:root {
    --brand-blue: #00346c;
    --brand-blue-strong: #004b95;
    --brand-sky: #a9c7ff;
    --brand-sky-soft: #d6e3ff;
    --bg: #f7f9fb;
    --bg-strong: #ffffff;
    --panel: #ffffff;
    --panel-soft: #f2f4f6;
    --surface-high: #e6e8ea;
    --surface-highest: #e0e3e5;
    --line: rgba(195, 198, 212, 0.32);
    --line-strong: rgba(115, 119, 131, 0.45);
    --text: #191c1e;
    --muted: #434652;
    --muted-soft: #526772;
    --brand: var(--brand-blue);
    --brand-dark: #001b3d;
    --accent: var(--brand-blue);
    --success: #0c7a5f;
    --warning: #7d2d00;
    --error: #ba1a1a;
    --shadow: 0 24px 40px rgba(0, 27, 61, 0.04);
    --hero-shadow: 0 30px 48px rgba(0, 27, 61, 0.07);
    --rail-width: 268px;
}

body[data-theme="dark"] {
    --bg: #0d1117;
    --bg-strong: #11161d;
    --panel: #151c24;
    --panel-soft: #111922;
    --surface-high: #1a2530;
    --surface-highest: #202a35;
    --line: rgba(66, 83, 104, 0.34);
    --line-strong: rgba(169, 199, 255, 0.24);
    --text: #eff1f3;
    --muted: #b4cad6;
    --muted-soft: #8aa0b5;
    --brand: #a9c7ff;
    --brand-dark: #d6e3ff;
    --accent: #a9c7ff;
    --success: #6fe0b7;
    --warning: #ffb596;
    --error: #ffb4ab;
    --shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
    --hero-shadow: 0 34px 60px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body[data-theme="dark"] {
    color-scheme: dark;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(0, 75, 149, 0.08), transparent 18%),
        radial-gradient(circle at left 18%, rgba(0, 52, 108, 0.06), transparent 24%),
        linear-gradient(180deg, var(--bg-strong) 0%, var(--bg) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(0, 52, 108, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 52, 108, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.5;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 92%);
}

a {
    color: inherit;
    text-decoration: none;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
    vertical-align: middle;
}

.workspace-shell {
    min-height: 100vh;
}

.side-rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-width);
    padding: 24px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: rgba(247, 249, 251, 0.85);
    border-right: 1px solid rgba(195, 198, 212, 0.24);
    backdrop-filter: blur(12px);
    z-index: 30;
}

body[data-theme="dark"] .side-rail {
    background: rgba(17, 22, 29, 0.86);
    border-right-color: rgba(66, 83, 104, 0.3);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 10px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-strong) 100%);
    color: #fff;
    box-shadow: 0 12px 26px rgba(0, 52, 108, 0.18);
}

.brand-lockup h1 {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: 1rem;
    line-height: 1.1;
    color: var(--brand-dark);
}

body[data-theme="dark"] .brand-lockup h1 {
    color: var(--brand-dark);
}

.brand-lockup p,
.rail-kicker,
.rail-footer p {
    margin: 0;
    color: var(--muted);
}

.brand-lockup p {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.rail-kicker {
    padding: 0 10px;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted-soft);
}

.side-nav {
    display: grid;
    gap: 4px;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 600;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.side-nav a .material-symbols-outlined {
    color: var(--brand-blue);
    font-size: 1.15rem;
}

.side-nav a.active {
    background: rgba(214, 227, 255, 0.7);
    color: var(--brand-dark);
}

body[data-theme="dark"] .side-nav a.active {
    background: rgba(0, 75, 149, 0.22);
    color: var(--brand-dark);
}

.side-nav a:hover {
    background: rgba(224, 227, 229, 0.75);
}

body[data-theme="dark"] .side-nav a:hover {
    background: rgba(32, 42, 53, 0.9);
}

.rail-footer {
    margin-top: auto;
    padding: 14px 12px;
    border-radius: 14px;
    background: var(--panel-soft);
}

.rail-footer strong {
    display: block;
    margin-bottom: 4px;
    font-family: "Manrope", sans-serif;
    color: var(--brand-dark);
}

.workspace-main {
    margin-left: var(--rail-width);
    min-height: 100vh;
    padding: 18px 22px 28px;
}

.top-app-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 72px;
    padding: 16px 22px;
    border-radius: 18px;
    margin-bottom: 12px;
    background: rgba(247, 249, 251, 0.82);
    box-shadow: 0 10px 24px rgba(0, 27, 61, 0.03);
}

body[data-theme="dark"] .top-app-bar {
    background: rgba(17, 22, 29, 0.82);
}

.glass-nav {
    backdrop-filter: blur(12px);
}

.top-app-copy h2 {
    margin: 2px 0 0;
    font-family: "Manrope", sans-serif;
    font-size: clamp(1.3rem, 1.8vw, 1.75rem);
    letter-spacing: -0.03em;
}

.top-app-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.top-app-time {
    font-size: 0.92rem;
    color: var(--muted-soft);
}

.shell-header h1,
.hero-card h2,
.page-intro h2,
.panel h2,
.metric-card h3,
.side-card h2 {
    margin: 0;
}

.shell-header h1 {
    font-size: clamp(1.8rem, 2.4vw, 2.55rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.header-subtitle {
    margin: 0;
    max-width: 70ch;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.header-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--muted);
}

.eyebrow,
.metric-label,
.filter-field span,
.summary-grid dt {
    margin: 0 0 10px;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    font-weight: 700;
}

.item-meta {
    margin: 0 0 8px;
    color: var(--muted-soft);
    font-size: 0.9rem;
    font-weight: 600;
}

.theme-toggle,
.top-nav a,
.flash,
.hero-card,
.side-card,
.panel,
.metric-card,
.list-card,
.summary-grid div,
.filter-field input,
.filter-field select,
pre {
    transition:
        background-color 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.theme-toggle {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.flash {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--accent);
}

.flash.success {
    color: var(--success);
}

.flash.warning {
    color: var(--warning);
}

.flash.error {
    color: var(--error);
}

.page-shell {
    display: grid;
    gap: 20px;
    padding-top: 6px;
}

.compact-panel {
    padding: 14px 18px;
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(247, 249, 251, 0.82);
}

body[data-theme="dark"] .status-strip {
    background: rgba(17, 22, 29, 0.82);
}

.status-strip-item {
    display: grid;
    gap: 8px;
}

.status-strip-copy {
    display: grid;
    gap: 8px;
    align-items: start;
}

.status-strip-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-grid,
.two-column,
.metrics-grid {
    display: grid;
    gap: 20px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
}

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

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

.hero-card,
.side-card,
.panel,
.metric-card {
    background: var(--panel);
    border: 0;
    outline: 1px solid rgba(195, 198, 212, 0.15);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.hero-card {
    background:
        linear-gradient(135deg, rgba(0, 52, 108, 0.98), rgba(0, 75, 149, 0.94)),
        radial-gradient(circle at top right, rgba(169, 199, 255, 0.24), transparent 36%);
    color: #fff;
    box-shadow: var(--hero-shadow);
    overflow: hidden;
    position: relative;
    outline: 0;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -50px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(169, 199, 255, 0.18), transparent 70%);
}

.hero-card .eyebrow,
.hero-card .lead,
.hero-card .secondary-link {
    color: rgba(255, 255, 255, 0.9);
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-card h2 {
    max-width: 18ch;
    font-family: "Manrope", sans-serif;
    font-size: clamp(2.15rem, 3vw, 3.1rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.hero-callout {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    position: relative;
    z-index: 1;
}

.hero-callout strong {
    display: block;
    margin-bottom: 6px;
}

.hero-callout .muted,
.hero-callout .detail {
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
}

.hero-callout .secondary-link {
    flex: 0 0 auto;
}

.primary-link,
.secondary-link,
.primary-button,
.secondary-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 11px 14px;
    font: inherit;
    font-weight: 600;
    border: 0;
    cursor: pointer;
}

.primary-link,
.primary-button {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-strong));
    color: #fff;
}

.secondary-link,
.secondary-button {
    background: var(--panel-soft);
    color: var(--brand-dark);
    border: 0;
}

body[data-theme="dark"] .secondary-link,
body[data-theme="dark"] .secondary-button {
    background: rgba(102, 188, 242, 0.08);
    border-color: rgba(102, 188, 242, 0.14);
}

.small-button {
    background: rgba(214, 227, 255, 0.86);
    color: var(--brand-dark);
    padding: 8px 12px;
}

body[data-theme="dark"] .small-button {
    color: #d8eefc;
}

.lead,
.muted,
.detail,
.plain-list li,
td,
th,
.allocation-row p {
    color: var(--muted);
}

.lead {
    line-height: 1.6;
}

.compact-copy {
    margin: 10px 0 2px;
    font-size: 0.98rem;
}

.plain-list,
.stack {
    display: grid;
    gap: 14px;
}

.plain-list {
    margin: 0;
    padding-left: 18px;
}

.panel-heading,
.list-head,
.allocation-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: start;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.compact-stack {
    gap: 8px;
}

.bulk-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-soft);
}

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

.list-card {
    border: 0;
    outline: 1px solid rgba(195, 198, 212, 0.15);
    border-radius: 14px;
    padding: 18px;
    background: var(--panel-soft);
}

.status-card {
    position: relative;
}

.status-card::before,
.status-row-good::before,
.status-row-warning::before,
.status-row-bad::before,
.status-row-neutral::before {
    content: "";
    position: absolute;
    inset: 18px auto 18px 0;
    width: 4px;
    border-radius: 999px;
    background: transparent;
}

.status-card-high::before,
.status-row-bad::before {
    background: var(--error);
}

.status-card-medium::before,
.status-row-warning::before {
    background: var(--warning);
}

.status-card-platform::before,
.status-row-neutral::before {
    background: var(--brand-blue);
}

.status-card-approved::before,
.status-card-executed::before,
.status-row-good::before {
    background: var(--success);
}

.status-card-failed::before {
    background: var(--error);
}

.status-card-pending::before {
    background: var(--warning);
}

.status-cluster {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 8px;
}

.side-card h2,
.panel h2 {
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.side-card h2,
.panel h2,
.metric-card h3 {
    font-size: clamp(1.1rem, 1.35vw, 1.45rem);
}

.metric-card h3 {
    font-size: clamp(1.65rem, 2vw, 2.2rem);
    letter-spacing: -0.03em;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(19, 44, 129, 0.08);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
}

body[data-theme="dark"] .pill {
    background: rgba(102, 188, 242, 0.12);
}

.pill-neutral,
.pill-info {
    background: rgba(19, 44, 129, 0.08);
    border-color: rgba(19, 44, 129, 0.12);
    color: var(--accent);
}

.pill-good {
    background: rgba(12, 122, 95, 0.12);
    border-color: rgba(12, 122, 95, 0.2);
    color: var(--success);
}

.pill-warning,
.pill-medium {
    background: rgba(154, 97, 16, 0.12);
    border-color: rgba(154, 97, 16, 0.2);
    color: var(--warning);
}

.pill-bad,
.pill-high {
    background: rgba(155, 54, 72, 0.12);
    border-color: rgba(155, 54, 72, 0.2);
    color: var(--error);
}

.pill-platform {
    background: rgba(19, 44, 129, 0.12);
    border-color: rgba(19, 44, 129, 0.18);
    color: var(--brand-blue);
}

body[data-theme="dark"] .pill-neutral,
body[data-theme="dark"] .pill-info,
body[data-theme="dark"] .pill-platform {
    background: rgba(142, 207, 255, 0.12);
    border-color: rgba(142, 207, 255, 0.18);
    color: #d8eefc;
}

body[data-theme="dark"] .pill-good {
    background: rgba(111, 224, 183, 0.12);
    border-color: rgba(111, 224, 183, 0.2);
}

body[data-theme="dark"] .pill-warning,
body[data-theme="dark"] .pill-medium {
    background: rgba(255, 204, 124, 0.12);
    border-color: rgba(255, 204, 124, 0.2);
}

body[data-theme="dark"] .pill-bad,
body[data-theme="dark"] .pill-high {
    background: rgba(255, 159, 176, 0.12);
    border-color: rgba(255, 159, 176, 0.2);
}

.status-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.status-icon svg {
    width: 100%;
    height: 100%;
}

.inline-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
    color: var(--muted-soft);
    font-size: 0.92rem;
    font-weight: 600;
}

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

.summary-grid div {
    padding: 18px;
    border: 0;
    outline: 1px solid rgba(195, 198, 212, 0.15);
    border-radius: 14px;
    background: var(--panel-soft);
}

.summary-grid dd {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.allocation-row {
    align-items: center;
    position: relative;
    padding-left: 16px;
}

.allocation-bar {
    flex: 1;
    min-width: 140px;
    height: 10px;
    background: rgba(19, 44, 129, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.allocation-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-sky));
}

.page-intro {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    padding: 4px 2px 2px;
}

.page-intro .lead {
    max-width: 72ch;
    margin-top: 10px;
}

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

.global-filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

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

.filter-field {
    display: grid;
    gap: 8px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--text);
    font: inherit;
    background: var(--panel-soft);
}

.filter-field input::placeholder {
    color: var(--muted-soft);
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-bottom-color: var(--brand-blue-strong);
}

.align-end {
    align-self: end;
}

.empty-state {
    margin: 14px 0 0;
}

.empty-state-inline {
    display: grid;
    gap: 6px;
    padding: 8px 0;
}

.table-wrap {
    overflow-x: auto;
}

.table-cell-stack {
    display: grid;
    gap: 8px;
}

th input[type="checkbox"],
td input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-blue);
}

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

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 0;
    white-space: nowrap;
    vertical-align: top;
}

.table-row-high td,
.table-row-medium td,
.table-row-good td,
.table-row-bad td,
.table-row-neutral td {
    background: transparent;
}

.table-row-high td:first-child,
.table-row-medium td:first-child,
.table-row-good td:first-child,
.table-row-bad td:first-child,
.table-row-neutral td:first-child {
    box-shadow: inset 3px 0 0 transparent;
}

.table-row-high td {
    background: rgba(155, 54, 72, 0.035);
}

.table-row-high td:first-child {
    box-shadow: inset 3px 0 0 var(--error);
}

.table-row-medium td {
    background: rgba(154, 97, 16, 0.035);
}

.table-row-medium td:first-child {
    box-shadow: inset 3px 0 0 var(--warning);
}

.table-row-good td {
    background: rgba(12, 122, 95, 0.035);
}

.table-row-good td:first-child {
    box-shadow: inset 3px 0 0 var(--success);
}

.table-row-bad td {
    background: rgba(155, 54, 72, 0.035);
}

.table-row-bad td:first-child {
    box-shadow: inset 3px 0 0 var(--error);
}

.table-row-neutral td {
    background: rgba(19, 44, 129, 0.03);
}

.table-row-neutral td:first-child {
    box-shadow: inset 3px 0 0 var(--brand-blue);
}

th {
    color: var(--muted-soft);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body[data-theme="dark"] th {
    color: #d8eefc;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
}

.text-link {
    color: var(--brand-blue);
    font-weight: 600;
}

body[data-theme="dark"] .text-link {
    color: #8ecfff;
}

.check-row {
    display: flex;
    gap: 12px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.check-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.check-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    margin-top: 5px;
    flex: 0 0 auto;
}

.check-dot.done {
    background: var(--success);
}

.check-dot.todo {
    background: var(--line-strong);
}

.status-list {
    display: grid;
    gap: 12px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.status-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.status-item-copy {
    display: grid;
    gap: 6px;
}

.status-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: 50vh;
}

.auth-card {
    width: min(480px, 100%);
}

@media (max-width: 1080px) {
    .workspace-main {
        margin-left: 0;
        padding: 16px;
    }

    .side-rail {
        display: none;
    }

    .hero-grid,
    .two-column,
    .metrics-grid,
    .filter-grid,
    .global-filter-bar,
    .status-strip {
        grid-template-columns: 1fr;
    }

    .page-intro,
    .panel-heading,
    .status-item {
        align-items: start;
        flex-direction: column;
    }

    .top-app-bar,
    .top-app-actions {
        flex-wrap: wrap;
    }

    .status-cluster {
        justify-content: start;
    }

    .hero-callout,
    .bulk-toolbar {
        align-items: start;
        flex-direction: column;
    }
}
