:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #152533;
  background: #f4f7f6;
  --muted: #4f6471;
  --line: #dce7e4;
  --green: #17664f;
  --soft: #dff1e9;
  --nav: #142731;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: var(--green); text-underline-offset: .18em; }
button, input, textarea, select { font: inherit; }
button, .button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .5rem .92rem; border: 1px solid #1d664f; border-radius: 7px; background: #1d664f; color: white; text-decoration: none; font-weight: 650; cursor: pointer; }
button:hover, .button:hover { background: #134b3a; }
button.secondary, .button.secondary { background: white; color: #174f40; border-color: #c4d6cf; }
button.secondary:hover, .button.secondary:hover { background: #edf6f1; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #cc7a21; outline-offset: 3px; }
.skip { position: absolute; top: -80px; left: 1rem; z-index: 2; background: white; padding: .5rem; }
.skip:focus { top: .5rem; }
.shell { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--nav); color: #eef8f4; padding: 1.6rem 1rem 1rem; }
.brand, .workspace { display: flex; gap: .75rem; align-items: center; }
.brand { margin: 0 .5rem 2.5rem; color: inherit; text-decoration: none; font-size: 1.15rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.brand-sub { display: block; font-size: .84rem; color: #b4c9cd; font-weight: 500; letter-spacing: .04em; margin-top: .14rem; }
.brand-symbol { display: grid; place-items: center; width: 43px; height: 43px; background: #9fddbd; border-radius: 11px; color: #183c30; font-size: 1.6rem; }
.sidebar nav { display: grid; gap: .25rem; }
.sidebar nav a { display: flex; gap: .65rem; align-items: center; padding: .7rem .8rem; border-radius: 7px; color: #c6d8da; text-decoration: none; font-size: .92rem; font-weight: 590; }
.sidebar nav a span { display: inline-grid; width: 1.25rem; place-items: center; color: #a4d7c1; }
.sidebar nav a[aria-current="page"], .sidebar nav a:hover { background: #264239; color: white; }
.sidebar nav a[aria-current="page"] { box-shadow: inset 3px 0 #a3dfbf; }
.workspace { margin: auto 0 0; padding: 1rem .5rem .2rem; border-top: 1px solid #37505a; overflow-wrap: anywhere; }
.workspace-icon { border: 1px solid #47636a; border-radius: 8px; padding: .3rem .55rem; color: #b0dacf; }
.workspace small { display: block; color: #b4c9cd; }
.topbar { min-height: 63px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .75rem clamp(1rem, 3vw, 2.75rem); color: var(--muted); font-size: .9rem; }
.topbar strong { color: #1a2b34; margin-left: .28rem; }
.topbar span span { margin-left: .28rem; }
.top-status { text-align: right; }
.top-actions { display: flex; gap: .7rem; align-items: center; }
.auth-layout { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth-card { width: min(100%, 440px); padding: clamp(1.25rem, 5vw, 2rem); }
.auth-card > p { margin-top: .75rem; }
.auth-card form { display: grid; gap: .9rem; }
.auth-card .auth-error { color: #903220; }
main { max-width: 1400px; margin: auto; padding: 2.1rem clamp(1rem, 3vw, 2.75rem) 3rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 3.5vw, 2.65rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.016em; }
h3 { font-size: 1.02rem; }
.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.55rem; flex-wrap: wrap; }
.heading p, .muted, .panel > p, .metric > p { color: var(--muted); }
.heading p { margin-top: .55rem; }
.eyebrow { display: block; color: var(--green); font-size: .84rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .45rem; }
.metrics, .columns { display: grid; gap: .85rem; margin-bottom: .9rem; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.columns { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.panel, .metric { min-width: 0; border: 1px solid var(--line); background: white; border-radius: 11px; padding: clamp(.9rem, 2vw, 1.35rem); overflow-wrap: anywhere; }
.panel { margin-bottom: .9rem; }
.columns .panel { margin-bottom: 0; }
.panel > p, .metric > p { margin: .35rem 0 0; }
.panel > * + .table, .panel > form, .panel > .actions { margin-top: .85rem; }
.metric strong { display: block; margin: .22rem 0; letter-spacing: -.045em; line-height: 1.12; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.metric > :first-child { color: #405964; font-weight: 650; font-size: .93rem; }
.metric p, .meta { font-size: .84rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.pill { display: inline-block; padding: .16rem .55rem; border-radius: 4px; background: #edf2f4; color: #405661; font-size: .83rem; font-weight: 650; }
.pill.good { color: #185b43; background: var(--soft); }
.pill.warn { color: #78400b; background: #fff0da; }
.pill.bad { color: #903220; background: #fbe7e3; }
.list { padding: 0; margin: .9rem 0; list-style: none; }
.list li { border-top: 1px solid var(--line); padding: .67rem 0; display: flex; gap: .7rem; align-items: center; justify-content: space-between; }
.actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.table { overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .91rem; }
th, td { padding: .67rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f2f7f5; color: #314854; white-space: nowrap; }
td:first-child { min-width: 120px; }
td button { min-height: 32px; padding: .2rem .5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; margin: .8rem 0; }
.filters label { min-width: 150px; }
label { display: grid; gap: .3rem; font-weight: 600; color: #253d47; }
input:not([type="checkbox"]), textarea, select { width: 100%; min-width: 0; padding: .55rem .62rem; border: 1px solid #bacdc8; border-radius: 6px; background: white; color: #152533; }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.wide { grid-column: 1 / -1; }
.checkbox { display: flex; align-items: center; gap: .45rem; }
details { border-top: 1px solid var(--line); padding: .8rem 0; }
summary { cursor: pointer; font-weight: 650; }
details p { margin-top: .4rem; }
.evidence { white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { background: #f3f8f6; border: 1px dashed #bcd2c8; border-radius: 8px; padding: 1rem; margin-top: .85rem; }
.chart { display: block; width: 100%; height: 170px; margin-top: .75rem; }
.notice { position: fixed; right: 1rem; bottom: 1rem; max-width: min(460px, calc(100vw - 2rem)); border: 1px solid #b5d4c7; border-radius: 8px; background: #effaf4; padding: .7rem 1rem; z-index: 3; box-shadow: 0 8px 26px #213b3020; }
.notice.error { background: #fff1e9; border-color: #e1ae99; }
@media (max-width: 1070px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { height: auto; position: static; padding: .7rem; }
  .brand { margin: 0 0 .65rem; }
  .sidebar nav { display: flex; gap: .2rem; overflow-x: auto; }
  .sidebar nav a { white-space: nowrap; padding: .48rem .55rem; }
  .workspace { display: none; }
  .columns, .form-grid { grid-template-columns: minmax(0, 1fr); }
  main { padding-top: 1.3rem; }
}
