:root {
  color-scheme: light;
  --navy: #071943;
  --ink: #10213d;
  --muted: #66728a;
  --line: #dce5ea;
  --paper: #ffffff;
  --surface: #f4f9fa;
  --teal: #43d3ca;
  --teal-dark: #087a72;
  --danger: #b42318;
  --warning: #9a6700;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: #f7fafb; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
h1, h2, h3 { margin: 0; color: var(--navy); letter-spacing: -.02em; }
h1 { font-size: clamp(32px, 4vw, 50px); line-height: 1; }
h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.08; }
h3 { font-size: 19px; line-height: 1.2; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 252px; padding: 28px 20px 22px; border-right: 1px solid var(--line); background: rgba(255,255,255,.94); display: flex; flex-direction: column; gap: 26px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--navy); color: var(--teal); font-weight: 900; letter-spacing: -.05em; }
.eyebrow { margin: 0 0 7px; color: var(--teal-dark); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.sidebar-label { padding: 0 10px; color: #9aa7b7; font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.tab-nav { display: grid; gap: 4px; }
.tab-nav button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; border-radius: 9px; background: transparent; color: var(--ink); padding: 12px 12px; text-align: left; font-weight: 760; }
.tab-nav button span { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: #eef3f5; color: var(--muted); font-size: 11px; text-align: center; }
.tab-nav button:hover { background: #edf7f7; }
.tab-nav button.active { background: var(--navy); color: white; box-shadow: 0 8px 18px rgba(7,25,67,.14); }
.tab-nav button.active span { background: rgba(67,211,202,.18); color: var(--teal); }
.sidebar-footer { display: grid; gap: 14px; margin-top: auto; }
.operator-identity { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.operator-identity strong, .operator-identity small { display: block; }
.operator-identity strong { font-size: 13px; }
.operator-identity small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e8f8f6; color: var(--teal-dark); font-weight: 850; }

.workspace { margin-left: 252px; max-width: 1500px; padding: 48px clamp(24px, 5vw, 72px) 80px; }
.topbar { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.topbar-copy, .section-copy { max-width: 680px; margin: 12px 0 0; color: var(--muted); line-height: 1.6; }
.role-chip, .pill { display: inline-flex; align-items: center; min-height: 27px; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.role-chip { background: #e8f8f6; color: var(--teal-dark); }
.pill.good { background: #e8f8f0; color: #067647; }
.pill.warn { background: #fff6df; color: var(--warning); }
.pill.bad { background: #ffebe9; color: var(--danger); }
.pill.neutral { background: #eef2f6; color: var(--muted); }
.flash { margin: 0 0 24px; padding: 13px 15px; border-radius: 9px; font-weight: 760; }
.flash.success { background: #e8f8f0; color: #067647; }
.flash.error { background: #ffebe9; color: var(--danger); }

.tab-panel[hidden] { display: none; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.metric { min-height: 132px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.metric span { color: var(--muted); font-size: 13px; font-weight: 760; }
.metric strong { display: block; margin-top: 18px; color: var(--navy); font-size: 38px; line-height: 1; }
.metric small { display: block; margin-top: 10px; color: var(--muted); line-height: 1.4; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 16px; margin-top: 16px; }
.workspace-grid { display: grid; gap: 16px; }
.split { grid-template-columns: minmax(310px, .72fr) minmax(440px, 1.28fr); }
.surface { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: white; }
.surface > .section-heading, .surface > .form-grid, .surface > .notice { margin-left: 20px; margin-right: 20px; }
.section-heading { margin-bottom: 16px; }
.surface > .section-heading { padding-top: 20px; }
.section-block { margin-top: 16px; }
.attention-panel, .quick-actions { padding: 20px; }
.attention-panel .section-heading, .quick-actions .section-heading { margin-bottom: 10px; }
.attention-list { display: grid; gap: 2px; }
.attention-item, .empty-inline { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 0; border-top: 1px solid var(--line); }
.attention-item > div, .empty-inline > div { min-width: 0; flex: 1; }
.attention-item strong, .empty-inline strong { display: block; font-size: 14px; }
.attention-item small, .empty-inline small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.status-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #b5c1cc; }
.status-dot.good { background: #22a06b; }.status-dot.warn { background: #e2a11b; }.status-dot.bad { background: #d64545; }
.quick-action { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 14px 0; color: var(--ink); text-align: left; }
.quick-action:hover strong, .text-action:hover { color: var(--teal-dark); }
.quick-action strong, .quick-action small { display: block; }.quick-action small { margin-top: 4px; color: var(--muted); }
.quick-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #e8f8f6; color: var(--teal-dark); font-weight: 900; }
.text-action { border: 0; background: transparent; color: var(--teal-dark); font-weight: 850; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding-bottom: 20px; }
.compact-form { padding-top: 20px; }
.wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 780; }
.checkbox-row { display: flex; align-items: center; gap: 9px; color: var(--ink); }.checkbox-row input { width: auto; }
input, select, textarea { width: 100%; border: 1px solid #cfd9df; border-radius: 8px; background: #fff; color: var(--ink); padding: 10px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(67,211,202,.18); }
textarea { min-height: 86px; resize: vertical; }.form-grid small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.primary, .danger, .ghost { border: 0; border-radius: 8px; min-height: 42px; padding: 0 15px; font-weight: 850; }.primary { background: var(--teal); color: #06152f; }.primary:hover { background: #68e0d8; }.danger { background: var(--danger); color: white; }.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }.full { width: 100%; }
.notice { margin-top: 18px; margin-bottom: 20px; padding: 14px; border-radius: 9px; background: #f4f8fa; color: var(--muted); line-height: 1.5; }
.release-warning { display: grid; gap: 4px; border: 1px solid #f1d79a; background: #fffaf0; color: var(--warning); }
.release-warning strong { color: #765000; }
.disclosure { padding: 0 20px; }.disclosure summary { padding: 18px 0; cursor: pointer; color: var(--navy); font-weight: 850; }.disclosure[open] summary { border-bottom: 1px solid var(--line); }
.table-wrap { overflow: auto; margin: 0 20px 20px; border: 1px solid var(--line); border-radius: 9px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; } th, td { padding: 13px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); } th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; } td small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.4; } tr:last-child td { border-bottom: 0; }.empty { padding: 28px; color: var(--muted); text-align: center; }
.link-button { border: 0; background: transparent; padding: 0; color: var(--teal-dark); font-weight: 850; }.muted-action { color: var(--muted); }.action-stack { display: grid; gap: 8px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--teal-dark); }
.ledger-evidence summary { color: var(--teal-dark); cursor: pointer; font-weight: 850; }.ledger-evidence strong { display: block; margin-top: 10px; color: var(--navy); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }.ledger-evidence pre { max-width: 360px; max-height: 180px; overflow: auto; margin: 5px 0 0; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: #f7fbfc; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.release-upload { padding: 0 20px; }.release-upload .form-grid { padding-top: 2px; }.release-upload input[type=file] { padding: 9px; }

.login-shell { display: grid; place-items: center; min-height: 100vh; padding: 24px; }.login-panel { width: min(430px,100%); padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(7,25,67,.12); }.login-form { display: grid; gap: 16px; margin-top: 26px; }

@media (max-width: 1100px) { .split, .overview-grid { grid-template-columns: 1fr; } .metric-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); } }
@media (max-width: 760px) { .sidebar { position: static; width: auto; padding: 18px; border-right: 0; border-bottom: 1px solid var(--line); gap: 16px; }.sidebar-footer { margin-top: 0; }.tab-nav { display: flex; overflow-x: auto; padding-bottom: 2px; }.tab-nav button { flex: 0 0 auto; width: auto; white-space: nowrap; }.tab-nav button span { display: none; }.workspace { margin-left: 0; padding: 28px 16px 52px; }.topbar { align-items: start; }.topbar .role-chip { display: none; }.panel-heading { align-items: start; flex-direction: column; }.metric-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }.metric { min-height: 112px; padding: 14px; }.metric strong { margin-top: 14px; font-size: 30px; }.form-grid { grid-template-columns: 1fr; }.wide { grid-column: auto; }.surface > .section-heading, .surface > .form-grid, .surface > .notice { margin-left: 16px; margin-right: 16px; }.table-wrap { margin-left: 16px; margin-right: 16px; } }
