:root {
  /* DocketHealth brand palette — see BRAND.md */
  --navy: #142b52;      /* Docket Navy — primary */
  --brand: #2f6fed;     /* Docket Blue — interactive/CTA */
  --teal: #12a594;      /* Health Teal — secondary accent */
  --ink: #0f1b33;
  --muted: #5b6b8c;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ok: #12a594;
  --warn: #d98c00;
  --crit: #d64545;
  --border: #e3e8f2;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
.hidden { display: none !important; }
.centered { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(20,33,61,0.04); }
.login-card { width: 420px; max-width: 100%; }
.brand-lockup { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.brand-lockup img, .brand-lockup svg { width: 44px; height: 44px; flex-shrink: 0; }
.brand-lockup .brand-word { font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; }
.brand-lockup .brand-word .teal { color: var(--teal); }
.login-card h1 { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: var(--navy); }
.subtitle { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.tagline { color: var(--navy); font-size: 13px; font-weight: 600; margin: -8px 0 18px; }
label { display: block; font-size: 13px; margin-bottom: 12px; color: var(--muted); }
input, select { width: 100%; padding: 10px 12px; margin-top: 4px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
button { cursor: pointer; }
button.primary, #login-form button { background: var(--brand); color: white; border: none; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.link-btn { background: none; border: none; color: var(--brand); font-size: 13px; }
.error { color: var(--crit); font-size: 13px; min-height: 18px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.5; }
.hint code { background: #eef1f8; padding: 1px 4px; border-radius: 4px; }

.topbar { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); }
.brand img, .brand svg { width: 30px; height: 30px; }
.brand .teal { color: var(--teal); }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab { background: none; border: none; padding: 8px 14px; border-radius: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.tab.active { background: var(--bg); color: var(--brand); font-weight: 600; }
.who { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.badge { background: #eef1f8; padding: 2px 8px; border-radius: 999px; font-size: 11px; color: var(--brand); }

main.tab-panel { max-width: 1100px; margin: 24px auto; padding: 0 24px; }
.panel-row { display: flex; align-items: center; gap: 16px; }
.kpis { display: flex; gap: 28px; flex: 1; }
.kpis .kpi { display: flex; flex-direction: column; }
.kpis .kpi .val { font-size: 24px; font-weight: 700; }
.kpis .kpi .lab { font-size: 12px; color: var(--muted); }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 8px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 600; }
.data-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.score { font-weight: 700; }
.score.ok { color: var(--ok); }
.score.warn { color: var(--warn); }
.score.crit { color: var(--crit); }
.pill { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.pill.ok { background: #e6f6ee; color: var(--ok); }
.pill.warn { background: #fdf2e0; color: var(--warn); }
.pill.crit { background: #fbe8e8; color: var(--crit); }
.pill.neutral { background: #eef1f8; color: var(--muted); }
.fix-list { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); }
.inline-form { display: flex; gap: 8px; margin-bottom: 12px; }
.inline-form select, .inline-form input { width: auto; margin-top: 0; }
.small-btn { padding: 4px 10px; font-size: 12px; border: 1px solid var(--border); background: white; border-radius: 6px; margin-right: 4px; }

.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; align-items: end; margin-top: 12px; }
.grid-form label { font-size: 12px; color: var(--muted); margin-bottom: 0; }
.grid-form input, .grid-form select { margin-top: 4px; }
.checkbox-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; padding: 8px 0; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
.checkbox-label input { width: auto; margin-top: 0; }
.grid-form button { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
.form-result { grid-column: 1 / -1; font-size: 13px; margin: 4px 0 0; min-height: 18px; }
.form-result.success { color: var(--ok); }
.form-result.error { color: var(--crit); }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
