:root {
    color-scheme: light;
    --navy-950: #071b35;
    --navy-900: #0b274b;
    --navy-800: #123b69;
    --navy-700: #1b5288;
    --primary-navy: var(--navy-900);
    --interactive: #1769aa;
    --interactive-hover: #0f568e;
    --primary-action: #1769aa;
    --primary-action-hover: #0f568e;
    --blue-50: #edf5fc;
    --page-bg: #f1f4f8;
    --surface: #fcfdff;
    --surface-elevated: #ffffff;
    --surface-subtle: #f5f7fa;
    --surface-muted: #ebf0f5;
    --surface-hover: #eaf2fa;
    --topbar-bg: rgba(255, 255, 255, .98);
    --input-bg: #ffffff;
    --table-heading-bg: #eef2f6;
    --row-hover: #f7fafd;
    --border: #d3dce6;
    --border-strong: #b8c5d2;
    --row-border: #e2e8ef;
    --text: #142235;
    --text-secondary: #405268;
    --text-muted: #647489;
    --text-soft: #7b899a;
    --heading: #0b203b;
    --success: #11633e;
    --success-bg: #e5f5ec;
    --success-border: #acd9c0;
    --warning: #7a4c05;
    --warning-bg: #fff2d2;
    --warning-border: #e8cd86;
    --danger: #a51f16;
    --danger-action: #a51f16;
    --danger-action-hover: #841912;
    --danger-bg: #fdebea;
    --danger-border: #e8b0ab;
    --info: #145b94;
    --info-bg: #e5f2fc;
    --info-border: #acd0ec;
    --neutral: #4f5e70;
    --neutral-bg: #e9edf2;
    --neutral-border: #cbd3dd;
    --sidebar-width: 232px;
    --topbar-height: 64px;
    --content-max: 1560px;
    --content-gutter: clamp(18px, 2.2vw, 34px);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(7, 27, 53, .06);
    --shadow: 0 8px 24px rgba(7, 27, 53, .07);
    --focus-ring: 0 0 0 3px rgba(23, 105, 170, .28);
    --motion-fast: 100ms;
    --motion: 170ms;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --interactive: #4a8ff7;
    --interactive-hover: #7fb2fb;
    --primary-action: #1d6ff2;
    --primary-action-hover: #3b82f6;
    --blue-50: #171a44;
    --page-bg: #0a0820;
    --surface: #100e2c;
    --surface-elevated: #12102f;
    --surface-subtle: #0d0b26;
    --surface-muted: #1a1740;
    --surface-hover: #1d1a48;
    --topbar-bg: rgba(13, 11, 38, .98);
    --input-bg: #0d0b26;
    --table-heading-bg: #16133a;
    --row-hover: #151238;
    --border: #241f4d;
    --border-strong: #382f6b;
    --row-border: #201c45;
    --text: #e9eff6;
    --text-secondary: #b9c6d4;
    --text-muted: #93a3b5;
    --text-soft: #7a8a9c;
    --heading: #f2f6fa;
    --success: #7fdcae;
    --success-bg: #0e2a24;
    --success-border: #27604a;
    --warning: #f0c25c;
    --warning-bg: #2b2318;
    --warning-border: #6a5326;
    --danger: #ff9b93;
    --danger-action: #a9362e;
    --danger-action-hover: #c0443a;
    --danger-bg: #2e1a24;
    --danger-border: #6b393d;
    --info: #7cc0fb;
    --info-bg: #131f44;
    --info-border: #32538a;
    --neutral: #b9c6d4;
    --neutral-bg: #191636;
    --neutral-border: #322c58;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 28px rgba(0, 0, 0, .45);
    --focus-ring: 0 0 0 3px rgba(74, 143, 247, .35);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--page-bg);
    --bs-secondary-color: var(--text-muted);
    --bs-border-color: var(--border);
    --bs-link-color: var(--interactive);
    --bs-link-hover-color: var(--interactive-hover);
}

/* The dark shell sits below the page, not above it: near-black chrome, and
   section eyebrows carry the accent instead of muted grey. */
html[data-theme="dark"] .site-header,
html[data-theme="dark"] body > footer { background: #070518; }
html[data-theme="dark"] .eyebrow { color: var(--interactive); }

*, *::before, *::after { box-sizing: border-box; }

html { min-width: 320px; }

body {
    margin: 0;
    color: var(--text);
    background: var(--page-bg);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--interactive); text-decoration: none; }
a:hover { color: var(--interactive-hover); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
}

.skip-link {
    position: fixed;
    z-index: 50;
    top: 8px;
    left: 8px;
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    color: #fff;
    background: var(--navy-900);
    transform: translateY(-150%);
}
.skip-link:focus { color: #fff; transform: translateY(0); }

.ui-icon { flex: 0 0 auto; }
.interactive, .button, .icon-button, .sidebar-nav a, .table-action, .quick-actions a {
    transition: color var(--motion) ease, background-color var(--motion) ease, border-color var(--motion) ease, box-shadow var(--motion) ease, transform var(--motion) ease;
}
.interactive:hover, .button:hover, .sidebar-nav a:hover, .table-action:hover, .quick-actions a:hover { transform: translateY(-1px); }
.interactive:active, .button:active, .icon-button:active, .sidebar-nav a:active, .table-action:active, .quick-actions a:active {
    transform: scale(.98);
    transition-duration: var(--motion-fast);
}

/* Application shell */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}
.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    overflow-y: auto;
    color: #dce8f5;
    background: var(--navy-950);
    border-right: 1px solid rgba(255, 255, 255, .08);
}
.app-stage {
    grid-column: 2;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 100vh;
}
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: var(--topbar-height);
    align-items: center;
    gap: 14px;
    padding: 8px var(--content-gutter);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
}
.app-main {
    width: 100%;
    max-width: var(--content-max);
    min-width: 0;
    margin: 0 auto;
    padding: 26px var(--content-gutter) 46px;
    scroll-margin-top: calc(var(--topbar-height) + 12px);
    /* Short pages (an empty queue/table with just a heading) fill the
       remaining viewport below the topbar instead of floating at the top
       with unused page beneath them. Pages with enough real content simply
       exceed this floor and the page scrolls normally - nothing here caps
       height or hides overflow. */
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--topbar-height));
}
.app-main:focus { outline: none; }
.app-main > .page-heading { flex: 0 0 auto; }
/* The page's main content region is the one thing that should absorb any
   leftover vertical space; the heading above it never grows. */
.app-main > .content-area {
    flex: 1 1 auto;
    min-height: 0;
}
.sidebar-brand-row { display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; }
.brand:hover { color: inherit; }
.brand > span:last-child { display: grid; line-height: 1.2; }
.brand strong { font-size: 14px; letter-spacing: .025em; }
.brand small { margin-top: 3px; color: inherit; opacity: .7; font-size: 11px; }
.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    color: #fff;
    background: var(--navy-700);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
}
.sidebar-brand { min-width: 0; flex: 1; padding: 18px 16px 17px; }
.sidebar-label {
    margin: 8px 19px 7px;
    color: #89a1bc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.sidebar-nav { display: grid; gap: 3px; padding: 0 10px; }
.sidebar-nav a {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #c9d8e9;
    font-size: 13px;
    font-weight: 600;
}
.sidebar-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.sidebar-nav a.active {
    color: #fff;
    background: #174a78;
    border-color: rgba(255, 255, 255, .11);
    box-shadow: inset 3px 0 #86c2f3;
}
.nav-icon { display: grid; width: 20px; flex: 0 0 20px; place-items: center; color: #96b6d8; }
.sidebar-nav a.active .nav-icon { color: #fff; }
.sidebar-foot {
    display: grid;
    gap: 3px;
    margin-top: auto;
    padding: 18px 16px;
    color: #a9bbce;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 10px;
    line-height: 1.45;
}
.sidebar-foot span { color: #d4e0ed; font-weight: 600; }
.sidebar-close { margin-right: 9px; color: #dce8f5; }
.sidebar-backdrop { display: none; }

.topbar-title { display: grid; min-width: 0; flex: 1 1 0; line-height: 1.2; }
.topbar-title strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title small { margin-top: 4px; color: var(--text-muted); font-size: 11px; }
.account-nav { display: flex; min-width: 0; flex: 0 0 auto; align-items: center; gap: 5px; margin-left: auto; }
.inline-form { display: inline-flex; margin: 0; }
.icon-button {
    position: relative;
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
    place-items: center;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
}
.icon-button:hover { color: var(--interactive-hover); background: var(--surface-hover); border-color: var(--border); }
.sidebar-close, .menu-toggle { display: none; }
.logout-control:hover, .logout-control:focus-visible { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.notification-count {
    position: absolute;
    top: 3px;
    right: 2px;
    display: grid;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    place-items: center;
    color: #fff;
    background: var(--danger-action);
    border: 2px solid #fff;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}
.user-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    color: #fff;
    background: var(--navy-800);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}
.account-menu { position: relative; min-width: 0; }
.account-menu-toggle {
    display: flex;
    width: auto;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 3px 9px 3px 4px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    cursor: pointer;
}
.account-menu-toggle:hover, .account-menu-toggle:focus-visible, .account-menu.is-open .account-menu-toggle {
    color: var(--heading);
    background: var(--surface-hover);
    border-color: var(--border);
}
.account-menu-name { max-width: 190px; overflow: hidden; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-chevron { flex: 0 0 auto; color: var(--text-muted); transition: transform var(--motion) ease; }
.account-menu.is-open .account-menu-chevron { transform: rotate(180deg); }
.account-menu-dropdown {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 25;
    display: none;
    width: min(250px, calc(100vw - 26px));
    overflow: hidden;
    color: var(--text);
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.account-menu.is-open .account-menu-dropdown { display: block; }
.account-menu-identity { display: grid; gap: 2px; padding: 14px 15px 12px; border-bottom: 1px solid var(--border); }
.account-menu-identity strong { overflow-wrap: anywhere; color: var(--heading); font-size: 13px; }
.account-menu-identity span { color: var(--text-muted); font-size: 11px; }
.account-menu-actions { display: grid; padding: 6px; }
.account-menu-actions a, .account-menu-actions button {
    display: flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 9px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.account-menu-actions form { margin: 0; }
.account-menu-actions a:hover, .account-menu-actions a:focus-visible,
.account-menu-actions button:hover, .account-menu-actions button:focus-visible { color: var(--heading); background: var(--surface-hover); border-color: var(--border); }
.account-menu-actions .account-menu-logout:hover, .account-menu-actions .account-menu-logout:focus-visible { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }

/* Page hierarchy and content */
.page-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-auto-flow: row dense;
    align-items: start;
    column-gap: 20px;
    margin: 0 0 20px;
}

/*
 | HEADING TITLE ROW - one rule, every page, every role.
 |
 | A heading action belongs on the TITLE's row: not the eyebrow above it, not
 | the description below it. Rather than offset the action, the copy wrapper
 | stops generating a box, so the eyebrow, title and description become rows
 | of the heading grid itself - the semantic title row the markup never had,
 | without editing 23 templates.
 |
 | The eyebrow takes a full-width row of its own, so the title always starts
 | the row after it. The action fixes only its COLUMN, and `dense` packs it
 | into the first free cell of column 2 - which is the title's row. A heading
 | with no eyebrow still pairs correctly, because there the title owns row 1.
 |
 | Column 1 is minmax(0, 1fr), which is what keeps long titles from
 | overflowing now that the copy wrapper no longer carries min-width: 0.
 */
.page-heading > div:first-child { display: contents; }
.page-heading > div:first-child > * { grid-column: 1; }
.page-heading > div:first-child > .eyebrow,
.page-heading > div:first-child > .release-eyebrow { grid-column: 1 / -1; }
.page-heading > :not(div:first-child) { grid-column: 2; align-self: center; }

/* Request operational heading: no eyebrow, its own title row and a boxed
   "next action" panel, plus flex-specific wrap rules of its own. It keeps
   the original flex heading rather than being forced into the grid. */
.request-operational-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.request-operational-heading > div:first-child { display: block; min-width: 0; }
.request-operational-heading > :not(div:first-child) { align-self: auto; }
.page-heading h1 { margin: 1px 0 3px; color: var(--heading); font-size: clamp(21px, 1.65vw, 25px); font-weight: 750; letter-spacing: -.022em; line-height: 1.18; }
.page-heading p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.4; }
/* Compact identity line under a record title: "Borrower: X   Submitted: Y". */
.request-heading-meta { display: flex; flex-wrap: wrap; gap: 3px 20px; margin-top: 6px !important; font-size: 12.5px; }
.request-heading-meta strong { color: var(--text-secondary); font-weight: 700; }
.eyebrow { margin: 0 0 4px; color: var(--text-muted); font-size: 9.5px; font-weight: 800; letter-spacing: .085em; text-transform: uppercase; }
h2, h3, h4 { color: var(--heading); }
h2 { margin: 0 0 12px; font-size: 17px; line-height: 1.3; }
h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.35; }
h4 { margin: 0 0 7px; font-size: 13px; }
p { margin-top: 0; }
small, .muted { color: var(--text-muted); }
.content-area { margin-top: 18px; }
.content-area.narrow { max-width: 860px; }
.top-gap { margin-top: 15px; }
.content-grid { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 16px; margin-top: 18px; }
.content-grid > * { min-width: 0; }
.content-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-grid.content-grid-single { grid-template-columns: minmax(0, 1fr); }
.card-grid, .approval-grid, .settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: stretch; gap: 16px; }
:is(.content-grid, .card-grid, .approval-grid, .settings-grid) > .card { height: 100%; }

/* Cards and dashboard */
.card, .table-wrap, .calendar-card, .auth-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card { padding: 19px; }
.card > :last-child { margin-bottom: 0; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.card-header h2, .card-header h3 { margin-bottom: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-grid > article {
    display: grid;
    min-width: 0;
    gap: 5px;
    padding: 17px 18px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.stat-card { min-height: 105px; padding: 17px 18px; }
.stat-card strong { display: block; margin: 0; color: var(--heading); font-size: 28px; line-height: 1; }
.stat-card span, .stat-card small { color: var(--text-muted); }
.stat-card span { font-size: 12px; font-weight: 700; }
.stat-card small { display: block; margin-top: 7px; font-size: 11px; }
.kpi-card { display: grid; align-content: start; gap: 5px; }
.kpi-card-inline { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 6px; }
.kpi-card-inline .kpi-meta { grid-column: 1 / -1; }
.kpi-icon { display: grid; width: 32px; height: 32px; place-items: center; color: var(--interactive); background: var(--blue-50); border: 1px solid var(--border); border-radius: 8px; }
.kpi-value { color: var(--heading); font-size: 28px; font-weight: 800; line-height: 1; }
.kpi-label { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.kpi-meta { color: var(--text-muted); font-size: 11px; }
.dashboard-kpi-card {
    --kpi-accent: var(--neutral);
    --kpi-icon-bg: var(--neutral-bg);
    --kpi-icon-border: var(--neutral-border);
    min-height: 132px;
    align-content: start;
    gap: 5px;
    padding: 16px 18px 17px;
    border-top: 3px solid var(--kpi-accent);
}
.dashboard-kpi-card .kpi-icon { color: var(--kpi-accent); background: var(--kpi-icon-bg); border-color: var(--kpi-icon-border); }
.dashboard-kpi-card .kpi-value { margin-top: 7px; font-size: 32px; }
.dashboard-kpi-card .kpi-label { color: var(--text-secondary); }
.kpi-accent-info { --kpi-accent: var(--info); --kpi-icon-bg: var(--info-bg); --kpi-icon-border: var(--info-border); }
.kpi-accent-warning { --kpi-accent: var(--warning); --kpi-icon-bg: var(--warning-bg); --kpi-icon-border: var(--warning-border); }
.kpi-accent-success { --kpi-accent: var(--success); --kpi-icon-bg: var(--success-bg); --kpi-icon-border: var(--success-border); }
.kpi-accent-danger { --kpi-accent: var(--danger); --kpi-icon-bg: var(--danger-bg); --kpi-icon-border: var(--danger-border); }

.report-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.report-filter-card { padding: 15px 16px; }
.report-filter-row { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.report-filter-row label { display: grid; gap: 6px; min-width: 150px; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.report-filter-row label input { width: min(100%, 180px); }
.report-period-summary { margin-top: 12px; margin-bottom: 0; color: var(--text-muted); font-size: 12px; }
.report-export-row { display: flex; justify-content: flex-start; }
.report-export-menu { position: relative; display: inline-block; }
.report-export-menu summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; }
.report-export-menu summary::-webkit-details-marker { display: none; }
.report-export-panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 8; display: grid; min-width: 180px; gap: 6px; padding: 8px; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); }
.report-export-panel a { display: block; padding: 8px 10px; color: var(--text); background: transparent; border-radius: 8px; font-size: 13px; font-weight: 600; }
.report-export-panel a:hover, .report-export-panel a:focus-visible { background: var(--surface-hover); text-decoration: none; }

.section-heading.compact-section-heading { margin-bottom: 12px; }
.distribution-list { display: grid; gap: 12px; }
.distribution-row { display: grid; gap: 6px; }
.distribution-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--heading); font-size: 13px; }
.distribution-row-head span { min-width: 0; overflow-wrap: anywhere; }
.distribution-row-head strong { font-size: 12px; }
.distribution-bar-track { position: relative; height: 10px; overflow: hidden; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 999px; }
.distribution-bar-fill { display: block; height: 100%; min-width: 12px; border-radius: inherit; background: linear-gradient(90deg, var(--interactive) 0%, var(--info) 100%); }
.empty-state-inline { margin: 0; color: var(--text-muted); }

.report-table-card { overflow: hidden; }
.report-table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.report-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; }
/* Sticky theads stick to just below the sticky topbar (not to the viewport
   top), so a page header never renders partially underneath the topbar
   once the user has scrolled the table into its sticky state.
   border-collapse must stay 'separate' (not 'collapse') on any table with a
   sticky thead: browsers render a stray gap/seam at the top of a collapsed
   table once one of its cells becomes position:sticky. */
.report-table thead th { position: sticky; top: var(--topbar-height); z-index: 1; background: var(--surface-elevated); color: var(--heading); border-bottom: 1px solid var(--border); padding: 10px 12px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.report-table tbody td { padding: 9px 12px; border-top: 1px solid var(--border); color: var(--text); vertical-align: top; }
.report-table td.numeric, .report-table th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.report-table tbody tr:nth-child(even) td { background: rgba(148, 163, 184, 0.03); }
.report-table tbody td.is-nonzero { background: rgba(245, 158, 11, 0.08); }
.report-formula-panel { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-subtle); }
.report-formula-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; cursor: pointer; font-weight: 700; color: var(--heading); list-style: none; }
.report-formula-panel summary::-webkit-details-marker { display: none; }
.report-formula-panel[open] summary { border-bottom: 1px solid var(--border); }
.report-formula-body { display: grid; gap: 8px; padding: 12px 14px 14px; color: var(--text-muted); }
.report-formula-body p { margin: 0; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); gap: 16px; }
.queue-list, .document-list, .notification-list { display: grid; gap: 0; }
.queue-list article, .document-list article, .evidence-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--row-border);
}
.queue-list article:first-child, .document-list article:first-child { padding-top: 2px; }
.queue-list article:last-child, .document-list article:last-child, .evidence-row:last-child { padding-bottom: 0; border-bottom: 0; }
.queue-list article > div, .document-list article > div { display: grid; min-width: 0; }
.queue-list small, .document-list small { margin-top: 2px; }
.quick-actions { display: grid; gap: 8px; }
.quick-actions a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    color: var(--heading);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 650;
}
.quick-actions a:hover { background: var(--surface-hover); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.quick-actions a > span { display: grid; min-width: 0; gap: 2px; }
.quick-actions a strong { font-size: 12px; }
.quick-actions a small { font-size: 10px; font-weight: 500; line-height: 1.4; }
.quick-actions .ui-icon { color: var(--text-muted); }
.ui-pressable {
    transform-origin: center;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
    will-change: transform;
}
.ui-pressable:hover { transform: translateY(-1px); }
.ui-pressable:focus-visible { border-color: var(--interactive); box-shadow: var(--focus-ring); }
.ui-pressable:active, .ui-pressable:hover:active {
    transform: scale(.98);
    transition-duration: 90ms;
}
.stat-card-link {
    position: relative;
    display: block;
    color: inherit;
    cursor: pointer;
}
.stat-card-link:hover { color: inherit; }
.stat-card-link.ui-pressable:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: 0 5px 14px rgba(7, 27, 53, .09);
}
.stat-card-link.ui-pressable:active, .stat-card-link.ui-pressable:hover:active {
    transform: scale(.98);
    box-shadow: var(--shadow-sm);
    transition-duration: 90ms;
}
.stat-card-link:focus-visible { box-shadow: var(--focus-ring); }
.stat-card-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: .35;
    transition: opacity 160ms ease;
}
.stat-card-link:hover .stat-card-arrow, .stat-card-link:focus-visible .stat-card-arrow { opacity: .85; }
.quick-actions a.ui-pressable:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(7, 27, 53, .09);
}
.quick-actions a.ui-pressable:active, .quick-actions a.ui-pressable:hover:active {
    transform: scale(.98);
    box-shadow: var(--shadow-sm);
}
.borrower-quick-actions a { display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; }
.borrower-quick-actions a > span:not(.quick-action-icon) { display: grid; min-width: 0; gap: 2px; }
.borrower-quick-actions .quick-action-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: var(--interactive);
    background: var(--blue-50);
    border: 1px solid var(--info-border);
    border-radius: 7px;
}
.borrower-quick-actions .quick-action-icon .ui-icon { color: inherit; }
.dashboard-view-all {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 3px;
    padding: 4px 2px;
    border-radius: var(--radius-sm);
    color: var(--interactive);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.dashboard-view-all:hover { color: var(--interactive-hover); }
.dashboard-view-all .ui-icon { transition: transform var(--motion) ease; }
.dashboard-view-all:hover .ui-icon { transform: translateX(2px); }
.dashboard-record-link { display: inline-flex; width: max-content; max-width: 100%; border-radius: 4px; }
.deadline-list { display: grid; gap: 8px; }
.deadline-list .deadline-event {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) minmax(130px, auto);
    align-items: center;
    gap: 13px;
    padding: 10px 12px 10px 9px;
    color: inherit;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-left: 3px solid var(--info);
    border-radius: 8px;
}
.deadline-list .deadline-event:hover { color: inherit; background: var(--surface-hover); border-color: var(--border-strong); border-left-color: var(--info); }
.deadline-list .deadline-event.is-overdue { border-left-color: var(--danger); }
.deadline-date { display: grid; justify-items: center; color: var(--interactive); line-height: 1; text-align: center; }
.deadline-date span { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.deadline-date strong { margin: 3px 0 2px; color: var(--heading); font-size: 22px; }
.deadline-date small { color: var(--text-muted); font-size: 10px; }
.deadline-event-copy { display: grid; min-width: 0; gap: 2px; }
.deadline-event-copy strong { color: var(--heading); }
.deadline-event-copy small { color: var(--text-muted); }
.deadline-event-copy > span { color: var(--text-secondary); font-size: 11px; font-weight: 650; }
.deadline-event-status { display: grid; justify-items: start; gap: 7px; }
.deadline-event-status > span:last-child { display: inline-flex; align-items: center; gap: 3px; color: var(--interactive); font-size: 10px; font-weight: 800; }

/* Buttons and status */
.actions, .inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button, button:not(.icon-button):not(.sidebar-backdrop):not(.link-button):not(.account-menu-toggle):not(.account-menu-logout):not(.calendar-event):not(.calendar-more):not(.calendar-view-control):not(.calendar-summary-filter):not(.calendar-summary-clear):not(.accountability-filter-card):not(.calendar-drawer-backdrop):not(.special-dates-sort):not(.prepared-quantity-step) {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    color: var(--text-secondary);
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
}
.button:hover, button:not(.icon-button):not(.sidebar-backdrop):not(.link-button):not(.account-menu-toggle):not(.account-menu-logout):not(.calendar-event):not(.calendar-more):not(.calendar-view-control):not(.calendar-summary-filter):not(.calendar-summary-clear):not(.accountability-filter-card):not(.calendar-drawer-backdrop):not(.special-dates-sort):not(.prepared-quantity-step):hover { color: var(--heading); background: var(--surface-hover); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.button.primary { color: #fff; background: var(--primary-action); border-color: var(--primary-action); }
.button.primary:hover { color: #fff; background: var(--primary-action-hover); border-color: var(--primary-action-hover); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.button.primary:active {
    transform: scale(0.98);
    transition-duration: var(--motion-fast);
}
.button.secondary,
.table-action {
    color: var(--interactive);
    background: transparent;
    border-color: var(--interactive);
}
.button.secondary:hover,
.button.secondary:focus-visible,
.table-action:hover,
.table-action:focus-visible {
    color: #fff;
    background: var(--interactive);
    border-color: var(--interactive);
    box-shadow: var(--shadow-sm);
}
.button.danger { color: #fff; background: var(--danger-action); border-color: var(--danger-action); }
.button.danger:hover { color: #fff; background: var(--danger-action-hover); border-color: var(--danger-action-hover); }
.button.ghost, .link-button { color: var(--interactive); background: transparent; border-color: transparent; }
.button.small, button.small { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.button.full { width: 100%; }
.button:disabled, button:disabled,
.button[aria-disabled="true"], button[aria-disabled="true"] { cursor: not-allowed; opacity: .55; transform: none; }
.status, .status-badge, .badge {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    padding: 4px 8px;
    color: var(--neutral);
    background: var(--neutral-bg);
    border: 1px solid var(--neutral-border);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: .015em;
}
.status-info { color: var(--info); background: var(--info-bg); border-color: var(--info-border); }
.status-success { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.status-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.status-danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.status-neutral, .status-closed { color: var(--neutral); background: var(--neutral-bg); border-color: var(--neutral-border); }
.record-id { color: var(--interactive); font-size: 11px; font-weight: 800; letter-spacing: .04em; }

/* Alerts and empty states */
.notice, .callout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 11px 13px;
    color: var(--text-secondary);
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    border-left: 3px solid var(--info);
    border-radius: 8px;
}
.notice .ui-icon { margin-top: 1px; color: currentColor; }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
.notice.success,
.callout.success {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: #176b45;
    background: #edf8f1;
    border: 1px solid #9dd0af;
    border-left: 4px solid #18794e;
    border-radius: 10px;
}
.notice.success .ui-icon,
.callout.success::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 2px solid currentColor;
    border-radius: 999px;
    color: #18794e;
    background: transparent;
    box-sizing: border-box;
}
.notice.success .ui-icon {
    margin-top: 0;
}
.callout.success::before {
    content: '\2713';
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}
.notice.success > div,
.callout.success > * {
    flex: 1 1 auto;
}
.notice.success strong,
.callout.success strong {
    color: inherit;
}
.notice.error { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); border-left-color: var(--danger); }
.notice.warning, .callout.warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); border-left-color: var(--warning); }
.callout { display: block; margin-top: 14px; }
.callout.success {
    margin-top: 0;
}
.callout p { margin: 4px 0 0; }
.empty-state { padding: 28px 18px; color: var(--text-muted); text-align: center; }
.card > .empty-state { min-height: 120px; display: grid; place-items: center; }
td.empty-state { height: 110px; }

/* Universal empty-state panel: one small neutral pattern reused across
   Borrower/AO/Head/ICTU list and dashboard sections instead of each page
   hand-rolling its own blank-panel/sentence. */
.empty-state-panel {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 26px 18px;
    color: var(--text-muted);
    text-align: center;
}
.empty-state-panel-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    color: var(--text-muted);
    background: var(--surface-subtle);
    border-radius: 999px;
}
.empty-state-panel-title { margin: 0; color: var(--text-secondary); font-weight: 700; font-size: .92rem; }
.empty-state-panel-message { margin: 0; max-width: 360px; font-size: .84rem; }
.empty-state-panel-cta { margin-top: 4px; color: var(--interactive); font-weight: 700; font-size: .84rem; text-decoration: none; }
.empty-state-panel-cta:hover { text-decoration: underline; }

/* Universal compact filter-context banner: replaces the oversized colored
   "Showing X (N) from your dashboard" alert on every filtered drilldown
   destination (Custody, Users, Delegations, Delivery Records, Accountability). */
.filter-context-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding: 8px 14px;
    color: var(--text-secondary);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .84rem;
}
.filter-context-count { color: var(--text-muted); margin-left: 2px; }
.filter-context-clear { font-weight: 700; white-space: nowrap; color: var(--interactive); text-decoration: none; }
.filter-context-clear:hover { text-decoration: underline; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
.table-wrap table { width: 100%; min-width: 680px; margin: 0; border-collapse: collapse; }
.table-wrap th {
    padding: 14px 16px;
    color: var(--text-secondary);
    background: var(--table-heading-bg);
    border-bottom: 1px solid var(--border-strong);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .065em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.table-wrap td { padding: 16px; border-bottom: 1px solid var(--row-border); vertical-align: middle; line-height: 1.45; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover:not(:has(.empty-state)) { background: var(--row-hover); }
.table-wrap td strong, .table-wrap td small { display: block; }
.table-wrap td small { margin-top: 2px; font-size: 11px; }
.table-action { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 10px; border: 1px solid var(--interactive); border-radius: 8px; background: transparent; color: var(--interactive); font-size: 11px; font-weight: 750; white-space: nowrap; cursor: pointer; }

/* Universal inline disclosure contract. Keep every View Details / Case Details
   trigger visually identical even inside tables or page-local workspaces. */
.disclosure-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 118px;
    list-style: none;
}
.button.secondary.disclosure-trigger,
.table-action.disclosure-trigger {
    color: var(--interactive);
    background: var(--surface-elevated);
    border-color: var(--interactive);
}
.button.secondary.disclosure-trigger:hover,
.button.secondary.disclosure-trigger:focus-visible,
.table-action.disclosure-trigger:hover,
.table-action.disclosure-trigger:focus-visible {
    color: #fff;
    background: var(--interactive);
    border-color: var(--interactive);
}
summary.disclosure-trigger::-webkit-details-marker { display: none; }
.disclosure-trigger__chevron {
    flex: 0 0 auto;
    color: currentColor;
    transition: transform var(--motion) ease;
}
.disclosure-trigger[aria-expanded="true"] .disclosure-trigger__chevron,
details[open] > .disclosure-trigger .disclosure-trigger__chevron {
    transform: rotate(180deg);
}

.admin-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-kpi-card { min-height: 132px; }
.admin-kpi-card .dashboard-view-all { margin-top: auto; }
.admin-table-wrap { border-radius: var(--radius); }
/* border-collapse must stay 'separate' (not the inherited 'collapse' from
   .table-wrap table) on any table with a sticky thead: browsers render a
   stray gap/seam at the top of a collapsed table once one of its cells
   becomes position:sticky. */
.table-wrap .admin-user-table { border-collapse: separate; border-spacing: 0; }
.admin-user-table thead th { position: sticky; top: var(--topbar-height); z-index: 1; }
.admin-user-table td.actions-cell { width: 130px; }
.action-group { display: flex; flex-wrap: wrap; gap: 6px; }
.audit-list { display: grid; gap: 18px; }
.audit-date-group { display: grid; gap: 10px; }
.audit-date-group h3 { margin: 0; color: var(--heading); }
.audit-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.audit-item:last-child { border-bottom: 0; }
.audit-icon { display: grid; place-items: center; width: 34px; height: 34px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; color: var(--interactive); }
.audit-content { display: grid; gap: 6px; min-width: 0; }
.audit-main-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.audit-main-row strong { color: var(--heading); }
.audit-time { color: var(--text-muted); font-size: 11px; font-weight: 700; }
.audit-meta-row { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-muted); font-size: 11px; }
.audit-content small { color: var(--text-muted); }
.audit-correlation { display: inline-block; padding-top: 2px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.admin-inline-note { display: grid; gap: 8px; align-content: center; padding: 12px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; }
.admin-inline-note p { margin: 0; color: var(--text-secondary); font-size: 12px; }
.admin-inline-note-warning { border-color: var(--warning-border); background: var(--warning-bg); }
.field-note { color: var(--text-muted); }
.admin-form-grid { gap: 18px; }
.admin-form-grid fieldset { padding: 16px; }
.settings-card-header { align-items: center; }
.setting-key { display: block; margin-top: 4px; color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.settings-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; }
.settings-summary span { color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.settings-summary strong { color: var(--heading); }
.settings-description { margin: 0; color: var(--text-secondary); }
.settings-form { gap: 12px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.audit-note { color: var(--text-muted); }
.checkbox-field { padding: 6px 2px; }
.checkbox-field label.checkbox { display: flex; align-items: center; gap: 10px; min-height: 42px; }

/* Universal record browser -------------------------------------------------
   Shared control pattern for borrower, Action Officer, and Admin list pages. */
.universal-record-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(180px, 230px) minmax(150px, 190px);
    gap: 12px;
    align-items: end;
    margin: 0 0 14px;
    padding: 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.universal-record-toolbar label {
    display: grid;
    min-width: 0;
    gap: 6px;
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}
.universal-record-toolbar input,
.universal-record-toolbar select {
    width: 100%;
    min-height: 42px;
    font-size: 12px;
}
.universal-record-toolbar .search-input-shell { width: 100%; }
@media (max-width: 760px) {
    .universal-record-toolbar { grid-template-columns: 1fr; }
}

/* Forms */
.form-card, .form-grid { display: grid; gap: 15px; }
.form-card { max-width: 900px; }
.form-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 15px; padding: 14px; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius); }
.filter-bar label { min-width: min(100%, 230px); flex: 1 1 230px; }
label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 400;
    transition: border-color var(--motion) ease, box-shadow var(--motion) ease, background-color var(--motion) ease;
}
.search-input-shell {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}
.search-input-shell > input[type="search"] { display: block; padding-left: 40px; }
.search-input-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 1;
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    pointer-events: none;
    transform: translateY(-50%);
}
.search-input-icon > svg { width: 18px; height: 18px; }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 17px; min-height: 17px; padding: 0; }
input[type="file"] { padding: 7px; }
input::placeholder, textarea::placeholder { color: var(--text-soft); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--interactive); box-shadow: var(--focus-ring); }
input:disabled, select:disabled, textarea:disabled { color: var(--text-soft); background: var(--surface-muted); cursor: not-allowed; }

/* Dropdown chevron: one consistent, vertically centred indicator for every select. */
select {
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230b203b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 38px;
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 16px 16px;
}
select::-ms-expand { display: none; }
html[data-theme="dark"] select {
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b9c6d4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
/* The disabled `background` shorthand above resets repeat/position/size; restore them so one chevron shows, not a tiled row. */
select:disabled { background-image: var(--select-chevron); background-repeat: no-repeat; background-position: right 13px center; background-size: 16px 16px; opacity: .75; }
select[multiple], select[size]:not([size="1"]) { padding-right: 11px; background-image: none; }

/* The decision that advances an accountability case reads as the primary one. */
.button.accountability-primary-action {
    min-height: 44px;
    padding: 12px 22px;
    font-size: 13.5px;
    font-weight: 750;
}

.helper, label small { color: var(--text-muted); font-size: 11px; font-weight: 400; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.field-error { margin: -7px 0 0; color: var(--danger); font-size: 11px; }
.form-grid fieldset { padding: 14px; border: 1px solid var(--border); border-radius: 8px; }
.form-grid legend { width: auto; padding: 0 5px; color: var(--heading); font-size: 12px; font-weight: 750; }
.quantity-input { max-width: 130px; }
.check-grid, .role-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.check-grid label, .role-list label { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 7px; }
.danger-zone { padding: 13px; background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: 8px; }

/* Supporting modules */
.detail-list { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); margin: 0; }
.detail-list dt, .detail-list dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--row-border); }
.detail-list dt { padding-right: 12px; color: var(--text-muted); font-size: 11px; font-weight: 700; }
.detail-list dd { color: var(--text); }
.detail-list.compact dt, .detail-list.compact dd { padding-top: 6px; padding-bottom: 6px; }
.timeline { display: grid; gap: 14px; }
.timeline article { display: grid; grid-template-columns: 54px 1fr; gap: 12px; }
.timeline article > span { color: var(--interactive); font-size: 11px; font-weight: 800; }
.timeline p { margin: 2px 0; }
.bar-list { display: grid; gap: 8px; }
.bar-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; background: var(--surface-subtle); border-radius: 7px; }
.steps { display: grid; gap: 9px; }
.step { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--row-border); }
.step:last-child { border-bottom: 0; }
.metric { font-size: 24px; font-weight: 800; color: var(--heading); }
.signature-preview { max-width: 300px; padding: 10px; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: 7px; }
.signature-preview img { max-height: 90px; margin: auto; object-fit: contain; }
.meta { color: var(--text-muted); font-size: 11px; }
.notification-list article { padding: 14px; border-bottom: 1px solid var(--border); }
.notification-list article.unread { background: var(--blue-50); border-left: 3px solid var(--navy-700); }
nav[role="navigation"] { margin-top: 16px; }
nav[role="navigation"] svg { width: 18px; height: 18px; }

/* Shared pagination: the default list-page control for any paginator that
   has no bespoke pagination view of its own (resources/views/partials/pagination.blade.php). */
.app-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.app-pagination-link {
    display: inline-flex;
    min-width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    color: var(--text-secondary);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    line-height: 1;
}
a.app-pagination-link:hover { color: var(--heading); border-color: var(--border-strong); background: var(--surface-hover); }
.app-pagination-link.is-active { color: #fff; background: var(--primary-action); border-color: var(--primary-action); }
.app-pagination-link[aria-disabled="true"] { color: var(--text-soft); background: var(--surface-subtle); cursor: not-allowed; }
.app-pagination-ellipsis { padding: 0 2px; color: var(--text-muted); }

/* Borrower portal */
.full-span { grid-column: 1 / -1; }
.is-hidden { display: none !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.heading-status { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.heading-status > span:not(.status-badge) { color: var(--text-muted); font-size: 12px; }

.queue-list .dashboard-task-row { display: block; padding: 0; }
.attention-card > .card-header { padding: 11px 12px; background: var(--blue-50); border: 1px solid var(--info-border); border-radius: 8px; }
.attention-card .queue-list { gap: 8px; }
.attention-card .queue-list .dashboard-task-row { border-bottom: 0; }
.dashboard-task-link {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px 11px 10px;
    color: inherit;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-left: 3px solid var(--info);
    border-radius: 8px;
}
.dashboard-task-link:hover { color: inherit; background: var(--surface-hover); border-color: var(--border-strong); border-left-color: var(--info); }
.dashboard-task-row.is-action-required .dashboard-task-link { border-left-color: var(--warning); }
.dashboard-task-row.is-action-required .dashboard-task-link:hover { border-left-color: var(--warning); }
.dashboard-task-copy { display: grid; min-width: 0; gap: 3px; }
.dashboard-task-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.record-reference { color: var(--text-muted); font-size: 11px; font-weight: 750; }
.dashboard-task-purpose { overflow: hidden; color: var(--heading); font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-task-copy small { color: var(--text-muted); }
.dashboard-task-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin-top: 2px; }
.dashboard-task-date { color: var(--text-secondary); font-size: 10px; font-weight: 650; }
.dashboard-task-action { color: var(--interactive); font-size: 10px; font-weight: 800; }
.dashboard-task-action.is-required { color: var(--warning); }
.dashboard-task-link > .ui-icon { color: var(--text-muted); }

.availability-filter { margin-bottom: 10px; }
.availability-window {
    display: grid;
    gap: 2px;
    margin-bottom: 14px;
    padding: 10px 13px;
    color: var(--text-secondary);
    background: var(--blue-50);
    border: 1px solid var(--info-border);
    border-radius: 8px;
    font-size: 12px;
}
.availability-window span { color: var(--text-muted); font-size: 11px; }
.availability-number { color: var(--interactive); font-size: 22px; line-height: 1; }

/* Borrowing calendar */
.calendar-month-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px 13px;
    padding: 7px 10px;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 650;
}
.calendar-month-summary span { white-space: nowrap; }
.calendar-month-summary strong { margin-right: 3px; color: var(--heading); font-size: 13px; }
.calendar-summary-filter,
.calendar-summary-clear {
    min-height: 32px;
    padding: 5px 8px;
    color: var(--text-muted);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background var(--motion-fast);
}
.calendar-summary-filter {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border-left: 3px solid var(--calendar-summary-accent, var(--border-strong));
}
.calendar-summary-filter strong { margin: 0; font-size: 14px; }
.calendar-summary-filter:hover,
.calendar-summary-clear:hover { color: var(--heading); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.calendar-summary-filter:focus-visible,
.calendar-summary-clear:focus-visible { outline: 0; border-color: var(--interactive); box-shadow: var(--focus-ring); }
.calendar-summary-filter.is-selected,
.calendar-summary-clear.is-selected { color: var(--heading); border-color: var(--calendar-summary-accent, var(--interactive)); box-shadow: 0 0 0 2px rgba(27, 90, 151, .12); }
.calendar-summary-active { --calendar-summary-accent: var(--success); }
.calendar-summary-due-soon { --calendar-summary-accent: var(--warning); }
.calendar-summary-overdue { --calendar-summary-accent: var(--danger); }
.calendar-summary-returned { --calendar-summary-accent: var(--neutral); }
.calendar-summary-active.is-selected { background: var(--success-bg); }
.calendar-summary-due-soon.is-selected { background: var(--warning-bg); }
.calendar-summary-overdue.is-selected { background: var(--danger-bg); }
.calendar-summary-returned.is-selected { background: var(--neutral-bg); }
.calendar-summary-clear { color: var(--interactive); background: transparent; }
.borrowing-calendar {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.calendar-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 10px 13px;
    border-bottom: 1px solid var(--border);
}
.calendar-navigation { display: flex; align-items: center; gap: 6px; margin: 0 !important; }
.calendar-nav-button {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    color: var(--interactive);
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 7px;
}
.calendar-nav-button:hover { color: var(--heading); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.calendar-nav-button .ui-icon { width: 16px; height: 16px; }
.icon-reverse { transform: rotate(180deg); }
.calendar-month-title { margin: 0; font-size: 17px; text-align: center; white-space: nowrap; }
.calendar-view-toggle {
    display: inline-flex;
    justify-self: end;
    padding: 3px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.calendar-view-control {
    min-height: 30px;
    padding: 5px 11px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
}
.calendar-view-control.active { color: var(--heading); background: var(--surface-elevated); box-shadow: var(--shadow-sm); }
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 9px 13px;
    border-bottom: 1px solid var(--border);
}
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 10px; font-weight: 650; }
.legend-mark { width: 8px; height: 8px; background: var(--navy-700); border-radius: 50%; }
.legend-mark.due { background: var(--warning); }
.legend-mark.overdue { background: var(--danger); }
.legend-mark.returned { background: #687487; }
.legend-mark.own { background: var(--surface-elevated); border: 2px solid var(--interactive); }
.calendar-month-scroll { overflow-x: auto; }
.calendar-month { min-width: 760px; }
.calendar-weekdays, .calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { color: var(--text-secondary); background: var(--table-heading-bg); border-bottom: 1px solid var(--border); }
.calendar-weekdays > div { padding: 8px 7px; font-size: 9px; font-weight: 800; letter-spacing: .055em; text-align: center; text-transform: uppercase; }
.weekday-short { display: none; }
.calendar-day {
    min-width: 0;
    min-height: 130px;
    padding: 7px;
    background: var(--surface-elevated);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.calendar-week .calendar-day:last-child { border-right: 0; }
.calendar-week:last-child .calendar-day { border-bottom: 0; }
.calendar-day.outside-month { background: var(--surface-subtle); }
.calendar-day.outside-month .calendar-day-heading,
.calendar-day.outside-month .calendar-day-events { opacity: .52; }
.calendar-day.is-today { background: var(--blue-50); box-shadow: inset 0 0 0 1px var(--info-border); }
.calendar-day-heading { display: flex; min-height: 23px; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 4px; }
.calendar-day-heading time { display: inline-grid; width: 23px; height: 23px; place-items: center; color: var(--text-secondary); font-size: 10px; font-weight: 750; }
.calendar-day.is-today .calendar-day-heading time { color: #fff; background: var(--navy-800); border-radius: 50%; }
.calendar-day-heading span { color: var(--interactive); font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.calendar-day-events { display: grid; gap: 4px; }
.calendar-day-occurrence { min-width: 0; }
.calendar-day-occurrence[hidden],
.calendar-event[hidden],
.calendar-more[hidden],
.calendar-filter-empty[hidden] { display: none !important; }
.calendar-event {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 2px;
    padding: 6px 7px;
    color: var(--text-secondary);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-left: 3px solid var(--navy-700);
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    line-height: 1.2;
    text-align: left;
}
.calendar-event:hover { color: var(--heading); background: var(--surface-hover); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.calendar-event-own { box-shadow: inset 0 0 0 1px rgba(20, 67, 111, .2); }
.calendar-event-due-soon { background: var(--warning-bg); border-color: var(--warning-border); border-left-color: var(--warning); }
.calendar-event-overdue { background: var(--danger-bg); border-color: var(--danger-border); border-left-color: var(--danger); }
.calendar-event-closed { background: var(--neutral-bg); border-color: var(--neutral-border); border-left-color: var(--neutral); }
.calendar-event-active { background: var(--success-bg); border-color: var(--success-border); border-left-color: var(--success); }
.calendar-event-phase { overflow: hidden; color: var(--text-muted); font-size: 8px; font-weight: 800; letter-spacing: .025em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.calendar-event-reference { overflow: hidden; color: inherit; font-size: 9px; font-weight: 800; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-purpose { overflow: hidden; color: var(--text); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-meta { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 4px; color: var(--text-muted); font-size: 8px; }
.calendar-event-cell .status-badge { max-width: 72px; overflow: hidden; padding: 2px 4px; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-period { color: var(--text-muted); font-size: 10px; }
.calendar-more {
    width: 100%;
    padding: 4px 6px;
    color: var(--interactive);
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
    font-size: 9px;
    font-weight: 800;
    text-align: left;
}
.calendar-more:hover { color: var(--heading); background: var(--surface-hover); }
.calendar-empty-month { display: grid; gap: 3px; padding: 16px; color: var(--text-muted); border-top: 1px solid var(--border); text-align: center; }
.calendar-empty-month strong { color: var(--heading); }
.calendar-filter-empty { display: grid; gap: 3px; padding: 14px; color: var(--text-muted); border-top: 1px solid var(--border); text-align: center; }
.calendar-filter-empty strong { color: var(--heading); }
.calendar-list-view { display: grid; gap: 8px; padding: 13px; }
.calendar-event-list, .calendar-event-drawer {
    grid-template-columns: minmax(135px, .65fr) minmax(170px, 1fr) auto;
    align-items: center;
    gap: 8px 14px;
    padding: 11px 12px;
}
.calendar-event-list .calendar-event-meta, .calendar-event-drawer .calendar-event-meta { grid-column: 3; grid-row: 1 / span 2; align-items: flex-end; flex-direction: column; }
.calendar-event-list .calendar-event-reference, .calendar-event-drawer .calendar-event-reference { font-size: 11px; }
.calendar-event-list .calendar-event-purpose, .calendar-event-drawer .calendar-event-purpose { grid-column: 2; grid-row: 1; }
.calendar-event-list .calendar-event-period { grid-column: 1 / 3; }
.calendar-drawer-backdrop {
    position: fixed;
    z-index: 45;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(8, 22, 38, .32);
    border: 0;
    cursor: default;
    opacity: 0;
    transition: opacity 160ms ease;
}
.calendar-drawer {
    position: fixed;
    z-index: 46;
    top: 0;
    right: 0;
    bottom: 0;
    display: grid;
    width: min(440px, calc(100vw - 32px));
    grid-template-rows: auto minmax(0, 1fr);
    background: var(--surface-elevated);
    border-left: 1px solid var(--border);
    box-shadow: -14px 0 34px rgba(7, 27, 53, .16);
    transform: translateX(100%);
    transition: transform 180ms ease;
}
.calendar-drawer-backdrop.is-open { opacity: 1; }
.calendar-drawer.is-open { transform: translateX(0); }
.calendar-drawer-header { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.calendar-drawer-header h2 { margin: 0; font-size: 16px; }
.calendar-drawer-content { min-height: 0; overflow-y: auto; padding: 18px; }
.calendar-drawer-detail { display: grid; gap: 17px; }
.calendar-drawer-reference { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.calendar-drawer-reference h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.calendar-drawer-summary { display: grid; margin: 0; }
.calendar-drawer-summary > div { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--row-border); }
.calendar-drawer-summary dt { color: var(--text-muted); font-size: 10px; font-weight: 750; }
.calendar-drawer-summary dd { margin: 0; color: var(--text); font-size: 12px; }
.calendar-drawer-action { padding: 11px 12px; color: var(--text-secondary); background: var(--blue-50); border: 1px solid var(--info-border); border-left: 3px solid var(--info); border-radius: 7px; }
.calendar-drawer-action.warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); border-left-color: var(--warning); }
.calendar-drawer-action p { margin: 3px 0 0; font-size: 12px; }
.calendar-drawer-items { display: grid; gap: 8px; }
.calendar-drawer-items .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calendar-drawer-items .section-heading h4 { margin: 0; }
.calendar-drawer-items .section-heading span { color: var(--text-muted); font-size: 10px; }
.calendar-item-list { display: grid; border-top: 1px solid var(--border); }
.calendar-item-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.calendar-item-list > div > span:first-child { display: grid; min-width: 0; gap: 2px; }
.calendar-item-list strong { font-size: 12px; }
.calendar-item-list small { font-size: 9px; }
.calendar-item-list > div > span:last-child { color: var(--interactive); font-size: 11px; font-weight: 750; white-space: nowrap; }
.calendar-private-note { margin: 0; padding: 11px; color: var(--text-muted); background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 7px; font-size: 11px; }
.calendar-day-summary > p:not(.eyebrow) { color: var(--text-muted); font-size: 11px; }
.calendar-day-summary-list { display: grid; gap: 7px; margin-top: 14px; }
.calendar-event-drawer { grid-template-columns: minmax(0, 1fr) auto; }
.calendar-event-drawer .calendar-event-purpose { grid-column: 1; grid-row: 2; }
.calendar-event-drawer .calendar-event-meta { grid-column: 2; grid-row: 1 / span 2; }
body.calendar-drawer-open { overflow: hidden; }

.request-list, .borrowing-list, .accountability-list { display: grid; gap: 10px; }
.request-list-item, .borrowing-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, .75fr) auto;
    gap: 18px;
    align-items: center;
    padding: 15px 17px;
    color: inherit;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.request-list-item:hover, .borrowing-list-item:hover { color: inherit; background: var(--surface-hover); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.request-list-item.is-action-required { border-left: 3px solid var(--warning); }
.request-list-main, .request-list-meta, .borrowing-list-main, .borrowing-list-meta { display: grid; min-width: 0; gap: 3px; }
.request-list-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.request-list-purpose { overflow: hidden; color: var(--heading); font-size: 14px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.request-list-main small, .borrowing-list-main small, .request-list-meta small, .borrowing-list-meta small { color: var(--text-muted); }
.request-list-meta, .borrowing-list-meta { padding-left: 16px; border-left: 1px solid var(--border); font-size: 12px; }
.request-list-action { display: inline-flex; align-items: center; gap: 5px; color: var(--interactive); font-size: 11px; font-weight: 800; white-space: nowrap; }
.request-list-action.is-required { color: var(--warning); }
.request-list-action .ui-icon { width: 16px; height: 16px; }
.borrower-empty-state { display: flex; min-height: 150px; align-items: center; justify-content: center; flex-direction: column; gap: 14px; background: var(--surface-elevated); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.request-empty-state { min-height: 126px; padding: 22px; }
.borrower-empty-state strong, .borrower-empty-state span { display: block; }

.request-form-shell { max-width: 1120px; }
.request-form-heading .step-chip { align-self: center; }
.step-chip { padding: 6px 10px; color: var(--interactive); background: var(--blue-50); border: 1px solid var(--info-border); border-radius: 999px; font-size: 11px; font-weight: 750; }
.form-section { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 5px 13px; }
.section-number { display: grid; width: 30px; height: 30px; place-items: center; color: #fff; background: var(--navy-800); border-radius: 50%; font-size: 10px; font-weight: 800; }
.form-section > .full-span { grid-column: 1 / -1; margin-top: 9px; }
.form-section h2 { margin-bottom: 2px; }
.item-selection-section { padding-bottom: 14px; }
.locked-value { display: inline-flex; min-height: 34px; align-items: center; color: var(--text-muted); font-size: 11px; }
.review-note { padding: 12px 14px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; }
.review-note p { margin-top: 0; }
.review-note ul { margin-bottom: 0; padding-left: 18px; color: var(--text-muted); }
.sticky-actions { position: sticky; z-index: 5; bottom: 10px; padding: 10px; background: color-mix(in srgb, var(--page-bg) 96%, transparent); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); }

.action-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-left: 4px solid var(--navy-700);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.action-panel h2 { margin-bottom: 3px; }
.action-panel p:not(.eyebrow) { margin: 0; color: var(--text-muted); }
.action-panel > :first-child { min-width: 0; }
.action-primary { border-left-color: var(--interactive); }
.action-warning { background: var(--warning-bg); border-left-color: var(--warning); }
.action-success { background: var(--success-bg); border-left-color: var(--success); }
.action-neutral { border-left-color: var(--border-strong); }

.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.summary-grid > div { padding: 9px 0; border-bottom: 1px solid var(--row-border); }
.summary-grid dt, .summary-grid dd { margin: 0; }
.summary-grid dt { color: var(--text-muted); font-size: 10px; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; }
.summary-grid dd { margin-top: 2px; overflow-wrap: anywhere; }
.summary-grid .summary-wide { grid-column: 1 / -1; }
.summary-grid.compact > div { padding: 7px 0; }
.request-progress-grid { align-items: start; }
.context-chip {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    min-height: 27px;
    align-items: center;
    padding: 4px 8px;
    color: var(--neutral);
    background: var(--neutral-bg);
    border: 1px solid var(--neutral-border);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
}
.context-chip-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.approval-queue-list { display: grid; gap: 10px; }
.approval-queue-item {
    display: grid;
    grid-template-columns: minmax(230px, 1.4fr) minmax(220px, .9fr) minmax(145px, .55fr) auto;
    align-items: center;
    gap: 16px;
    padding: 15px 17px;
    color: inherit;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-left: 3px solid var(--info);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.approval-queue-item:hover { color: inherit; background: var(--surface-hover); border-color: var(--border-strong); border-left-color: var(--info); }
.approval-queue-primary, .approval-queue-schedule, .approval-queue-indicators { display: grid; min-width: 0; gap: 3px; }
.approval-queue-primary > strong { overflow: hidden; color: var(--heading); font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.approval-queue-borrower { color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.approval-queue-period { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; color: var(--heading); font-size: 12px; font-weight: 750; }
.approval-queue-schedule small { color: var(--text-muted); font-size: 10px; }
.approval-queue-indicators { justify-items: start; }
.approval-queue-indicators > span:first-child { color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.approval-queue-action { display: inline-flex; min-height: 36px; align-items: center; gap: 4px; color: var(--interactive); font-size: 11px; font-weight: 800; white-space: nowrap; }
.approval-queue-empty { min-height: 112px; padding: 24px; background: var(--surface-elevated); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.approval-review-heading .heading-status { margin-top: 7px; }
.approval-review-summary .summary-grid dd small { display: block; margin-top: 1px; color: var(--text-muted); }
.approval-review-context, .approval-review-supporting { align-items: start; }
.approval-schedule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin: 0; }
.approval-schedule-grid > div { padding: 9px 0; border-bottom: 1px solid var(--row-border); }
.approval-schedule-grid dt, .approval-schedule-grid dd { margin: 0; }
.approval-schedule-grid dt { color: var(--text-muted); font-size: 10px; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; }
.approval-schedule-grid dd { margin-top: 2px; color: var(--heading); font-weight: 650; }
.approval-schedule-grid .approval-schedule-wide { grid-column: 1 / -1; }
.approval-off-campus-note { display: grid; gap: 7px; margin-top: 13px; padding: 11px 12px; background: var(--warning-bg); border: 1px solid var(--warning-border); border-left: 3px solid var(--warning); border-radius: 7px; }
.approval-off-campus-note p { margin: 0; color: var(--text-secondary); font-size: 11px; }
.approval-certification-panel .detail-list dd { justify-items: start; }
.approval-items-table { max-height: 440px; overflow: auto; }
.approval-items-table table { min-width: 650px; }
.approval-document-list article > div { gap: 4px; }
.approval-document-list .status-badge { margin-top: 4px; }
.approval-decision-section { margin-top: 28px; }
.approval-decision-panel { background: var(--info-bg); border-color: var(--info-border); border-top: 3px solid var(--info); }
.approval-decision-panel[data-decision-tone="approve"] { background: var(--success-bg); border-color: var(--success-border); border-top-color: var(--success); }
.approval-decision-panel[data-decision-tone="return"] { background: var(--warning-bg); border-color: var(--warning-border); border-top-color: var(--warning); }
.approval-decision-panel[data-decision-tone="reject"] { background: var(--danger-bg); border-color: var(--danger-border); border-top-color: var(--danger); }
.approval-decision-panel[data-decision-tone="approve"] select { border-color: var(--success); }
.approval-decision-panel[data-decision-tone="return"] select { border-color: var(--warning); }
.approval-decision-panel[data-decision-tone="reject"] select { border-color: var(--danger); }
.approval-decision-form { padding: 15px; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: 8px; }
.approval-decision-form .field-help { margin: -8px 0 0; color: var(--text-muted); font-size: 11px; font-weight: 500; }
.approval-decision-form .field-error { margin-top: -8px; }
.approval-decision-form [aria-invalid="true"] { border-color: var(--danger); }
.approval-decision-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 13px; border-top: 1px solid var(--border); }
.approval-decision-footer p { max-width: 680px; margin: 0; color: var(--text-muted); font-size: 11px; }
.approval-decision-footer .button { flex: 0 0 auto; }
.approval-progress { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.approval-progress li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding-bottom: 18px; }
.approval-progress li:not(:last-child)::before { position: absolute; top: 27px; bottom: 0; left: 13px; width: 1px; content: ""; background: var(--border-strong); }
.approval-marker { display: grid; z-index: 1; width: 27px; height: 27px; place-items: center; color: #fff; background: var(--navy-800); border-radius: 50%; font-size: 10px; font-weight: 800; }
.approval-stage { margin-right: 8px; color: var(--heading); font-weight: 800; }
.approval-progress p { margin: 4px 0 0; }
.approval-progress small { color: var(--text-muted); }
.review-remarks { margin-top: 8px; padding: 9px 10px; background: var(--warning-bg); border-left: 3px solid var(--warning); border-radius: 5px; }
.review-remarks p { margin: 2px 0 0; }
.borrower-document-list article > div { gap: 4px; }
.borrower-document-list .status-badge { margin-top: 4px; }
.certification-panel { border-left: 4px solid var(--navy-700); }
.compact-danger summary { color: var(--danger); cursor: pointer; font-weight: 750; }
.compact-danger[open] summary { margin-bottom: 5px; }

.accountability-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.accountability-summary span { display: grid; gap: 1px; padding: 13px 15px; color: var(--text-muted); font-size: 11px; border-right: 1px solid var(--border); }
.accountability-summary span:last-child { border-right: 0; }
.accountability-summary strong { color: var(--heading); font-size: 21px; line-height: 1; }
.dashboard-stat-grid.accountability-filter-grid .dashboard-kpi-card { height: 100px; min-height: 100px; padding: 10px 12px; }
.borrower-accountability-browser { display: grid; gap: 11px; }
.borrower-accountability-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px) minmax(145px, 180px) auto;
    gap: 10px;
    align-items: end;
    padding: 10px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.borrower-accountability-toolbar label { display: grid; min-width: 0; gap: 6px; margin: 0; color: var(--text-muted); font-size: 10px; font-weight: 750; }
.borrower-accountability-toolbar input,
.borrower-accountability-toolbar select { width: 100%; height: 40px; min-height: 40px; }
.borrower-accountability-clear { height: 40px; min-height: 40px; }
.borrower-accountability-results { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-muted); font-size: 11px; }
.borrower-accountability-results [data-accountability-result-count] { color: var(--text-secondary); font-weight: 750; }
.borrower-accountability-records { display: grid; gap: 9px; }
.accountability-browser-record { display: grid; gap: 11px; padding: 14px 16px; }
.accountability-browser-record[hidden],
.borrower-accountability-empty[hidden] { display: none !important; }
.accountability-browser-record .record-heading h3 { margin: 1px 0 2px; font-size: 15px; }
.accountability-browser-record .record-heading small { color: var(--text-muted); font-size: 10px; }
.accountability-browser-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--row-border); }
.accountability-browser-facts > span { display: grid; min-width: 0; gap: 3px; padding: 9px 12px 0 0; }
.accountability-browser-facts small { color: var(--text-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.accountability-browser-facts strong { color: var(--text-secondary); font-size: 11px; overflow-wrap: anywhere; }
.accountability-browser-record > .meta { margin: 0; }
.borrower-accountability-empty { display: grid; min-height: 80px; place-content: center; gap: 3px; padding: 10px 14px; color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); text-align: center; }
.borrower-accountability-empty strong { color: var(--heading); }
@media (max-width: 900px) {
    .borrower-accountability-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .borrower-accountability-search { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
    .stat-grid.accountability-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-stat-grid.accountability-filter-grid .dashboard-kpi-card { height: 100px; min-height: 100px; padding: 9px 10px; }
    .borrower-accountability-toolbar { grid-template-columns: 1fr; }
    .borrower-accountability-search { grid-column: auto; }
    .borrower-accountability-clear { width: 100%; }
    .borrower-accountability-results { align-items: flex-start; flex-direction: column; gap: 2px; }
    .accountability-browser-facts { grid-template-columns: 1fr; }
    .accountability-browser-facts > span { padding-top: 7px; }
}
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-heading h2 { margin-bottom: 0; }
.accountability-record { padding: 17px 19px; }
.record-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.record-heading h3 { margin: 2px 0 0; }
.incident-outcomes { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.incident-outcomes span { padding: 5px 8px; color: var(--text-secondary); background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 6px; font-size: 11px; }
.billing-lines { margin: 10px 0; border-top: 1px solid var(--border); }
.billing-lines p { display: grid; grid-template-columns: minmax(130px, .45fr) minmax(0, 1fr) auto; gap: 10px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--border); }
.billing-lines span, .billing-lines small { color: var(--text-muted); }
.payment-upload { margin-top: 15px; padding: 14px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; }
.payment-history { margin-top: 12px; }

/* SPMU operational views */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.operational-summary { margin-bottom: 14px; }
.operational-table table { min-width: 900px; border-collapse: separate; border-spacing: 0; }
.operational-table th { position: sticky; z-index: 1; top: var(--topbar-height); }
.inventory-operations-table table { min-width: 980px; }
.operational-quantity { margin-bottom: 5px; font-size: 25px; line-height: 1; }
.operational-quantity.is-available { color: var(--success); }
.operational-quantity.is-zero { color: var(--danger); }
.inventory-operations-table .status-badge { margin-top: 6px; }
.quantity-pair { display: grid; gap: 4px; }
.quantity-pair > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: 11px; }
.quantity-pair strong { color: var(--heading); font-size: 13px; }
.operational-record-list { display: flex; flex-direction: column; gap: 9px; }
.operational-record {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(380px, 1.25fr) minmax(155px, auto);
    align-items: center;
    gap: 16px;
    padding: 13px 15px 13px 12px;
    color: inherit;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-left: 3px solid var(--info);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.operational-record.is-warning { border-left-color: var(--warning); }
.operational-record.is-danger { border-left-color: var(--danger); }
.operational-record:hover { color: inherit; background: var(--surface-hover); border-color: var(--border-strong); border-left-color: var(--info); }
.operational-record.is-warning:hover { border-left-color: var(--warning); }
.operational-record.is-danger:hover { border-left-color: var(--danger); }
.operational-record-primary { display: grid; min-width: 0; gap: 2px; }
.operational-record-primary > strong { color: var(--heading); font-size: 14px; }
.operational-record-primary > span { color: var(--text-secondary); }
.operational-record-primary small { color: var(--text-muted); }
.operational-record-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 16px; border-right: 1px solid var(--border); border-left: 1px solid var(--border); }
.operational-record-facts > span { display: grid; min-width: 0; gap: 2px; }
.operational-record-facts small { color: var(--text-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.operational-record-facts strong { color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.operational-record-action { display: grid; justify-items: start; gap: 7px; }
.operational-record-action > strong { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 3px; padding: 6px 10px; border: 1px solid var(--interactive); border-radius: 8px; background: transparent; color: var(--interactive); font-size: 11px; font-weight: 750; transition: color var(--motion) ease, background-color var(--motion) ease, border-color var(--motion) ease; }
.operational-record:hover .operational-record-action > strong, .operational-record:focus-visible .operational-record-action > strong { color: #fff; background: var(--interactive); border-color: var(--interactive); }
.custody-process { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; overflow: hidden; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); list-style: none; }
.custody-process li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; padding: 11px 12px; border-right: 1px solid var(--border); }
.custody-process li:last-child { border-right: 0; }
.custody-process li > span { display: grid; width: 26px; height: 26px; place-items: center; color: var(--text-muted); background: var(--surface-muted); border: 1px solid var(--border-strong); border-radius: 50%; font-size: 10px; font-weight: 800; }
.custody-process li > div { display: grid; min-width: 0; gap: 1px; }
.custody-process strong { color: var(--text-secondary); font-size: 11px; }
.custody-process small { color: var(--text-muted); font-size: 9px; }
.custody-process .is-complete > span { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.custody-process .is-current { background: var(--info-bg); }
.custody-process .is-current > span { color: var(--info); background: var(--surface-elevated); border-color: var(--info-border); }
.custody-preparation-grid { grid-template-columns: minmax(0, 2fr) minmax(280px, .75fr); align-items: start; }
.preparation-table table { min-width: 800px; }
.preparation-table input { min-width: 120px; }
.operational-confirmation { display: grid; gap: 13px; border-top: 3px solid var(--info); }
.acknowledgement-status { display: grid; gap: 12px; border-left: 4px solid var(--warning); }
.acknowledgement-status.is-complete { border-left-color: var(--success); }
.conditional-document-grid .card { border-top: 3px solid var(--info); }
.physical-release-panel { display: grid; gap: 13px; border-top: 3px solid var(--warning); }
.release-checklist { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.release-checklist li { position: relative; padding-left: 20px; color: var(--warning); font-size: 11px; font-weight: 700; }
.release-checklist li::before { position: absolute; top: 1px; left: 0; content: "â—‹"; }
.release-checklist li.is-complete { color: var(--success); }
.release-checklist li.is-complete::before { content: "âœ“"; }
.evidence-upload-panel { border-top: 3px solid var(--info); }
.evidence-verification-panel { border-top: 3px solid var(--warning); }
.operational-evidence-row { align-items: flex-start; }
.operational-evidence-row > div:first-child { display: grid; min-width: 0; justify-items: start; gap: 4px; }
.evidence-decision-form { width: min(100%, 330px); padding: 11px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; }
.operational-verification-form { border-top: 3px solid var(--info); }
.return-processing-form { border-top: 3px solid var(--interactive); }
.return-processing-table table { min-width: 1280px; }
.return-processing-table td { vertical-align: top; }
.return-processing-table td:last-child { min-width: 280px; }
.return-processing-table td:last-child label + label { margin-top: 8px; }
.operational-action-form { margin-top: 13px; padding: 13px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; }
.record-note { margin: 10px 0; padding: 9px 10px; color: var(--text-secondary); background: var(--surface-subtle); border-left: 3px solid var(--border-strong); border-radius: 5px; }
.payment-verification-form { width: min(100%, 620px); padding: 12px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; }
.payment-verification-form > p { margin-bottom: 0; color: var(--text-muted); font-size: 11px; }

.profile-readonly-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-readonly-grid > div { display: grid; padding: 9px 10px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 7px; }
.profile-readonly-grid span { color: var(--text-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.profile-readonly-grid strong { margin-top: 2px; font-size: 12px; }
.profile-readonly-grid.single-row { grid-template-columns: 1fr; }
.account-settings-form { align-content: start; }
.profile-side-column { display: grid; align-content: start; gap: 16px; }
.appearance-settings-card { display: grid; gap: 12px; }
.appearance-settings-card .card-header { margin-bottom: 0; }
.account-settings-section { display: grid; gap: 13px; }
.account-settings-section + .account-settings-section { padding-top: 18px; border-top: 1px solid var(--border); }
.account-settings-section .section-heading { margin-bottom: 0; }
.account-settings-section .field-help { margin: -3px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.55; }
.account-information-callout { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; }
.account-information-callout .ui-icon { margin-top: 1px; color: var(--info); }
.account-information-callout p { margin: 2px 0 0; }
.signature-card .signature-preview { width: 100%; max-width: none; min-height: 130px; display: grid; place-items: center; }
.signature-card .signature-preview img { max-height: 110px; }

.borrower-notifications { overflow: hidden; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.notification-list .notification-item { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; }
.notification-date { display: grid; justify-items: center; color: var(--interactive); border-right: 1px solid var(--border); }
.notification-date strong { font-size: 20px; line-height: 1; }
.notification-date span { color: var(--text-muted); font-size: 9px; }
.notification-copy { min-width: 0; }
.notification-copy p { margin: 3px 0; }
.notification-copy small { color: var(--text-muted); }
.notification-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notification-heading h2 { margin: 0; font-size: 14px; }

/* A notification row opens the record it refers to. The link is stretched
   over the whole item so the "Mark as read" control inside it stays
   separately clickable instead of being nested in an anchor. */
.notification-list .notification-item.is-linked { position: relative; }
.notification-open { position: absolute; inset: 0; z-index: 1; border-radius: 6px; }
.notification-open:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.notification-list .notification-item.is-linked:hover { background: var(--surface-hover); }
.notification-list .notification-item.is-linked:hover .notification-heading h2 { color: var(--interactive); }
.notification-list .notification-item.is-linked.unread:hover { background: var(--blue-50); border-left-color: var(--interactive); }
.notification-item > form { position: relative; z-index: 2; }

/* Public and authentication */
.site-header, body > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px var(--content-gutter); color: #dce8f5; background: var(--navy-950); }
.site-header {
    gap: 24px;
}
.site-header .brand {
    flex: 1;
    min-width: 0;
}
.site-header nav {
    flex: 0 0 auto;
}
.site-header nav a {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    opacity: 0.9;
    transition: opacity var(--motion) ease;
}
.site-header nav a:hover {
    opacity: 1;
    color: #fff;
}
body > main:not(.app-main) { min-height: calc(100vh - 139px); }
body > footer {
    color: #9eb2c8;
    font-size: 11px;
}
body > footer span:last-child {
    color: #6d8297;
    font-size: 10px;
}
body > footer a {
    color: #dce8f5;
    text-decoration: underline;
    text-underline-offset: 2px;
}
body > footer a:hover { color: #fff; }
.public-header .brand-mark { background: var(--navy-700); }
.public-header nav {
    display: flex;
    gap: 12px;
    align-items: center;
}
.public-header nav a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
}
.public-header nav a:first-child {
    color: rgba(255, 255, 255, .85);
    opacity: 0.85;
    transition: opacity var(--motion) ease;
}
.public-header nav a:first-child:hover {
    opacity: 1;
}
.public-header nav a:last-child {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    transition: background var(--motion) ease;
}
.public-header nav a:last-child:hover {
    background: rgba(255, 255, 255, .25);
}
.hero {
    position: relative;
    overflow: hidden;
    padding: 72px max(var(--content-gutter), calc((100vw - 1320px) / 2)) 84px;
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    background-image: url('/images/cspc-campus-hero.png');
    background-size: cover;
    background-position: center 42%;
    background-attachment: scroll;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 27, 53, .8) 0%, rgba(7, 27, 53, .72) 22%, rgba(7, 27, 53, .5) 38%, rgba(11, 52, 90, .34) 56%, rgba(130, 175, 214, .18) 72%, rgba(255, 255, 255, 0) 100%),
        linear-gradient(135deg, rgba(7, 27, 53, .8) 0%, rgba(12, 45, 82, .52) 45%, rgba(23, 105, 170, .28) 100%);
    pointer-events: none;
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}
.hero h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.15;
    letter-spacing: -.028em;
    font-weight: 700;
}
.hero-statement {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, .95);
    font-size: 20px;
    line-height: 1.4;
    font-weight: 600;
}
.hero-description {
    margin: 0 0 24px;
    color: rgba(237, 245, 255, .82);
    font-size: 15px;
    line-height: 1.65;
}
.hero .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
@media (prefers-reduced-motion: no-preference) {
    .hero-content {
        animation: fadeInDown 0.7s ease-out;
    }
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.section-block, .feature-grid, .public-section {
    padding: 48px max(var(--content-gutter), calc((100vw - 1320px) / 2));
}
.section-block:first-of-type {
    padding-top: 56px;
}
.section-block > h2 { max-width: 900px; margin: 0 0 18px; font-size: clamp(22px, 2.8vw, 32px); }
.section-block > .eyebrow { display: block; margin: 0 0 6px; }
.section-intro { color: var(--text-muted); font-size: 15px; margin: 0 0 24px; max-width: 880px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature-grid.landing-workflow { padding: 0; }
.landing-workflow article { position: relative; padding: 26px; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius); }
.landing-workflow article:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -17px;
    width: 14px;
    height: 2px;
    background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
    transform: translateY(-50%);
}
.workflow-step {
    display: grid;
    gap: 12px;
    transition: transform var(--motion) ease, box-shadow var(--motion) ease, border-color var(--motion) ease;
}
.workflow-step:hover {
    transform: translateY(-2px);
    border-color: var(--interactive);
    box-shadow: 0 5px 12px rgba(7, 27, 53, .08);
}
.step-number {
    color: var(--interactive);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .05em;
}
.workflow-step h3 {
    margin-top: 4px;
}
.workflow-step p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}
.capability-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}
.capability-card,
.info-card {
    padding: 22px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-elevated);
}
.capability-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--heading);
}
.capability-card p,
.info-card li {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}
.info-grid-section {
    margin-top: 0;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}
.info-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 18px 18px 16px;
    border-radius: 12px;
}
.info-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.info-card__icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--navy-900);
    background: rgba(21, 105, 170, .12);
}
.info-card__icon .ui-icon {
    width: 16px;
    height: 16px;
}
.info-card h2 {
    margin: 0;
    color: var(--navy-950);
    font-size: clamp(18px, 1.5vw, 24px);
    line-height: 1.25;
}
.info-card ul {
    list-style: none;
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
}
.info-card li {
    position: relative;
    padding-left: 18px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.info-card li::before {
    content: "âœ“";
    position: absolute;
    left: 0;
    top: 0;
    color: #317d5a;
    font-weight: 700;
}
.info-card--green {
    background: #edf9f1;
    border-color: rgba(37, 89, 62, .22);
}
.info-card--green .info-card__icon {
    background: rgba(51, 125, 89, .12);
    color: #1f5e3f;
}
.info-card--amber {
    background: #fff7e8;
    border-color: rgba(142, 106, 42, .25);
}
.info-card--amber .info-card__icon {
    background: rgba(186, 126, 31, .12);
    color: #7a4d0d;
}
.accountability-copy {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}
.cta-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin: 0 auto 20px;
    padding: 18px 20px;
    border: 1px solid rgba(23, 105, 170, .18);
    border-radius: 12px;
    background: #edf6ff;
    color: var(--navy-900);
}
.cta-panel__icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: var(--navy-700);
    background: rgba(23, 105, 170, .12);
}
.cta-panel__icon .ui-icon {
    width: 22px;
    height: 22px;
}
.cta-panel__content {
    min-width: 0;
}
.cta-panel h2 {
    margin: 0;
    font-size: clamp(18px, 1.8vw, 24px);
    color: var(--navy-950);
    line-height: 1.3;
}
.cta-panel__content p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}
.cta-panel .button.primary {
    flex: 0 0 auto;
    background: var(--primary-action);
    color: #fff;
    border-color: var(--primary-action);
    min-height: 40px;
    padding: 10px 18px;
}
.cta-panel .button.primary:hover {
    color: #fff;
    background: var(--primary-action-hover);
    border-color: var(--primary-action-hover);
}
.landing-footer {
    background: var(--navy-950);
    color: #dfeaf8;
    border-top: 1px solid rgba(159, 177, 201, .22);
}
.landing-footer__inner {
    display: grid;
    grid-template-columns: minmax(420px, 1.2fr) minmax(280px, .8fr);
    align-items: start;
    gap: 64px;
    width: min(100%, 1220px);
    margin: 0 auto;
    padding: 40px var(--content-gutter) 0;
}
.landing-footer__brand {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
}
.landing-footer__logo {
    width: 60px;
    height: auto;
    flex: 0 0 auto;
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    padding: 4px;
}
.landing-footer__identity {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: auto;
}
.landing-footer__title {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.02em;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.landing-footer__meta {
    color: #b7c9dc;
    font-size: 14px;
}
.landing-footer__meta--emphasis {
    color: #dceaf9;
    font-weight: 600;
}
.landing-footer__support {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-self: end;
    align-self: start;
    min-width: 280px;
    width: min(100%, 360px);
}
.landing-footer__support h3 {
    margin: 0;
    color: #fff;
    font-size: 13px;
}
.landing-footer__support p {
    margin: 0;
    color: #c4d5ea;
    font-size: 14px;
}
.landing-footer__divider {
    width: min(100%, var(--content-max));
    margin: 24px auto 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.landing-footer__copyright {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    padding: 16px var(--content-gutter) 20px;
    color: #a7b9cd;
    font-size: 12px;
    text-align: center;
}
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    .cta-panel {
        grid-template-columns: auto 1fr;
        padding: 16px 18px;
    }
    .cta-panel .button.primary {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }
    .landing-footer__inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .landing-footer__support {
        justify-items: start;
    }
}
@media (max-width: 520px) {
    .info-card {
        padding: 16px 14px;
    }
    .cta-panel {
        margin-bottom: 18px;
        padding: 14px 14px;
        gap: 12px;
    }
    .cta-panel h2 {
        font-size: 18px;
    }
    .cta-panel__content p {
        font-size: 13px;
    }
    .landing-footer__inner {
        padding-top: 24px;
        padding-bottom: 14px;
    }
    .landing-footer__brand {
        gap: 12px;
    }
    .landing-footer__title {
        font-size: 15px;
    }
    .landing-footer__meta {
        font-size: 13px;
    }
}
@media (prefers-reduced-motion: no-preference) {
    .landing-workflow article {
        opacity: 0;
        transform: translateY(24px);
    }
    .landing-workflow article.is-revealed {
        animation: workflowReveal 0.5s ease-out forwards;
    }
    .landing-workflow article:nth-child(1) { animation-delay: 0ms; }
    .landing-workflow article:nth-child(2) { animation-delay: 100ms; }
    .landing-workflow article:nth-child(3) { animation-delay: 200ms; }
    .landing-workflow article:nth-child(4) { animation-delay: 300ms; }
}
@keyframes workflowReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
body:has(.auth-shell) .public-header {
    display: none !important;
}

main:has(.auth-shell) {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

body > main + footer {
    display: none !important;
}

.auth-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px var(--content-gutter);
    position: relative;
    background: #ecf1f7;
    overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
    content: '';
    position: absolute;
    background: radial-gradient(circle, rgba(200, 220, 255, .25) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.auth-shell::before {
    width: 450px;
    height: 450px;
    top: -120px;
    right: -100px;
}

.auth-shell::after {
    width: 520px;
    height: 520px;
    bottom: -180px;
    left: -150px;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(530px, calc(100vw - 32px));
    max-width: 535px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(211, 220, 230, .6);
    box-shadow: 0 8px 32px rgba(7, 27, 53, .08);
    padding: 40px 48px 44px;
    text-align: center;
}

.auth-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    background: #e8f1ff;
    border-radius: 50%;
}

.auth-icon-container svg {
    width: 46px;
    height: 46px;
    color: #1769aa;
    stroke-width: 1.6;
}

.auth-heading {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-heading h1 {
    margin: 0;
    color: #0b203b;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.015em;
}

.auth-heading p {
    margin: 0;
    color: #647489;
    font-size: 15px;
    line-height: 1.5;
}

.auth-heading strong {
    color: #1769aa;
    font-weight: 700;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
    text-align: left;
}

.auth-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field-group > label {
    margin: 0;
    color: #142235;
    font-size: 12px;
    font-weight: 700;
    text-transform: none;
}

.auth-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    height: 56px;
    background: #fcfdff;
    border: 1px solid #dce5f0;
    border-radius: 10px;
    transition: all var(--motion) ease;
}

.auth-input-wrapper:focus-within {
    border-color: #1769aa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(23, 105, 170, .08);
}

.auth-input-wrapper svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: #7b899a;
    stroke-width: 1.8;
}

.auth-input-wrapper input {
    flex: 1;
    border: 0;
    background: transparent;
    color: #142235;
    font-size: 15px;
    padding: 0;
    margin: 0;
    font-family: inherit;
    box-shadow: none;
}

.auth-input-wrapper input::placeholder {
    color: #a5b2c2;
}

.auth-input-wrapper input:focus {
    outline: 0;
}

.auth-password-wrapper {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    min-width: auto;
    padding: 4px;
    height: 24px;
    width: 24px;
    background: transparent;
    border: 0;
    color: #7b899a;
    cursor: pointer;
    border-radius: 4px;
    transition: color var(--motion) ease;
}

.auth-password-toggle:hover {
    color: #1769aa;
    background: rgba(23, 105, 170, .06);
}

.auth-password-toggle:focus-visible {
    outline: 2px solid #1769aa;
    outline-offset: 2px;
}

.auth-password-toggle svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin: 0;
    color: #142235;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox input {
    flex: 0 0 auto;
    cursor: pointer;
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #1769aa;
}

.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 32px;
    margin: 0;
    width: 100%;
    height: 56px;
    background: linear-gradient(90deg, #1769aa 0%, #145b94 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--motion) ease;
}

.auth-button:hover {
    background: linear-gradient(90deg, #0f568e 0%, #0f4a76 100%);
    box-shadow: 0 6px 20px rgba(23, 105, 170, .2);
}

.auth-button:active {
    transform: scale(.99);
}

.auth-button:focus-visible {
    outline: 2px solid #1769aa;
    outline-offset: 2px;
}

.auth-button-arrow {
    font-size: 18px;
    font-weight: 700;
}

.auth-divider {
    position: relative;
    margin: 24px 0;
    text-align: center;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dce5f0;
}

.auth-divider span {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 0 12px;
    background: #fff;
    color: #647489;
    font-size: 13px;
    font-weight: 500;
}

.auth-help-text {
    margin: 0;
    color: #647489;
    font-size: 13px;
    line-height: 1.6;
}

.field-error {
    margin: 0;
    padding: 0;
    color: #dc3545;
    font-size: 11px;
    line-height: 1.4;
}

@media (max-height: 760px) {
    .auth-shell {
        padding: 12px var(--content-gutter);
        min-height: auto;
    }

    .auth-card {
        padding: 32px 40px 36px;
    }

    .auth-icon-container {
        width: 80px;
        height: 80px;
        margin: 0 auto 16px;
    }

    .auth-icon-container svg {
        width: 42px;
        height: 42px;
    }

    .auth-heading {
        margin-bottom: 20px;
        gap: 6px;
    }

    .auth-heading h1 {
        font-size: 26px;
    }

    .auth-heading p {
        font-size: 14px;
    }

    .auth-form {
        gap: 14px;
        margin-bottom: 16px;
    }

    .auth-divider {
        margin: 16px 0;
    }
}

@media (max-width: 600px) {
    .auth-shell {
        padding: 16px 12px;
    }

    .auth-card {
        width: calc(100% - 24px);
        max-width: none;
        padding: 28px 22px 32px;
        border-radius: 16px;
    }

    .auth-icon-container {
        width: 80px;
        height: 80px;
        margin: 0 auto 18px;
    }

    .auth-icon-container svg {
        width: 40px;
        height: 40px;
    }

    .auth-heading {
        margin-bottom: 20px;
    }

    .auth-heading h1 {
        font-size: 24px;
    }

    .auth-heading p {
        font-size: 14px;
    }

    .auth-input-wrapper {
        height: 52px;
        padding: 12px 14px;
    }

    .auth-button {
        height: 52px;
        padding: 12px 24px;
        font-size: 15px;
    }

    .auth-form {
        gap: 16px;
    }

    .auth-divider {
        margin: 20px 0;
    }
}

.password-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.password-field label {
    display: inline;
    gap: 0;
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.password-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    min-height: auto;
    min-width: auto;
    padding: 4px 6px;
    height: auto;
    background: transparent;
    border: none;
    color: var(--interactive);
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
    border-radius: 0;
}

.password-toggle:hover {
    color: var(--interactive-hover);
    background: transparent;
    border-color: transparent;
}

.password-toggle:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
}

.password-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.password-field label {
    display: inline;
    gap: 0;
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.password-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    min-height: auto;
    min-width: auto;
    padding: 4px 6px;
    height: auto;
    background: transparent;
    border: none;
    color: var(--interactive);
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
    border-radius: 0;
}

.password-toggle:hover {
    color: var(--interactive-hover);
    background: transparent;
    border-color: transparent;
}

.password-toggle:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
}

@media (min-width: 1050px) {
    .app-sidebar { transform: none; }
    .sidebar-close, .menu-toggle, .sidebar-backdrop { display: none; }
    body.sidebar-open { overflow: visible; }
}

@media (max-width: 1049px) {
    .app-shell { display: block; }
    .app-stage { width: 100%; margin-left: 0; }
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: var(--sidebar-width);
        transform: translateX(-102%);
        transition: transform var(--motion) ease;
        box-shadow: var(--shadow);
    }
    .sidebar-close, .menu-toggle { display: inline-grid; }
    .sidebar-open { overflow: hidden; }
    .sidebar-open .app-sidebar { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 30; width: 100%; height: 100%; padding: 0; background: rgba(5, 18, 34, .48); border: 0; border-radius: 0; opacity: 0; pointer-events: none; transition: opacity var(--motion) ease; }
    .sidebar-open .sidebar-backdrop { display: block; opacity: 1; pointer-events: auto; }
}

@media (max-width: 1100px) {
    .approval-queue-item { grid-template-columns: minmax(220px, 1.15fr) minmax(210px, .9fr) auto; }
    .approval-queue-primary { grid-row: 1 / span 2; }
    .approval-queue-indicators { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    .approval-queue-action { grid-column: 3; grid-row: 1 / span 2; }
    .operational-record { grid-template-columns: minmax(0, 1fr) minmax(155px, auto); }
    .operational-record-facts { grid-column: 1 / -1; grid-row: 2; padding: 10px 0 0; border-top: 1px solid var(--border); border-right: 0; border-left: 0; }
    .operational-record-action { grid-column: 2; grid-row: 1; }
}

@media (max-width: 768px) {
    :root { --content-gutter: 16px; }
    .app-main { padding-top: 20px; }
    .app-topbar { gap: 8px; }
    .topbar-title { margin-right: auto; }
    .account-nav { margin-left: 0; gap: 1px; }
    .page-heading { display: flex; align-items: flex-start; flex-direction: column; gap: 13px; }
    .page-heading > div:first-child { display: block; min-width: 0; }
    .page-heading h1 { font-size: 22px; }
    .stat-grid, .content-grid, .content-grid.two, .content-grid.three, .dashboard-grid, .hero { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-kpi-card { min-height: 122px; }
    .form-columns { grid-template-columns: 1fr; }
    .report-filter-row { flex-direction: column; align-items: stretch; }
    .report-filter-row label, .report-filter-row label input { width: 100%; }
    .report-header-actions { width: 100%; }
    .report-header-actions .button { flex: 1 1 auto; }
    .hero {
        min-height: clamp(420px, 62vh, 560px);
        padding: 56px max(var(--content-gutter), calc((100vw - 1320px) / 2)) 64px;
    }
    .hero h1 { font-size: clamp(28px, 5vw, 40px); }
    .hero-statement { font-size: 18px; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-list dt { padding-bottom: 0; border-bottom: 0; }
    .detail-list dd { padding-top: 2px; }
    .request-list-item, .borrowing-list-item { grid-template-columns: 1fr auto; gap: 10px 14px; }
    .request-list-meta, .borrowing-list-meta { grid-column: 1; padding: 8px 0 0; border-top: 1px solid var(--border); border-left: 0; }
    .request-list-action { grid-column: 2; grid-row: 1 / span 2; }
    .action-panel { align-items: flex-start; flex-direction: column; gap: 13px; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-grid.landing-workflow article:not(:last-child)::after { display: none; }
    .landing-workflow article { grid-column: span 1; }
    .action-panel > .actions { width: 100%; }
    .summary-grid { grid-template-columns: 1fr; }
    .summary-grid .summary-wide { grid-column: auto; }
    .approval-queue-item { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 14px; }
    .approval-queue-primary { grid-column: 1; grid-row: 1; }
    .approval-queue-schedule { grid-column: 1; grid-row: 2; padding-top: 8px; border-top: 1px solid var(--row-border); }
    .approval-queue-indicators { grid-column: 1; grid-row: 3; }
    .approval-queue-action { grid-column: 2; grid-row: 1 / span 3; }
    .approval-schedule-grid { grid-template-columns: 1fr; }
    .approval-schedule-grid .approval-schedule-wide { grid-column: auto; }
    .approval-decision-footer { align-items: flex-start; flex-direction: column; }
    .accountability-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .accountability-summary span:nth-child(2) { border-right: 0; }
    .accountability-summary span:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .billing-lines p { grid-template-columns: 1fr; gap: 2px; }
    .notification-list .notification-item { grid-template-columns: 46px minmax(0, 1fr); }
    .notification-item > form { grid-column: 2; }
    .calendar-page-heading { gap: 10px; }
    .calendar-month-summary { width: 100%; justify-content: flex-start; }
    .calendar-toolbar { grid-template-columns: 1fr auto; gap: 9px; }
    .calendar-month-title { grid-column: 1 / -1; grid-row: 1; }
    .calendar-navigation { grid-column: 1; grid-row: 2; }
    .calendar-view-toggle { grid-column: 2; grid-row: 2; }
    .calendar-weekdays > div { padding-right: 4px; padding-left: 4px; }
    .weekday-full { display: none; }
    .weekday-short { display: inline; }
    .custody-process { grid-template-columns: repeat(5, minmax(175px, 1fr)); overflow-x: auto; }
    .custody-preparation-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .borrower-inventory-table table, .borrower-detail-table table, .request-items-table table { min-width: 0; }
    .borrower-inventory-table thead, .borrower-detail-table thead, .request-items-table thead { display: none; }
    .borrower-inventory-table tbody, .borrower-inventory-table tr, .borrower-inventory-table td,
    .borrower-detail-table tbody, .borrower-detail-table tr, .borrower-detail-table td,
    .request-items-table tbody, .request-items-table tr, .request-items-table td { display: block; width: 100%; }
    .borrower-inventory-table tr, .borrower-detail-table tr, .request-items-table tr { padding: 10px 12px; border-bottom: 1px solid var(--border); }
    .borrower-inventory-table tr:last-child, .borrower-detail-table tr:last-child, .request-items-table tr:last-child { border-bottom: 0; }
    .borrower-inventory-table td, .borrower-detail-table td, .request-items-table td { display: grid; grid-template-columns: minmax(105px, .42fr) minmax(0, 1fr); gap: 10px; padding: 6px 0; border: 0; }
    .borrower-inventory-table td::before, .borrower-detail-table td::before, .request-items-table td::before { content: attr(data-label); color: var(--text-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
    .borrower-inventory-table td.empty-state, .borrower-detail-table td.empty-state, .request-items-table td.empty-state { display: block; }
    .quantity-input { max-width: none; }
    .operational-record { grid-template-columns: 1fr; gap: 10px; }
    .operational-record-action { grid-column: 1; grid-row: auto; justify-items: stretch; padding-top: 8px; border-top: 1px solid var(--border); }
    .operational-record-action > strong { justify-content: space-between; }
    .operational-record-facts { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; gap: 7px; }
    .calendar-legend { gap: 7px 12px; }
    .calendar-list-view { padding: 9px; }
    .calendar-event-list { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; }
    .calendar-event-list .calendar-event-reference { grid-column: 1; grid-row: 1; }
    .calendar-event-list .calendar-event-purpose { grid-column: 1; grid-row: 2; }
    .calendar-event-list .calendar-event-period { grid-column: 1 / -1; grid-row: 3; }
    .calendar-event-list .calendar-event-meta { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 590px) {
    .feature-grid.landing-workflow { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    :root { --topbar-height: 60px; --content-gutter: 13px; }
    body { font-size: 13px; }
    .app-topbar { padding-top: 6px; padding-bottom: 6px; }
    .topbar-title small { display: none; }
    .topbar-title strong { max-width: 90px; }
    .icon-button { width: 38px; height: 38px; flex-basis: 38px; }
    .account-menu-toggle { min-height: 40px; padding-right: 6px; }
    .account-menu-name { display: none; }
    .stat-grid { grid-template-columns: 1fr; gap: 10px; }
    .report-kpi-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 92px; }
    .dashboard-kpi-card { min-height: 116px; padding: 14px 15px 15px; }
    .card { padding: 15px; }
    .report-header-actions { flex-direction: column; align-items: stretch; }
    .report-export-menu, .report-export-menu summary, .report-export-menu .report-export-panel { width: 100%; }
    .report-export-panel { position: static; margin-top: 10px; }
    .distribution-row-head { flex-direction: column; align-items: flex-start; }
    .report-table { min-width: 760px; }
    .card-header { flex-direction: column; }
    .page-heading { margin-bottom: 16px; }
    .page-heading h1 { font-size: 21px; }
    .hero {
        min-height: clamp(340px, 58vh, 440px);
        padding: 44px max(var(--content-gutter), calc((100vw - 1320px) / 2)) 52px;
    }
    .hero h1 { font-size: clamp(24px, 6vw, 32px); }
    .hero-statement { font-size: 16px; }
    .hero-description { font-size: 14px; }
    .hero .actions { gap: 10px; }
    .button { width: 100%; }
    .actions .button, .inline-actions .button { width: auto; flex: 1 1 auto; }
    .queue-list article, .document-list article, .evidence-row { align-items: flex-start; flex-direction: column; }
    .deadline-list a { grid-template-columns: 44px 1fr; }
    .deadline-list .deadline-event { grid-template-columns: 50px minmax(0, 1fr); gap: 10px; padding: 10px 9px 10px 7px; }
    .deadline-event-status { grid-column: 2; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
    .deadline-list .deadline-event-status .status-badge { grid-column: auto; justify-self: start; }
    .site-header, body > footer { padding-right: 14px; padding-left: 14px; }
    body > footer { align-items: flex-start; flex-direction: column; gap: 4px; }
    .auth-card { padding: 20px; }
    .dashboard-task-link { padding: 10px 9px 10px 8px; }
    .dashboard-task-heading { align-items: flex-start; }
    .request-list-item, .borrowing-list-item { grid-template-columns: 1fr; }
    .request-list-action { grid-column: 1; grid-row: auto; justify-content: space-between; padding-top: 7px; border-top: 1px solid var(--border); }
    .approval-queue-item { grid-template-columns: 1fr; padding: 13px; }
    .approval-queue-primary, .approval-queue-schedule, .approval-queue-indicators, .approval-queue-action { grid-column: 1; grid-row: auto; }
    .approval-queue-action { width: 100%; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--row-border); }
    .approval-queue-primary > strong { white-space: normal; }
    .approval-decision-form { padding: 12px; }
    .approval-decision-footer .button { width: 100%; }
    .form-section { grid-template-columns: 30px minmax(0, 1fr); padding: 14px; }
    .section-number { width: 26px; height: 26px; }
    .sticky-actions { position: static; }
    .accountability-summary { grid-template-columns: 1fr; }
    .accountability-summary span, .accountability-summary span:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--border); }
    .accountability-summary span:last-child { border-bottom: 0; }
    .record-heading { align-items: flex-start; flex-direction: column; }
    .profile-readonly-grid { grid-template-columns: 1fr; }
    .profile-readonly-grid .full-span { grid-column: auto; }
    .notification-list .notification-item { grid-template-columns: 1fr; }
    .notification-date { justify-items: start; grid-auto-flow: column; justify-content: start; gap: 5px; padding-bottom: 7px; border-right: 0; border-bottom: 1px solid var(--border); }
    .notification-item > form { grid-column: 1; }
    .calendar-toolbar { padding: 9px; }
    .calendar-navigation .button { width: auto; }
    .calendar-legend { padding: 8px 10px; }
    .calendar-month-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-summary-filter { justify-content: center; }
    .calendar-summary-clear { grid-column: 1 / -1; }
    .calendar-drawer { width: 100%; }
    .calendar-drawer-content { padding: 15px; }
    .calendar-drawer-reference { align-items: flex-start; flex-direction: column; }
    .calendar-drawer-summary > div { grid-template-columns: 1fr; gap: 2px; }
    .calendar-event-drawer { grid-template-columns: 1fr; }
    .calendar-event-drawer .calendar-event-reference,
    .calendar-event-drawer .calendar-event-purpose,
    .calendar-event-drawer .calendar-event-meta { grid-column: 1; grid-row: auto; }
    .calendar-event-drawer .calendar-event-meta { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    .interactive:hover, .button:hover, .sidebar-nav a:hover, .table-action:hover, .quick-actions a:hover,
    .interactive:active, .button:active, .icon-button:active, .sidebar-nav a:active, .table-action:active, .quick-actions a:active,
    .ui-pressable:hover, .ui-pressable:active,
    .stat-card-link.ui-pressable:hover, .stat-card-link.ui-pressable:active, .stat-card-link.ui-pressable:hover:active,
    .quick-actions a.ui-pressable:hover, .quick-actions a.ui-pressable:active, .quick-actions a.ui-pressable:hover:active { transform: none; }
}

@media print {
    .app-sidebar, .app-topbar, .sidebar-backdrop, .site-header, body > footer { display: none !important; }
    .app-stage { margin: 0; }
    .app-main { width: 100%; max-width: none; padding: 0; display: block; min-height: 0; }
    body { background: #fff; }
    .card, .table-wrap { box-shadow: none; break-inside: avoid; }
}
/* =========================================================
   LOGIN PAGE â€” LOCAL OVERRIDES ONLY
   Does NOT modify public header/footer/global layout.
   ========================================================= */

.login-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: calc(100vh - 145px);

    padding: 24px 16px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 92% 52%,
            rgba(72, 139, 230, 0.10) 0,
            rgba(72, 139, 230, 0.10) 14%,
            transparent 14.2%
        ),
        radial-gradient(
            circle at 4% 105%,
            rgba(72, 139, 230, 0.08) 0,
            rgba(72, 139, 230, 0.08) 17%,
            transparent 17.2%
        ),
        #f3f7fc;
}


/* CARD */

.login-page .login-card {
    position: relative;
    z-index: 1;

    width: min(430px, calc(100vw - 32px));

    padding: 24px 30px 26px;

    border: 1px solid #d7e0eb;
    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 14px 38px rgba(27, 55, 91, 0.09);
}


/* SHIELD */

.login-page .login-emblem {
    display: grid;
    place-items: center;

    width: 66px;
    height: 66px;

    margin: 0 auto 14px;

    border-radius: 999px;

    background: #e8f2ff;
    color: #1769b4;
}

.login-page .login-emblem svg {
    width: 34px;
    height: 34px;
}


/* HEADING */

.login-page .login-heading {
    margin-bottom: 20px;
    text-align: center;
}

.login-page .login-heading h1 {
    margin: 0;

    color: #10284a;

    font-size: 26px;
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.login-page .login-heading p {
    margin: 7px 0 0;

    color: #71809a;

    font-size: 14px;
    line-height: 1.5;
}

.login-page .login-heading strong {
    color: #216ee5;
}


/* FORM */

.login-page .login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-page .login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-page .login-field > label,
.login-page .login-label-row label {
    margin: 0;

    color: #142b4e;

    font-size: 13px;
    font-weight: 700;
}

.login-page .login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.login-page .login-forgot {
    color: #2874ef;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
}


/* INPUT WRAPPER */

.login-page .login-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    min-height: 50px;

    padding: 0 13px;

    border: 1px solid #c8d5e7;
    border-radius: 9px;

    background: #ffffff;

    box-sizing: border-box;
}

.login-page .login-input-wrap:focus-within {
    border-color: #2778ed;

    box-shadow:
        0 0 0 3px rgba(39, 120, 237, 0.11);
}


/* IMPORTANT:
   Removes global input styling inside login field */

.login-page .login-input-wrap input[type="email"],
.login-page .login-input-wrap input[type="password"],
.login-page .login-input-wrap input[type="text"] {
    flex: 1;

    width: 100%;
    min-width: 0;
    height: 48px;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    outline: 0 !important;

    background: transparent !important;

    box-shadow: none !important;

    color: #152b4b;

    font: inherit;
    font-size: 14px;
}

.login-page .login-input-wrap input:hover,
.login-page .login-input-wrap input:focus,
.login-page .login-input-wrap input:active {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}


/* ICON */

.login-page .login-input-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;

    color: #71829b;
}

.login-page .login-input-icon svg {
    width: 18px;
    height: 18px;
}


/* PASSWORD EYE */

.login-page .login-password-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 auto;

    width: 34px;
    height: 34px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #71829b;

    cursor: pointer;
}

.login-page .login-password-toggle:hover {
    background: #f1f6fc;
    color: #2874ef;
}

.login-page .login-password-toggle svg {
    width: 18px;
    height: 18px;
}


/* REMEMBER */

.login-page .login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    width: fit-content;

    margin: 0;

    color: #566781;

    font-size: 13px;

    cursor: pointer;
}

.login-page .login-remember input[type="checkbox"] {
    width: 17px;
    height: 17px;

    margin: 0;

    accent-color: #2874ef;
}


/* SIGN IN */

.login-page .login-submit {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 50px;

    padding: 0 48px;

    border: 0;
    border-radius: 9px;

    background:
        linear-gradient(
            100deg,
            #1748c8 0%,
            #2875f5 100%
        );

    box-shadow:
        0 9px 20px rgba(37, 105, 222, 0.18);

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 100ms ease,
        box-shadow 150ms ease;
}

.login-page .login-submit:hover {
    transform: translateY(-1px);

    box-shadow:
        0 12px 24px rgba(37, 105, 222, 0.23);
}

.login-page .login-submit:active {
    transform: scale(0.985);
}

.login-page .login-submit-arrow {
    position: absolute;
    right: 18px;

    font-size: 19px;
}


/* GOOGLE SIGN-IN
   Secondary to the blue primary button: surface background, thin border, and
   the same width and radius as the login controls. */

.login-page .login-alt-divider {
    display: flex;
    align-items: center;
    gap: 12px;

    color: #8190a7;

    font-size: 13px;
}

.login-page .login-alt-divider::before,
.login-page .login-alt-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: #dbe3ed;
}

.login-page .login-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 100%;
    min-height: 50px;

    padding: 0 18px;

    border: 1px solid #cfdae8;
    border-radius: 9px;

    background: #ffffff;

    color: #24374f;

    font-size: 14.5px;
    font-weight: 650;

    text-decoration: none;

    cursor: pointer;

    transition:
        border-color 150ms ease,
        background-color 150ms ease,
        box-shadow 150ms ease;
}

.login-page .login-google:hover {
    border-color: #b6c7dc;

    background: #f7fafd;

    box-shadow: 0 4px 12px rgba(37, 105, 222, 0.08);
}

.login-page .login-google:focus-visible {
    outline: 0;

    border-color: #2875f5;

    box-shadow: 0 0 0 3px rgba(40, 117, 245, 0.22);
}

.login-page .login-google-icon {
    display: inline-flex;
    flex: 0 0 auto;
}

html[data-theme="dark"] .login-page .login-google {
    border-color: #3a4c63;

    background: #16202c;

    color: #e5ecf5;
}

html[data-theme="dark"] .login-page .login-google:hover {
    border-color: #4c6280;

    background: #1c2836;
}

html[data-theme="dark"] .login-page .login-alt-divider::before,
html[data-theme="dark"] .login-page .login-alt-divider::after {
    background: #33445a;
}


/* HELP */

.login-page .login-help {
    margin-top: 0;

    text-align: center;
}

.login-page .login-help-divider {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 11px;

    color: #8190a7;

    font-size: 13px;
}

.login-page .login-help-divider::before,
.login-page .login-help-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: #dbe3ed;
}

.login-page .login-help p {
    margin: 2px 0;

    color: #31486b;

    font-size: 12.5px;
    line-height: 1.4;
}


/* VALIDATION */

.login-page .login-error {
    color: #b83240;

    font-size: 12.5px;
}


/* SHORT LAPTOP */

@media (max-height: 760px) and (min-width: 601px) {

    .login-page {
        min-height: auto;
        padding: 14px 16px;
    }

    .login-page .login-card {
        width: min(410px, calc(100vw - 32px));
        padding: 20px 28px 22px;
    }

    .login-page .login-emblem {
        width: 58px;
        height: 58px;

        margin-bottom: 10px;
    }

    .login-page .login-emblem svg {
        width: 30px;
        height: 30px;
    }

    .login-page .login-heading {
        margin-bottom: 16px;
    }

    .login-page .login-heading h1 {
        font-size: 24px;
    }

    .login-page .login-form {
        gap: 12px;
    }

}


/* MOBILE */

@media (max-width: 600px) {

    .login-page {
        min-height: auto;
        padding: 14px 12px 20px;
    }

    .login-page .login-card {
        width: 100%;
        padding: 22px 20px 24px;
    }

    .login-page .login-emblem {
        width: 60px;
        height: 60px;
    }

    .login-page .login-heading h1 {
        font-size: 24px;
    }

}


/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .login-page .login-submit {
        transition: none;
    }

    .login-page .login-submit:hover,
    .login-page .login-submit:active {
        transform: none;
    }

}
/* =========================================================
   LOGIN FINAL FIX
   Keep public header/footer and landing page untouched.
   ========================================================= */

/* Keep login compact so footer stays reachable */
.login-page {
    min-height: auto !important;
    padding: 14px 16px 18px !important;
}

/* Card */
.login-page .login-card {
    width: min(410px, calc(100vw - 32px)) !important;
    padding: 20px 28px 22px !important;
    border-radius: 18px !important;
}

/* Shield */
.login-page .login-emblem {
    width: 58px !important;
    height: 58px !important;
    margin-bottom: 10px !important;
}

.login-page .login-emblem svg {
    width: 30px !important;
    height: 30px !important;
}

/* Heading */
.login-page .login-heading {
    margin-bottom: 16px !important;
}

.login-page .login-heading h1 {
    font-size: 24px !important;
}

.login-page .login-heading p {
    margin-top: 5px !important;
    font-size: 13px !important;
}

/* Form spacing */
.login-page .login-form {
    gap: 12px !important;
}

/* Inputs: wrapper owns the appearance */
.login-page .login-input-wrap {
    min-height: 46px !important;
    padding: 0 12px !important;

    border: 1px solid #c8d5e7 !important;
    border-radius: 9px !important;

    background: #ffffff !important;
}

/* Remove all global/native input background */
.login-page .login-input-wrap input[type="email"],
.login-page .login-input-wrap input[type="password"],
.login-page .login-input-wrap input[type="text"] {
    flex: 1 !important;

    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;

    background: transparent !important;
    background-color: transparent !important;

    box-shadow: none !important;

    color: #152b4b !important;
    font-size: 14px !important;
}

/* Browser autofill */
.login-page .login-input-wrap input:-webkit-autofill,
.login-page .login-input-wrap input:-webkit-autofill:hover,
.login-page .login-input-wrap input:-webkit-autofill:focus {
    -webkit-text-fill-color: #152b4b !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
}

/* Focus */
.login-page .login-input-wrap:focus-within {
    border-color: #2874ef !important;
    box-shadow: 0 0 0 3px rgba(40, 116, 239, 0.12) !important;
}

/* Icons */
.login-page .login-input-icon {
    display: grid !important;
    place-items: center !important;
}

.login-page .login-input-icon svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
}

/* Eye toggle */
.login-page button.login-password-toggle {
    display: grid !important;
    place-items: center !important;

    width: 34px !important;
    height: 34px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 8px !important;

    background: transparent !important;
    box-shadow: none !important;

    color: #71829b !important;
}

.login-page button.login-password-toggle svg {
    display: block !important;
    width: 19px !important;
    height: 19px !important;
}

/* Remember checkbox */
.login-page .login-remember {
    gap: 8px !important;
    font-size: 13px !important;
}

.login-page .login-remember input[type="checkbox"] {
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    accent-color: #2874ef;
}

/* Restore BLUE Sign in button */
.login-page button.login-submit {
    position: relative !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: 48px !important;

    margin: 0 !important;
    padding: 0 48px !important;

    border: 0 !important;
    border-radius: 9px !important;

    background: linear-gradient(
        100deg,
        #1748c8 0%,
        #2875f5 100%
    ) !important;

    color: #ffffff !important;

    box-shadow:
        0 9px 20px rgba(37, 105, 222, 0.20) !important;

    font-size: 14px !important;
    font-weight: 700 !important;

    cursor: pointer !important;
}

.login-page button.login-submit:hover {
    background: linear-gradient(
        100deg,
        #1543ba 0%,
        #216bea 100%
    ) !important;

    transform: translateY(-1px);
}

.login-page .login-submit-arrow {
    position: absolute !important;
    right: 18px !important;

    color: #ffffff !important;
    font-size: 19px !important;
}

/* Need help */
.login-page .login-help-divider {
    margin-bottom: 8px !important;
}

.login-page .login-help p {
    margin: 2px 0 !important;
    font-size: 12px !important;
}

/* Mobile */
@media (max-width: 600px) {
    .login-page {
        padding: 12px !important;
    }

    .login-page .login-card {
        width: 100% !important;
        padding: 20px !important;
    }
}

/* Request progress tracker -------------------------------------------------- */
.request-tracker-card {
    margin-top: 18px;
}

.request-tracker {
    overflow: hidden;
}

.request-tracker__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--row-border);
}

.request-tracker__header h2 {
    margin: 2px 0 4px;
}

.request-tracker__intro {
    margin: 0;
    color: var(--text-muted);
}

.request-tracker__current {
    display: inline-flex;
    min-height: 34px;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid var(--info-border);
    border-radius: 999px;
    color: var(--info);
    background: var(--info-bg);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.request-tracker__current-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 13%, transparent);
}

.request-tracker__current.is-warning {
    color: var(--warning);
    background: var(--warning-bg);
    border-color: var(--warning-border);
}

.request-tracker__current.is-terminal {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

.request-tracker__attention-note,
.request-tracker__terminal-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid var(--warning-border);
    border-radius: 9px;
    color: var(--warning);
    background: var(--warning-bg);
    font-size: 12px;
    font-weight: 650;
}

.request-tracker__terminal-note {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

.request-tracker__attention-note .ui-icon,
.request-tracker__terminal-note .ui-icon {
    margin-top: 1px;
    flex: 0 0 auto;
}

.request-tracker__scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    padding: 26px 2px 14px;
}

.request-tracker__scroll:focus-visible {
    border-radius: 8px;
}

.request-tracker__rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(125px, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.request-tracker__step {
    position: relative;
    min-width: 0;
    padding: 0 8px;
    text-align: center;
}

.request-tracker__step::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 23px;
    left: calc(50% + 23px);
    width: calc(100% - 46px);
    height: 3px;
    border-radius: 999px;
    background: var(--border);
}

.request-tracker__step:last-child::after {
    display: none;
}

.request-tracker__step.is-complete::after {
    background: var(--success);
}

.request-tracker__marker {
    position: relative;
    z-index: 1;
    display: grid;
    width: 46px;
    height: 46px;
    margin: 0 auto 11px;
    place-items: center;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    color: var(--text-soft);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 5px var(--surface-elevated);
    transition: border-color var(--motion) ease, color var(--motion) ease, background var(--motion) ease, box-shadow var(--motion) ease;
}

.request-tracker__step.is-complete .request-tracker__marker {
    color: #fff;
    background: var(--success);
    border-color: var(--success);
}

.request-tracker__step.is-current .request-tracker__marker {
    color: var(--interactive);
    border-color: var(--interactive);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 5px var(--surface-elevated), 0 0 0 8px color-mix(in srgb, var(--interactive) 16%, transparent);
}

.request-tracker__step.is-warning .request-tracker__marker {
    color: var(--warning);
    border-color: var(--warning);
    background: var(--warning-bg);
    box-shadow: 0 0 0 5px var(--surface-elevated), 0 0 0 8px color-mix(in srgb, var(--warning) 16%, transparent);
}

.request-tracker__step.is-stopped .request-tracker__marker {
    color: var(--danger);
    border-color: var(--danger);
    background: var(--danger-bg);
    box-shadow: 0 0 0 5px var(--surface-elevated), 0 0 0 8px color-mix(in srgb, var(--danger) 13%, transparent);
}

.request-tracker__copy {
    display: grid;
    justify-items: center;
    gap: 3px;
}

.request-tracker__copy strong {
    display: flex;
    align-items: center;
    min-height: 2.6em;
    color: var(--heading);
    font-size: 12px;
    line-height: 1.3;
}

.request-tracker__copy time,
.request-tracker__pending-label {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.35;
}

.request-tracker__copy small {
    display: -webkit-box;
    overflow: hidden;
    max-width: 155px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.request-tracker__step.is-current .request-tracker__copy strong {
    color: var(--interactive);
}

.request-tracker__step.is-warning .request-tracker__copy strong {
    color: var(--warning);
}

.request-tracker__step.is-stopped .request-tracker__copy strong {
    color: var(--danger);
}

.request-tracker__step.is-pending .request-tracker__copy {
    opacity: .72;
}

.request-tracker__hint {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 4px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--row-border);
    color: var(--text-muted);
    font-size: 11px;
}

.request-tracker__hint .ui-icon {
    flex: 0 0 auto;
    margin-top: 1px;
}

@media (max-width: 720px) {
    .request-tracker__header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .request-tracker__current {
        align-self: flex-start;
    }

    .request-tracker__scroll {
        margin-inline: -2px;
        padding-top: 22px;
    }

    .request-tracker__rail {
        grid-auto-columns: minmax(118px, 1fr);
    }
}


/* Final role-focused dashboards ------------------------------------------- */
.dashboard-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dashboard-stat-grid .dashboard-kpi-card {
    min-height: 138px;
    height: 100%;
}
.dashboard-balanced-grid {
    align-items: stretch;
}
.dashboard-panel-equal {
    min-height: 360px;
    height: 100%;
}
.workflow-mini-list {
    display: grid;
    gap: 10px;
}
.workflow-mini-list > span {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-subtle);
    color: var(--heading);
    font-weight: 650;
}
.workflow-mini-list > span > strong,
.laundry-dashboard-tracker > li > span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    color: var(--interactive);
    background: var(--blue-50);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 800;
}
.laundry-dashboard-tracker {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.laundry-dashboard-tracker > li {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 2px 10px;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-subtle);
}
.laundry-dashboard-tracker > li > span {
    grid-row: 1 / 3;
}
.laundry-dashboard-tracker strong {
    color: var(--heading);
    font-size: 12px;
}
.laundry-dashboard-tracker small {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .dashboard-stat-grid { grid-template-columns: 1fr; }
    .dashboard-panel-equal { min-height: auto; }
}

/* Laundry operations four-step tracker ------------------------------------ */
.laundry-progress-card { margin-top: 0; }
.laundry-progress-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.laundry-progress-step {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 96px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-subtle);
}
.laundry-progress-marker {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    color: var(--text-muted);
    background: var(--surface-elevated);
    font-size: 12px;
    font-weight: 800;
}
.laundry-progress-step strong { display: block; color: var(--heading); font-size: 12px; }
.laundry-progress-step small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 10px; line-height: 1.45; }
.laundry-progress-step.is-complete .laundry-progress-marker { color: #fff; background: var(--success); border-color: var(--success); }
.laundry-progress-step.is-current { border-color: var(--info-border); background: var(--info-bg); }
.laundry-progress-step.is-current .laundry-progress-marker { color: var(--interactive); border-color: var(--interactive); }
.laundry-progress-step.is-pending { opacity: .72; }

@media (max-width: 900px) {
    .laundry-progress-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .laundry-progress-rail { grid-template-columns: 1fr; }
}


/* Full-quantity return accounting */
.return-accounting-list {
    display: grid;
    gap: 1rem;
}

.return-accounting-card {
    border: 1px solid var(--border, #cbd8e6);
    border-radius: 10px;
    padding: 1rem;
    background: var(--surface, #fff);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.return-accounting-card.is-complete {
    border-color: #78b99a;
}

.return-accounting-card.is-incomplete {
    border-color: #d5a34d;
}

.return-accounting-card-head,
.return-accounting-supporting {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, .35fr);
    gap: 1rem;
    align-items: start;
}

.return-accounting-card-head small,
.return-accounting-supporting small {
    display: block;
    margin-top: .25rem;
}

.return-accounting-expected {
    text-align: right;
}

.return-accounting-expected span,
.return-accounting-expected strong {
    display: block;
}

.return-accounting-expected strong {
    font-size: 1.35rem;
}

.return-condition-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.return-accounting-summary {
    margin: .85rem 0 1rem;
    padding: .65rem .8rem;
    border-radius: 10px;
    background: #f4f7fb;
    font-weight: 700;
}

.return-accounting-card.is-complete .return-accounting-summary {
    background: #edf8f2;
}

.return-accounting-card.is-incomplete .return-accounting-summary {
    background: #fff7e8;
}

@media (max-width: 900px) {
    .return-condition-grid,
    .return-accounting-card-head,
    .return-accounting-supporting {
        grid-template-columns: 1fr;
    }

    .return-accounting-expected {
        text-align: left;
    }
}

/* BORROWER CALENDAR STATUS CARDS V2 */

/* Remove the large wrapper rectangle */
.calendar-month-summary[data-calendar-status-filters] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Shared card design */
[data-calendar-status-filters] .calendar-summary-filter {
    min-width: 118px;
    min-height: 56px;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 3px;
    padding: 9px 13px;
    border: 0 !important;
    border-radius: 10px;
    box-shadow: none !important;
    text-align: left;
}

[data-calendar-status-filters] .calendar-summary-filter strong {
    font-size: 19px;
    line-height: 1;
    font-weight: 800;
    color: #fff !important;
}

[data-calendar-status-filters] .calendar-summary-filter span {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    color: #fff !important;
}

/* Solid status colors */
[data-calendar-status-filters] .calendar-summary-active {
    background: #15803d !important;
}

[data-calendar-status-filters] .calendar-summary-due-soon {
    background: #a16207 !important;
}

[data-calendar-status-filters] .calendar-summary-overdue {
    background: #b42318 !important;
}

[data-calendar-status-filters] .calendar-summary-returned {
    background: #64748b !important;
}

/* Selected status — no shadow */
[data-calendar-status-filters] .calendar-summary-filter.is-selected {
    outline: 2px solid #16365f !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

/* All remains secondary */
[data-calendar-status-filters] .calendar-summary-clear {
    min-width: 52px;
    min-height: 56px;
    padding: 9px 12px;
    border: 1px solid var(--border) !important;
    border-radius: 10px;
    background: var(--surface) !important;
    color: var(--interactive) !important;
    box-shadow: none !important;
    font-size: 11px;
    font-weight: 700;
}

[data-calendar-status-filters] .calendar-summary-clear.is-selected {
    border-color: var(--interactive) !important;
    background: var(--surface-subtle) !important;
    box-shadow: none !important;
}

@media (max-width: 760px) {
    [data-calendar-status-filters] .calendar-summary-filter {
        flex: 1 1 105px;
        min-width: 105px;
    }
}

/* END BORROWER CALENDAR STATUS CARDS V2 */
