/* DS Metis — DS brand: maroon #91253C, orange #FFB001 */
:root {
  --maroon: #91253C;
  --maroon-dark: #6e1c2e;
  --orange: #FFB001;
  --bg: #f5f4f2;
  --card: #ffffff;
  --ink: #262223;
  --muted: #7a7276;
  --line: #e5e0e2;
  --green: #2e7d32;
  --amber: #ef6c00;
  --red: #c62828;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 15px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); }
#app { display: flex; min-height: 100vh; }

#sidenav { width: 235px; background: var(--maroon); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.15); }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; background: var(--orange); color: var(--maroon); font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.brand-name { font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 11px; opacity: .75; }
#nav-links { flex: 1; padding: 12px 0; }
#nav-links a { display: block; padding: 10px 18px; color: rgba(255,255,255,.85); text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
#nav-links a:hover { background: rgba(255,255,255,.08); }
#nav-links a.active { background: rgba(0,0,0,.22); border-left-color: var(--orange); color: #fff; }
#user-box { padding: 14px 16px; font-size: 12.5px; border-top: 1px solid rgba(255,255,255,.15); }
#user-box .role-chip { display: inline-block; background: var(--orange); color: var(--maroon); font-weight: 700; border-radius: 10px; padding: 1px 8px; font-size: 11px; margin-top: 4px; }
#user-box a { color: var(--orange); }

#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#view { flex: 1; padding: 24px 28px; max-width: 1200px; width: 100%; }
h1 { font-size: 22px; margin-bottom: 4px; }
.sub { color: var(--muted); margin-bottom: 20px; font-size: 13.5px; }
h2 { font-size: 15px; margin-bottom: 10px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.card .big { font-size: 26px; font-weight: 700; color: var(--maroon); }
.card .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 18px; overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 11.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
tr:hover td { background: #faf7f8; }

.light { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: baseline; }
.light.green { background: var(--green); } .light.amber { background: var(--amber); } .light.red { background: var(--red); }
.suppressed { color: var(--muted); font-style: italic; }
.badge-suppressed { background: #eee; color: var(--muted); border-radius: 8px; padding: 1px 8px; font-size: 11px; }

#privacy-footer { padding: 14px 28px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); background: #fbfafa; }

#va-banner { background: var(--orange); color: var(--maroon); padding: 9px 28px; font-size: 13.5px; border-bottom: 2px solid var(--maroon); }
#va-banner a { color: var(--maroon); font-weight: 700; margin-left: 10px; }

.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }

.btnbar { margin-bottom: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select, button { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
button.primary { background: var(--maroon); color: #fff; border-color: var(--maroon); cursor: pointer; }

.login-wrap { margin: 12vh auto; max-width: 420px; text-align: center; }
.login-wrap .panel { padding: 34px; }
.login-btn { display: inline-block; margin-top: 18px; background: var(--maroon); color: #fff; padding: 11px 26px; border-radius: 8px; text-decoration: none; font-weight: 600; }

.error-box { background: #fdecea; color: var(--red); border: 1px solid #f5c6c0; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
ul.plain { list-style: none; } ul.plain li { padding: 4px 0 4px 22px; position: relative; }
ul.plain li.yes::before { content: "✓"; color: var(--green); position: absolute; left: 0; font-weight: 700; }
ul.plain li.no::before { content: "✕"; color: var(--red); position: absolute; left: 0; font-weight: 700; }

@media (max-width: 860px) {
  #app { flex-direction: column; }
  #sidenav { width: 100%; height: auto; position: static; }
  #nav-links { display: flex; flex-wrap: wrap; }
  #nav-links a { border-left: none; border-bottom: 3px solid transparent; }
  #nav-links a.active { border-bottom-color: var(--orange); }
  #view { padding: 16px; }
}
