.admin-grid .table td,
.admin-grid .table th {
    padding: var(--ik-space-4) var(--ik-space-5);
    font-size: var(--ik-text-base);
    vertical-align: middle;
}
.admin-grid .table .btn-sm {
    padding: var(--ik-space-2) var(--ik-space-4);
    font-size: var(--ik-text-sm);
}
.admin-grid .table td .d-flex {
    align-items: center;
}
.admin-grid .members-grid-head .members-grid-title-row th {
    font-weight: 700;
    font-size: var(--ik-text-xs);
    vertical-align: middle;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bs-table-bg);
}
.admin-grid .members-grid-head .members-grid-filter-row th {
    background: var(--ikapun-surface-soft);
    border-top: 0;
    vertical-align: top;
}
/* Compact variant: dense in-table filter rows are intentionally shorter
   than the canonical 44px field. Use min-height (not height) so it
   actually wins over the canonical min-height. */
.admin-grid .members-grid-filter-row .form-control,
.admin-grid .members-grid-filter-row .form-select {
    min-height: 32px;
    padding: var(--ik-space-2) var(--ik-space-4);
    font-size: var(--ik-text-sm);
    border-radius: var(--ik-radius-sm);
}
.admin-grid .members-sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--ik-space-3);
}
.admin-grid .members-sort-link:hover {
    text-decoration: underline;
}
.admin-grid .members-filter-toggle {
    background: transparent;
    border: 0;
    color: inherit;
    font-size: var(--ik-text-md);
    margin-left: var(--ik-space-4);
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}
.admin-grid .members-filter-toggle:hover {
    opacity: 0.7;
}
.admin-grid .table-responsive {
    max-height: 65vh;
    overflow-y: auto;
}
.status-brand-mark {
    font-weight: 900;
    font-size: var(--ik-text-md);
    color: rgba(255,255,255,0.98);
    letter-spacing: 0.3px;
    line-height: 1;
    white-space: nowrap;
}
.status-brand-link {
    text-decoration: none !important;
}

.status-brand-link:hover,
.status-brand-link:focus {
    color: rgba(255,255,255,0.98) !important;
    text-decoration: none !important;
}
.brand-dot {
    color: var(--ikapun-gold, var(--ikapun-gold));
    font-weight: 900;
}
.brand-system-name {
    opacity: 0.82;
    font-weight: 500;
    margin-left: var(--ik-space-1);
    color: rgba(255,255,255,0.82);
}
.navbar-brand-subtle {
    opacity: .9;
    font-weight: 800;
    font-size: var(--ik-text-md);
}
/* Session idle-timeout countdown (right cluster, immediately left of the
   "ikapun." wordmark). Kept compact so the countdown reads clearly; tabular-nums
   stops the value from jittering / the pill from changing width as digits tick.
   The pill has no background or border so it sits plain on the status bar. */
.system-status-bar .status-pill.session-timer-pill {
    align-self: center !important;
    line-height: 18px !important;
    min-height: 20px !important;
    padding: var(--ik-space-0) var(--ik-space-4)!important;
    gap: var(--ik-space-3);
    font-size: var(--ik-text-xs) !important;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.92) !important;
    border-radius: 999px !important;
}
.system-status-bar .status-pill.session-timer-pill .bi {
    font-size: var(--ik-text-xs);
    opacity: 0.8;
}
.system-status-bar .status-pill.session-timer-pill .session-timer-value {
    display: inline-block;
    min-width: 2.9rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.system-status-bar .status-pill.session-timer-pill.is-warning {
    background: rgba(212, 175, 55, 0.25) !important;
    border-color: rgba(212, 175, 55, 0.55) !important;
    color: var(--ikapun-warning-tint-alt) !important;
}
.system-status-bar .status-pill.session-timer-pill.is-danger {
    background: rgba(220, 53, 69, 0.3) !important;
    border-color: rgba(220, 53, 69, 0.6) !important;
    color: var(--ikapun-danger-tint) !important;
}
/* Manual session-lock button — a small icon-only companion to the timer
   pill. Plain like the timer, brightening on hover/focus; the disabled
   state (set while the lock modal is open) dims it. */
.system-status-bar .status-pill.session-lock-button {
    align-self: center !important;
    line-height: 1 !important;
    min-height: 20px !important;
    min-width: 24px !important;
    padding: var(--ik-space-0) var(--ik-space-4)!important;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.75) !important;
    border-radius: 999px !important;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.system-status-bar .status-pill.session-lock-button .bi {
    font-size: var(--ik-text-sm);
}
.system-status-bar .status-pill.session-lock-button:hover,
.system-status-bar .status-pill.session-lock-button:focus-visible {
    background: rgba(255, 255, 255, 0.16) !important;
    color: var(--ikapun-on-dark) !important;
    outline: none;
}
.system-status-bar .status-pill.session-lock-button:disabled {
    opacity: 0.4;
    cursor: default;
}
.app-alert {
    border: 0;
    border-radius: var(--ik-radius-lg);
    box-shadow: var(--ik-shadow-lg);
}
.alert-icon {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.08);
    flex: 0 0 auto;
}
button.is-loading {
    pointer-events: none;
}
/* ===== Display-consistent layout density ===== */
:root {
    --app-status-height: 32px;
    --app-navbar-height: 40px;
    --app-footer-height: 26px;
    --app-content-y: 1rem;
}

.system-status-bar {
    height: var(--app-status-height);
    min-height: var(--app-status-height);
    padding: var(--ik-space-0);
    display: flex;
    align-items: center;
}
/* The profile / org / branch menus live inside the status bar. On desktop the
   bar is position:fixed at z-index:1045, so its menus already paint above the
   navbar (1030). Below 768px the bar becomes position:static and loses that
   stacking context, while .navbar-fixed stays at 1030 — Bootstrap's default
   .dropdown-menu z-index:1000 then loses, and the menus render *behind* the
   navbar. Popper's strategy:'fixed' keeps them out of the horizontally
   scrolling row, but does not change stacking order, so lift just these
   menus above the navbar. */
.system-status-bar .dropdown-menu {
    z-index: 1050;
}
.system-status-bar .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
}
.system-status-bar .container-fluid > .d-flex {
    width: 100%;
    align-items: center;
    /* Stretch this row (and the nested row below) to the bar's FULL
       content height, rather than each auto-sizing to its own content and
       then being centered as a block within the level above -- that
       centering-of-a-shorter-box-within-a-taller-box is what was actually
       producing the persistent visible gap above .profile-switcher-toggle,
       not anything at .profile-switcher's own level. A margin-top nudge on
       the toggle itself (tried in v3.74.0) can only patch the SYMPTOM one
       level too low in the tree; this fixes the actual cause so
       .profile-switcher's align-self:flex-start (v3.73.0) finally has real
       vertical room to reach the true top of the bar. */
    align-self: stretch;
}
.system-status-bar .container-fluid > .d-flex > .d-flex {
    /* Both the left-hand row (profile pill + branch switcher) and the
       right-hand row (the "fedha." brand mark) are .d-flex children of the
       row above -- stretching both is harmless, since each still centers
       its own children via its own align-items:center; only
       .profile-switcher (which explicitly overrides to align-self:
       flex-start) actually changes position. */
    align-self: stretch;
}
.system-status-bar .status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: var(--ik-space-0) var(--ik-space-4);
    font-size: var(--ik-text-xs);
    line-height: var(--app-status-height);
    vertical-align: middle;
    /* Standardized to match the two dropdown-toggle pills (profile switcher
       / branch switcher, v3.73.0-v3.77.0): same slate fill, flush-to-top
       position, square top / reduced-curve bottom corners, no seam against
       the bar's top border. This rule (broader than .profile-switcher-
       toggle / .context-switcher-toggle) is what the OTHER, plain
       non-dropdown status pills in this bar fall back to -- the platform-
       admin "Operating in: <org>" pill, and the single-branch fallback
       pills shown to staff/members who can't switch branches. Without this,
       those three stayed on the old plain rgba(255,255,255,...) styling
       (still set below in the global, unscoped ".status-pill" rule) while
       the two dropdown pills had already moved to the new slate look --
       an inconsistent bar. The two dropdown-toggle buttons set their own
       MORE specific + !important rules elsewhere, so they're unaffected by
       this broader one; only the plain spans actually change here. */
    align-self: flex-start;
    background: var(--ikapun-slate) !important;
    border-color: var(--ikapun-slate) !important;
    color: var(--ikapun-navy-dark) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
    border-top: none !important;
    /* v3.87.0: Denys compared this bar's plain pills ("Operating in", "Head
       Office") against the profile pill and found them "not consistent" --
       pixel-sampled a real screenshot and confirmed background/border/
       radius/height are all byte-identical across every pill, so the
       mismatch wasn't color or shape. It was type weight: this rule never
       set font-weight, so plain pill text rendered at the browser default
       (400) unless a child <strong> bolded part of it -- giving "Operating
       in:" a thin prefix next to a bold org name (mixed weight in one
       pill), while "Head Office" (entirely wrapped in <strong>) came out
       fully bold. Neither matched .profile-switcher-toggle's 600. Setting
       600 here (and dropping the now-redundant <strong> wrappers in the
       markup) puts every plain pill's text at the same weight as the
       profile pill, closing the gap Denys was pointing at. */
    font-weight: 600;
}

/* ===== Context switcher (organization / branch) =====
   Replaces the old <select> + separate "Apply" button with a single
   dropdown pill: click to open, click an item to switch immediately.
   No native <select> means no clunky OS-level popup and no separate
   submit button; each item is its own submit button inside one shared
   <form>, so switching still works with JS fully disabled. */
/* Same "tab hanging off the top line" treatment as the profile pill
   (v3.73.0-v3.75.0): flush against the bar's top border, square top
   corners / reduced-curve bottom corners, no seam. Recolored from gold to
   slate (--ikapun-slate) to match the actual color sampled from Denys's AWS
   reference screenshot -- see the --ikapun-slate definition and comment.
   Kept as its own rule set (not merged with .profile-switcher-toggle)
   since the two pills differ in font-weight and have their own distinct
   caret icons, but the visual treatment itself now matches exactly. */
.context-switcher {
    align-self: flex-start;
    /* Display:flex + align-items:flex-start makes the toggle button a
       flex item whose top is pinned to this wrapper's flex-start (the
       status bar's content top), instead of sitting in the wrapper's
       block line box -- whose vertical placement of the inline-flex
       button varied with the inherited line-height, so the two dropdown
       pills landed 1px off the plain pills at some viewports (seen at
       iPhone 14 Pro 393px width: dropdown pills top 3px, plain pills
       top 4px). Same treatment as .profile-switcher below. */
    display: flex;
    align-items: flex-start;
}
/* v3.86.0: "Operating in: <org>" and "Exit to Platform" merged into one
   pill (previously two separate .status-pill elements grouped with a
   tight gap, v3.79.0-v3.85.0 -- see the old ".org-context-group" this
   replaced). The outer element already gets .status-pill's own
   align-self:flex-start/position/color treatment for free since it's a
   direct row child now (no wrapper div in between anymore), so this rule
   only needs to lay out ITS OWN children (icon, text, the exit form). */
.org-context-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--ik-space-3);
    /* Explicit min-height matching .profile-switcher-toggle's actual
       rendered height (31px, measured directly -- not the 32px
       --app-status-height variable, which caused a real, visible
       regression when tried directly on this pill previously: with
       the icon/label still overflowing at that point, forcing a
       slightly-too-small fixed height clipped/misaligned content
       instead of fixing it). Now that the icon and label below no
       longer inflate past their own intended size, this floor alone
       is enough to bring the pill's overall height in line with the
       buttons beside it, without needing overflow:hidden at all. */
    min-height: 31px;
    /* Real, confirmed root cause (measured directly on the live page,
       not guessed): the icon and the .context-switcher-label inside
       this pill each individually render taller than intended --
       the icon inherits this pill's own line-height as its line-box
       height (much taller than an icon glyph needs), and the label's
       vertical-align:middle on a nested inline-block further expands
       its own containing line box. Both get their own line-height:1
       reset directly (see the icon rule right below, and the label's
       own rule further down) rather than resetting it here on the
       pill itself -- this pill's OWN line-height needs to stay at
       the inherited, taller var(--app-status-height) value, since
       that's what makes its overall rendered height match the
       buttons beside it in the first place. This pill can't become a
       <button> itself like the other two static pills did -- it
       contains a nested <form> for the exit action, and buttons
       cannot contain forms. */
    /* Comprehensive pass: .org-select-pill, .org-context-pill, and
       .status-pill.branch-fallback-pill are the three "static" pills
       (no dropdown) that should all look exactly like
       .profile-switcher-toggle -- same slate/navy fill, same corner
       shape, same vertical position via align-self:flex-start. Only
       branch-fallback-pill had gotten this treatment so far; this
       rule and .org-select-pill below were still on the plain,
       semi-transparent base .status-pill look and align-items:center
       positioning, never updated when the others were. */
    align-self: flex-start;
    background: var(--ikapun-slate) !important;
    border-color: var(--ikapun-slate) !important;
    color: var(--ikapun-navy-dark) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
    margin-top: var(--ik-space-0);
}
.org-context-pill > .bi {
    line-height: 1;
}
.org-context-pill .context-switcher-label {
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    /* vertical-align:middle on a nested inline-block can expand its
       containing line box taller than line-height alone would
       dictate -- confirmed by direct measurement: the outer <span>
       wrapping this measured ~1.36px taller than the pill's intended
       height, matching this exactly. line-height:1 here keeps this
       label's own box from contributing extra height to that
       calculation. */
    line-height: 1;
}
.org-select-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--ik-space-3);
    /* Same comprehensive match as .org-context-pill above -- see that
       rule's comment. Now converted from <a> to a real <button>
       (matching .profile-switcher-toggle's element type exactly,
       after everything else -- align-self, colors, radius, even an
       explicit height cap -- failed to fully resolve inconsistent
       rendering against these non-button elements), so it needs the
       same iOS/native-chrome reset those buttons already have. */
    align-self: flex-start;
    -webkit-appearance: none;
    appearance: none;
    margin: var(--ik-space-0);
    box-sizing: border-box;
    font-family: inherit;
    background: var(--ikapun-slate) !important;
    border-color: var(--ikapun-slate) !important;
    color: var(--ikapun-navy-dark) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
    /* Explicit here rather than relying on the shared base
       .system-status-bar .status-pill rule providing it: all four
       pill-style buttons now use this exact same mechanism -- each
       declares border-top:none directly on its own dedicated rule --
       rather than some inheriting it and others needing their own
copy, for one consistent, predictable pattern across all of
        them regardless of cascade order between rules. */
    border-top: none !important;
    margin-top: var(--ik-space-0);
}

.status-pill.branch-fallback-pill {
    /* !important added after a real computed-style diff (not a
       guess) showed this rendering as display:flex on the live page
       despite this rule saying inline-flex -- something else (likely
       real Bootstrap CSS this sandbox can't load and inspect
       directly) was winning the cascade. Forcing it removes that
       ambiguity regardless of what the actual competing rule is. */
    display: inline-flex !important;
    align-items: center;
    gap: var(--ik-space-3);
    /* Also confirmed differing in the same real diff: profile has
       min-width:0, this had min-width:auto (the flex-item default).
       Matching it explicitly rather than leaving it to whatever
       default applies. */
    min-width: 0;
    /* align-self now lives on .branch-fallback-wrapper below, matching
       the exact DOM structure .profile-switcher-toggle and
       .context-switcher-toggle use (a wrapping div carries
       align-self:flex-start, not the button itself) -- confirmed by
       a real screenshot that align-self directly on this button,
       with no wrapper, was still rendering with a visibly different
       top gap than the wrapped buttons beside it, despite identical
       CSS property values otherwise. */
    /* Now converted from <span> to a real <button> (matching
       .profile-switcher-toggle's element type exactly), so it needs
       the same iOS/native-chrome reset those buttons already have. */
    -webkit-appearance: none;
    appearance: none;
    margin: var(--ik-space-0);
    box-sizing: border-box;
    font-family: inherit;
    /* This is the SAME branch pill as .context-switcher-toggle above --
       just the read-only version shown to staff who have exactly one
       branch and therefore no dropdown to switch between. It was never
       given that pill's slate/navy treatment, only inheriting the
       plain, semi-transparent base .status-pill look instead -- so a
       Branch Manager (this pill) and a Super Admin (the dropdown one)
       saw two visibly different-looking pills for conceptually the
       same piece of status-bar information. Matched exactly, colors
       and corner shape both, so the pill looks identical regardless
       of which underlying markup renders it. */
    background: var(--ikapun-slate) !important;
    border-color: var(--ikapun-slate) !important;
    color: var(--ikapun-navy-dark) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
    /* Explicit here rather than relying on the shared base
       .system-status-bar .status-pill rule providing it -- same
       consistent mechanism as the other three pill-style buttons,
       see .org-select-pill's comment above for the full reasoning. */
    border-top: none !important;
}
.status-pill.branch-fallback-pill .context-switcher-label {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
/* The exit button's <form> is the actual flex item inside the pill (forms
   aren't display:contents by default), so it needs to participate in the
   inline-flex row itself rather than sit as an inert block. The left
   border acts as a subtle divider between the org text and the exit
   action -- navy-ish at low opacity so it reads against the slate pill
   background (a light rgba, by contrast, would barely show against a
   background this light). */
.org-context-exit-form {
    display: inline-flex;
    align-items: center;
    margin: var(--ik-space-0);
    margin-left: var(--ik-space-4);
    padding-left: var(--ik-space-4);
    border-left: 1px solid rgba(7, 20, 42, 0.3);
}
/* Icon-only, no button chrome of its own -- reads as an action living
   inside the pill, not a second pill glued on. Inherits the pill's own
   navy-dark text color via `color: inherit` so it matches "Operating in"
   text exactly; opacity dims it slightly at rest and brightens on
   hover/focus as the only affordance that it's clickable (no border/
   background change, to stay minimal inside an already-small pill). */
.org-context-exit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: var(--ik-space-0);
    color: inherit;
    font-size: var(--ik-text-sm);
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}
.org-context-exit-btn:hover,
.org-context-exit-btn:focus {
    opacity: 1;
}
.context-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--ik-space-3);
    min-height: 20px;
    padding: var(--ik-space-0) var(--ik-space-4);
    font-size: var(--ik-text-xs);
    font-weight: 600;
    line-height: var(--app-status-height);
    /* Same iOS Safari native-button-chrome reset as .profile-switcher-
       toggle above -- this is also a <button>, so it's equally exposed
       even though only the profile pill was reported so far. */
    -webkit-appearance: none;
    appearance: none;
    margin: var(--ik-space-0);
    /* Align with the plain status pills (flex-start + margin-top:.5px) so
       this dropdown pill lands at the same 3.5px as everything else at every
       viewport -- the wrapper above no longer lets its line box shift the
       button (see .context-switcher). */
    margin-top: var(--ik-space-0);
    box-sizing: border-box;
    /* Same font-inheritance follow-up as .profile-switcher-toggle --
       see that rule's comment for the full reasoning. font-size,
       font-weight, and line-height are all part of the `font`
       shorthand's sub-properties and were already explicitly set
       above (0.76rem / 600 / var(--app-status-height)) -- font:
       inherit resets all of them to the parent's values unless
       re-declared after it, which they are here, deliberately. */
    font: inherit;
    font-size: var(--ik-text-xs);
    font-weight: 600;
    line-height: var(--app-status-height);
    background: var(--ikapun-slate) !important;
    border-color: var(--ikapun-slate) !important;
    color: var(--ikapun-navy-dark) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
    border-top: none !important;
}
.context-switcher-toggle:hover,
.context-switcher-toggle:focus {
    background: var(--ikapun-slate-dark) !important;
    border-color: var(--ikapun-slate-dark) !important;
    color: var(--ikapun-navy-dark) !important;
}
/* No sizing rule existed for this label at all before -- a long branch
   name (short_name + full name) could stretch the pill arbitrarily wide,
   pushing the rest of the status bar row around. Capped and ellipsized so
   the pill itself stays a fixed, predictable size; the full name is still
   available via the dropdown list and the title attribute added in the
   markup. */
.context-switcher-label {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.context-switcher-toggle .context-switcher-caret {
    font-size: var(--ik-text-xs);
    opacity: 0.85;
    color: var(--ikapun-navy-dark);
    transition: transform 0.15s ease;
}
.context-switcher-toggle[aria-expanded="true"] .context-switcher-caret {
    transform: rotate(180deg);
}
.context-switcher-toggle.is-switching {
    opacity: 0.72;
    pointer-events: none;
}
.dropdown-menu.context-switcher-menu {
    /* Selector was just ".context-switcher-menu" through v3.81.0 -- a
       single-class selector, specificity 0,1,0, exactly TIED with the
       later, more general ".dropdown-menu { background-color: ...
       !important }" theme rule further down this file. Equal specificity
       means the later rule in source order wins the tie, so this panel was
       silently losing its glass background/border to that plain white
       theme rule the whole time -- the actual bug behind "the branch
       switcher is not conforming". ".dropdown-menu.profile-menu" already
       used the double-class trick to avoid this exact issue (see its own
       comment above); this panel just never got the same fix. Markup
       already carries both classes (`class="dropdown-menu
       context-switcher-menu p-0"`), so only the selector needed to change. */
    min-width: 250px;
    max-width: 320px;
    padding: var(--ik-space-0);
    /* Same shape conformance as .dropdown-menu.profile-menu above: square
       top corners flush against the pill, reduced-curve (4px) bottom
       corners instead of the previous uniform 10px, a slate border, and
       margin-top:0 to close the gap against the toggle. Background is now
       the SAME glass surface as the profile menu (--ikapun-glass-navy +
       blur) rather than the previous plain white/light dropdown -- per
       Denys's explicit "unify the colors too", this was a light panel next
       to a dark one, which "conform" alone (v3.80.0, frame-only) didn't
       address. Every child rule below (search input, list rows, empty
       state) is inverted to light-on-dark to stay readable against this
       new background -- none of that inversion was needed before. */
    border: 1px solid var(--ikapun-slate) !important;
    background: var(--ikapun-glass-navy) !important;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-top: var(--ik-space-0)!important;
    box-shadow: var(--ik-shadow-lg);
    overflow: hidden;
    backdrop-filter: blur(var(--ikapun-glass-blur));
    -webkit-backdrop-filter: blur(var(--ikapun-glass-blur));
}
.context-switcher-search-wrap {
    padding: var(--ik-space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.context-switcher-search {
    /* Bootstrap's .form-control defaults to a white fill + dark text +
       gray border -- invisible/wrong on the new dark glass panel. Kept
       genuinely transparent (not a solid fill) so it still reads as part
       of the glass surface rather than a separate light box glued onto a
       dark one. */
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}
.context-switcher-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.context-switcher-search:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--ikapun-slate) !important;
    box-shadow: 0 0 0 0.15rem rgba(127, 137, 151, 0.35) !important;
}
.context-switcher-list {
    max-height: 320px;
    overflow-y: auto;
    padding: var(--ik-space-2) var(--ik-space-0);
}
/* Selector upgraded to ".dropdown-item.context-switcher-item" (double
   class, specificity 0,2,0) in v3.84.0 -- this is the SAME bug already
   found and fixed on the panel itself in v3.82.0 (.context-switcher-menu
   vs the generic .dropdown-menu rule), just missed here on the item text
   color. There's a real, generic ".dropdown-item { color: var(--ikapun-text)
   }" rule much further down this file (single class, specificity 0,1,0 --
   tied with the old ".context-switcher-item" selector), and since it comes
   LATER in source order, it was winning the tie and silently forcing every
   non-current branch row back to dark theme text on the dark glass panel --
   confirmed from Denys's screenshot ("CENSOS -- Soroti...") showing barely
   legible, washed-out text even after the v3.83.0 background-opacity fix,
   which could never have fixed this since the real defect was the text
   color losing, not the background being too light. Going double-class
   here wins on specificity alone, independent of source order, so this
   can't silently regress again if the file gets reordered. Markup already
   carries both classes (`class="dropdown-item context-switcher-item..."`).*/
.dropdown-item.context-switcher-item {
    display: flex;
    align-items: center;
    gap: var(--ik-space-4);
    width: 100%;
    text-align: left;
    font-size: var(--ik-text-base);
    padding: var(--ik-space-4) var(--ik-space-5);
    color: rgba(255, 255, 255, 0.92);
    background: transparent;
}
/* Same tie, same fix, for the hover/focus state: the generic
   ".dropdown-item:hover, .dropdown-item:focus" rule (specificity 0,2,0,
   also later in source) was overriding this subtle light-overlay hover
   with its own solid gold-soft background + navy text -- which happens to
   use the exact same --ikapun-gold-soft/--ikapun-navy pair as
   ".is-current" below, so a merely-HOVERED row rendered visually
   IDENTICAL to the actually-selected row (see "CENTOS" in Denys's
   screenshot: gold highlight, no checkmark -- just hovered, not current).
   ".dropdown-item.context-switcher-item:hover" is specificity 0,3,0,
   strictly higher than the generic rule's 0,2,0 -- wins outright, not just
   by source order. */
.dropdown-item.context-switcher-item:hover,
.dropdown-item.context-switcher-item:focus {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ikapun-on-dark);
}
.context-switcher-item i.bi {
    font-size: var(--ik-text-base);
    opacity: 0.65;
    width: 1rem;
    text-align: center;
    flex: 0 0 auto;
}
/* Same flex-shrink problem .profile-menu-stat-value used to have (fixed
   there in v3.84.0 by switching to a stacked layout instead -- see that
   rule's comment) applies here too, on the other panel: .context-switcher-
   item is itself a flex row (icon + label span +
   optional check icon), and a plain <span> defaults to min-width:auto, so
   a long "<short_name> — <full branch name>" combo never truncated -- it
   either overflowed past the check icon or got hard-clipped by
   .dropdown-menu.context-switcher-menu's overflow:hidden with no "…".
   Targets .context-switcher-item-label (added in the markup) rather than a
   bare "span" so it doesn't accidentally catch the spinner span swapped in
   during a branch switch (see .context-switcher-spinner below). */
.context-switcher-item-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}
/* Deliberately NOT ".active" -- that class name collides with
   Bootstrap's own .dropdown-item.active (white text on a blue
   background by default via --bs-dropdown-link-active-color/-bg), and
   since this rule never set `color`, Bootstrap's white text won that
   property while our own background override won -- white text on a
   pale gold background, unreadable. ".is-current" avoids the collision
   outright and sets both properties explicitly.
   v3.85.0: dropped the solid gold-soft fill block -- Denys's read on it
   was "too noisy" once the panel itself became a dark glass surface (a
   bright solid card floating inside a translucent dark list draws more
   attention than a "you are here" marker needs to). Kept transparent like
   every other row and marked instead with gold text + bold weight, same
   as the checkmark already used -- one consistent accent color instead of
   a whole highlighted block. Hover still gets the shared subtle light
   overlay (same as non-current rows) so this row doesn't go fully inert
   on hover, just keeps its gold text instead of switching to white. */
.dropdown-item.context-switcher-item.is-current {
    background: transparent;
    color: var(--ikapun-gold, var(--ikapun-gold));
    font-weight: 700;
}
.dropdown-item.context-switcher-item.is-current:hover,
.dropdown-item.context-switcher-item.is-current:focus {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ikapun-gold, var(--ikapun-gold));
}
.context-switcher-item .bi-check2 {
    margin-left: auto;
    opacity: 1;
    color: var(--ikapun-gold, var(--ikapun-gold));
}
.context-switcher-empty {
    display: none;
    padding: var(--ik-space-4) var(--ik-space-5);
    font-size: var(--ik-text-sm);
    color: rgba(255, 255, 255, 0.6);
}
@keyframes context-switcher-spin {
    to { transform: rotate(360deg); }
}
.context-switcher-spinner {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--ikapun-on-dark);
    border-radius: 50%;
    animation: context-switcher-spin 0.6s linear infinite;
    vertical-align: middle;
}

/* ===== Profile panel (flat, minimal pill — per Denys's reference
   screenshot of a plain dark "name (detail) ▼" pill) =====
   Replaces the earlier AWS-console-card version: no avatar circle, no
   boxed stat rows, no pill-shaped action buttons — just a plain dark
   pill trigger and a flat, borderless dropdown underneath, in the same
   fedha navy/gold theme. Kept on the LEFT where the pill already lived. */
/* The username/role trigger reads as a tab hanging off the gold top
   border, not a free-floating pill in the middle of the bar: pulled to
   the top of the status-bar row (align-self, overriding the row's own
   align-items:center) so its top edge sits flush against the gold line
   with square top corners (no gap, no rounding to break the join), gold
   fill so it visually continues the same gold surface, and rounded
   bottom corners so it still reads as a distinct dropdown tab hanging
   down from that bar. Per Denys's explicit answer: BOTH position (flush
   against the line) AND color (gold fill matching the line) together. */
.profile-switcher {
    align-self: flex-start;
    /* Display:flex + align-items:flex-start (same as .context-switcher)
       pins the toggle button to this wrapper's flex-start rather than
       letting the wrapper's block line box place it, which varied with
       inherited line-height (dropdown pills sat 1px off the plain pills
       at iPhone 14 Pro width). */
    display: flex;
    align-items: flex-start;
}
.branch-fallback-wrapper {
    /* Same role as .profile-switcher above -- a wrapping div carrying
       align-self:flex-start, matching the working pills' exact DOM
       structure instead of applying align-self directly to the
       button, which measured differently despite identical CSS. */
    align-self: flex-start;
    display: inline-flex;
    margin-top: var(--ik-space-0);
}
.profile-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--ik-space-3);
    font-weight: 600;
    /* iOS Safari renders <button> elements with native platform chrome
       (including its own intrinsic height/padding) unless explicitly
       stripped -- min-height/padding alone on .status-pill (below,
       inherited by this button too) only set a floor, not a ceiling,
       so native button chrome can still push this taller than the
       plain <span>/<div> pills beside it, which have no such native
       styling to fight in the first place. Not reproducible in this
       sandbox (Chromium only, no real iOS Safari available to test
       against directly) -- applied because it's the well-established,
       safe fix for exactly this class of button-vs-span mismatch,
       reported as the profile pill covering the full status bar
       height on a real iPhone. */
    -webkit-appearance: none;
    appearance: none;
    margin: var(--ik-space-0);
    /* Align with the plain status pills (flex-start + margin-top:.5px) so
       this dropdown pill lands at the same 3.5px as everything else at every
       viewport -- the wrapper above no longer lets its line box shift the
       button (see .profile-switcher). */
    margin-top: var(--ik-space-0);
    box-sizing: border-box;
    /* Follow-up to the fix above, after a real iPhone screenshot still
       showed this pill visibly taller than its neighbors even with
       appearance:none applied: buttons default to the OS's own system
       UI font (not the page's) unless explicitly told otherwise --
       appearance:none strips native visual chrome (border/background)
       but does not, by itself, reset font inheritance, so a
       system-font line-height could still be pushing this taller.
       font: inherit is the standard, established second half of a
       CSS button reset alongside appearance:none (see e.g.
       normalize.css's own button reset), which this was missing.
       Still not directly reproducible in this sandbox (Chromium only) --
       applied because it's a well-known, low-risk gap in the earlier
       fix, not a new guess. font-weight was already explicitly set
       above (600) -- font: inherit resets it to the parent's value
       unless re-declared after it, which it is here, deliberately. */
    font: inherit;
    font-weight: 600;
    /* Recolored from gold to slate (--ikapun-slate, var(--ikapun-slate)) -- sampled
       directly from Denys's AWS reference screenshot, which is NOT gold at
       all, per his explicit "make the pills and gold line the same color
       as the amazon one". Text switched from navy to navy-dark, closer to
       the near-black text color actually sampled from the reference. */
    background: var(--ikapun-slate) !important;
    border-color: var(--ikapun-slate) !important;
    color: var(--ikapun-navy-dark) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    /* Reduced from the previous version's default (Bootstrap's ~6px .btn
       radius on the bottom corners, which read as too curvy at this small
       height) down to a much subtler curve -- still a distinct tab shape,
       not a sharp rectangle, per "reduce the curve at the edges". */
    border-bottom-left-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
    /* No border on the toggle's own top edge -- with one, the fill still
       touches the bar's top border, but a redundant 1px top border on the
       pill sitting just below the bar's 3px top border reads as two
       separate lines with a seam between them rather than one continuous
       surface. Dropping just the top border (sides/bottom stay colored via
       border-color above) removes that seam. Gap-closing itself is handled
       by the flex chain above (.container-fluid > .d-flex > .d-flex)
       stretching to the bar's full height (v3.75.0), giving
       .profile-switcher's align-self:flex-start (v3.73.0) real room to
       reach the true top -- no margin hack needed. */
    border-top: none !important;
}
.profile-switcher-toggle:hover,
.profile-switcher-toggle:focus {
    background: var(--ikapun-slate-dark) !important;
    border-color: var(--ikapun-slate-dark) !important;
    color: var(--ikapun-navy-dark) !important;
}
.profile-switcher-toggle .profile-switcher-caret {
    font-size: var(--ik-text-xs);
    opacity: 0.85;
    color: var(--ikapun-navy-dark);
    /* Matches .context-switcher-caret below. Without these the profile
       pill's arrow stayed pointing down while its menu was open, while
       the branch pill beside it flipped — two identical-looking controls
       behaving differently. Bootstrap already maintains aria-expanded on
       the button, so no JS is involved. */
    transition: transform 0.15s ease;
}
.profile-switcher-toggle[aria-expanded="true"] .profile-switcher-caret {
    transform: rotate(180deg);
}
/* Bootstrap auto-adds its own ::after caret to every .dropdown-toggle --
   on top of our own <i class="bi bi-caret-down-fill"> icon, that rendered
   as two carets side by side in production (invisible in this session's
   offline preview harness, since Bootstrap's real CSS wasn't reachable
   there -- only caught once Denys shared a real screenshot). Suppressed
   here, scoped to just these two toggles, NOT globally -- the Reports/
   Admin nav dropdowns elsewhere on this page still need Bootstrap's
   default caret, since they have no custom icon of their own. */
.profile-switcher-toggle.dropdown-toggle::after,
.context-switcher-toggle.dropdown-toggle::after {
    display: none;
}
/* Selector written as ".dropdown-menu.profile-menu" (specificity 0,2,0),
   not just ".profile-menu" -- a later, more general
   ".dropdown-menu { background-color: ... !important }" rule (theme
   block, further down this file) is also !important, and with equal
   specificity the later rule in source order wins, which would force
   this panel back to white and leave the white-on-navy text below the
   header unreadable. The extra ".dropdown-menu" in the selector (this
   element already has both classes) outranks it regardless of order. */
.dropdown-menu.profile-menu {
    min-width: 240px;
    max-width: 300px;
    padding: var(--ik-space-3) var(--ik-space-0);
    /* Conforms to the same shape language as the pill it opens from
       (v3.73.0-v3.79.0): square top corners (flush continuation of the
       flush/square-top pill above, no rounded gap breaking the join),
       reduced-curve bottom corners (4px, same family as the pills' 3px,
       just slightly larger for this bigger surface), border recolored
       from a generic white-ish rgba to the slate theme color so the panel
       reads as part of the same system, and margin-top:0 to close the
       Bootstrap-default gap between toggle and menu -- attaches directly
       under the pill instead of floating with a visible seam. */
    border: 1px solid var(--ikapun-slate);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-top: var(--ik-space-0)!important;
    overflow: hidden;
    box-shadow: var(--ik-shadow-md);
    /* Glass panel, per Denys's "unify the colors too / transparent glass
       panels?" -- translucent navy + blur instead of the previous solid
       fill, using the same --ikapun-glass-navy/--ikapun-glass-blur values as
       .context-switcher-menu below so both panels genuinely share one
       color, not just a similar one. Selector specificity note from
       before still applies -- keeps !important and the ".dropdown-menu
       .profile-menu" double-class selector to beat the later, more general
       ".dropdown-menu { background-color: ... !important }" theme rule. */
    background: var(--ikapun-glass-navy) !important;
    backdrop-filter: blur(var(--ikapun-glass-blur));
    -webkit-backdrop-filter: blur(var(--ikapun-glass-blur));
}
.profile-menu-header {
    padding: var(--ik-space-4) var(--ik-space-6) var(--ik-space-3);
}
.profile-menu-name {
    color: var(--ikapun-on-dark);
    font-size: var(--ik-text-sm);
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-menu-role {
    color: rgba(255, 255, 255, 0.55);
    font-size: var(--ik-text-xs);
    font-weight: 600;
}
.profile-menu-stats {
    padding: var(--ik-space-3) var(--ik-space-6) var(--ik-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--ik-space-2);
}
/* Restructured from a single-line side-by-side row (label ... value,
   right-aligned, forced onto one line via white-space:nowrap +
   text-overflow:ellipsis) to a stacked label-above-value layout in
   v3.84.0. The side-by-side version is what was truncating "Centenary Bank
   Staff Savings Scheme" down to "Centenary Bank Staff Savings S..." --
   that ellipsis WAS working correctly (v3.82.0 fixed the flex-shrink bug
   that stopped it from firing at all), but squeezing a long value into
   the leftover space next to a label, on a ~300px-wide panel, meant most
   of any real organization/branch name got cut off regardless. Per
   Denys's "fix ... even the truncation of the text", the actual fix is to
   stop needing to truncate in the common case: label on its own line,
   value on the line below at full panel width, wrapping instead of
   clipping if a value is still unusually long. */
.profile-menu-stat {
    display: flex;
    flex-direction: column;
    gap: var(--ik-space-0);
}
.profile-menu-stat-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: var(--ik-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.profile-menu-stat-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--ik-text-xs);
    font-weight: 600;
    text-align: left;
    overflow-wrap: break-word;
    word-break: break-word;
}
.profile-menu-links {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--ik-space-2) var(--ik-space-0);
}
.profile-menu-link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: var(--ik-space-4);
    padding: var(--ik-space-3) var(--ik-space-6);
    font-size: var(--ik-text-sm);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    background: transparent;
    border: none;
    text-align: left;
}
.profile-menu-link:hover,
.profile-menu-link:focus {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ikapun-on-dark);
}
.profile-menu-link i.bi {
    font-size: var(--ik-text-sm);
    opacity: 0.7;
    width: 1rem;
    text-align: center;
}
.profile-menu-logout-form {
    margin: var(--ik-space-0);
}
.profile-menu-logout-link:hover,
.profile-menu-logout-link:focus {
    color: var(--ikapun-gold, var(--ikapun-gold));
}

/* Notifications (bell) — same wrapper/toggle treatment as the other
   status pills so it sits inline with them at the same height, with an
   unread-count badge on top of the icon and a glass dropdown panel
   matching .profile-menu/.context-switcher-menu. */
.notifications-switcher {
    align-self: flex-start;
    display: flex;
    align-items: flex-start;
}
.notifications-switcher-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ik-space-3);
    padding: var(--ik-space-0) var(--ik-space-4);
    -webkit-appearance: none;
    appearance: none;
    margin: var(--ik-space-0);
    margin-top: var(--ik-space-0);
    box-sizing: border-box;
    font: inherit;
    font-size: var(--ik-text-xs);
    font-weight: 600;
    line-height: var(--app-status-height);
    position: relative;
    /* The bi-bell icon alone is a few px short of the others' text height;
       nudge it so the pill still reads as vertically centered. */
}
.notifications-switcher-toggle .bi-bell {
    font-size: var(--ik-text-sm);
}
@media (max-width: 767.98px) {
    .notifications-switcher-toggle .bi-bell {
        font-size: var(--ik-text-base);
    }
}
.notification-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 15px;
    height: 15px;
    padding: var(--ik-space-0) var(--ik-space-1);
    border-radius: var(--ik-radius-sm);
    background: var(--ikapun-danger);
    color: var(--ikapun-on-dark);
    font-size: var(--ik-text-xs);
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    box-shadow: 0 0 0 1.5px var(--ikapun-navy, var(--ikapun-slate-2));
}
.dropdown-menu.notifications-menu {
    border: 1px solid var(--ikapun-slate);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-top: var(--ik-space-0)!important;
    overflow: hidden;
    box-shadow: var(--ik-shadow-md);
    background: var(--ikapun-glass-navy) !important;
    backdrop-filter: blur(var(--ikapun-glass-blur));
    -webkit-backdrop-filter: blur(var(--ikapun-glass-blur));
    min-width: 320px;
    max-width: 360px;
    color: var(--ikapun-on-dark);
}
.notification-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ik-space-4);
    padding: var(--ik-space-4) var(--ik-space-6) var(--ik-space-4);
    font-size: var(--ik-text-sm);
    font-weight: 700;
    color: var(--ikapun-on-dark);
}
.notification-mark-all {
    background: transparent;
    border: none;
    padding: var(--ik-space-0);
    font-size: var(--ik-text-xs);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}
.notification-mark-all:hover:not(:disabled),
.notification-mark-all:focus:not(:disabled) {
    color: var(--ikapun-gold, var(--ikapun-gold));
}
.notification-mark-all:disabled {
    cursor: default;
    opacity: 0.4;
}
.notification-menu-list {
    max-height: 340px;
    overflow-y: auto;
}
.notification-item {
    display: flex;
    gap: var(--ik-space-4);
    padding: var(--ik-space-4) var(--ik-space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
}
.notification-item:hover,
.notification-item:focus {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ikapun-on-dark);
}
.notification-item.unread {
    background: rgba(212, 175, 55, 0.08);
    border-left: 2px solid var(--ikapun-gold, var(--ikapun-gold));
}
.notification-item-icon {
    flex: 0 0 auto;
    padding-top: var(--ik-space-0);
    font-size: var(--ik-text-base);
    opacity: 0.85;
}
.notification-item-body {
    min-width: 0;
}
.notification-item-title {
    font-size: var(--ik-text-sm);
    font-weight: 700;
    color: var(--ikapun-on-dark);
    line-height: 1.25;
}
.notification-item-title .unread-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: var(--ik-space-3);
    border-radius: 50%;
    background: var(--ikapun-gold, var(--ikapun-gold));
    vertical-align: 1px;
}
.notification-item-text {
    font-size: var(--ik-text-xs);
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.75);
    margin: var(--ik-space-1) var(--ik-space-0) var(--ik-space-2);
}
.notification-item-time {
    font-size: var(--ik-text-xs);
    color: rgba(255, 255, 255, 0.45);
}
.notification-menu-empty {
    padding: var(--ik-space-6);
    font-size: var(--ik-text-xs);
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}
.notification-menu-footer {
    display: block;
    text-align: center;
    padding: var(--ik-space-4) var(--ik-space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--ik-text-xs);
    font-weight: 700;
    color: var(--ikapun-gold, var(--ikapun-gold));
    text-decoration: none;
}
.notification-menu-footer:hover,
.notification-menu-footer:focus {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ikapun-gold, var(--ikapun-gold));
}

/* Notifications page: list of alert rows. */
.notification-page-list {
    display: flex;
    flex-direction: column;
}
.notification-page-item {
    display: flex;
    gap: var(--ik-space-5);
    padding: var(--ik-space-5) var(--ik-space-0);
    border-bottom: 1px solid rgba(7, 20, 42, 0.08);
}
.notification-page-item.has-link {
    cursor: pointer;
}
.notification-page-item.has-link:hover {
    background: rgba(7, 20, 42, 0.03);
}
.notification-page-item:last-child {
    border-bottom: 0;
}
.notification-page-item.unread .notification-page-title {
    color: var(--ikapun-navy, var(--ikapun-slate-2));
}
.notification-page-icon {
    flex: 0 0 auto;
    font-size: var(--ik-text-md);
    color: var(--ikapun-slate, var(--ikapun-muted));
    padding-top: var(--ik-space-1);
}
.notification-page-item.unread .notification-page-icon {
    color: var(--ikapun-gold, var(--ikapun-gold));
}
.notification-page-body {
    flex: 1 1 auto;
    min-width: 0;
}
.notification-page-title {
    font-size: var(--ik-text-base);
    font-weight: 700;
    color: rgba(7, 20, 42, 0.6);
}
.notification-page-text {
    font-size: var(--ik-text-sm);
    color: var(--ikapun-text-secondary);
    margin-top: var(--ik-space-1);
}
.notification-page-ref {
    font-size: var(--ik-text-xs);
    color: var(--ikapun-muted);
    margin-top: var(--ik-space-2);
}
.notification-page-link {
    color: var(--ikapun-gold, var(--ikapun-gold));
    font-weight: 600;
    text-decoration: none;
}
.notification-page-link:hover {
    text-decoration: underline;
}
.notification-page-time {
    font-size: var(--ik-text-xs);
    color: var(--ikapun-slate-7);
    margin-top: var(--ik-space-2);
}
.notification-page-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    gap: var(--ik-space-3);
}

/* Compact navbar to match tight footer */
.navbar-fixed {
    height: var(--app-navbar-height);
    min-height: var(--app-navbar-height);
    padding-top: var(--ik-space-0);
    padding-bottom: var(--ik-space-0);
    margin-bottom: var(--ik-space-0);
    border-bottom: 0;
}
.navbar-fixed .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
}
.navbar-fixed .navbar-collapse {
    height: 100%;
    align-items: center;
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
}
.navbar-fixed .navbar-nav {
    height: 100%;
    align-items: center;
}
.navbar-fixed .nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding-top: var(--ik-space-0);
    padding-bottom: var(--ik-space-0);
    font-size: var(--ik-text-sm);
    font-weight: 600;
    line-height: 1;
}
.navbar-fixed .dropdown-menu {
    font-size: var(--ik-text-sm);
}
.navbar-fixed .dropdown-item {
    padding-top: var(--ik-space-3);
    padding-bottom: var(--ik-space-3);
}
.navbar-fixed .dropdown-header {
    font-size: var(--ik-text-xs);
    padding-top: var(--ik-space-3);
    padding-bottom: var(--ik-space-2);
}
.navbar-fixed .btn-sm,
.navbar-fixed .form-select-sm {
    min-height: 28px;
    height: 28px;
    padding-top: var(--ik-space-1);
    padding-bottom: var(--ik-space-1);
    font-size: var(--ik-text-xs);
    line-height: 1;
}
.navbar-fixed .navbar-brand {
    display: flex;
    align-items: center;
    height: 100%;
    padding-top: var(--ik-space-0);
    padding-bottom: var(--ik-space-0);
    font-size: var(--ik-text-md);
    line-height: 1;
}
.navbar-fixed .navbar-toggler {
    /* Plain icon, not a pill. The nav cluster owns the auto margin so the
       burger sits at the far right with the timer directly beside it. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: var(--ik-space-4);
    padding: var(--ik-space-2) var(--ik-space-1);
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--ikapun-navy) !important;
    font-size: var(--ik-text-base);
}
.navbar-fixed .navbar-toggler:hover,
.navbar-fixed .navbar-toggler:focus-visible {
    border: 0 !important;
    background: transparent !important;
}
.navbar-fixed .navbar-toggler:focus-visible .navbar-toggler-icon {
    opacity: 0.7;
}
.nav-account-area {
    height: 100%;
    flex: 1 1 auto;
    min-width: 0;
}
.nav-account-area form {
    margin-bottom: var(--ik-space-0);
}

.main-content {
    top: calc(var(--app-status-height) + var(--app-navbar-height) - 1px);
    bottom: var(--app-footer-height);
    padding-top: var(--ik-space-0);
    padding-bottom: var(--app-content-y);
}

.main-content.no-navbar {
    top: var(--app-status-height);
}

/* Constrain offcanvas drawers to the content area between navbar and footer. */
.offcanvas {
  top: calc(var(--app-status-height) + var(--app-navbar-height));
  bottom: var(--app-footer-height);
  height: auto;
  max-height: calc(100vh - var(--app-status-height) - var(--app-navbar-height) - var(--app-footer-height));
  opacity: 0;
  transition: opacity 0.15s ease;
}
/* Bootstrap's .offcanvas.offcanvas-end rule (two classes) sets top: 0 and
   out-specifies the .offcanvas rule above, so end drawers started underneath
   the status bar/navbar while max-height stopped them short of the footer.
   Restate the top offset at matching specificity. */
.offcanvas.offcanvas-end {
  top: calc(var(--app-status-height) + var(--app-navbar-height));
}
/* User editor side drawer (admin/access.html). Kept in CSS rather than an
   inline style attribute because style-src-attr is 'none'. Two classes so
   it also out-specifies Bootstrap's .offcanvas.offcanvas-end width. */
.offcanvas.user-edit-drawer {
  width: min(720px, 100vw);
}
/* Default: fill the available height (fit in place), body scrolls. */
.offcanvas .offcanvas-body {
  overflow-y: auto;
}
/* Float variant: size to content, scroll only when needed. */
.offcanvas-float {
  bottom: auto !important;
  display: block !important;
}
.offcanvas-float .offcanvas-body {
  flex: 0 1 auto !important;
  max-height: calc(100vh - var(--app-status-height) - var(--app-navbar-height) - var(--app-footer-height) - 3rem) !important;
}

/* Glass (frosted) look for offcanvas drawers */
.offcanvas {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-left: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: -8px 0 32px rgba(7, 20, 42, 0.18);
}
.offcanvas .card {
  background-color: #ffffff;
}
@media (prefers-reduced-transparency: reduce) {
  .offcanvas {
    background: var(--ikapun-surface, #ffffff) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* AWS-style tight footer */
.footer-fixed {
    height: var(--app-footer-height);
    min-height: var(--app-footer-height);
    padding: var(--ik-space-0);
    border-top: 1px solid var(--ikapun-border-strong);
    background: var(--ikapun-surface);
}
.footer-fixed .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
}
.footer-tight-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ik-space-6);
}
.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: var(--ik-space-2);
    min-width: 0;
}
.footer-left > * + *,
.footer-right > * + * {
    position: relative;
}
.footer-left > * + *::before,
.footer-right > * + *::before {
    content: "|";
    color: var(--ikapun-slate-7);
    font-weight: 500;
    margin-right: var(--ik-space-2);
}
.footer-link,
.footer-text,
.footer-muted {
    color: var(--ikapun-slate-6);
    font-size: var(--ik-text-xs);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}
.footer-link:hover {
    color: var(--ikapun-navy-soft);
    text-decoration: underline;
}

/* Footer legal-notice links render as <button> (they open the inline
   modal, no URL) — strip native button chrome so they look like links. */
button.footer-link {
    background: none;
    border: 0;
    padding: var(--ik-space-0);
    margin: var(--ik-space-0);
    cursor: pointer;
    font-family: inherit;
    vertical-align: baseline;
}
#aboutModal .modal-dialog {
    max-width: 320px;
}
#aboutModal .about-top-dialog {
    margin-top: 3rem;
}
#aboutModal .modal-body {
    padding: var(--ik-space-4) var(--ik-space-7) var(--ik-space-5);
}
#aboutModal .modal-header {
    justify-content: center;
    position: relative;
    padding: var(--ik-space-3) var(--ik-space-6) var(--ik-space-1);
}
#aboutModal .modal-footer {
    justify-content: center;
    padding: var(--ik-space-2);
}
#aboutModal .modal-header .btn-close {
    position: absolute;
    right: 1rem;
    top: 0.6rem;
    z-index: 2;
    transform: scale(0.85);
}
.about-hero-logo {
    border-radius: 50%;
    box-shadow: var(--ik-shadow-sm);
}
.about-hero-name {
    font-size: var(--ik-text-base);
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--ikapun-navy, var(--ikapun-navy-soft));
    margin-top: var(--ik-space-3);
}
.about-facts {
    margin: var(--ik-space-4) var(--ik-space-0) var(--ik-space-0);
}
.about-fact-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--ik-space-0);
    padding: var(--ik-space-1) var(--ik-space-0);
}
.about-fact-row dt {
    font-weight: 600;
    color: var(--ikapun-navy, var(--ikapun-navy-soft));
    margin: var(--ik-space-0);
    white-space: nowrap;
    font-size: var(--ik-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.75;
}
.about-fact-row dd {
    margin: var(--ik-space-0);
    text-align: center;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    font-size: var(--ik-text-xs);
}
.about-copyright {
    margin-top: var(--ik-space-4);
    font-size: var(--ik-text-xs);
}
.about-more-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ik-space-2);
    margin: var(--ik-space-4) auto var(--ik-space-0);
    padding: var(--ik-space-1) var(--ik-space-0);
    background: none;
    border: 0;
    font-size: var(--ik-text-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ikapun-gold-dark, var(--ikapun-gold-dark));
    cursor: pointer;
}
.about-more-heading:hover {
    text-decoration: underline;
}
.about-more-chevron {
    transition: transform 0.2s ease;
}
.about-more-heading[aria-expanded="true"] .about-more-chevron {
    transform: rotate(180deg);
}
.about-more-facts {
    margin-top: var(--ik-space-4)!important;
}
.footer-fixed .badge {
    font-size: var(--ik-text-xs);
    line-height: 1;
    padding: var(--ik-space-1) var(--ik-space-3);
    border-radius: 999px;
    vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════════
   FLASH NOTIFICATIONS — inline pill in the navbar's empty right area
   (between the status bar and the hero, so messages never cover page
   content). One compressed pill shows the latest message; hover
   reveals the rest via the title attribute.
   ══════════════════════════════════════════════════════════════════ */
.nav-flash {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.nav-flash-item {
    display: inline-flex;
    align-items: center;
    gap: var(--ik-space-4);
    min-width: 0;
    max-width: 100%;
    margin-left: auto;
    padding: var(--ik-space-2) var(--ik-space-4) var(--ik-space-2) var(--ik-space-5);
    border-radius: 999px;
    background: var(--ikapun-surface);
    border: 1px solid var(--ikapun-border, var(--ikapun-border));
    color: var(--ikapun-navy, var(--ikapun-navy));
    font-size: var(--ik-text-sm);
    font-weight: 600;
    line-height: 1.15;
    box-shadow: var(--ik-shadow-sm);
}

.nav-flash-icon {
    flex-shrink: 0;
    font-size: var(--ik-text-md);
    line-height: 1;
}

.nav-flash-message {
    flex: 1 1 auto;
    min-width: 4rem;
    color: var(--ikapun-navy, var(--ikapun-navy));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-flash-more {
    flex-shrink: 0;
    padding: var(--ik-space-0) var(--ik-space-3);
    border-radius: 999px;
    background: var(--ikapun-bg-soft, var(--ikapun-surface-muted));
    color: var(--ikapun-navy, var(--ikapun-navy));
    font-size: var(--ik-text-xs);
    font-weight: 800;
}

.nav-flash-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    padding: var(--ik-space-0);
    border: 0;
    border-radius: 50%;
    background: var(--ikapun-bg-soft, var(--ikapun-surface-muted));
    color: var(--ikapun-muted, var(--ikapun-muted));
    font-size: var(--ik-text-sm);
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-flash-close:hover {
    background: var(--ikapun-border, var(--ikapun-border));
    color: var(--ikapun-navy, var(--ikapun-navy));
}

/* Category accents on the light navbar: tint the icon and the danger edge. */
.nav-flash-success .nav-flash-icon { color: var(--ikapun-success); }
.nav-flash-info .nav-flash-icon { color: var(--ikapun-info-strong); }
.nav-flash-warning .nav-flash-icon { color: var(--ikapun-gold-dark); }
.nav-flash-danger .nav-flash-icon { color: var(--ikapun-danger); }
.nav-flash-danger { border-color: rgba(220,38,38,0.4); }

/* The flash layer is a direct child of the nav row, not of #mainNavbar, so
   closing the burger can never hide it. When the links fit it is a normal
   flex child that docks at the navbar's right edge, exactly where the pill
   used to sit inside .nav-account-area. Deliberately NOT reusing that class:
   its max-width:991px `width:100%` rule would wrap this onto a second line
   and change the navbar's height. */
.nav-flash-layer {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
/* The max-width:991px rules below flatten the pill into a full-width sheet
   row. Keep it compact only when BOTH the links and the pill fit on the same
   row (measured by the inline probe in layout.html). Otherwise it wraps out
   of the bar and covers the hero. */
html.nav-fits.nav-flash-fits .nav-flash,
html.nav-fits.nav-flash-fits .nav-flash-item {
    width: auto !important;
    max-width: 560px !important;
}
/* Bootstrap still allows the nav row to wrap below lg. With the links and
   the compact pill both in that row, wrapping dumped the pill onto a second
   line (or clean out of the bar at 800-900px), where it covered the hero. */
html.nav-fits .navbar-fixed .container-fluid {
    flex-wrap: nowrap !important;
}

/* Off-screen compact copy used to measure the pill's real width. It must not
   inherit the flattened full-width styles from the burger media query. */
.nav-flash-item.nav-flash-measure-probe {
    position: absolute !important;
    left: -10000px !important;
    top: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: max-content !important;
    max-width: 560px !important;
    flex: none !important;
    margin: 0 !important;
}

/* When the burger is rendered — or when the links fit but the pill would not
   fit alongside them — dock the alert in a full-width strip just under the
   navbar. Reserve that space on .main-content so it never covers the hero,
   and release it again once the alert is dismissed. */
html:not(.nav-flash-fits) body.has-nav-flash .main-content {
    padding-top: 44px !important;
}
html:not(.nav-flash-fits) .nav-flash-layer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    padding: var(--ik-space-2) var(--ik-space-4);
    background: var(--ikapun-surface);
    border-bottom: 1px solid var(--ikapun-border, var(--ikapun-border));
    box-shadow: var(--ik-shadow-sm);
    /* Below the open burger sheet (1030) so the sheet still wins while open. */
    z-index: 1029;
}
html:not(.nav-flash-fits) .nav-flash-layer .nav-flash,
html:not(.nav-flash-fits) .nav-flash-layer .nav-flash-item {
    width: 100%;
    max-width: 100%;
}
/* Once dismissed, don't leave an empty striped bar behind. */
html:not(.nav-flash-fits) .nav-flash-layer:not(:has(.nav-flash-item)) {
    display: none;
}

/* Below lg the navbar collapses into a burger sheet, so the pill becomes
   a full-width row inside the open sheet rather than a pill. */
@media (max-width: 991.98px) {
    .nav-account-area {
        width: 100%;
    }
    .nav-flash,
    .nav-flash-item {
        width: 100%;
        max-width: 100%;
    }
    .nav-flash-item {
        border-radius: var(--ik-radius-sm);
    }
}

@media (max-height: 800px) {
    :root {
        --app-status-height: 30px;
        --app-navbar-height: 36px;
        --app-footer-height: 24px;
        --app-content-y: 0.65rem;
    }

    .system-status-bar .container-fluid,
    .navbar .container-fluid {
        padding-left: var(--ik-space-5);
        padding-right: var(--ik-space-5);
    }

    .system-status-bar .status-pill {
        padding: var(--ik-space-0) var(--ik-space-4);
        font-size: var(--ik-text-xs);
    }

    /* Landscape phones report a CSS viewport width that can fall
       outside the max-width: 768px breakpoint this rule normally
       relies on elsewhere in the file (confirmed via a real iPhone
       14 Pro landscape screenshot showing this brand mark duplicated
       -- once here, redundantly, once again in the white navbar
       below -- on a fresh page load, not a scroll artifact). Height
       is the more reliable signal for "this is a phone, not a
       desktop-width browser window" regardless of orientation, since
       every phone -- portrait or landscape -- has short viewport
       height; only landscape phones have the width ambiguity. */
    /* Landscape phones report a CSS viewport width that can fall
       outside the max-width: 768px breakpoint this rule normally
       relies on elsewhere in the file. See the dedicated, standalone
       media query below (after this block closes) for the actual
       hide rule and the full reasoning -- deliberately NOT nested
       here, since a laptop with a modest-height browser window also
       falls under this block's own max-height: 800px, and hiding the
       brand mark for that case would be a real desktop regression,
       not a landscape-phone fix. */

    .nav-account-area {
        gap: var(--ik-space-4)!important;
    }

    .nav-account-area .btn-sm {
        min-height: 26px;
        height: 26px;
        font-size: var(--ik-text-xs);
    }

    .main-content > .container,
    .main-content > .molo-content-wrap {
        padding-top: var(--ik-space-4)!important;
        padding-bottom: var(--ik-space-4)!important;
    }

    .app-alert {
        padding: var(--ik-space-4) var(--ik-space-5);
        margin-bottom: var(--ik-space-3);
        border-radius: var(--ik-radius-md);
    }
}

@media (min-width: 769px) {
    .navbar-fixed {
        top: var(--app-status-height) !important;
    }

    .main-content {
        top: calc(var(--app-status-height) + var(--app-navbar-height)) !important;
        margin-top: var(--ik-space-0)!important;
    }

    .main-content.no-navbar {
        top: var(--app-status-height) !important;
    }

    body,
    .page-shell,
    .container,
    .container-fluid {
        margin-top: var(--ik-space-0)!important;
    }
}

/* Retrofitted from a max-height + max-width combination to (pointer:
   coarse) directly. That combination worked (verified: laptop
   viewports stay above 900px wide even when short; landscape phones
   stay under it) but was still ultimately a size-based guess. Pointer
   capability is not: verified directly that a desktop browser window
   manually resized to the EXACT viewport size of a real phone still
   correctly reports (pointer: fine), not (pointer: coarse) -- window
   resizing cannot fake this, unlike width or height, which is what
   caused this exact rule to regress desktop browsers twice already
   (first hiding the brand mark on any viewport under 768px wide,
   then again on any viewport under 800px tall, each fix -- true
   at the time -- eventually colliding with some real desktop window
   size). This is the properly reliable version those were reaching
   for. Two comma-separated queries (both requiring pointer: coarse)
   rather than one, since a phone can be narrow-but-tall (portrait) or
   short-but-wide (landscape) -- catching only one dimension misses
   the other orientation, confirmed directly: an earlier version of
   this retrofit used max-height alone and incorrectly showed the
   brand mark on a portrait phone. Falls back gracefully on browsers
   without pointer/hover media feature support (rare today) -- the
   rule simply never matches, which just means this narrow edge case
   (landscape phone, brand mark shown) doesn't get its cosmetic fix,
   not a functional break. */
/* Only one wordmark should be visible at a time. Up to 500px the navbar
   brand owns it — including a desktop window resized to phone-portrait
   dimensions, which the pointer-based rules below cannot distinguish from a
   real phone. From 501px to lg the status bar owns it, as on tablets and
   desktop. The second query keeps that phone treatment for real coarse-pointer
   devices in landscape, where the viewport is wider than 500px but short. */
@media (min-width: 501px) and (max-width: 991.98px) {
    .navbar-fixed .navbar-brand {
        display: none !important;
    }
}

@media (max-width: 500px),
       (pointer: coarse) and (max-height: 500px) {
    .system-status-bar .status-brand-mark {
        display: none !important;
    }
    .navbar-fixed .navbar-brand {
        display: flex !important;
    }
}

/* In this width band ui.css switches the bars to fixed but leaves .main-content
   static, so the top offset from the desktop rule is ignored and the hero
   renders under the navbar. At exactly 768px the bars are already fixed while
   the max-width:768px flow rules still apply, which is the worst case: start
   at 768, not 769. This hits resized desktop windows as well as landscape
   phones, so key it off width alone, not pointer capability. */
@media (min-width: 768px) and (max-width: 991.98px) {
    .main-content {
        position: fixed !important;
        top: calc(var(--app-status-height) + var(--app-navbar-height)) !important;
        /* ui.css's tablet min-height would otherwise push the box under the
           footer even though top/bottom now size it. */
        min-height: 0 !important;
    }
    /* ui.css also made the footer static in this band. With main-content no
       longer in flow it collapses under the navbar, so restore the fixed
       bottom bar that desktop uses. */
    .footer-fixed {
        position: fixed !important;
        bottom: 0 !important;
        z-index: 1020;
    }
}

/* The same landscape-phone trap, one element over. The status pill row gets
   `overflow-x: auto` inside the max-width: 768px query further down, because
   at phone widths a Branch Manager's profile pill + branch pill don't fit on
   one line and the bar's height is fixed by --app-status-height -- so a
   wrapped second line is clipped under the navbar instead of shown.

   768px is a PORTRAIT-phone width, and a landscape phone reports a CSS
   viewport WIDER than that: an iPhone 14 Pro Max is 814px in landscape. So
   the one viewport where vertical space is scarcest, and these pills are
   therefore most likely to wrap, was the single viewport where the fix did
   not apply -- the row kept overflow-x: visible and the pills ran off the
   right edge. Found by tests/test_responsive_ui.py's pill_wrap check, which
   had never been running.

   Keyed on pointer: coarse rather than a wider max-width, for the same
   reason as the brand mark above: coarse pointer is what actually identifies
   "this is a phone", and it holds in both orientations. Raising the
   max-width would have caught this one device and kept missing the next one
   that ships wider -- a current-generation Pro Max is wider still, as is any
   foldable or a tablet in split view. Deliberately a top-level query, not
   nested inside the 768px block: nested media queries are an AND, which
   would reintroduce the very width ceiling being escaped.

   The duplicate declarations inside the 768px query are left in place on
   purpose -- they still cover a narrow *desktop* window, which is not a
   coarse pointer and so never matches this rule. */
@media (pointer: coarse) {
    .system-status-bar .container-fluid > .d-flex > .d-flex:first-child {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .system-status-bar .container-fluid > .d-flex > .d-flex:first-child::-webkit-scrollbar {
        display: none;
    }

    .system-status-bar .status-pill,
    .system-status-bar .profile-switcher,
    .system-status-bar .context-switcher {
        flex-shrink: 0;
    }
}

/* ===== Burger menu on small screens (collapse active below lg) =====
   Goal: the open panel is a self-contained, scrollable sheet that
   (a) floats above the page instead of growing in-flow, so expanding
   the Reports/Admin groups no longer shoves the fixed-position page
   content down, and (b) drops the desktop centered/row chrome: links
   become full-width left-aligned rows and the submenus flatten inline
   so every item is reachable by scrolling the sheet alone. */
@media (max-width: 991.98px) {
  html:not(.nav-fits) {
    .navbar-fixed {
        position: relative;
    }
    .navbar-fixed .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1030;
        /* The desktop rule sets height:100%, which here resolves to the
           40px navbar and clips the sheet after two links. Let it size to
           its content, capped by max-height below. */
        height: auto;
        max-height: calc(100vh - var(--app-status-height) - var(--app-navbar-height));
        max-height: calc(100dvh - var(--app-status-height) - var(--app-navbar-height));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--ikapun-surface) !important;
        border-top: 1px solid var(--ikapun-border);
        padding-top: var(--ik-space-4);
        box-shadow: var(--ik-shadow-lg);
    }
    .navbar-fixed .navbar-nav {
        height: auto;
        align-items: stretch;
    }
    .navbar-fixed .nav-item {
        width: 100%;
        margin: var(--ik-space-0)!important;
        border-bottom: 1px solid var(--ikapun-navy-soft, var(--ikapun-navy-soft));
    }
    .navbar-fixed .nav-link {
        justify-content: flex-start;
        height: auto;
        text-align: left;
    }
    /* Flatten Reports/Admin into inline, full-width groups inside the sheet */
    .navbar-fixed .dropdown .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
  }
}

/* Runtime nav-fit state, set by the inline probe in layout.html. The probe
   measures an off-screen copy of the real links, so this applies at whatever
   width they actually fit — not a hard-coded phone/tablet breakpoint. */
html.nav-fits .navbar-fixed .navbar-toggler {
    display: none !important;
}
html.nav-fits .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    position: static;
    height: 100%;
    max-height: none;
    padding: 0;
    background: transparent;
    border-top: 0;
    box-shadow: none;
    overflow: visible;
}
html.nav-fits .navbar-expand-lg .navbar-nav {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: var(--ik-space-1) !important;
    width: auto;
    height: 100%;
}
/* Bootstrap keeps dropdowns in flow below lg; with the row visible that
   would stretch the 40px bar, so restore the desktop popover. */
html.nav-fits .navbar-fixed .dropdown .dropdown-menu {
    position: absolute !important;
    float: none;
    width: auto;
    margin: 0;
    border: 1px solid var(--ikapun-border);
    border-radius: var(--ik-radius-md);
    box-shadow: var(--ik-shadow-md);
}

/* The burger state is the single source of truth for the identity cluster.
   When the burger is rendered, the navbar owns the wordmark and the session
   timer/lock; when the full nav row fits, they return to the status bar. The
   runtime script physically moves the same elements between the two clusters,
   so nothing is floated or duplicated. */
html:not(.nav-fits) .navbar-fixed .navbar-brand {
    display: flex !important;
}
html:not(.nav-fits) .system-status-bar .status-brand-mark {
    display: none !important;
}
html.nav-fits .navbar-fixed .navbar-brand {
    display: none !important;
}
html.nav-fits .system-status-bar .status-brand-mark {
    display: block !important;
}

.nav-session-cluster {
    display: none;
    align-items: center;
    gap: var(--ik-space-4);
    margin-left: auto;
}
html:not(.nav-fits) .nav-session-cluster {
    display: flex;
}

/* Plain navbar text/icons — no pill background, border, or radius. The runtime
   script appends timer then lock here; the burger gets an equal 8px gap. */
.navbar-fixed .session-timer-pill,
.navbar-fixed .session-lock-button {
    position: static !important;
    align-self: center !important;
    min-height: 24px;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: var(--ikapun-navy) !important;
}
.navbar-fixed .session-timer-pill {
    gap: var(--ik-space-1);
    line-height: 1 !important;
    font-size: var(--ik-text-xs) !important;
    font-weight: 700;
    letter-spacing: 0;
}
.navbar-fixed .session-timer-pill .bi {
    font-size: var(--ik-text-xs);
    opacity: 1;
}
.navbar-fixed .session-timer-pill .session-timer-value {
    min-width: 2.6rem;
    text-align: right;
}
.navbar-fixed .session-timer-pill.is-warning {
    color: #8a5a00 !important;
}
.navbar-fixed .session-timer-pill.is-danger {
    color: #b42318 !important;
}
.navbar-fixed .session-lock-button {
    width: auto;
    min-width: 20px !important;
    line-height: 1 !important;
    transition: opacity .15s ease;
}
.navbar-fixed .session-lock-button .bi {
    font-size: var(--ik-text-sm);
}
.navbar-fixed .session-lock-button:hover,
.navbar-fixed .session-lock-button:focus-visible {
    background: transparent !important;
    color: var(--ikapun-navy) !important;
    outline: none;
}
.navbar-fixed .session-lock-button:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Off-screen copy used only for measuring link widths. It lives inside the
   navbar container, so it inherits the real link/padding styles, but never
   participates in layout or paints. */
.navbar-nav.nav-fit-probe {
    position: absolute !important;
    left: -10000px !important;
    top: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: var(--ik-space-1) !important;
    width: max-content !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
.nav-fit-probe > .nav-item {
    width: auto !important;
    flex: none !important;
    margin: 0 !important;
    border: 0 !important;
}
.nav-fit-probe .nav-link {
    white-space: nowrap !important;
}
.nav-fit-probe .dropdown-menu {
    display: none !important;
}

@media (max-width: 768px) {
    .system-status-bar .container-fluid > .d-flex {
        justify-content: flex-start !important;
    }

    .system-status-bar {
        height: 28px;
        min-height: 28px;
    }

    .system-status-bar .status-pill {
        padding: var(--ik-space-0) var(--ik-space-4);
        font-size: var(--ik-text-xs);
        /* Neutralize ui.css's mobile-wide ".d-flex.gap-2.flex-wrap .btn"
           rules (min-height: 32px / flex: 1 1 100% / width: 100%, inside
           its max-width: 767.98px and 575.98px breaks), which were
           snaring these status-pill buttons on phones -- confirmed at
           iPhone 14 Pro 393px, where the four .btn pills grew to the
           full bar height while the plain <div> pill stayed 20px. Their
           selector out-specifies this one, hence !important. */
        height: 20px !important;
        min-height: 20px !important;
        flex: 0 0 auto !important;
        width: auto !important;
    }

    .org-context-pill .context-switcher-label {
        max-width: 90px;
    }

    /* Real bug found via actual iPhone 14 Pro testing (393px), not just
       code inspection: at phone widths, a Branch Manager's profile pill
       + branch pill together don't fit on one line. .system-status-bar
       has a fixed height (--app-status-height), which every other
       positioned element (navbar, main-content, toasts) depends on
       being a single predictable value -- so when the pills wrapped to
       a second line, that second line was clipped/hidden underneath
       the navbar below it rather than the bar growing to show it.
       Fix: keep the pill row on one line and let it scroll horizontally
       instead of wrapping -- a standard mobile pattern -- rather than
       trying to make the status bar's height dynamic, which every other
       positioned element on the page would need to account for. */
    .system-status-bar .container-fluid > .d-flex > .d-flex:first-child {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .system-status-bar .container-fluid > .d-flex > .d-flex:first-child::-webkit-scrollbar {
        display: none;
    }

    .system-status-bar .status-pill,
    .system-status-bar .profile-switcher,
    .system-status-bar .context-switcher {
        flex-shrink: 0;
    }
    :root {
        --app-footer-height: 40px;
    }

    .footer-fixed {
        height: var(--app-footer-height);
        min-height: var(--app-footer-height);
        padding: var(--ik-space-0);
    }

    .footer-tight-row {
        height: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: var(--ik-space-2);
    }

    .footer-left,
    .footer-right {
        width: 100%;
        justify-content: center;
        gap: var(--ik-space-2);
        overflow: hidden;
    }
    .footer-left > * + *::before,
    .footer-right > * + *::before {
        margin-right: var(--ik-space-2);
    }
    .footer-right .footer-muted {
        display: none;
    }

    .footer-right .footer-muted:nth-of-type(1),
    .footer-right .footer-muted:nth-of-type(2) {
        display: inline !important;
    }

    .footer-right .badge {
        display: none;
    }

    .footer-left .footer-link,
    .footer-right .footer-link,
    .footer-right .footer-muted {
        font-size: var(--ik-text-xs);
        line-height: 1;
    }

    .navbar-fixed {
        height: auto;
        min-height: var(--app-navbar-height);
    }
    .navbar-fixed .navbar-collapse,
    .navbar-fixed .navbar-nav {
        height: auto;
    }
    .navbar-fixed .nav-link {
        height: auto;
        padding-top: var(--ik-space-4);
        padding-bottom: var(--ik-space-4);
    }
    /* .navbar-fixed switches to height:auto right above — its real
       rendered height on mobile (brand mark + hamburger button, with
       their own padding) can genuinely exceed --app-navbar-height,
       which main-content's top offset is calculated from. That
       mismatch hides whatever renders first inside main-content
       (a page hero's eyebrow/title, in the reported case) underneath
       the navbar. height:auto means the exact real height can't be
       predicted from CSS alone, so give main-content a fixed extra
       buffer here rather than trying to compute an exact value. */
    .main-content {
        top: calc(var(--app-status-height) + var(--app-navbar-height) + 14px) !important;
    }
}

/* ===== fedha light banking theme: navy + gold ===== */
:root {
    --ikapun-navy: #0B1D3A;
    --ikapun-navy-dark: #07142A;
    --ikapun-navy-soft: #14213D;
    --ikapun-gold: #D4AF37;
    --ikapun-gold-dark: #B88A13;
    --ikapun-gold-soft: #FFF7D6;
    /* Sampled directly from Denys's AWS reference screenshot (pixel colors
       read via PIL, not eyeballed) -- the top line and both status-bar
       pills there are a slate blue-gray, rgb(127,137,151), NOT gold. Used
       in place of --ikapun-gold for exactly those three elements per his
       explicit "make the pills and gold line the same color as the amazon
       one" -- everywhere else in the app that still legitimately wants the
       warm gold accent (buttons, etc.) is untouched. */
    --ikapun-slate: #7F8997;
    --ikapun-slate-dark: #667080;
    /* Unified "glass" surface for the status-bar dropdown panels (profile
       menu + branch-switcher menu), per Denys's explicit ask to unify their
       colors as a transparent glass panel rather than one dark / one light
       surface as before. Translucent navy + backdrop-filter blur, so page
       content shows softly through both panels the same way.
       Alpha bumped 0.74 -> 0.92 in v3.83.0: at 0.74, a panel opening over
       the light dashboard body (as the branch-switcher menu usually does --
       it sits lower/wider than the profile menu, over the white nav strip
       and page background rather than the dark status bar) let enough
       light through that its light-on-dark text (rgba(255,255,255,.92))
       lost most of its contrast -- confirmed from Denys's own screenshot,
       where the non-highlighted branch rows were barely legible against a
       washed-out, hazy panel, while the profile menu (which happens to sit
       over darker page content) looked fine at the same alpha. Since both
       panels share this one variable, the fix has to hold up regardless of
       what's behind either of them -- 0.92 keeps a soft blurred edge
       (glass) while being dark enough on its own to guarantee contrast
       everywhere, not just over a conveniently dark backdrop. */
    --ikapun-glass-navy: rgba(7, 20, 42, 0.92);
    --ikapun-glass-blur: 16px;
    --ikapun-bg: #F4F7FB;
    --ikapun-surface: #FFFFFF;
    --ikapun-surface-soft: #F8FAFC;
    --ikapun-border: #E2E8F0;
    --ikapun-border-strong: #CBD5E1;
    --ikapun-text: #14213D;
    --ikapun-muted: #64748B;
    --ikapun-success: #15803D;
    --ikapun-danger: #DC2626;
    --ikapun-danger-soft: #FEE2E2;
    --ikapun-text-secondary: #334155;
    --ikapun-navy-hover: #0C1F3D;
    --ikapun-on-dark: #FFFFFF;
    --ikapun-success-soft: #DCFCE7;
    --ikapun-success-text: #14532D;
    --ikapun-danger-text: #7F1D1D;
    --ikapun-warning-soft: #FEF3C7;
    --ikapun-warning-text: #713F12;
    --ikapun-info-soft: #DBEAFE;
    --ikapun-info-text: #1E3A8A;
    --ikapun-surface-muted: #F1F5F9;
    --ikapun-surface-cool: #EEF3F8;
    --ikapun-bg-soft: #F1F5F9;
    /* Spacing scale (px steps). Values of 32px and above are layout offsets and stay literal. */
    --ik-space-0: 0px;
    --ik-space-1: 2px;
    --ik-space-2: 4px;
    --ik-space-3: 6px;
    --ik-space-4: 8px;
    --ik-space-5: 12px;
    --ik-space-6: 16px;
    --ik-space-7: 20px;
    --ik-space-8: 24px;
    --ik-space-9: 32px;
    /* Shared scales: radius, type and shadow. Retune here, not per component. */
    --ik-radius-sm: 8px;
    --ik-radius-md: 12px;
    --ik-radius-lg: 16px;
    --ik-text-xs: 12px;
    --ik-text-sm: 13px;
    --ik-text-base: 14px;
    --ik-text-md: 16px;
    --ik-text-lg: 18px;
    --ik-text-xl: 22px;
    --ik-text-2xl: 28px;
    --ik-shadow-sm: 0 2px 8px rgba(15, 23, 42, .08);
    --ik-shadow-md: 0 10px 24px rgba(15, 23, 42, .12);
    --ik-shadow-lg: 0 18px 45px rgba(15, 23, 42, .16);
    /* Scales below: values are unchanged from the literals they replace. Retune here. */
    --ikapun-slate-1: #0F172A;
    --ikapun-slate-2: #0B1B33;
    --ikapun-slate-3: #0F1B33;
    --ikapun-slate-4: #1B2A49;
    --ikapun-slate-5: #1E293B;
    --ikapun-slate-6: #475569;
    --ikapun-slate-7: #94A3B8;
    --ikapun-info-strong: #0369A1;
    --ikapun-warning-strong: #B45309;
    --ikapun-danger-tint: #FFD7DB;
    --ikapun-warning-tint-alt: #FFE9A8;
    --ikapun-info: #2563EB;
}

html,
body,
body.bg-light {
    background: var(--ikapun-bg) !important;
    color: var(--ikapun-text);
}

.brand-dot {
    color: var(--ikapun-gold) !important;
}

.system-status-bar {
    background: var(--ikapun-navy-dark) !important;
    border: none !important;
    border-top: 3px solid var(--ikapun-slate) !important;
}

.status-brand-mark,
.brand-system-name {
    color: rgba(255,255,255,0.9) !important;
}

.status-pill {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.95);
}

.navbar-fixed {
    background: var(--ikapun-surface) !important;
    border-bottom: 1px solid var(--ikapun-border) !important;
    box-shadow: var(--ik-shadow-md);
}

.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
    color: var(--ikapun-navy) !important;
}

.navbar-dark .navbar-nav .nav-link {
    position: relative;
    font-size: var(--ik-text-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--ikapun-text-secondary) !important;
    text-decoration: none !important;
    transition: color .2s ease;
    /* Keep the row compact: 16px side padding left ~34px of empty space
       between icon/text groups. 8px/6px reads as one navigational group and
       lets the full row fit at narrower widths. */
    gap: var(--ik-space-3);
    padding-left: var(--ik-space-4);
    padding-right: var(--ik-space-4);
    padding-bottom: var(--ik-space-1);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link.dropdown-toggle,
.navbar-dark .navbar-nav .nav-link.dropdown-toggle:hover,
.navbar-dark .navbar-nav .nav-link.dropdown-toggle:focus {
    color: var(--ikapun-text-secondary) !important;
    text-decoration: none !important;
}

/* Drawn on ::before, not ::after: Bootstrap puts its dropdown caret on
   .dropdown-toggle::after, and an element has only one. Reports and Admin
   are .nav-link.dropdown-toggle, so sharing ::after merged the two rules —
   this selector won on position/size/background but declared no border, so
   Bootstrap's `border-top: .3em solid` (currentColor) survived and painted a
   dark bar over the gold one. Using ::before leaves ::after free for the
   caret those two items are meant to have. */
.navbar-dark .navbar-nav .nav-link::before {
    content: "";
    position: absolute;
    left: var(--ik-space-3);
    right: var(--ik-space-3);
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: var(--ikapun-gold);
    opacity: 0;
    transform: scaleX(0.7);
    transform-origin: center;
    transition: opacity .18s ease, transform .18s ease;
}

.navbar-dark .navbar-brand:hover,
.navbar-dark .navbar-brand:focus {
    color: var(--ikapun-navy-dark) !important;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: var(--ikapun-slate-5) !important;
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link.dropdown-toggle.active,
.navbar-dark .navbar-nav .nav-link.dropdown-toggle.show,
.navbar-dark .navbar-nav .show > .nav-link {
    color: var(--ikapun-text-secondary) !important;
}

.navbar-dark .navbar-nav .nav-link.active::before,
.navbar-dark .navbar-nav .nav-link:hover::before,
.navbar-dark .navbar-nav .nav-link:focus::before {
    opacity: 1;
    transform: scaleX(1);
}

.navbar-dark .navbar-nav .nav-link > i {
    font-size: var(--ik-text-md);
    line-height: 1;
}

.navbar-toggler {
    border-color: rgba(11,29,58,0.18);
}

.navbar-dark .navbar-toggler-icon {
    /* Bootstrap ships a translucent-white stroke for .navbar-dark. Replacing
       the image with a navy stroke is more reliable (and higher contrast)
       than filtering that white image against our light navbar. */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230B1D3A' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    filter: none !important;
    opacity: 0.95;
}

.main-content {
    background:
        radial-gradient(circle at top left, rgba(212,175,55,0.08), transparent 26%),
        var(--ikapun-bg) !important;
}

.card,
.section-card,
.modal-content,
.list-group-item,
.dropdown-menu {
    background-color: var(--ikapun-surface) !important;
    border-color: var(--ikapun-border) !important;
}

.page-shell {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.card,
.section-card,
.modal-content,
.dropdown-menu {
    box-shadow: var(--ik-shadow-md);
}

.page-title,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ikapun-text);
}

.page-subtitle,
.text-muted,
.footer-muted {
    color: var(--ikapun-muted) !important;
}

.text-primary,
.text-success {
    color: var(--ikapun-navy) !important;
}
/* eyebrow color is set per-context in ui.css — not overridden here */

a,
.footer-link {
    color: var(--ikapun-navy);
}

a:hover,
a:focus,
.footer-link:hover,
.footer-link:focus {
    color: var(--ikapun-gold-dark);
}

.btn-gold {
    background: var(--ikapun-navy) !important;
    border-color: var(--ikapun-navy) !important;
    color: var(--ikapun-on-dark) !important;
    font-weight: 700;
    box-shadow: var(--ik-shadow-md);
}

.btn-success {
    background: var(--ikapun-success) !important;
    border-color: var(--ikapun-success) !important;
    color: var(--ikapun-on-dark) !important;
    font-weight: 700;
    box-shadow: var(--ik-shadow-md);
}

.btn-gold:hover,
.btn-gold:focus,
.btn-success:hover,
.btn-success:focus {
    background: var(--ikapun-gold-dark) !important;
    border-color: var(--ikapun-gold-dark) !important;
    color: var(--ikapun-on-dark) !important;
}

.btn-outline-primary {
    color: var(--ikapun-navy) !important;
    border-color: var(--ikapun-navy) !important;
    background: transparent !important;
    font-weight: 700;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: var(--ikapun-on-dark) !important;
    background: var(--ikapun-navy) !important;
    border-color: var(--ikapun-navy) !important;
}

.btn-outline-success {
    color: var(--ikapun-navy) !important;
    border-color: var(--ikapun-gold) !important;
    background: transparent !important;
    font-weight: 700;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    color: var(--ikapun-navy) !important;
    background: var(--ikapun-gold-soft) !important;
    border-color: var(--ikapun-gold-dark) !important;
}

.btn-outline-warning {
    color: var(--ikapun-navy) !important;
    border-color: var(--ikapun-navy) !important;
    background: transparent !important;
    font-weight: 700;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
    color: var(--ikapun-on-dark) !important;
    background: var(--ikapun-navy) !important;
    border-color: var(--ikapun-navy) !important;
}

.btn-outline-light {
    border-color: var(--ikapun-border-strong) !important;
    color: var(--ikapun-navy) !important;
    background: var(--ikapun-surface) !important;
    font-weight: 700;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: var(--ikapun-gold-soft) !important;
    border-color: var(--ikapun-gold) !important;
    color: var(--ikapun-navy) !important;
}

.bg-primary,
.bg-success,
.badge.bg-primary,
.badge.bg-success {
    background-color: var(--ikapun-navy) !important;
}

.badge.bg-secondary {
    background-color: var(--ikapun-navy-soft) !important;
}

.badge.bg-warning {
    background-color: var(--ikapun-gold) !important;
    color: var(--ikapun-navy) !important;
}

/* Form-field skin (border, radius, height, font, focus ring) is defined
   once, canonically, in css/ui.css — see the "Canonical form-field skin"
   block there. Do not re-declare it here; page stylesheets only add
   structural tweaks and the deliberate variants (compact filter rows,
   pill search fields, dark-glass context switcher, auth card inputs). */

.dropdown-header {
    color: var(--ikapun-muted);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dropdown-item {
    color: var(--ikapun-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--ikapun-gold-soft);
    color: var(--ikapun-navy);
}

.table {
    --bs-table-color: var(--ikapun-text);
    --bs-table-border-color: var(--ikapun-border);
}

.table thead th,
.admin-grid .members-grid-head .members-grid-title-row th {
    background: var(--ikapun-surface-cool) !important;
    color: var(--ikapun-navy) !important;
    border-bottom-color: var(--ikapun-border-strong) !important;
}

.admin-grid .members-grid-head .members-grid-filter-row th {
    background: var(--ikapun-surface-soft) !important;
}

.table-hover tbody tr:hover {
    --bs-table-hover-bg: rgba(212,175,55,0.07);
}

.alert-success {
    color: var(--ikapun-success-text);
    background: var(--ikapun-success-soft);
}

.alert-warning {
    color: var(--ikapun-warning-text);
    background: var(--ikapun-warning-soft);
}

.alert-danger {
    color: var(--ikapun-danger-text);
    background: var(--ikapun-danger-soft);
}

.alert-info {
    color: var(--ikapun-info-text);
    background: var(--ikapun-info-soft);
}

.alert-icon {
    background: rgba(212,175,55,0.18);
    color: var(--ikapun-navy);
}

.footer-fixed {
    background: var(--ikapun-surface) !important;
    border-top: 2px solid var(--ikapun-gold) !important;
}

.footer-link,
.footer-text,
.footer-muted {
    color: var(--ikapun-slate-6) !important;
}

.footer-link:hover,
.footer-link:focus {
    color: var(--ikapun-gold-dark) !important;
}

.cookie-privacy-box {
    border-color: var(--ikapun-border);
    box-shadow: var(--ik-shadow-lg);
}

.public-page-card {
    border: 1px solid var(--ikapun-border, var(--ikapun-border)) !important;
    border-radius: var(--ik-radius-lg);
    overflow: hidden;
    background: var(--ikapun-surface);
    box-shadow: var(--ik-shadow-md);
}

.public-page-card h6 {
    color: var(--ikapun-navy, var(--ikapun-navy));
    font-weight: 800 !important;
}

.public-page-card p,
.public-page-card li {
    color: var(--ikapun-text, var(--ikapun-navy-soft));
    font-size: var(--ik-text-base);
}

@media (max-width: 768px) {
    .navbar-fixed {
        background: var(--ikapun-surface) !important;
    }

    .navbar-fixed .navbar-collapse.show,
    .navbar-fixed .navbar-collapse.collapsing {
        background: var(--ikapun-surface) !important;
        border-top: 1px solid var(--ikapun-border);
    }

    .navbar-dark .navbar-nav .nav-link.active::before,
    .navbar-dark .navbar-nav .nav-link:hover::before,
    .navbar-dark .navbar-nav .nav-link:focus::before {
        left: 1.1rem;
        right: auto;
        width: 2.5rem;
        opacity: 1;
        transform: none;
    }
}

/* ── System-wide compact btn-sm ─────────────────────────────────── */
.btn-sm {
    font-size: var(--ik-text-xs);
    font-weight: 700;
    padding: var(--ik-space-2) var(--ik-space-5);
    border-radius: var(--ik-radius-sm);
    line-height: 1.3;
}

/* Hero buttons — slightly more padding than regular btn-sm, consistent height */
.page-hero .btn,
.page-hero-actions .btn {
    font-size: var(--ik-text-xs);
    font-weight: 700;
    padding: var(--ik-space-2) var(--ik-space-5);
    border-radius: var(--ik-radius-sm);
    line-height: 1.3;
    white-space: nowrap;
    min-height: 30px;
}

/* Section card h6 titles — tight */
.section-card h6,
.section-card h5 {
    font-size: var(--ik-text-base) !important;
    font-weight: 700 !important;
    margin-bottom: var(--ik-space-1);
}

/* Row gaps — tighter defaults */
.row.g-2 { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }
.row.g-3 { --bs-gutter-x: 0.6rem; --bs-gutter-y: 0.6rem; }

/* mb-3 inside page-shell — reduce */
.page-shell .mb-3 { margin-bottom: var(--ik-space-4)!important; }
.page-shell .mb-2 { margin-bottom: var(--ik-space-3)!important; }

/* Table cells tighter */
.table-sm > :not(caption) > * > * {
    padding: var(--ik-space-3) var(--ik-space-4);
}

/* ------------------------------------------------------------------
   Idle-session lock screen.
   The lock is shown by layout.html once the server reports the session
   has ended. It is UX only — the session is already cleared server-side
   (extensions._end_session); this just lets the user re-authenticate in
   place instead of being bounced to a full login page.
------------------------------------------------------------------- */
.session-lock {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: rgba(7, 20, 42, 0.72);
    backdrop-filter: blur(3px);
}

.session-lock.is-open {
    display: flex;
}

body.session-is-locked {
    overflow: hidden;
}

.session-lock-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
}

.session-lock-icon {
    width: 3rem;
    height: 3rem;
    margin: var(--ik-space-0) auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--warning-soft);
    color: var(--warning);
    font-size: var(--ik-text-xl);
}

.session-lock-title {
    font-size: var(--ik-text-lg);
    font-weight: 700;
    margin: var(--ik-space-0) var(--ik-space-0) var(--space-sm);
}

.session-lock-text {
    color: var(--text-muted);
    font-size: var(--ik-text-base);
    margin: var(--ik-space-0) var(--ik-space-0) var(--space-lg);
}

.session-lock-form {
    text-align: left;
}

.session-lock-field {
    margin-bottom: var(--space-md);
}

.session-lock-field label {
    display: block;
    font-size: var(--ik-text-xs);
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.session-lock-field input {
    width: 100%;
    padding: var(--ik-space-4) var(--ik-space-5);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text-main);
    font-size: var(--ik-text-md);
}

.session-lock-field input[readonly] {
    color: var(--text-soft);
    background: var(--bg-muted);
}

.session-lock-error {
    color: var(--danger);
    font-size: var(--ik-text-base);
    margin: var(--ik-space-0) var(--ik-space-0) var(--space-md);
}

.session-lock-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
}

.session-lock-submit {
    width: 100%;
}

.session-lock-signout {
    text-align: center;
    font-size: var(--ik-text-sm);
    color: var(--text-muted);
}


/* Moved out of layout.html's inline <style> block: CSP allows only
   stylesheets from 'self', so an inline nonce'd block was blocked. */
.navbar-fixed .navbar-collapse { flex-grow: 1 !important; flex-shrink: 1 !important; min-width: 0 !important; }
.nav-account-area { flex: 1 1 auto !important; min-width: 0 !important; }
.nav-flash { width: 100% !important; justify-content: flex-end !important; }
.nav-flash-item { max-width: 100% !important; margin-left: auto !important; }
.nav-flash-item { color: var(--ikapun-navy, #0b1d3a) !important; background: #ffffff !important; }
.nav-flash-message { flex: 1 1 auto !important; min-width: 4rem !important; color: var(--ikapun-navy, #0b1d3a) !important; }
.nav-flash-more, .nav-flash-close { color: var(--ikapun-navy, #0b1d3a) !important; }

/* Landing hubs (loans, members, savings, dashboard, ...) never show Back.
   The Jinja filter already strips it from fresh responses. This pre-paint rule
   also hides any stale Back pill restored from an older cached DOM so it can
   never flash before the new page settles. */
body[data-suppress-hero-back="true"] .page-hero .hero-back-link {
  display: none !important;
}

/* ── Hero Back link ────────────────────────────────────────────────────────────
   Back is navigation, not a page action. The mark_hero_back filter tags the
   hand-written links; this rule pins every one to the hero's top-right corner
   at every viewport width — never in the action row, never bottom-left. */
.page-hero {
  position: relative;
}
.page-hero .page-hero-actions > .hero-back-link.btn {
  position: absolute;
  top: var(--ik-space-3);
  right: var(--ik-space-4);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--ik-space-1);
  width: auto !important; /* beat the full-width mobile action rule */
  min-width: 0 !important; /* beat ui.css's 120px mobile action minimum */
  padding: var(--ik-space-1) var(--ik-space-3) !important;
  font-size: 11px !important;
  min-height: 24px !important;
  line-height: 1.2 !important;
  background: rgba(7, 20, 42, 0.85) !important;
}
.page-hero .page-hero-actions > .hero-back-link::before {
  content: "\2190";
}
/* Reserve the corner: keep long titles/eyebrows clear of the pill and shift
   the remaining actions left of it, so they stay on the hero's top row. */
.page-hero:has(.hero-back-link) .page-title {
  padding-right: 72px;
}
/* Keep the Back clearance OUTSIDE the eyebrow's gold ring. Padding-right here
   used to add 72px of empty space inside the border, making a short label sit
   in a giant pill; margin-right reserves the same corner without inflating it. */
.page-hero:has(.hero-back-link) .eyebrow {
  margin-right: 72px;
}
.page-hero:has(.hero-back-link) .page-hero-actions {
  padding-right: 72px;
}
/* A declaration's status badge belongs beside Back in the hero's top-right
   corner, not in the stacked mobile action grid. 72px is the corner already
   reserved for the Back pill (8px inset + ~53px pill + gap). */
.page-hero .page-hero-actions > .hero-status-badge {
  position: absolute;
  top: var(--ik-space-3);
  right: 72px;
  z-index: 2;
  width: auto !important;
  min-width: 0 !important;
  flex: none !important;
}
/* The top-right corner now holds badge + Back (~164px). On the narrowest
   phones the eyebrow cannot stay on one line, so wrap it in the space left
   over instead of letting it run underneath the badge. */
@media (max-width: 391.98px) {
  .page-hero:has(.hero-status-badge) .eyebrow {
    max-width: calc(100% - 164px);
    white-space: normal;
    line-height: 1.2;
  }
}

/* When the runtime nav-fit check passes, use the desktop hero arrangement at
   any width: title left, actions top-right, not the mobile stacked grid. */
html.nav-fits .page-hero > .d-flex {
  flex-direction: row !important;
  align-items: flex-start !important;
}
html.nav-fits .page-hero-actions {
  width: auto !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
}
html.nav-fits .page-hero .btn,
html.nav-fits .page-hero-actions .btn {
  flex: none !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

/* ── Compact heroes when the nav collapses ─────────────────────────────────
   When the runtime check says the nav does not fit, ui.css's phone rules make
   every hero button 100% wide, which stacks six actions into a tall block.
   Lay them out in two columns instead, with the gold primary CTA spanning the
   full row. As soon as the nav fits, html.nav-fits above restores the desktop
   top row. Back stays pinned top-right in both states. */
@media (max-width: 991.98px) {
  html:not(.nav-fits) {
  .page-hero {
    padding: var(--ik-space-4);
    margin-bottom: var(--ik-space-4);
    border-radius: var(--ik-radius-md);
  }
  /* In the stacked layout the actions sit below the title, so they do not
     need the horizontal clearance reserved for the desktop top row. */
  .page-hero:has(.hero-back-link) .page-hero-actions {
    padding-right: 0;
  }
  .page-hero .eyebrow {
    margin-bottom: var(--ik-space-2);
    padding: var(--ik-space-1) var(--ik-space-3);
    font-size: 11px;
  }
  .page-hero:has(.hero-back-link) .eyebrow {
    padding: var(--ik-space-1) var(--ik-space-3);
    margin-right: 72px;
  }
  .page-hero .page-title {
    font-size: var(--ik-text-md);
    line-height: 1.25;
    margin-bottom: var(--ik-space-3) !important;
  }
  .page-hero .page-hero-actions {
    display: grid !important; /* beats .d-flex's display:flex !important */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ik-space-2) !important;
    width: 100%;
  }
  /* Forms wrapping a single action (authorize, cancel, reverse) are the grid
     items, so they — not just the buttons — need to fill their cell. */
  .page-hero .page-hero-actions > form {
    width: 100%;
  }
  /* Back is absolute navigation, never a grid action. Excluding it here
     matters: html:not(.nav-fits) adds a class to this selector's specificity,
     so a bare .btn rule would otherwise override the pill's width:auto. */
  .page-hero .page-hero-actions > .btn:not(.hero-back-link),
  .page-hero .page-hero-actions > form > .btn {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    white-space: normal !important;
    text-align: center;
    line-height: 1.25 !important;
  }
  .page-hero .page-hero-actions > .btn-gold,
  .page-hero .page-hero-actions > form:has(.btn-gold) {
    grid-column: 1 / -1;
  }
  }
}

/* ── Report export controls ───────────────────────────────────────────────────
   Applied at every viewport so desktop matches mobile: drop the button chrome
   and present a large brand-coloured file icon with the format name below.
   These are plain links with a Bootstrap btn class, so strip the border,
   background and shadow rather than restyling 15 separate templates. The
   href/title/download behaviour is untouched.

   Keep the group compact: a 44px-wide tap target with only 2px of side
   padding, and a 4px container gap (instead of Bootstrap's gap-2 / 8px),
   otherwise the icons end up ~44px apart -- wider than the icons themselves. */
.d-flex.gap-2:has(> a.btn > .bi-file-earmark-pdf),
.d-flex.gap-2:has(> a.btn > .bi-file-earmark-excel),
.d-flex.gap-2:has(> a.btn > .bi-filetype-csv) {
  gap: var(--ik-space-2) !important;
}
a.btn:has(.bi-file-earmark-pdf),
a.btn:has(.bi-file-earmark-excel),
a.btn:has(.bi-filetype-csv) {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--ik-space-1);
  width: auto !important;
  /* ui.css's mobile .d-flex.gap-2.flex-wrap .btn rule sets flex:1 1 100%;
     without this the three links stretch to full-width rows. */
  flex: 0 0 auto !important;
  min-width: 44px;
  padding: var(--ik-space-2) var(--ik-space-1) !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ikapun-navy, #0b1d3a) !important;
  font-size: var(--ik-text-xs) !important;
  font-weight: 700;
  line-height: 1.1 !important;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap !important;
}
a.btn:has(.bi-file-earmark-pdf) > i,
a.btn:has(.bi-file-earmark-excel) > i,
a.btn:has(.bi-filetype-csv) > i {
  font-size: 20px;
  line-height: 1;
}
a.btn:has(.bi-file-earmark-pdf) > i {
  color: var(--ikapun-danger, #DC2626); /* PDF / Adobe red */
}
a.btn:has(.bi-file-earmark-excel) > i {
  color: #217346; /* Microsoft Excel green */
}
a.btn:has(.bi-filetype-csv) > i {
  color: var(--ikapun-info, #2563EB); /* CSV — no vendor brand, use data blue */
}

/* The declaration review keeps All alongside the export icons on one
   right-aligned row. ui.css's mobile .d-flex.gap-2.flex-wrap .btn rule
   would otherwise stretch it to a full-width row of its own. */
.payout-batch-all {
  flex: 0 0 auto !important;
  width: auto !important;
}

/* ── Footer is fixed at every viewport ────────────────────────────────────────
   ui.css switches .footer-fixed to position:static below 992px, and the old
   layout.css fix only restored it in the 769–991px band. That left phones and
   small tablets with an in-flow footer that either scrolled away or stopped
   short of the viewport bottom. Pin it globally instead, with the same
   --app-footer-height the rest of the shell uses for its offsets. */
.footer-fixed {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1020 !important;
    height: var(--app-footer-height) !important;
    min-height: var(--app-footer-height) !important;
}

/* Below 769px .main-content stays in flow and the page scrolls, so reserve
   the pinned footer's height at the end of the content instead of letting it
   cover the last card/link. */
@media (max-width: 768px) {
    .main-content {
        padding-bottom: calc(var(--app-footer-height) + var(--ik-space-6)) !important;
    }
}
