:root {
    color-scheme: light;
    --chrome: #1a2942;
    --chrome-deep: #142239;
    --chrome-2: #2d3b55;
    --chrome-3: #35455f;
    --chrome-line: rgba(255, 255, 255, 0.11);
    --chrome-text: #f6f9ff;
    --chrome-muted: #8fa2bf;
    --blue: #1f6ed4;
    --blue-2: #2f8bff;
    --blue-soft: #e9f2ff;
    --workspace: #edf3f9;
    --workspace-2: #e7eef7;
    --surface: #ffffff;
    --surface-2: #f7fbff;
    --surface-3: #eef5fc;
    --field: #ffffff;
    --text: #071a31;
    --soft: #314967;
    --muted: #637c9b;
    --line: #d7e2ee;
    --line-strong: #bfd0e3;
    --green: #118a5b;
    --amber: #bd7618;
    --red: #c33737;
    --cyan: #007c9c;
    --success-soft: #e8f7ef;
    --warn-soft: #fff3df;
    --danger-soft: #ffeded;
    --info-soft: #e8f6fb;
    --shadow: 0 12px 28px rgba(22, 39, 66, 0.12);
    --shadow-high: 0 22px 58px rgba(22, 39, 66, 0.18);
    --shadow-tight: 0 6px 14px rgba(22, 39, 66, 0.12);
    --button-top: #93bfff;
    --button-mid: #4a82e0;
    --button-bottom: #244f9e;
    --button-border: rgba(35, 77, 149, 0.82);
    --button-shadow: 0 18px 28px rgba(23, 58, 124, 0.18), 0 3px 0 rgba(19, 43, 84, 0.3);
    --mono: "Cascadia Code", "Consolas", monospace;
    --display: "Segoe UI Variable Display", "Aptos Display", "Bahnschrift", sans-serif;
    --body: "Segoe UI Variable Text", "Aptos", "Segoe UI", sans-serif;
    --radius: 10px;
    --radius-sm: 7px;
    --shell-sidebar-w: 236px;
    --shell-topbar-h: 52px;
    --shell-page-pad-x: 18px;
    --shell-page-pad-y: 14px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --workspace: #0d1421;
    --workspace-2: #101b2b;
    --surface: #141f31;
    --surface-2: #18263a;
    --surface-3: #1e3048;
    --field: #101b2b;
    --text: #f3f7ff;
    --soft: #c7d5e8;
    --muted: #8da2bd;
    --line: #263a55;
    --line-strong: #38516f;
    --blue-soft: rgba(47, 139, 255, 0.16);
    --success-soft: rgba(17, 138, 91, 0.18);
    --warn-soft: rgba(189, 118, 24, 0.18);
    --danger-soft: rgba(195, 55, 55, 0.18);
    --info-soft: rgba(0, 124, 156, 0.18);
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
    --shadow-high: 0 24px 70px rgba(0, 0, 0, 0.34);
    --shadow-tight: 0 8px 18px rgba(0, 0, 0, 0.24);
    --button-top: #82a9f6;
    --button-mid: #3f72cd;
    --button-bottom: #203f85;
    --button-border: rgba(126, 170, 255, 0.32);
    --button-shadow: 0 18px 28px rgba(0, 0, 0, 0.28), 0 3px 0 rgba(6, 18, 36, 0.72);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at 76% 10%, rgba(31, 110, 212, 0.12), transparent 27rem),
        linear-gradient(180deg, var(--workspace), var(--workspace-2));
    color: var(--text);
    font-family: var(--body);
    font-size: 13px;
    margin: 0;
    min-height: 100vh;
}

::selection {
    background: var(--blue);
    color: #ffffff;
}

a {
    color: var(--blue);
}

body.auth-screen {
    background:
        radial-gradient(circle at 50% 0%, rgba(31, 110, 212, 0.18), transparent 24rem),
        linear-gradient(180deg, #eef4fb, #dde8f5);
}

html[data-theme="dark"] body.auth-screen {
    background:
        radial-gradient(circle at 50% 0%, rgba(47, 139, 255, 0.2), transparent 24rem),
        linear-gradient(180deg, #0e1624, #101a2b);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-content: center;
    place-items: center;
    padding: 32px 18px;
}

.auth-stage {
    display: grid;
    gap: 18px;
    justify-self: center;
    width: min(100%, 680px);
}

.auth-brand {
    color: #0c1f38;
    justify-self: center;
    margin-bottom: 4px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.auth-brand strong {
    color: #0a1b31;
}

.auth-brand small {
    color: #476485;
}

html[data-theme="dark"] .auth-brand {
    color: #f5f9ff;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .auth-brand strong {
    color: #f5f9ff;
}

html[data-theme="dark"] .auth-brand small {
    color: #a8bad3;
}

.auth-shell .panel,
.auth-shell .hero-panel {
    margin: 0;
    width: 100%;
}

.auth-shell .panel {
    padding: 34px 38px;
}

.auth-shell .narrow {
    margin: 0;
    max-width: none;
}

.auth-shell .notice {
    margin: 0;
}

.auth-shell h1 {
    font-size: clamp(2.2rem, 4.2vw, 3rem);
    margin-bottom: 10px;
}

.auth-card-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 16px;
}

.choice-stack {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 14px;
}

.choice-stack legend {
    color: var(--text);
    font-weight: 700;
    padding: 0 6px;
}

.choice-card {
    align-items: flex-start;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    padding: 12px 14px;
}

.choice-card input {
    margin-top: 2px;
}

.choice-card strong,
.choice-card small {
    display: block;
}

.choice-card strong {
    color: var(--text);
}

.choice-card small {
    color: var(--muted);
    line-height: 1.45;
}

.choice-card:hover {
    border-color: var(--line-strong);
}

html[data-theme="dark"] .choice-stack,
html[data-theme="dark"] .choice-card {
    border-color: var(--line-strong);
}

.app-frame {
    display: grid;
    grid-template-columns: var(--shell-sidebar-w) minmax(0, 1fr);
    min-height: 100vh;
}

.side-rail {
    background: linear-gradient(180deg, var(--chrome), var(--chrome-deep));
    border-right: 1px solid var(--chrome-line);
    box-shadow: 10px 0 34px rgba(10, 19, 33, 0.18);
    color: var(--chrome-text);
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-height: 100vh;
    padding: 10px 10px 12px;
    position: sticky;
    top: 0;
}

.brand {
    align-items: center;
    color: var(--chrome-text);
    display: flex;
    gap: 9px;
    grid-row: 1;
    min-height: 40px;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, #1a78ff, #2361c8);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 8px 20px rgba(23, 103, 220, 0.35);
    color: #ffffff;
    display: inline-flex;
    font-family: var(--display);
    font-size: 15px;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    letter-spacing: -0.08em;
    width: 32px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.brand small {
    color: var(--chrome-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-top: 2px;
    text-transform: uppercase;
}

.rail-cta {
    align-items: center;
    background: linear-gradient(180deg, var(--button-top), var(--button-mid) 38%, var(--button-bottom));
    border: 1px solid var(--button-border);
    border-radius: 7px;
    box-shadow: var(--button-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.26);
    color: #ffffff;
    display: flex;
    font-weight: 900;
    gap: 9px;
    grid-row: 2;
    margin: 14px 0 12px;
    min-height: 44px;
    padding: 0 10px;
    text-decoration: none;
}

.rail-cta span {
    align-items: center;
    background: rgba(255, 255, 255, 0.13);
    border-radius: 7px;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.nav {
    align-content: start;
    display: grid;
    gap: 5px;
    grid-row: 3;
}

.nav-kicker {
    color: var(--chrome-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    padding: 0 6px 6px;
    text-transform: uppercase;
}

.nav-divider {
    border-top: 1px solid var(--chrome-line);
    margin: 14px 0 10px;
}

.rail-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #d6e1f2;
    display: grid;
    font-weight: 800;
    font-size: 12px;
    gap: 9px;
    grid-template-columns: 26px minmax(0, 1fr);
    min-height: 38px;
    padding: 0 8px;
    text-decoration: none;
}

.rail-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #b5c6df;
    display: inline-flex;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 900;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.icon-svg {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.icon-svg svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.85;
    width: 17px;
}

.rail-icon .icon-svg svg {
    height: 16px;
    width: 16px;
}

.rail-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.rail-link.active {
    background: #1f6ed4;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 18px rgba(16, 69, 155, 0.24);
    color: #ffffff;
}

.rail-link.active .rail-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.rail-footer {
    align-self: end;
    border-top: 1px solid var(--chrome-line);
    color: var(--chrome-muted);
    display: grid;
    font-size: 11px;
    gap: 4px;
    grid-row: 4;
    justify-items: center;
    padding-top: 14px;
    text-align: center;
}

.rail-footer strong {
    color: #6f83a3;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.rail-footer span {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.main-stage {
    min-width: 0;
}

.command-bar {
    align-items: center;
    background: var(--chrome);
    border-bottom: 1px solid var(--chrome-line);
    box-shadow: 0 5px 18px rgba(12, 22, 38, 0.2);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    min-height: var(--shell-topbar-h);
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.global-search {
    position: relative;
}

.global-search span {
    color: #b9c7dc;
    font-size: 11px;
    font-weight: 900;
    left: 12px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.global-search input {
    background: var(--chrome-2);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 12px;
    min-height: 32px;
    padding: 6px 66px 6px 58px;
    width: 100%;
}

.global-search input::placeholder {
    color: #a7b5cb;
}

.global-search:focus-within input {
    border-color: rgba(111, 184, 255, 0.74);
    box-shadow: 0 0 0 3px rgba(39, 130, 255, 0.2);
}

.hotkey-pill {
    align-items: center;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    color: #d0def2;
    display: inline-flex;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 900;
    height: 20px;
    justify-content: center;
    letter-spacing: 0.05em;
    min-width: 44px;
    padding: 0 6px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.command-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
    justify-self: end;
}

.top-button {
    align-items: center;
    background: var(--chrome-2);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    box-shadow: 0 10px 16px rgba(6, 14, 28, 0.18), 0 2px 0 rgba(6, 14, 28, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    gap: 6px;
    justify-content: center;
    min-height: 30px;
    padding: 0 11px;
    text-decoration: none;
    white-space: nowrap;
}

.top-button:hover {
    background: var(--chrome-3);
}

.top-button.primary {
    background: linear-gradient(180deg, var(--button-top), var(--button-mid) 38%, var(--button-bottom));
    border-color: var(--button-border);
    box-shadow: var(--button-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.theme-toggle-orb {
    background: linear-gradient(135deg, #ffe8a9, #ffffff);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(255, 230, 142, 0.52);
    display: inline-block;
    height: 15px;
    width: 15px;
}

html[data-theme="dark"] .theme-toggle-orb {
    background: linear-gradient(135deg, #85d5ff, #385c94);
    box-shadow: 0 0 12px rgba(109, 195, 255, 0.48);
}

.reports-menu,
.user-menu {
    position: relative;
}

.reports-menu summary,
.user-menu summary {
    list-style: none;
}

.reports-menu summary::-webkit-details-marker,
.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-chip {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    display: grid;
    gap: 8px;
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 36px;
    padding: 3px 10px 3px 4px;
    width: 194px;
}

.user-menu[open] .user-chip,
.user-chip:hover {
    background: var(--chrome-3);
}

.user-avatar {
    align-items: center;
    background: linear-gradient(135deg, #247af0, #176bd4);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.user-label {
    min-width: 0;
}

.user-label strong,
.user-label small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-label strong {
    font-size: 12px;
    line-height: 1.1;
}

.user-label small {
    color: #a7b5cb;
    font-size: 10px;
    line-height: 1.2;
    margin-top: 2px;
}

.reports-panel,
.user-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: var(--shadow-high);
    color: var(--text);
    display: grid;
    gap: 10px;
    padding: 12px 10px;
    position: absolute;
    right: 0;
    top: 42px;
    width: 320px;
    z-index: 50;
}

.user-panel {
    gap: 8px;
    padding: 10px;
    width: 320px;
}

.reports-panel > div + div {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.report-kicker {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.16em;
    margin: 0 0 9px;
    padding: 0 10px;
    text-transform: uppercase;
}

.reports-panel a,
.user-panel a,
.menu-theme-button {
    align-items: start;
    border-radius: 7px;
    color: var(--text);
    display: grid;
    gap: 10px;
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 9px 10px;
    text-decoration: none;
}

.menu-separator {
    background: var(--line);
    display: block;
    height: 1px;
    margin: 4px 6px;
}

.menu-theme-button {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
    width: 100%;
}

.reports-panel a:hover,
.user-panel a:hover,
.menu-theme-button:hover {
    background: var(--surface-3);
}

.reports-panel a span,
.user-panel a span,
.menu-theme-button > span {
    align-items: center;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--blue);
    display: inline-flex;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.reports-panel a > span,
.user-panel a > span,
.menu-theme-button > span {
    grid-row: 1 / span 2;
}

.menu-icon {
    align-items: center;
    justify-content: center;
}

.menu-icon .icon-svg svg {
    height: 18px;
    width: 18px;
}

.menu-theme-button .theme-toggle-orb {
    background: linear-gradient(135deg, #ffe8a9, #ffffff);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(255, 230, 142, 0.52);
    height: 18px;
    justify-self: center;
    width: 18px;
}

html[data-theme="dark"] .menu-theme-button .theme-toggle-orb {
    background: linear-gradient(135deg, #85d5ff, #385c94);
    box-shadow: 0 0 12px rgba(109, 195, 255, 0.48);
}

.reports-panel strong,
.reports-panel small,
.user-panel strong,
.user-panel small,
.menu-theme-button strong,
.menu-theme-button small {
    display: block;
}

.reports-panel strong,
.user-panel strong,
.menu-theme-button strong {
    font-size: 13px;
    grid-column: 2;
    line-height: 1.2;
}

.reports-panel small,
.user-panel small,
.menu-theme-button small {
    color: var(--soft);
    font-size: 11px;
    grid-column: 2;
    line-height: 1.3;
    margin-top: 3px;
}

.shell {
    margin: 0;
    max-width: none;
    padding: 0;
}

.toast-stack {
    bottom: 18px;
    display: grid;
    gap: 10px;
    left: 50%;
    max-width: min(540px, calc(100vw - 24px));
    pointer-events: none;
    position: fixed;
    transform: translateX(-50%);
    width: calc(100vw - 24px);
    z-index: 4000;
}

.notice {
    backdrop-filter: blur(16px);
    border-radius: 14px;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 18px 40px rgba(18, 31, 54, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.38);
    margin: 0;
    opacity: 0;
    padding: 12px 16px;
    pointer-events: auto;
    transform: translateY(16px) scale(0.97);
    transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
    filter: blur(4px);
}

.notice.is-visible {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0) scale(1);
}

.notice.is-leaving {
    filter: blur(3px);
    opacity: 0;
    transform: translateY(14px) scale(0.98);
}

.notice-error {
    background: linear-gradient(180deg, rgba(255, 242, 242, 0.96), rgba(255, 234, 234, 0.98));
    border-color: rgba(195, 55, 55, 0.26);
    color: #8f2f36;
}

.notice-success {
    background: linear-gradient(180deg, rgba(238, 250, 243, 0.96), rgba(229, 246, 236, 0.98));
    border-color: rgba(17, 138, 91, 0.24);
    color: #256c4f;
}

.notice-warning {
    background: linear-gradient(180deg, rgba(255, 247, 232, 0.96), rgba(255, 241, 217, 0.98));
    border-color: rgba(189, 118, 24, 0.24);
    color: #8b6020;
}

html[data-theme="dark"] .notice {
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .notice-error {
    background: linear-gradient(180deg, rgba(83, 31, 38, 0.96), rgba(61, 22, 28, 0.98));
    border-color: rgba(227, 111, 121, 0.26);
    color: #ffd5d9;
}

html[data-theme="dark"] .notice-success {
    background: linear-gradient(180deg, rgba(24, 66, 48, 0.96), rgba(18, 49, 36, 0.98));
    border-color: rgba(88, 184, 138, 0.24);
    color: #d7ffee;
}

html[data-theme="dark"] .notice-warning {
    background: linear-gradient(180deg, rgba(78, 55, 20, 0.96), rgba(56, 39, 15, 0.98));
    border-color: rgba(226, 181, 92, 0.24);
    color: #ffe7bd;
}

.page-heading {
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 18px rgba(22, 39, 66, 0.06);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: 0;
    min-height: 60px;
    padding: 10px var(--shell-page-pad-x);
}

.page-heading-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.page-heading-actions .search-form {
    min-width: min(420px, 100%);
}

.page-heading h1 {
    font-family: var(--display);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
}

.page-heading .lede {
    color: #426a98;
    font-size: 12px;
    line-height: 1.35;
    margin: 4px 0 0;
}

html[data-theme="dark"] .page-heading .lede {
    color: var(--muted);
}

.worksheet-heading {
    min-height: 60px;
}

.count-badge {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 241, 252, 0.96));
    border: 1px solid rgba(144, 171, 204, 0.34);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 6px 14px rgba(42, 66, 97, 0.08);
    color: #587191;
    display: inline-flex;
    font-weight: 900;
    font-size: 10px;
    letter-spacing: 0.08em;
    min-height: 24px;
    padding: 0 10px;
    text-transform: uppercase;
    white-space: nowrap;
}

html[data-theme="dark"] .count-badge {
    background: linear-gradient(180deg, rgba(25, 39, 60, 0.96), rgba(20, 33, 50, 0.98));
    border-color: rgba(120, 147, 183, 0.26);
    color: #bdd6ff;
}

.hero-panel,
.panel,
.status-card,
.metric,
.table-panel,
.ops-strip article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-panel,
.panel {
    margin: var(--shell-page-pad-y) var(--shell-page-pad-x);
    padding: 16px;
}

.hero-panel {
    align-items: stretch;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.hero-panel h1 {
    font-family: var(--display);
    font-size: clamp(30px, 3vw, 44px);
    letter-spacing: -0.05em;
    line-height: 1;
    margin: 0;
}

.hero-panel .lede,
.panel p {
    color: var(--muted);
    font-size: 12px;
}

.eyebrow {
    color: #4f739b;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.panel h1,
.panel h2 {
    margin-top: 0;
}

.panel h2 {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: -0.03em;
}

.panel-accent {
    border-color: rgba(189, 118, 24, 0.34);
    box-shadow: inset 0 3px 0 var(--amber), var(--shadow);
}

.narrow {
    margin: 24px auto;
    max-width: 520px;
}

.status-card {
    align-content: center;
    display: grid;
    gap: 7px;
    margin: 0;
    min-height: 160px;
    padding: 20px;
}

.status-card span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.status-card strong {
    color: var(--text);
    font-family: var(--display);
    font-size: 30px;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.status-card small {
    color: var(--muted);
}

.status-ok {
    box-shadow: inset 0 4px 0 var(--green), var(--shadow);
}

.status-warn {
    box-shadow: inset 0 4px 0 var(--amber), var(--shadow);
}

.metric-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: var(--shell-page-pad-y) var(--shell-page-pad-x);
}

.search-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
    min-height: 88px;
    padding: 12px;
}

.metric span,
.ops-strip span,
.admin-status-strip span {
    color: var(--muted);
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 900;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.metric strong {
    color: var(--text);
    font-family: var(--mono);
    font-size: 24px;
}

.ops-strip {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: var(--shell-page-pad-y) var(--shell-page-pad-x);
}

.ops-strip article {
    min-height: 92px;
    padding: 12px;
}

.ops-strip strong {
    display: block;
    font-family: var(--display);
    font-size: 20px;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.ops-strip small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    margin-top: 6px;
}

.command-grid,
.two-column {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: var(--shell-page-pad-y) var(--shell-page-pad-x);
}

.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.two-column .panel,
.command-grid .panel {
    margin: 0;
}

.settings-grid,
.admin-split {
    display: grid;
    gap: 14px;
    margin: var(--shell-page-pad-y) var(--shell-page-pad-x);
}

.settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: inherit;
    display: grid;
    gap: 12px;
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 148px;
    padding: 18px;
    text-decoration: none;
}

.settings-card:hover {
    border-color: rgba(31, 110, 212, 0.28);
    box-shadow: 0 18px 34px rgba(22, 39, 66, 0.12);
    transform: translateY(-1px);
}

.settings-card-icon {
    align-items: center;
    background: var(--blue-soft);
    border: 1px solid #bfd6ff;
    border-radius: 10px;
    color: var(--blue);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.settings-card-icon .icon-svg svg {
    height: 20px;
    width: 20px;
}

.settings-card-copy h2,
.settings-card-copy p,
.settings-card-copy small {
    margin: 0;
}

.settings-card-copy h2 {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: -0.03em;
}

.settings-card-copy p {
    color: var(--soft);
    font-size: 12px;
    line-height: 1.5;
}

.settings-card-copy small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    margin-top: 6px;
}

.admin-split {
    align-items: start;
    grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.58fr);
}

.admin-table-panel {
    margin: 0;
}

.company-editor {
    margin: 0;
    overflow: hidden;
    position: sticky;
    top: 78px;
}

.company-editor-form {
    margin-top: 0;
    padding: 14px;
}

.company-impact-panel {
    background: linear-gradient(180deg, rgba(255, 250, 239, 0.96), rgba(255, 245, 228, 0.92));
    border: 1px solid rgba(222, 183, 107, 0.34);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 10px 20px rgba(179, 132, 44, 0.08);
    color: #6d5530;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.company-impact-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.company-impact-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.company-impact-panel p {
    margin: 0;
}

.company-delete-form {
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding: 14px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.form-stack {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

label {
    color: var(--muted);
    display: grid;
    font-size: 12px;
    font-weight: 850;
    gap: 5px;
}

.field-stack {
    display: grid;
    gap: 5px;
}

.field-label {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 850;
}

.field-hidden {
    display: none !important;
}

input,
select,
textarea {
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    min-height: 32px;
    padding: 6px 8px;
}

input[type="search"] {
    min-width: 0;
}

input[data-uppercase] {
    text-transform: uppercase;
}

textarea {
    min-height: 84px;
    padding: 8px 10px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #7d91aa;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 110, 212, 0.14);
    outline: 0;
}

select[multiple],
.multi-select-field {
    min-height: 110px;
    padding: 6px;
}

select[multiple] option,
.multi-select-field option {
    border-radius: 8px;
    padding: 6px 8px;
}

.field-help {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 4px;
}

.access-level-picker {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.access-level-option {
    width: 100%;
}

.search-form {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(220px, 1fr) auto auto;
}

.people-search-form {
    grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr) auto auto;
}

.people-search-form .report-picker-field {
    min-width: min(320px, 100%);
}

.people-search-form .report-picker {
    width: 100%;
}

.button {
    align-items: center;
    background: linear-gradient(180deg, var(--button-top), var(--button-mid) 38%, var(--button-bottom));
    border: 1px solid var(--button-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--button-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 900;
    gap: 7px;
    justify-content: center;
    font-size: 12px;
    min-height: 32px;
    padding: 0 12px;
    text-decoration: none;
}

.button:hover {
    filter: brightness(1.05) saturate(1.02);
    transform: translateY(-1px);
}

.button:active {
    box-shadow: 0 10px 18px rgba(19, 54, 108, 0.18), 0 1px 0 rgba(13, 64, 128, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transform: translateY(1px);
}

.button.secondary {
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border-color: rgba(128, 154, 186, 0.26);
    box-shadow: 0 12px 18px rgba(42, 66, 97, 0.08), 0 2px 0 rgba(42, 66, 97, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    color: var(--text);
}

.button.danger {
    background: linear-gradient(180deg, #ff8d8b, #e95b5d 42%, #cf4048);
    border-color: rgba(166, 34, 47, 0.54);
    box-shadow: 0 14px 22px rgba(166, 34, 47, 0.18), 0 3px 0 rgba(135, 24, 38, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.32);
    color: #ffffff;
    gap: 7px;
}

.button.compact {
    min-height: 26px;
    padding: 0 10px;
}

.text-link {
    color: var(--blue);
    font-weight: 900;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.debug-box {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    overflow: auto;
    padding: 18px;
}

.drawer-layer {
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 180ms ease;
    z-index: 80;
}

.drawer-layer:target {
    opacity: 1;
    pointer-events: auto;
}

.drawer-backdrop {
    backdrop-filter: blur(8px);
    background: rgba(16, 26, 41, 0.48);
    inset: 0;
    position: absolute;
}

.modal-layer {
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 180ms ease;
    z-index: 95;
}

.modal-layer:target {
    opacity: 1;
    pointer-events: auto;
}

.modal-layer.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    backdrop-filter: blur(10px);
    background: rgba(12, 22, 36, 0.42);
    inset: 0;
    position: absolute;
}

.modal-backdrop-button {
    border: 0;
    cursor: pointer;
    padding: 0;
    width: 100%;
}

.admin-modal {
    background: var(--surface);
    border: 1px solid rgba(128, 154, 186, 0.18);
    border-radius: 18px;
    box-shadow: var(--shadow-high);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    left: 50%;
    max-height: min(90vh, 1040px);
    overflow: hidden;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -47%);
    transition: transform 180ms ease;
    width: min(960px, calc(100vw - 28px));
}

.modal-layer:target .admin-modal {
    transform: translate(-50%, -50%);
}

.modal-layer.is-open .admin-modal {
    transform: translate(-50%, -50%);
}

.admin-modal-wide {
    width: min(1180px, calc(100vw - 28px));
}

.confirm-modal {
    width: min(520px, calc(100vw - 28px));
}

.confirm-modal-body {
    gap: 18px;
    padding: 22px 20px 20px;
}

.confirm-modal-copy {
    display: grid;
    gap: 10px;
}

.confirm-modal-copy p {
    margin: 0;
}

.confirm-modal-copy > p:first-child {
    color: var(--text);
    font-family: var(--display);
    font-size: 22px;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.confirm-modal-note {
    background: rgba(255, 248, 230, 0.72);
    border: 1px solid rgba(189, 118, 24, 0.16);
    border-radius: 12px;
    color: #7b5b24;
    font-size: 11px;
    padding: 11px 12px;
}

html[data-theme="dark"] .confirm-modal-note {
    background: rgba(78, 55, 20, 0.32);
    border-color: rgba(226, 181, 92, 0.18);
    color: #ffe7bd;
}

.confirm-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-modal-actions .button {
    min-width: 168px;
}

.confirm-impact-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.confirm-impact-card {
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.95), rgba(239, 246, 253, 0.95));
    border: 1px solid rgba(136, 160, 191, 0.22);
    border-radius: 12px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.confirm-impact-card span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.confirm-impact-card strong {
    color: var(--text);
    font-size: 18px;
    letter-spacing: -0.03em;
}

.confirm-action-form {
    display: grid;
    gap: 16px;
}

.confirm-check-row span {
    align-items: center;
    display: flex;
    min-height: 48px;
}

html[data-theme="dark"] .confirm-impact-card {
    background: linear-gradient(180deg, rgba(24, 38, 58, 0.95), rgba(19, 31, 49, 0.95));
    border-color: rgba(102, 127, 160, 0.24);
}

body.modal-open {
    overflow: hidden;
}

.admin-modal-header {
    align-items: start;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 253, 0.98)),
        var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px 18px;
}

html[data-theme="dark"] .admin-modal-header {
    background:
        linear-gradient(180deg, rgba(24, 37, 57, 0.98), rgba(19, 31, 48, 0.98)),
        var(--surface);
}

.admin-modal-header h2 {
    font-family: var(--display);
    font-size: 20px;
    letter-spacing: -0.04em;
    margin: 0;
}

.admin-modal-body {
    background:
        radial-gradient(circle at top right, rgba(31, 110, 212, 0.08), transparent 18rem),
        linear-gradient(180deg, rgba(247, 251, 255, 0.7), rgba(237, 244, 251, 0.45));
    display: grid;
    gap: 16px;
    overflow: auto;
    padding: 18px;
}

html[data-theme="dark"] .admin-modal-body {
    background:
        radial-gradient(circle at top right, rgba(47, 139, 255, 0.12), transparent 18rem),
        linear-gradient(180deg, rgba(24, 37, 57, 0.36), rgba(16, 27, 43, 0.18));
}

.admin-modal-grid {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.58fr);
}

.admin-modal-grid-slim {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-modal-stack,
.admin-status-strip {
    display: grid;
    gap: 16px;
}

.admin-status-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-status-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-status-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-status-strip article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-tight);
    min-height: 94px;
    padding: 14px;
}

.admin-status-strip strong {
    display: block;
    font-family: var(--display);
    font-size: 22px;
    letter-spacing: -0.04em;
    line-height: 1.04;
}

.admin-status-strip small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    margin-top: 7px;
}

.admin-command-grid,
.admin-modal .command-grid,
.admin-modal .table-panel,
.admin-modal .panel {
    margin: 0;
}

.admin-modal .metric {
    min-height: 94px;
}

.admin-modal .company-editor {
    position: sticky;
    top: 0;
}

.person-drawer {
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: -28px 0 70px rgba(8, 17, 31, 0.28);
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100vh;
    max-width: 760px;
    overflow-y: auto;
    padding: 0 14px 16px;
    position: absolute;
    right: 0;
    top: 0;
    transform: translateX(20px);
    transition: transform 180ms ease;
    width: min(56vw, 760px);
}

.drawer-layer:target .person-drawer {
    transform: translateX(0);
}

.drawer-header {
    align-items: start;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin: 0 -14px 12px;
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.drawer-header h2 {
    font-family: var(--display);
    font-size: 16px;
    letter-spacing: -0.03em;
    margin: 0;
}

.drawer-close {
    align-items: center;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid rgba(128, 154, 186, 0.24);
    border-radius: 999px;
    box-shadow: 0 10px 18px rgba(42, 66, 97, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.66);
    color: var(--soft);
    display: inline-flex;
    font-size: 15px;
    height: 32px;
    justify-content: center;
    text-decoration: none;
    width: 32px;
}

.drawer-form {
    display: grid;
    gap: 10px;
}

.drawer-card {
    background: var(--blue-soft);
    border: 1px solid #acd0ff;
    border-left: 3px solid var(--blue);
    border-radius: 9px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

html[data-theme="dark"] .drawer-card {
    border-color: var(--line-strong);
}

.drawer-card-soft {
    background: var(--success-soft);
    border-color: rgba(17, 138, 91, 0.24);
    border-left-color: var(--green);
}

.drawer-card-title {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.drawer-card-title strong {
    color: var(--blue);
    font-size: 14px;
    font-weight: 900;
}

.drawer-card-title span {
    color: var(--muted);
    font-size: 11px;
}

.drawer-card p {
    color: var(--soft);
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

.drawer-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-panel {
    margin: var(--shell-page-pad-y) var(--shell-page-pad-x);
    overflow-x: auto;
}

.table-heading {
    align-items: center;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 14px;
}

.table-heading-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.table-heading h2 {
    font-family: var(--display);
    font-size: 16px;
    letter-spacing: -0.03em;
    margin: 0;
}

.table-heading .eyebrow {
    margin-bottom: 4px;
}

.subtle {
    color: var(--muted);
    font-size: 11px;
}

.spaced {
    margin-top: var(--shell-page-pad-y);
}

table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    line-height: 1.42;
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-2);
    box-shadow: 0 4px 12px rgba(22, 39, 66, 0.07);
    color: #547191;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    position: static;
    text-transform: uppercase;
    white-space: nowrap;
}

html[data-theme="dark"] th {
    color: var(--muted);
}

.sort-link {
    align-items: center;
    color: inherit;
    display: inline-flex;
    gap: 6px;
    text-decoration: none;
}

.sort-link.active {
    color: var(--blue);
}

.sort-link-indicator {
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
}

td {
    background: var(--surface);
    color: var(--soft);
}

tbody tr:nth-child(even) td {
    background: var(--surface-2);
}

tbody tr:hover td {
    background: var(--blue-soft);
}

td strong {
    color: var(--text);
}

td small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

tr:last-child td {
    border-bottom: 0;
}

.row-link {
    color: var(--text);
    font-weight: 900;
    text-decoration: none;
}

.row-link:hover {
    color: var(--blue);
}

.mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.mini-stats span {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 13px;
}

.inline-action {
    margin-top: 22px;
}

.pill {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 246, 252, 0.98));
    border: 1px solid rgba(128, 154, 186, 0.2);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: #5f7896;
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    margin: 2px 4px 2px 0;
    padding: 7px 11px;
    text-transform: uppercase;
}

.pill-warning {
    background: linear-gradient(180deg, rgba(255, 247, 230, 0.98), rgba(255, 241, 217, 1));
    border-color: rgba(189, 118, 24, 0.18);
    color: #8f641f;
}

.pill-error {
    background: linear-gradient(180deg, rgba(255, 241, 241, 0.98), rgba(255, 233, 233, 1));
    border-color: rgba(195, 55, 55, 0.18);
    color: #9e4545;
}

.pill-ok {
    background: linear-gradient(180deg, rgba(239, 250, 244, 0.98), rgba(231, 247, 237, 1));
    border-color: rgba(17, 138, 91, 0.18);
    color: #2d8060;
}

.pill-muted {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(240, 246, 252, 1));
    color: var(--muted);
}

.pill-info {
    background: linear-gradient(180deg, rgba(240, 249, 252, 0.98), rgba(231, 246, 250, 1));
    border-color: rgba(0, 124, 156, 0.16);
    color: #377c8f;
}

.icon-button,
.drag-handle {
    align-items: center;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid rgba(128, 154, 186, 0.22);
    border-radius: 999px;
    box-shadow: 0 10px 18px rgba(42, 66, 97, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: var(--blue);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    text-decoration: none;
    width: 32px;
}

.icon-button:hover,
.drag-handle:hover {
    border-color: rgba(74, 130, 224, 0.34);
    color: #295fa8;
    transform: translateY(-1px);
}

.icon-button .icon-svg svg,
.drag-handle .icon-svg svg {
    height: 15px;
    width: 15px;
}

.oval-icon-button {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 252, 0.98));
    border: 1px solid rgba(128, 154, 186, 0.22);
    border-radius: 999px;
    box-shadow: 0 10px 18px rgba(42, 66, 97, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.74);
    color: var(--blue);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    min-width: 42px;
    padding: 0 12px;
    text-decoration: none;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.oval-icon-button.secondary {
    color: #55708f;
}

.oval-icon-button:hover {
    border-color: rgba(74, 130, 224, 0.34);
    box-shadow: 0 12px 22px rgba(42, 66, 97, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.74);
    transform: translateY(-1px);
}

.oval-icon-button .icon-svg svg {
    height: 15px;
    width: 15px;
}

.table-action-cluster {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
}

.drag-handle {
    color: var(--muted);
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.handle-cell {
    text-align: center;
    white-space: nowrap;
    width: 54px;
}

.sortable-company-row {
    transition: transform 140ms ease, opacity 140ms ease;
}

.sortable-company-row.dragging {
    opacity: 0.72;
}

.record-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.42fr) minmax(280px, 0.58fr);
    margin: 18px 22px;
}

.record-layout .panel {
    margin: 0;
}

.detail-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.detail-list div {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 8px;
    grid-template-columns: 132px minmax(0, 1fr);
    padding-bottom: 12px;
}

.detail-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-list dt {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-list dd {
    color: var(--soft);
    margin: 0;
    overflow-wrap: anywhere;
}

.summary-stack {
    display: grid;
    gap: 10px;
}

.summary-stack span {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 13px 14px;
}

.summary-stack strong {
    color: var(--blue);
    font-family: var(--mono);
    font-size: 24px;
    margin-right: 8px;
}

.release-log {
    display: grid;
    gap: 12px;
}

.release-entry {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 248, 253, 0.92));
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-tight);
    display: grid;
    gap: 10px;
    padding: 14px 15px;
}

html[data-theme="dark"] .release-entry {
    background: linear-gradient(180deg, rgba(26, 38, 58, 0.92), rgba(21, 32, 49, 0.9));
}

.release-entry.current {
    border-color: rgba(31, 110, 212, 0.26);
    box-shadow: 0 18px 28px rgba(26, 55, 102, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.release-entry-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.release-entry h3 {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: -0.03em;
    margin: 0;
}

.release-entry p {
    color: var(--soft);
    margin: 0;
}

.release-entry-list {
    color: var(--soft);
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
}

.release-entry-list li {
    margin: 0;
}

.workspace-grid {
    display: grid;
    align-items: start;
    gap: 16px;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    margin: 18px 22px;
}

.workspace-grid-stats {
    grid-template-columns: minmax(0, 1.72fr) minmax(240px, 0.48fr);
}

.workspace-main,
.workspace-side,
.workspace-list-body,
.site-rollup-list,
.credential-stack {
    display: grid;
    gap: 16px;
}

.workspace-side {
    align-content: start;
}

.workspace-stat-stack {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 80px;
}

.workspace-metrics {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workspace-metric,
.site-rollup,
.credential-card,
.system-card,
.workspace-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-tight);
}

.workspace-metric {
    min-height: 106px;
    padding: 16px;
}

.workspace-metric span,
.compact-detail dt {
    color: var(--muted);
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.workspace-metric strong {
    color: var(--text);
    display: block;
    font-family: var(--display);
    font-size: 30px;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-top: 12px;
}

.workspace-metric small {
    color: var(--muted);
    display: block;
    margin-top: 8px;
}

.workspace-list {
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.workspace-band {
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.workspace-band-body {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.site-profile-card .workspace-band-body {
    min-height: 232px;
    padding-bottom: 24px;
}

.site-profile-card .detail-grid {
    align-items: stretch;
}

.site-profile-card .detail-grid div {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 253, 0.98));
    border: 1px solid rgba(133, 160, 192, 0.28);
    box-shadow:
        0 14px 24px rgba(42, 66, 97, 0.09),
        0 2px 0 rgba(42, 66, 97, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
    min-height: 78px;
    padding: 14px 15px 15px;
}

html[data-theme="dark"] .site-profile-card .detail-grid div {
    background: linear-gradient(180deg, rgba(28, 41, 61, 0.96), rgba(21, 33, 50, 0.94));
    border-color: rgba(112, 138, 171, 0.26);
    box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.28),
        0 2px 0 rgba(9, 16, 27, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.profile-head-actions {
    align-items: end;
    display: grid;
    gap: 6px;
    justify-items: end;
}

.site-status-form {
    margin: 0;
}

.status-toggle-group {
    align-items: center;
    background: rgba(233, 240, 248, 0.86);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
    display: inline-flex;
    gap: 4px;
    padding: 4px;
}

html[data-theme="dark"] .status-toggle-group {
    background: rgba(24, 37, 57, 0.92);
}

.status-toggle-button {
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    min-height: 28px;
    padding: 0 12px;
    text-transform: uppercase;
    transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.status-toggle-button.is-active {
    background: linear-gradient(180deg, var(--button-top), var(--button-mid) 42%, var(--button-bottom));
    box-shadow: var(--button-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.status-toggle-button[data-status-toggle-value="active"].is-active {
    background: linear-gradient(180deg, #48b88c, #239b6d 46%, #15754f);
    box-shadow: 0 14px 24px rgba(21, 117, 79, 0.24), 0 3px 0 rgba(14, 92, 61, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.status-toggle-button[data-status-toggle-value="review"].is-active {
    background: linear-gradient(180deg, #f0c36b, #d79a2b 46%, #ad7416);
    box-shadow: 0 14px 24px rgba(173, 116, 22, 0.24), 0 3px 0 rgba(133, 86, 12, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.status-toggle-button[data-status-toggle-value="inactive"].is-active {
    background: linear-gradient(180deg, #e06e79, #c34755 46%, #942a39);
    box-shadow: 0 14px 24px rgba(148, 42, 57, 0.22), 0 3px 0 rgba(112, 28, 41, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.status-toggle-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(31, 110, 212, 0.14);
    outline: 0;
}

.status-toggle-button:active {
    transform: translateY(1px);
}

.workspace-editor-form {
    display: grid;
    gap: 16px;
}

.workspace-form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-field,
.checkbox-chip,
.partition-option,
.copy-target-option {
    cursor: pointer;
    display: inline-flex;
    position: relative;
}

.checkbox-field,
.copy-target-option {
    width: 100%;
}

.checkbox-field input,
.checkbox-chip input,
.partition-option input,
.copy-target-option input {
    cursor: pointer;
    height: 100%;
    inset: 0;
    margin: 0;
    min-height: auto;
    opacity: 0;
    position: absolute;
    width: 100%;
    z-index: 1;
}

.checkbox-field span,
.checkbox-chip span,
.partition-option span,
.copy-target-option span {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 252, 0.96));
    border: 1px solid var(--line);
    box-shadow: var(--shadow-tight), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: var(--text);
    display: inline-flex;
    font-weight: 800;
    gap: 6px;
    line-height: 1.35;
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

html[data-theme="dark"] .checkbox-field span,
html[data-theme="dark"] .checkbox-chip span,
html[data-theme="dark"] .partition-option span,
html[data-theme="dark"] .copy-target-option span {
    background: linear-gradient(180deg, rgba(26, 38, 58, 0.94), rgba(21, 33, 50, 0.92));
}

.checkbox-field span {
    border-radius: 12px;
    font-size: 12px;
    justify-content: flex-start;
    min-height: 38px;
    padding: 10px 12px;
    width: 100%;
}

.checkbox-chip span,
.partition-option span {
    border-radius: 999px;
    font-size: 11px;
    min-height: 28px;
    padding: 0 10px;
}

.copy-target-option span {
    border-radius: 10px;
    font-size: 12px;
    justify-content: flex-start;
    min-height: 38px;
    padding: 8px 10px;
    width: 100%;
}

.checkbox-field input:checked + span,
.checkbox-chip input:checked + span,
.partition-option input:checked + span,
.copy-target-option input:checked + span {
    background: linear-gradient(180deg, var(--button-top), var(--button-mid) 42%, var(--button-bottom));
    border-color: var(--button-border);
    box-shadow: var(--button-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.checkbox-field input:focus-visible + span,
.checkbox-chip input:focus-visible + span,
.partition-option input:focus-visible + span,
.copy-target-option input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(31, 110, 212, 0.14);
}

.checkbox-field input:active + span,
.checkbox-chip input:active + span,
.partition-option input:active + span,
.copy-target-option input:active + span {
    transform: translateY(1px);
}

.toggle-field {
    align-items: center;
    background: linear-gradient(180deg, rgba(244, 249, 255, 0.96), rgba(236, 244, 252, 0.94));
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-tight);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 32px;
    padding: 10px 12px;
}

html[data-theme="dark"] .toggle-field {
    background: linear-gradient(180deg, rgba(24, 37, 57, 0.88), rgba(20, 32, 48, 0.82));
}

.toggle-copy {
    display: grid;
    gap: 4px;
}

.toggle-copy strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.toggle-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.profile-option-card {
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(238, 245, 253, 0.96));
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    display: grid;
    gap: 12px;
    padding: 14px;
}

html[data-theme="dark"] .profile-option-card {
    background: linear-gradient(180deg, rgba(24, 37, 57, 0.92), rgba(20, 32, 48, 0.88));
}

.profile-option-head {
    align-items: start;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.profile-option-head h3 {
    font-family: var(--display);
    font-size: 16px;
    letter-spacing: -0.03em;
    margin: 0;
}

.profile-option-body {
    display: grid;
    gap: 12px;
}

.profile-company-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.profile-option-toggle {
    align-self: start;
}

.toggle-switch {
    display: inline-flex;
    position: relative;
}

.toggle-switch input {
    cursor: pointer;
    height: 24px;
    inset: 0;
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 46px;
    z-index: 1;
}

.toggle-slider {
    background: linear-gradient(180deg, #d7e1ed, #bdcddd);
    border: 1px solid rgba(109, 132, 161, 0.24);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(26, 39, 61, 0.12);
    display: inline-flex;
    height: 24px;
    position: relative;
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    width: 46px;
}

.toggle-slider::after {
    background: linear-gradient(180deg, #ffffff, #eff4f9);
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(27, 48, 76, 0.18);
    content: "";
    height: 18px;
    left: 2px;
    position: absolute;
    top: 2px;
    transition: transform 180ms ease;
    width: 18px;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(180deg, #4a9bff, #1f6ed4);
    border-color: rgba(13, 87, 176, 0.46);
    box-shadow: inset 0 1px 2px rgba(10, 48, 98, 0.18), 0 10px 18px rgba(31, 110, 212, 0.18);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(22px);
}

.toggle-switch input:focus-visible + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(31, 110, 212, 0.14);
}

.detail-inline-row {
    align-items: start;
    display: grid;
    gap: 8px;
}

.flag-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.workspace-list-body {
    padding: 18px;
}

.workspace-item,
.system-card {
    background: var(--surface-2);
    display: grid;
    gap: 12px;
    padding: 16px;
}

.workspace-item-head {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.workspace-item h3,
.system-card h3 {
    font-family: var(--display);
    font-size: 20px;
    letter-spacing: -0.03em;
    margin: 0;
}

.workspace-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    margin: 6px 0 0;
}

.workspace-columns {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.92fr);
    margin-top: 14px;
}

.rollup-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px;
}

.access-site-editor {
    display: grid;
    gap: 12px;
}

.access-editor-intro {
    align-items: start;
    background: linear-gradient(180deg, rgba(244, 248, 253, 0.98), rgba(235, 242, 251, 0.94));
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 16px;
}

.access-editor-intro strong,
.access-site-modal-meta strong {
    color: var(--text);
    display: block;
    font-size: 13px;
}

.access-editor-intro p,
.access-site-modal-meta small {
    color: var(--soft);
    font-size: 12px;
    line-height: 1.5;
    margin: 6px 0 0;
}

.access-editor-intro-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.access-site-picker-section {
    display: grid;
    gap: 10px;
}

.access-site-picker-panel {
    margin: 0;
}

.access-site-picker-panel td strong {
    color: var(--text);
    display: block;
    font-size: 13px;
}

.access-site-picker-panel td small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    line-height: 1.45;
    margin-top: 4px;
}

.access-editor-modal {
    max-width: min(1100px, calc(100vw - 44px));
}

.access-site-modal-meta {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 16px;
}

.copy-actions-panel {
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(238, 245, 253, 0.98));
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.copy-actions-head {
    align-items: start;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.copy-actions-head h2 {
    font-family: var(--display);
    font-size: 16px;
    letter-spacing: -0.03em;
    margin: 0;
}

.copy-target-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.copy-status-text {
    margin: 0;
}

.copy-actions-panel-standalone {
    margin-bottom: 0;
}

.copy-source-note {
    margin: -2px 0 0;
}

.site-access-modal-grid {
    display: grid;
    gap: 10px;
}

.site-section-visibility-form {
    display: grid;
    gap: 14px;
}

.site-section-toggle-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-section-toggle-card {
    min-height: 82px;
}

.site-section-toggle-card strong {
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-schedule-form,
.site-schedule-grid {
    display: grid;
    gap: 12px;
}

.site-schedule-summary-strip {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-schedule-row {
    align-items: start;
    background: linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(238, 245, 253, 0.95));
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-tight);
    display: grid;
    gap: 14px;
    grid-template-columns: 148px minmax(0, 1fr);
    padding: 14px;
}

html[data-theme="dark"] .site-schedule-row {
    background: linear-gradient(180deg, rgba(25, 38, 58, 0.94), rgba(20, 32, 48, 0.9));
}

.site-schedule-day {
    display: grid;
    gap: 4px;
}

.site-schedule-day strong {
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.02em;
}

.site-schedule-day small {
    color: var(--muted);
    line-height: 1.4;
}

.site-schedule-input-grid {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: 144px repeat(2, minmax(0, 1fr));
}

.site-schedule-readonly {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 100%;
}

.site-section-state-strip {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-section-state-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.workspace-save-bar-inline {
    margin-top: 0;
}

.workspace-save-bar-modal {
    margin-top: 16px;
}

.site-access-editor {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-tight);
    overflow: hidden;
}

.site-access-editor[open] {
    box-shadow: 0 16px 28px rgba(22, 39, 66, 0.12);
}

.site-access-editor summary {
    cursor: pointer;
    list-style: none;
}

.site-access-editor summary::-webkit-details-marker {
    display: none;
}

.site-access-summary {
    align-items: center;
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(241, 247, 253, 0.98));
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 14px;
}

.site-access-summary-copy strong,
.site-access-summary-copy small {
    display: block;
}

.site-access-summary-copy strong {
    color: var(--text);
    font-size: 14px;
}

.site-access-summary-copy small,
.site-access-summary-metrics {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.site-access-summary-metrics {
    text-align: right;
    white-space: nowrap;
}

.site-access-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.site-access-editor.system-editor-card-burg,
.system-editor-card-burg {
    border-left: 3px solid #d5852b;
}

.site-access-editor.system-editor-card-cctv,
.system-editor-card-cctv {
    border-left: 3px solid var(--blue);
}

.site-access-editor.system-editor-card-access,
.system-editor-card-access {
    border-left: 3px solid #0d98a5;
}

.site-roster-accordion,
.site-section-accordion {
    display: grid;
    gap: 12px;
    padding: 8px 16px 16px;
}

.site-roster-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-tight);
    overflow: hidden;
}

.site-roster-section.site-roster-section-burg {
    border-left: 3px solid #d5852b;
}

.site-roster-section.site-roster-section-cctv {
    border-left: 3px solid var(--blue);
}

.site-roster-section.site-roster-section-access {
    border-left: 3px solid #0d98a5;
}

.site-roster-section[open] {
    box-shadow: 0 16px 28px rgba(22, 39, 66, 0.12);
}

.site-roster-section summary {
    cursor: pointer;
    list-style: none;
}

.site-roster-section summary::-webkit-details-marker {
    display: none;
}

.site-roster-section-summary {
    align-items: center;
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(241, 247, 253, 0.98));
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 16px;
}

.site-roster-section-burg .site-roster-section-summary {
    background: linear-gradient(180deg, rgba(255, 249, 240, 0.98), rgba(252, 242, 226, 0.98));
}

.site-roster-section-cctv .site-roster-section-summary {
    background: linear-gradient(180deg, rgba(244, 249, 255, 0.98), rgba(232, 242, 255, 0.98));
}

.site-roster-section-access .site-roster-section-summary {
    background: linear-gradient(180deg, rgba(241, 253, 252, 0.98), rgba(229, 247, 246, 0.98));
}

html[data-theme="dark"] .site-roster-section-burg .site-roster-section-summary {
    background: linear-gradient(180deg, rgba(58, 40, 23, 0.96), rgba(45, 31, 18, 0.94));
}

html[data-theme="dark"] .site-roster-section-cctv .site-roster-section-summary {
    background: linear-gradient(180deg, rgba(24, 41, 68, 0.96), rgba(18, 32, 54, 0.94));
}

html[data-theme="dark"] .site-roster-section-access .site-roster-section-summary {
    background: linear-gradient(180deg, rgba(18, 49, 52, 0.96), rgba(15, 38, 40, 0.94));
}

.site-roster-section-copy strong,
.site-roster-section-copy small {
    display: block;
}

.site-roster-section-copy strong {
    color: var(--text);
    font-size: 15px;
}

.site-roster-section-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    margin-top: 3px;
}

.site-roster-section-meta {
    align-items: flex-end;
    display: grid;
    gap: 8px;
    justify-items: end;
}

.site-roster-section-body {
    display: grid;
    gap: 12px;
    padding: 14px 16px 16px;
}

.site-roster-entry-list {
    display: grid;
    gap: 12px;
}

.site-roster-entry {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 254, 0.98));
    border: 1px solid rgba(133, 160, 192, 0.24);
    border-radius: 13px;
    box-shadow: 0 12px 20px rgba(42, 66, 97, 0.08), 0 2px 0 rgba(42, 66, 97, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 15px;
}

html[data-theme="dark"] .site-roster-entry {
    background: linear-gradient(180deg, rgba(28, 41, 61, 0.96), rgba(21, 33, 50, 0.94));
    border-color: rgba(112, 138, 171, 0.24);
    box-shadow: 0 16px 26px rgba(0, 0, 0, 0.24), 0 2px 0 rgba(9, 16, 27, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-roster-entry-main {
    display: grid;
    gap: 12px;
}

.site-roster-entry-head {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.site-roster-entry-head strong,
.site-roster-entry-head small {
    display: block;
}

.site-roster-entry-head strong {
    color: var(--text);
    font-size: 14px;
}

.site-roster-entry-head small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    margin-top: 3px;
}

.site-roster-entry-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-roster-entry-cell {
    display: grid;
    gap: 6px;
}

.site-roster-entry-cell p,
.site-roster-entry-cell small {
    margin: 0;
}

.site-roster-entry-cell p {
    color: var(--text);
    font-size: 12px;
    line-height: 1.45;
}

.site-roster-entry-cell small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.site-roster-entry-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.site-roster-entry-actions {
    align-items: center;
    display: flex;
}

.site-roster-person {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-tight);
    overflow: hidden;
}

.site-roster-person[open] {
    box-shadow: 0 16px 28px rgba(22, 39, 66, 0.12);
}

.site-roster-person summary {
    cursor: pointer;
    list-style: none;
}

.site-roster-person summary::-webkit-details-marker {
    display: none;
}

.site-roster-person-summary {
    align-items: center;
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(241, 247, 253, 0.98));
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 16px;
}

.site-roster-person-copy strong,
.site-roster-person-copy small {
    display: block;
}

.site-roster-person-copy strong {
    color: var(--text);
    font-size: 15px;
}

.site-roster-person-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    margin-top: 3px;
}

.site-roster-person-summary-badges {
    margin-top: 8px;
}

.site-roster-person-summary-meta {
    align-items: flex-end;
    display: grid;
    gap: 8px;
    justify-items: end;
}

.site-roster-person-body {
    display: grid;
    gap: 14px;
    padding: 14px 16px 16px;
}

.site-roster-person-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-roster-person-cell {
    display: grid;
    gap: 6px;
}

.site-roster-person-cell p,
.site-roster-person-cell small {
    margin: 0;
}

.site-roster-person-cell p {
    color: var(--text);
    font-size: 12px;
    line-height: 1.45;
}

.site-roster-person-cell small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.site-roster-person-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.site-roster-person-actions {
    display: flex;
    justify-content: flex-end;
}

.system-editor-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.system-editor-head {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.system-editor-copy {
    min-width: 0;
}

.system-editor-copy strong,
.system-editor-copy small {
    display: block;
}

.system-editor-copy strong {
    color: var(--text);
    font-size: 14px;
}

.system-editor-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    margin-top: 4px;
}

.system-editor-toggle-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.system-editor-grid {
    display: grid;
    gap: 10px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-span {
    grid-column: 1 / -1;
}

.partition-editor {
    display: grid;
    gap: 8px;
}

.partition-editor > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.partition-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workspace-save-bar {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px 16px;
}

.compact-detail {
    display: grid;
    gap: 12px;
    margin: 0;
}

.compact-detail div {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 6px;
    padding-bottom: 12px;
}

.compact-detail div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.compact-detail dd {
    color: var(--soft);
    margin: 0;
    overflow-wrap: anywhere;
}

.credential-card {
    padding: 12px 14px;
}

.credential-card strong,
.credential-card small,
.secret-value {
    display: block;
}

.credential-card strong {
    color: var(--text);
    font-size: 14px;
}

.credential-card small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    margin-top: 4px;
}

.secret-value {
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
    margin-top: 10px;
    overflow-wrap: anywhere;
}

.site-rollup {
    color: inherit;
    display: block;
    padding: 14px;
    text-decoration: none;
}

.site-rollup.static {
    text-decoration: none;
}

.site-rollup:hover {
    border-color: rgba(31, 110, 212, 0.34);
    box-shadow: 0 12px 28px rgba(22, 39, 66, 0.1);
    transform: translateY(-1px);
}

.site-rollup strong,
.site-rollup small,
.site-rollup span {
    display: block;
}

.site-rollup strong {
    color: var(--text);
    font-size: 14px;
}

.site-rollup small,
.site-rollup span {
    color: var(--muted);
    line-height: 1.35;
    margin-top: 5px;
}

.detail-grid {
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid div {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr;
    padding: 12px 14px;
}

.detail-grid div:last-child {
    padding-bottom: 12px;
}

.workspace-table-panel {
    margin: 0;
}

.compact-table {
    min-width: 0;
    table-layout: fixed;
}

.compact-table th,
.compact-table td {
    padding: 8px 10px;
}

.compact-table td {
    overflow-wrap: anywhere;
}

.compact-table td .pill + .pill {
    margin-left: 4px;
}

.compact-table th:last-child,
.compact-table td:last-child {
    width: 120px;
}

.responsive-card-table {
    min-width: 0;
}

.responsive-card-table td[data-card-actions="true"] .table-action-cluster {
    justify-content: flex-end;
}

.credential-inline {
    display: grid;
    gap: 6px;
}

.credential-inline span {
    color: var(--text);
    display: block;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.45;
}

.system-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px;
}

.system-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.workspace-empty {
    background: var(--surface-2);
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    color: var(--muted);
    padding: 22px;
}

.workspace-empty.tight {
    padding: 14px;
}

.note-box {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--soft);
    margin-top: 18px;
    padding: 14px;
}

.check-list {
    color: var(--soft);
    display: grid;
    gap: 9px;
    margin: 18px 0 0;
    padding-left: 20px;
}

.report-builder-card {
    display: grid;
    gap: 12px;
}

.report-builder-card-soft {
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(238, 245, 253, 0.96));
}

html[data-theme="dark"] .report-builder-card-soft {
    background: linear-gradient(180deg, rgba(24, 37, 57, 0.92), rgba(20, 32, 48, 0.9));
}

.report-builder-checklist {
    margin-top: 10px;
}

.report-builder-modal {
    width: min(1160px, calc(100vw - 28px));
}

.report-builder-form {
    display: grid;
    gap: 16px;
}

.report-builder-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
}

.report-builder-column,
.report-builder-column-side {
    display: grid;
    gap: 14px;
}

.report-builder-panel {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(239, 245, 252, 0.96));
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-tight);
    display: grid;
    gap: 14px;
    padding: 16px;
}

html[data-theme="dark"] .report-builder-panel {
    background: linear-gradient(180deg, rgba(24, 37, 57, 0.92), rgba(20, 32, 48, 0.9));
}

.report-builder-hub {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-builder-panel-head {
    display: grid;
    gap: 4px;
}

.report-builder-panel-head h2 {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: -0.03em;
    margin: 0;
}

.report-builder-panel-compact {
    background: var(--surface);
    border-color: var(--line-strong);
    box-shadow: none;
    gap: 12px;
}

html[data-theme="dark"] .report-builder-panel-compact {
    background: rgba(17, 26, 41, 0.96);
    border-color: rgba(111, 129, 155, 0.42);
}

.report-builder-panel-compact label {
    display: grid;
    gap: 6px;
}

.report-builder-panel-compact .form-actions {
    margin-top: 4px;
}

.report-builder-panel-span-2 {
    grid-column: span 2;
}

.report-picker-field {
    display: grid;
    gap: 6px;
}

.report-picker {
    position: relative;
}

.report-picker > summary {
    list-style: none;
}

.report-picker > summary::-webkit-details-marker {
    display: none;
}

.report-picker-trigger {
    align-items: center;
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-height: 34px;
    padding: 6px 8px;
}

.report-picker[open] .report-picker-trigger {
    border-color: rgba(46, 107, 191, 0.46);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.report-picker-panel {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: var(--shadow-tight);
    display: grid;
    gap: 10px;
    left: 0;
    margin-top: 8px;
    max-height: min(46vh, 360px);
    overflow: hidden;
    padding: 10px;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 24;
}

.report-picker-tools {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.report-picker-tools input[type="search"] {
    flex: 1 1 220px;
    min-width: 0;
}

.report-picker-options {
    display: grid;
    gap: 8px;
    max-height: min(34vh, 270px);
    overflow: auto;
    padding-right: 2px;
}

.report-picker-empty {
    margin: 0;
}

.report-picker-option {
    align-items: start;
    cursor: pointer;
    display: grid;
    gap: 0;
    position: relative;
}

.report-picker-option input {
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.report-picker-option > span {
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 5px;
    min-height: 0;
    padding: 9px 10px;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.report-picker-option > span strong {
    color: var(--text);
    font-size: 12px;
    letter-spacing: -0.01em;
}

.report-picker-option > span small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.report-picker-option-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-picker-option input:checked + span {
    background: rgba(44, 115, 214, 0.08);
    border-color: rgba(46, 107, 191, 0.42);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.report-picker-option input:focus-visible + span {
    border-color: rgba(46, 107, 191, 0.52);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.report-picker-option-compact > span {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.report-picker-option-compact .report-picker-option-badges {
    justify-content: flex-end;
}

.request-item-row {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 14px;
}

.request-item-row strong,
.request-item-row small {
    display: block;
}

.request-item-row small {
    color: var(--muted);
    line-height: 1.45;
}

.spaced-heading {
    margin-top: 20px;
}

html[data-theme="dark"] .report-picker-panel {
    background: rgba(17, 26, 41, 0.98);
    border-color: rgba(111, 129, 155, 0.42);
}

html[data-theme="dark"] .report-picker-option > span {
    background: rgba(20, 31, 48, 0.96);
    border-color: rgba(99, 121, 150, 0.26);
}

html[data-theme="dark"] .report-picker-option input:checked + span {
    background: rgba(55, 100, 172, 0.22);
    border-color: rgba(108, 150, 219, 0.48);
}

html[data-theme="dark"] .request-item-row {
    border-color: rgba(111, 129, 155, 0.42);
}

.report-builder-picker-head {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.report-builder-picker-head h2 {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: -0.03em;
    margin: 0;
}

.report-builder-picker-head .subtle {
    display: block;
    margin-top: 4px;
}

.report-builder-site-picker {
    display: grid;
    gap: 10px;
    max-height: min(48vh, 430px);
    overflow: auto;
    padding-right: 4px;
}

.report-builder-site-grid {
    display: grid;
    gap: 12px;
}

.report-builder-site-group {
    display: grid;
    gap: 10px;
}

.report-builder-site-group-label {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.report-builder-site-group-options {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.report-builder-site-option span {
    align-items: start;
    display: grid;
    gap: 4px;
}

.report-builder-site-option span strong {
    color: var(--text);
    font-size: 12px;
    letter-spacing: -0.01em;
}

.report-builder-site-option span small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.report-builder-site-option input:checked + span small {
    color: rgba(255, 255, 255, 0.82);
}

.report-builder-section-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-builder-section-option span {
    justify-content: center;
    min-height: 42px;
    position: relative;
}

.report-builder-section-option span::before {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(195, 55, 55, 0.34);
    border-radius: 999px;
    box-shadow: 0 6px 12px rgba(42, 66, 97, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    color: #b13b3b;
    content: "\00D7";
    display: inline-flex;
    flex: 0 0 auto;
    font-family: var(--display);
    font-size: 14px;
    font-weight: 900;
    height: 20px;
    justify-content: center;
    line-height: 1;
    margin-right: 2px;
    width: 20px;
}

.report-builder-section-option input:checked + span {
    background: linear-gradient(180deg, #4cc290, #269b6d 46%, #15754f);
    border-color: rgba(17, 117, 79, 0.82);
    box-shadow: 0 16px 26px rgba(21, 117, 79, 0.22), 0 3px 0 rgba(14, 92, 61, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.26);
    color: #ffffff;
}

.report-builder-section-option input:checked + span::before {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    color: #ffffff;
    content: "\2713";
}

html[data-theme="dark"] .report-builder-section-option span::before {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(228, 113, 113, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #ffb5b5;
}

.report-builder-summary-card h2 {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: -0.03em;
    margin: 0;
}

.report-builder-summary-card p {
    margin: 0;
}

.report-builder-actions {
    margin-top: 6px;
}

.review-summary-panel,
.review-system-form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.review-summary-badges,
.review-site-badges,
.review-site-health-badges,
.review-system-actions,
.review-person-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-site-stack,
.review-system-stack {
    display: grid;
    gap: 16px;
}

.company-site-access-people {
    display: grid;
    gap: 12px;
}

.company-site-system-table {
    table-layout: fixed;
    width: 100%;
}

.company-site-system-table th,
.company-site-system-table td {
    vertical-align: top;
}

.company-site-system-table td strong,
.company-site-system-table td small {
    display: block;
}

.company-site-system-table td small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    margin-top: 4px;
}

.company-site-system-table input[type="text"] {
    min-width: 0;
    width: 100%;
}

.company-site-system-table .company-col-person {
    width: 180px;
}

.company-site-system-table .company-col-site {
    width: 180px;
}

.company-site-system-table .company-col-section {
    width: 84px;
}

.company-site-system-table .company-col-system {
    width: 220px;
}

.company-site-system-table .company-col-enabled {
    width: 82px;
}

.company-site-system-table .company-col-access {
    width: 228px;
}

.company-site-system-table .company-col-value {
    width: 118px;
}

.company-site-system-table .company-col-extra {
    width: 108px;
}

.company-site-system-table .company-col-extra .subtle,
.company-site-system-table .company-col-access .subtle {
    display: inline-block;
    line-height: 1.35;
}

.company-site-access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-site-extra-stack {
    display: grid;
    gap: 6px;
}

.company-site-people-table .company-col-person .review-person-meta {
    margin-top: 8px;
}

.company-site-people-table tr + tr .company-col-person,
.company-site-people-table tr + tr .company-col-section,
.company-site-people-table tr + tr .company-col-system,
.company-site-people-table tr + tr .company-col-enabled,
.company-site-people-table tr + tr .company-col-access,
.company-site-people-table tr + tr .company-col-value,
.company-site-people-table tr + tr .company-col-extra {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.company-person-site-table tr + tr .company-col-site,
.company-person-site-table tr + tr .company-col-section,
.company-person-site-table tr + tr .company-col-system,
.company-person-site-table tr + tr .company-col-enabled,
.company-person-site-table tr + tr .company-col-access,
.company-person-site-table tr + tr .company-col-value,
.company-person-site-table tr + tr .company-col-extra {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.company-site-hik-toggle {
    justify-content: flex-start;
}

.company-site-hik-toggle span {
    min-width: 0;
}

.review-site-stack {
    margin: 0 var(--shell-page-pad-x) var(--shell-page-pad-y);
}

.review-site-accordion {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
    overflow: hidden;
}

.review-site-accordion[open] {
    box-shadow: 0 16px 28px rgba(22, 39, 66, 0.12);
}

html[data-theme="dark"] .review-site-accordion[open] {
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
}

.review-site-accordion summary {
    cursor: pointer;
    list-style: none;
}

.review-site-accordion summary::-webkit-details-marker {
    display: none;
}

.review-site-summary {
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(241, 247, 253, 0.98));
    display: grid;
    gap: 12px;
    padding: 16px;
}

html[data-theme="dark"] .review-site-summary {
    background: linear-gradient(180deg, rgba(24, 37, 57, 0.96), rgba(19, 31, 47, 0.94));
}

.review-site-summary-meta {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.review-site-body {
    display: grid;
    gap: 16px;
    padding: 10px 16px 16px;
}

.review-system-accordion {
    min-width: 0;
    overflow: hidden;
    padding: 0;
}

.review-system-accordion[open] {
    box-shadow: 0 16px 24px rgba(42, 66, 97, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="dark"] .review-system-accordion[open] {
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.28), 0 2px 0 rgba(8, 15, 25, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.review-system-accordion summary {
    cursor: pointer;
    list-style: none;
}

.review-system-accordion summary::-webkit-details-marker {
    display: none;
}

.review-system-summary {
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(243, 248, 254, 0.98));
    padding: 14px;
}

html[data-theme="dark"] .review-system-summary {
    background: linear-gradient(180deg, rgba(26, 39, 59, 0.96), rgba(20, 32, 49, 0.94));
}

.review-system-body {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
}

.review-system-card {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(239, 245, 252, 0.96));
    border: 1px solid rgba(136, 160, 191, 0.24);
    border-radius: 14px;
    box-shadow: 0 12px 20px rgba(42, 66, 97, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    display: grid;
    gap: 12px;
    overflow: hidden;
    padding: 14px;
}

.review-system-card.review-system-accordion {
    padding: 0;
}

.review-system-card-burg {
    border-left: 3px solid #d5852b;
}

.review-system-card-cctv {
    border-left: 3px solid var(--blue);
}

.review-system-card-access {
    border-left: 3px solid #0d98a5;
}

html[data-theme="dark"] .review-system-card {
    background: linear-gradient(180deg, rgba(24, 37, 57, 0.92), rgba(20, 32, 48, 0.9));
    border-color: rgba(106, 131, 164, 0.26);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24), 0 2px 0 rgba(8, 15, 25, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.review-site-head,
.review-system-head {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.review-site-head h2,
.review-system-head h3 {
    font-family: var(--display);
    letter-spacing: -0.03em;
    margin: 0;
}

.review-site-head h2 {
    font-size: 20px;
}

.review-system-head h3 {
    font-size: 18px;
}

.review-site-head .lede,
.review-system-head p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    margin: 4px 0 0;
}

.review-site-badges,
.review-site-health-badges,
.review-system-actions {
    justify-content: flex-end;
}

.review-roster-table {
    table-layout: fixed;
    width: 100%;
}

.review-roster-table th,
.review-roster-table td {
    vertical-align: top;
}

.review-roster-table input[type="text"],
.review-roster-table textarea {
    min-width: 0;
    width: 100%;
}

.review-roster-table th:last-child,
.review-roster-table td:last-child {
    width: auto;
}

.review-roster-table th.review-col-flag,
.review-roster-table td.review-col-flag {
    width: 76px;
}

.review-roster-table th.review-col-user,
.review-roster-table td.review-col-user {
    width: 72px;
}

.review-roster-table th.review-col-code,
.review-roster-table td.review-col-code {
    width: 88px;
}

.review-roster-table th.review-col-credential,
.review-roster-table td.review-col-credential {
    width: 118px;
}

.review-roster-table th.review-col-reg,
.review-roster-table td.review-col-reg {
    width: 96px;
}

.review-table-wrap {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.review-roster-table textarea {
    min-height: 72px;
    resize: vertical;
}

.review-inline-toggle {
    display: inline-flex;
    justify-content: center;
    width: auto;
}

.review-inline-toggle span {
    justify-content: center;
    min-height: 28px;
    padding: 4px 8px;
    white-space: nowrap;
    width: auto;
}

.review-roster-table td.review-col-reg .report-inline-value,
.review-roster-table td.review-col-reg .subtle {
    display: block;
    line-height: 1.35;
}

.review-roster-table td.review-col-user input {
    max-width: 56px;
}

.review-roster-table td.review-col-code input {
    max-width: 72px;
}

.review-access-level-grid {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-partition-picker {
    justify-content: flex-start;
    max-width: 100%;
}

.review-partition-picker .partition-option {
    max-width: 100%;
}

.review-access-level-option {
    align-items: flex-start;
}

.review-access-level-option span {
    min-height: 0;
    padding: 6px 8px;
}

.review-partition-picker .partition-option span {
    line-height: 1.2;
    max-width: 100%;
    min-height: 0;
    padding: 4px 8px;
    white-space: normal;
}

.review-save-bar {
    justify-content: flex-end;
    margin-top: 0;
}

.report-page {
    display: grid;
    gap: 14px;
    padding: var(--shell-page-pad-y) var(--shell-page-pad-x);
}

.report-page-heading-compact {
    gap: 8px;
    min-height: 0;
    padding-bottom: 10px;
    position: static;
}

.report-page-heading-compact h1 {
    font-size: 24px;
    margin: 0;
}

.report-page-heading-compact .lede {
    margin: 0;
}

.report-page-heading-compact .page-heading-actions {
    align-items: flex-end;
    gap: 8px;
}

.report-meta-line {
    color: #334155;
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
}

.report-sheet-compact {
    gap: 8px;
    padding: 10px 12px;
}

.report-block-head-compact {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.report-block-head-compact h2,
.report-block-head-compact h3 {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: -0.03em;
    margin: 0;
}

.report-block-head-compact p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    margin: 0;
}

.report-block-badges-compact {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.report-block-badges-compact span {
    border: 1px solid currentColor;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    padding: 2px 6px;
}

.report-table-compact {
    table-layout: auto;
    width: 100%;
}

.report-table-compact th,
.report-table-compact td {
    overflow-wrap: anywhere;
    padding: 5px 6px;
    vertical-align: top;
}

.report-table-compact th:last-child,
.report-table-compact td:last-child {
    width: auto;
}

.report-table-compact td strong,
.report-table-compact td small {
    display: block;
}

.report-table-compact td small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
    margin-top: 2px;
}

.report-empty-line {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    color: #475569;
    font-size: 11px;
    line-height: 1.45;
    margin: 0;
    padding: 10px 12px;
}

.report-page-heading {
    position: sticky;
    top: 0;
    z-index: 8;
}

.report-card-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-card {
    display: grid;
    gap: 12px;
    min-height: 0;
}

.report-card p {
    margin: 0;
}

.report-card-actions,
.report-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-sheet {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 14px;
}

.report-header-grid {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.report-identity {
    display: grid;
    gap: 4px;
}

.report-identity h2,
.report-block h3 {
    font-family: var(--display);
    font-size: 20px;
    letter-spacing: -0.03em;
    margin: 0;
}

.report-identity p,
.report-block p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    margin: 0;
}

.report-meta-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-meta-grid div,
.report-summary-strip article {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 254, 0.98));
    border: 1px solid rgba(140, 164, 193, 0.26);
    border-radius: 12px;
    box-shadow: 0 12px 20px rgba(42, 66, 97, 0.08), 0 2px 0 rgba(42, 66, 97, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.74);
    display: grid;
    gap: 4px;
    padding: 10px 12px;
}

html[data-theme="dark"] .report-meta-grid div,
html[data-theme="dark"] .report-summary-strip article {
    background: linear-gradient(180deg, rgba(26, 39, 59, 0.98), rgba(19, 31, 49, 0.96));
    border-color: rgba(106, 131, 164, 0.26);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24), 0 2px 0 rgba(8, 15, 25, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.report-meta-grid span,
.report-summary-strip span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.report-meta-grid strong,
.report-summary-strip strong {
    color: var(--text);
    font-size: 13px;
    letter-spacing: -0.01em;
}

.report-summary-strip {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-block {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    padding-top: 14px;
}

.report-block:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.report-site-section-stack,
.report-system-stack {
    display: grid;
    gap: 12px;
}

.report-section-card,
.report-system-card {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(239, 245, 252, 0.96));
    border: 1px solid rgba(136, 160, 191, 0.24);
    border-radius: 14px;
    box-shadow: 0 12px 20px rgba(42, 66, 97, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    display: grid;
    gap: 12px;
    padding: 14px;
}

.report-section-card-burg {
    box-shadow: inset 0 3px 0 rgba(213, 133, 43, 0.9), 0 12px 20px rgba(42, 66, 97, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.report-section-card-cctv {
    box-shadow: inset 0 3px 0 rgba(31, 110, 212, 0.9), 0 12px 20px rgba(42, 66, 97, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.report-section-card-access {
    box-shadow: inset 0 3px 0 rgba(13, 152, 165, 0.9), 0 12px 20px rgba(42, 66, 97, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.report-section-card-head,
.report-system-card-head {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.report-section-card h4,
.report-system-card h5 {
    font-family: var(--display);
    letter-spacing: -0.03em;
    margin: 0;
}

.report-section-card h4 {
    font-size: 18px;
}

.report-system-card h5 {
    font-size: 16px;
}

.report-section-card p,
.report-system-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    margin: 4px 0 0;
}

.report-disabled-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    margin: 0;
}

.report-inline-notes {
    margin-top: 8px;
}

.report-block-head {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.report-block-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.report-table {
    font-size: 11px;
}

.report-table th {
    white-space: nowrap;
}

.report-table th:last-child,
.report-table td:last-child {
    width: auto;
}

.report-table td strong,
.report-table td small {
    display: block;
}

.report-table td small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    margin-top: 3px;
}

.report-chip-list,
.report-secret-list,
.report-note-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-note-stack {
    display: grid;
    gap: 6px;
}

.report-chip,
.report-secret {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    min-height: 22px;
    padding: 0 9px;
}

.report-chip {
    background: rgba(121, 145, 176, 0.14);
    border: 1px solid rgba(121, 145, 176, 0.26);
    color: var(--soft);
    text-transform: uppercase;
}

.report-chip-burg {
    background: rgba(213, 133, 43, 0.13);
    border-color: rgba(213, 133, 43, 0.26);
    color: #9a5f18;
}

.report-chip-cctv {
    background: rgba(31, 110, 212, 0.12);
    border-color: rgba(31, 110, 212, 0.24);
    color: #255ca8;
}

.report-chip-access {
    background: rgba(13, 152, 165, 0.12);
    border-color: rgba(13, 152, 165, 0.24);
    color: #0b7780;
}

.report-secret {
    background: rgba(7, 26, 49, 0.06);
    border: 1px solid rgba(117, 138, 164, 0.2);
    color: var(--text);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0;
    text-transform: none;
}

.report-note-stack span {
    color: var(--soft);
    font-size: 11px;
    line-height: 1.5;
}

html[data-theme="dark"] .report-chip {
    background: rgba(110, 132, 162, 0.18);
    border-color: rgba(110, 132, 162, 0.28);
    color: #d9e7fa;
}

html[data-theme="dark"] .report-chip-burg {
    background: rgba(164, 103, 35, 0.28);
    border-color: rgba(215, 146, 74, 0.28);
    color: #ffd9a4;
}

html[data-theme="dark"] .report-chip-cctv {
    background: rgba(39, 95, 180, 0.28);
    border-color: rgba(88, 146, 234, 0.3);
    color: #d7e7ff;
}

html[data-theme="dark"] .report-chip-access {
    background: rgba(12, 113, 121, 0.3);
    border-color: rgba(71, 186, 196, 0.28);
    color: #d4fcff;
}

html[data-theme="dark"] .report-secret {
    background: rgba(6, 15, 28, 0.34);
    border-color: rgba(88, 110, 136, 0.28);
    color: #eef6ff;
}

.report-screen {
    background: #eef3f8;
    color: #0a1625;
}

.report-frame {
    margin: 0 auto;
    max-width: 1240px;
    padding: 24px;
}

.report-screen .page-heading.report-page-heading {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #d7e1ec;
    box-shadow: none;
    margin: 0 0 10px;
    min-height: 0;
    padding: 0 0 14px;
    position: static;
}

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

.report-screen .page-heading.report-page-heading .lede {
    color: #546b87;
}

.report-screen .panel.report-card,
.report-screen .panel.report-sheet {
    background: #ffffff;
    border-color: #d6e0ea;
    border-radius: 14px;
    box-shadow: 0 18px 34px rgba(26, 40, 63, 0.08);
}

.report-screen .report-meta-grid div,
.report-screen .report-summary-strip article {
    background: #ffffff;
    border-color: #d6e0ea;
    box-shadow: none;
}

.report-screen .count-badge {
    background: #f5f8fc;
    border-color: #d6e0ea;
    box-shadow: none;
    color: #5d7188;
}

.report-screen .compact-table thead th {
    background: #f5f8fc;
    border-bottom-color: #d6e0ea;
    color: #5a708c;
}

.report-screen .compact-table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

.report-screen .report-block {
    border-top-color: #dbe4ee;
}

.report-screen .report-section-card,
.report-screen .report-system-card {
    background: #ffffff;
    border-color: #d6e0ea;
}

.report-screen .button.secondary {
    background: #f7fafd;
    border-color: #d0dceb;
    box-shadow: 0 8px 16px rgba(31, 47, 73, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    color: #274969;
}

.report-screen .button.secondary:hover {
    filter: none;
    transform: translateY(-1px);
}

.report-filter-form {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.report-filter-form label {
    min-width: 170px;
}

.report-inline-value {
    color: #111827;
    display: inline-block;
    font-size: 11px;
    line-height: 1.45;
}

.report-text-mono-inline {
    font-family: var(--mono);
    font-size: 10px;
}

.report-text-stack {
    display: grid;
    gap: 4px;
}

.report-text-stack span {
    color: #111827;
    display: block;
    font-size: 11px;
    line-height: 1.45;
}

.report-text-mono span {
    font-family: var(--mono);
    font-size: 10px;
}

.review-print-table {
    table-layout: fixed;
    width: 100%;
}

.review-print-table th,
.review-print-table td {
    vertical-align: top;
}

.report-screen {
    background: #ffffff;
    color: #111827;
}

.report-frame {
    max-width: 1040px;
    padding: 20px 24px 30px;
}

.report-screen .report-page {
    gap: 10px;
    padding: 0;
}

.report-screen .page-heading.report-page-heading {
    border-bottom: 2px solid #111827;
    padding: 0 0 12px;
}

.report-screen .panel.report-card,
.report-screen .panel.report-sheet,
.report-screen .report-meta-grid div,
.report-screen .report-summary-strip article,
.report-screen .report-section-card,
.report-screen .report-system-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    box-shadow: none;
}

.report-screen .report-sheet {
    gap: 10px;
    padding: 12px 14px;
}

.report-screen .report-meta-grid div,
.report-screen .report-summary-strip article {
    padding: 8px 10px;
}

.report-screen .report-section-card,
.report-screen .report-system-card {
    padding: 10px;
}

.report-screen .count-badge,
.report-screen .pill {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: none;
    color: #111827;
}

.report-screen .compact-table thead th {
    background: #ffffff;
    border-bottom-color: #111827;
    color: #111827;
    font-size: 10px;
}

.report-screen .compact-table tbody tr:nth-child(even) td {
    background: #ffffff;
}

.report-screen .report-block,
.report-screen .report-section-card,
.report-screen .report-system-card {
    border-top-color: #d1d5db;
}

.report-screen .button.secondary {
    background: #ffffff;
    border-color: #111827;
    box-shadow: none;
    color: #111827;
}

.report-screen .button.secondary:hover {
    background: #f3f4f6;
    transform: none;
}

.report-screen .workspace-empty {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    color: #475569;
}

.report-screen {
    background: #ffffff;
    color: #000000;
}

.report-screen .eyebrow,
.report-screen .subtle,
.report-screen .lede,
.report-screen p,
.report-screen small {
    color: #111827;
}

.report-screen .report-frame {
    max-width: 1100px;
    padding: 18px 20px 24px;
}

.report-screen .report-page {
    gap: 8px;
    padding: 0;
}

.report-screen .page-heading.report-page-heading {
    background: transparent;
    border: 0;
    border-bottom: 2px solid #000000;
    box-shadow: none;
    margin: 0 0 8px;
    min-height: 0;
    padding: 0 0 8px;
    position: static;
}

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

.report-screen .panel.report-card,
.report-screen .panel.report-sheet,
.report-screen .report-meta-grid div,
.report-screen .report-summary-strip article,
.report-screen .report-section-card,
.report-screen .report-system-card {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 0;
    box-shadow: none;
}

.report-screen .report-sheet {
    gap: 8px;
    padding: 10px 12px;
}

.report-screen .report-meta-grid,
.report-screen .report-summary-strip {
    gap: 4px;
}

.report-screen .report-meta-grid div,
.report-screen .report-summary-strip article,
.report-screen .report-section-card,
.report-screen .report-system-card {
    padding: 6px 8px;
}

.report-screen .report-block {
    border-top: 1px solid #000000;
    gap: 6px;
    padding-top: 8px;
}

.report-screen .report-block-head,
.report-screen .report-block-head-compact {
    gap: 6px;
}

.report-screen .report-block-badges span,
.report-screen .report-block-badges-compact span,
.report-screen .count-badge,
.report-screen .pill {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 0;
    box-shadow: none;
    color: #000000;
    font-weight: 700;
}

.report-screen .button.secondary {
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 0;
    box-shadow: none;
    color: #000000;
}

.report-screen .button.secondary:hover {
    background: #f3f4f6;
    transform: none;
}

.report-screen .workspace-empty,
.report-screen .report-empty-line {
    background: #ffffff;
    border-color: #000000;
    color: #000000;
}

.report-screen .report-inline-value,
.report-screen .report-text-stack span,
.report-screen .report-text-mono span {
    color: #000000;
}

.report-screen .report-text-mono span {
    font-size: 10px;
}

.report-screen .compact-table,
.report-screen .report-table-compact {
    border-collapse: collapse;
}

.report-screen .compact-table th,
.report-screen .compact-table td {
    border-bottom: 1px solid #d1d5db;
    padding: 5px 6px;
    vertical-align: top;
}

.report-screen .compact-table thead th {
    background: #ffffff;
    border-bottom-color: #000000;
    color: #000000;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-screen .compact-table tbody tr:nth-child(even) td {
    background: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

@media (max-width: 1240px) {
    .command-bar {
        grid-template-columns: minmax(230px, 1fr) max-content;
    }

    .command-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        justify-self: stretch;
    }

    .reports-panel,
    .user-panel {
        left: 0;
        right: auto;
        width: min(90vw, 390px);
    }
}

@media (max-width: 1180px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ops-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-status-grid,
    .admin-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-card-grid,
    .report-header-grid,
    .report-summary-strip,
    .report-builder-hub {
        grid-template-columns: 1fr;
    }

    .rollup-grid,
    .detail-grid,
    .workspace-form-grid-3,
    .report-meta-grid,
    .report-builder-layout,
    .report-builder-section-grid {
        grid-template-columns: 1fr;
    }

    .report-builder-panel-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 1100px) {
    :root {
        --shell-page-pad-x: 14px;
        --shell-page-pad-y: 12px;
    }

    .app-frame {
        grid-template-columns: 1fr;
    }

    .side-rail {
        align-items: center;
        gap: 10px 14px;
        grid-template-areas:
            "brand cta"
            "nav nav";
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        min-height: auto;
        padding: 12px 14px;
        position: relative;
    }

    .brand {
        grid-area: brand;
    }

    .rail-cta {
        grid-area: cta;
        margin: 0;
        min-height: 38px;
        white-space: nowrap;
    }

    .nav {
        gap: 8px;
        grid-area: nav;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-kicker,
    .nav-divider,
    .rail-footer {
        display: none;
    }

    .hero-panel,
    .record-layout,
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .admin-split {
        grid-template-columns: 1fr;
    }

    .admin-modal-grid,
    .admin-modal-grid-slim {
        grid-template-columns: 1fr;
    }

    .command-bar {
        position: relative;
    }

    .person-drawer {
        max-width: none;
        width: min(720px, 92vw);
    }

    .system-grid {
        grid-template-columns: 1fr;
    }

    .workspace-stat-stack {
        position: static;
    }

    .company-editor {
        position: static;
    }
}

@media (max-width: 760px) {
    :root {
        --shell-page-pad-x: 12px;
        --shell-page-pad-y: 10px;
    }

    .side-rail {
        gap: 8px 10px;
        padding: 10px 12px 12px;
    }

    .brand {
        gap: 8px;
    }

    .brand strong {
        font-size: 14px;
    }

    .brand small {
        letter-spacing: 0.1em;
    }

    .rail-cta {
        justify-content: center;
        justify-self: stretch;
        min-height: 40px;
        padding: 0 12px;
    }

    .rail-link {
        min-height: 40px;
    }

    .command-bar {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 12px;
    }

    .command-actions {
        justify-content: stretch;
    }

    .global-search input {
        min-height: 36px;
        padding-right: 16px;
    }

    .hotkey-pill {
        display: none;
    }

    .top-button,
    .reports-menu,
    .user-menu {
        flex: 1 1 auto;
    }

    .user-chip {
        width: 100%;
    }

    .reports-panel,
    .user-panel {
        left: 0;
        right: auto;
        width: min(94vw, 360px);
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading-actions {
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
    }

    .page-heading-actions .search-form,
    .page-heading-actions .button,
    .page-heading-actions .count-badge {
        width: 100%;
    }

    .page-heading-actions .count-badge {
        justify-content: center;
    }

    .confirm-impact-grid,
    .report-filter-form {
        grid-template-columns: 1fr;
    }

    .report-picker-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .report-picker-tools .form-actions,
    .report-picker-tools input[type="search"] {
        width: 100%;
    }

    .report-filter-form {
        display: grid;
        width: 100%;
    }

    .report-filter-form label {
        min-width: 0;
        width: 100%;
    }

    .table-heading,
    .table-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .table-heading-actions {
        justify-content: flex-start;
    }

    .table-heading-actions > * {
        width: 100%;
    }

    .workspace-band-body,
    .workspace-list-body,
    .review-site-body,
    .site-roster-section-body,
    .site-roster-person-body,
    .site-roster-accordion,
    .site-section-accordion {
        padding-left: 12px;
        padding-right: 12px;
    }

    .site-section-toggle-grid,
    .site-schedule-row,
    .site-schedule-input-grid,
    .site-roster-person-grid,
    .site-roster-entry-grid,
    .report-card-grid,
    .report-meta-grid,
    .report-summary-strip,
    .report-builder-section-grid {
        grid-template-columns: 1fr;
    }

    .access-editor-intro,
    .access-site-modal-meta,
    .copy-actions-head,
    .review-site-head,
    .review-system-head,
    .site-access-summary,
    .site-roster-section-summary,
    .site-roster-person-summary,
    .site-roster-entry,
    .site-roster-entry-head,
    .system-editor-head,
    .workspace-save-bar,
    .report-block-head,
    .report-header-grid,
    .report-builder-picker-head,
    .report-section-card-head,
    .report-system-card-head {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .site-roster-section-meta,
    .site-roster-person-summary-meta,
    .site-access-summary-metrics,
    .review-site-summary-meta {
        text-align: left;
        justify-items: start;
        white-space: normal;
    }

    .site-roster-section-meta,
    .site-roster-person-summary-meta,
    .site-roster-person-actions,
    .site-roster-entry-actions,
    .review-site-badges,
    .review-site-health-badges,
    .review-system-actions,
    .review-summary-badges,
    .report-block-badges {
        justify-items: start;
        justify-content: flex-start;
    }

    .person-drawer {
        width: 100vw;
    }

    .drawer-grid {
        grid-template-columns: 1fr;
    }

    .metric-grid,
    .ops-strip,
    .command-grid,
    .admin-status-grid,
    .admin-status-strip,
    .two-column,
    .settings-grid,
    .workspace-form-grid,
    .workspace-metrics,
    .workspace-columns,
    .rollup-grid,
    .detail-grid,
    .system-editor-grid,
    .report-builder-site-group-options {
        grid-template-columns: 1fr;
    }

    .nav {
        grid-template-columns: 1fr 1fr;
    }

    .search-form,
    .detail-list div {
        grid-template-columns: 1fr;
    }

    .admin-modal,
    .admin-modal-wide {
        border-radius: 18px 18px 0 0;
        bottom: 0;
        left: 0;
        max-height: 94dvh;
        top: auto;
        transform: translate(0, 0);
        width: 100vw;
    }

    .admin-modal-body {
        padding: 14px;
    }

    .modal-layer:target .admin-modal,
    .modal-layer.is-open .admin-modal {
        transform: translate(0, 0);
    }

    table {
        min-width: 0;
    }

    .responsive-card-table {
        border-spacing: 0;
    }

    .responsive-card-table thead {
        display: none;
    }

    .responsive-card-table,
    .responsive-card-table tbody,
    .responsive-card-table tr,
    .responsive-card-table td {
        display: block;
        width: 100%;
    }

    .responsive-card-table tbody {
        display: grid;
        gap: 12px;
        padding: 12px;
    }

    .responsive-card-table tbody tr {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 14px;
        box-shadow: var(--shadow-tight);
        overflow: hidden;
    }

    .responsive-card-table tbody tr:hover td {
        background: transparent;
    }

    .responsive-card-table td {
        background: transparent !important;
        border-bottom: 1px solid var(--line);
        display: grid;
        gap: 8px;
        grid-template-columns: 104px minmax(0, 1fr);
        padding: 10px 12px;
    }

    .responsive-card-table td:last-child {
        border-bottom: 0;
        width: 100%;
    }

    .responsive-card-table td::before {
        color: var(--muted);
        content: attr(data-label);
        font-family: var(--mono);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: 0.08em;
        line-height: 1.35;
        text-transform: uppercase;
    }

    .responsive-card-table td[data-card-primary="true"],
    .responsive-card-table td[data-card-actions="true"] {
        grid-template-columns: 1fr;
    }

    .responsive-card-table td[data-card-actions="true"] .table-action-cluster {
        justify-content: flex-start;
    }

    .responsive-card-table td[data-card-actions="true"] .icon-button,
    .responsive-card-table td[data-card-actions="true"] .oval-icon-button {
        min-width: 42px;
    }

    .responsive-card-table td strong,
    .responsive-card-table td small {
        overflow-wrap: anywhere;
    }
}

@media print {
    @page {
        margin: 0.3in;
        size: auto;
    }

    body {
        background: #ffffff !important;
        color: #000000;
        font-size: 9pt;
        line-height: 1.25;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .side-rail,
    .command-bar,
    .drawer-layer,
    .toast-stack,
    .page-heading-actions,
    .workspace-save-bar,
    .modal-layer {
        display: none !important;
    }

    .app-frame,
    .main-stage,
    .shell,
    .report-frame {
        display: block;
        margin: 0;
        max-width: none;
        min-height: auto;
        padding: 0;
    }

    .shell,
    .report-page {
        margin: 0;
        padding: 0;
    }

    .page-heading.report-page-heading,
    .page-heading.report-page-heading.report-page-heading-compact {
        background: transparent !important;
        border: 0 !important;
        border-bottom: 2px solid #000000 !important;
        box-shadow: none !important;
        margin: 0 0 0.08in;
        min-height: 0;
        padding: 0 0 0.05in !important;
        position: static !important;
    }

    .report-sheet,
    .report-block,
    .report-meta-grid div,
    .report-summary-strip article,
    .report-section-card,
    .report-system-card,
    .workspace-empty,
    .report-empty-line {
        background: #ffffff !important;
        border-color: #000000 !important;
        box-shadow: none !important;
        color: #000000 !important;
    }

    .report-sheet {
        border: 0;
        padding: 0;
    }

    .report-sheet,
    .report-sheet-compact {
        gap: 0.05in;
        padding: 0 !important;
    }

    .report-summary-strip,
    .report-meta-grid {
        gap: 0.04in;
    }

    .report-meta-grid div,
    .report-summary-strip article {
        padding: 0.04in 0.05in !important;
    }

    .report-block {
        border-top: 1px solid #000000 !important;
        padding-top: 0.05in !important;
    }

    .compact-table,
    .report-table-compact {
        border-collapse: collapse !important;
        table-layout: auto;
        width: 100%;
    }

    .compact-table th,
    .compact-table td {
        border-bottom: 1px solid #000000 !important;
        padding: 3pt 4pt !important;
        vertical-align: top;
    }

    .compact-table thead th {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 8pt !important;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .compact-table tbody tr:nth-child(even) td {
        background: #ffffff !important;
    }

    .compact-table td strong,
    .compact-table td small,
    .report-inline-value,
    .report-text-stack span,
    .report-text-mono span {
        color: #000000 !important;
    }

    .report-block,
    .report-card,
    .report-table tr,
    .report-header-grid,
    .report-summary-strip,
    .report-section-card,
    .report-system-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}
