/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #1a4f8a; --navy-dark: #0f3460; --navy-lt: #e8f0fb;
  --accent: #c8102e; --text: #1c1e24; --text-2: #5a5f70; --text-3: #9197a8;
  --border: #e2e5ec; --border-2: #cdd1da; --bg: #f4f5f8; --bg-card: #ffffff; --bg-hover: #f8f9fc;
  --green: #2e7d32; --green-lt: #e8f5e9; --red: #c62828; --red-lt: #ffebee;
  --amber-lt: #fff8e1; --amber: #e65100;
  --sidebar-bg: #0f1d35; --sidebar-text: rgba(255,255,255,.6);
  --sidebar-hover: rgba(255,255,255,.07); --sidebar-active: rgba(255,255,255,.12);
  --radius: 8px; --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

/* ── Dark mode ── */
body.dark-mode {
  --text: #e8eaf0; --text-2: #9aa0b4; --text-3: #5c6480;
  --border: #2a2f45; --border-2: #353b55; --bg: #111827; --bg-card: #1e2535; --bg-hover: #252d40;
  --navy-lt: #1a2d4a; --green-lt: #1a2e1c; --red-lt: #2e1a1a; --amber-lt: #2e2210;
  --sidebar-bg: #090e1a;
}
body.dark-mode input, body.dark-mode select, body.dark-mode textarea { background: #252d40; color: var(--text); border-color: var(--border-2); }
body.dark-mode .btn { background: var(--bg-card); color: var(--text); border-color: var(--border-2); }
body.dark-mode .btn:hover { background: var(--bg-hover); }
body.dark-mode .btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
body.dark-mode .btn-primary:hover { background: var(--navy-dark); }
body.dark-mode th { background: #252d40; }
body.dark-mode .stat-card { background: #252d40; border-color: var(--border); }
body.dark-mode .cat-item  { background: #252d40; border-color: var(--border); }
body.dark-mode .link       { color: #f0a040; }
body.dark-mode .link:hover { color: #f8c070; }
body.dark-mode .tag { background: #1e2e1a; color: #8ecf6a; }
body.dark-mode .grid-hours-cell.has-hours { background: #1a2d4a; color: #7eb3ff; }
body.dark-mode .grid-total-cell  { background: #1c2840; }
body.dark-mode th.grid-total-cell { background: #1a2540; }

body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; transition: background .2s, color .2s; }

/* ── Layout ── */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 250px; min-width: 250px; background: var(--sidebar-bg); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: background .2s; }
.main { flex: 1; overflow-y: auto; min-width: 0; }

/* ── Sidebar brand ── */
.sidebar-brand { display: block; padding: 16px 14px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo { display: block; margin-bottom: 10px; line-height: 0; }
.sidebar-logo img { display: block; width: 100%; height: auto; max-width: 222px; }
.brand-name { display: block; font-size: 20px; font-weight: 700; color: #fff; line-height: 1.15; letter-spacing: .04em; margin-bottom: 5px; }
.brand-sub  { display: block; font-size: 12px; color: rgba(255,255,255,.55); line-height: 1.5; }

/* ── Nav ── */
.sidebar-nav { padding: 8px 0; flex: 1; }
.nav-section { font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); padding: 12px 16px 4px; }
.nav-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 16px; background: none; border: none; color: var(--sidebar-text); font-size: 13px; font-family: var(--font); cursor: pointer; text-align: left; transition: background .12s, color .12s; }
.nav-item:hover  { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 500; }

/* ── Sidebar footer ── */
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 10px 14px 6px; }
.dark-toggle { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: none; color: rgba(255,255,255,.5); font-size: 11px; font-family: var(--font); cursor: pointer; padding: 6px 2px; margin-bottom: 6px; border-radius: 6px; transition: color .15s; }
.dark-toggle:hover { color: rgba(255,255,255,.85); }
.toggle-track { width: 28px; height: 16px; background: rgba(255,255,255,.15); border-radius: 99px; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle-track.on { background: var(--navy); }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: #fff; border-radius: 50%; transition: left .2s; }
.toggle-track.on .toggle-thumb { left: 14px; }
.auth-guest { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.auth-guest span { font-size: 11px; color: rgba(255,255,255,.4); }
.auth-user  { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.auth-username { font-size: 12px; font-weight: 500; color: #fff; }
.auth-role  { font-size: 10px; color: rgba(255,255,255,.4); }

/* ── Pages ── */
.page { padding: 28px 32px; max-width: 1200px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.page-title { font-size: 22px; font-weight: 600; color: var(--text); }
.page-desc  { font-size: 13px; color: var(--text-2); margin-top: 3px; }

/* ── Cards ── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; transition: background .2s, border-color .2s; }
.table-card { padding: 0; overflow: hidden; }
.section-heading { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.section-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span-2 { grid-column: 1 / -1; }
label { font-size: 11px; font-weight: 600; color: var(--text-2); letter-spacing: .03em; text-transform: uppercase; }
.req  { color: var(--accent); }
.hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-3); }
input[type=text], input[type=number], input[type=date], input[type=email],
input[type=password], select, textarea {
  font-family: var(--font); font-size: 13px; color: var(--text); background: var(--bg-card);
  border: 1px solid var(--border-2); border-radius: var(--radius); padding: 8px 10px;
  transition: border-color .15s, box-shadow .15s, background .2s; outline: none; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26,79,138,.12); }
textarea { resize: vertical; }

/* ── Toolbar ── */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-family: var(--font); font-size: 13px; font-weight: 500; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--bg-card); color: var(--text); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; line-height: 1; }
.btn:hover   { background: var(--bg-hover); }
.btn:active  { transform: scale(.98); }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn-danger  { border-color: #e57373; color: var(--red); }
.btn-danger:hover { background: var(--red-lt); }
.btn-ghost   { background: transparent; border-color: transparent; color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: transparent; }
.btn-sm    { padding: 5px 10px; font-size: 12px; }
.btn-full  { width: 100%; justify-content: center; margin-bottom: 8px; }
.btn-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--border); background: var(--bg); white-space: nowrap; transition: background .2s; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-hover); }

/* ── Badges & tags ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.badge-pass     { background: var(--green-lt); color: var(--green); }
.badge-fail     { background: var(--red-lt);   color: var(--red); }
.badge-attended { background: var(--amber-lt); color: var(--amber); }
.badge-active   { background: var(--green-lt); color: var(--green); }
.badge-inactive { background: var(--red-lt);   color: var(--red); }
.badge-leave    { background: var(--amber-lt); color: var(--amber); }
.tag { display: inline-block; background: var(--navy-lt); color: var(--navy-dark); border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 500; }

/* ── Stat cards ── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; transition: background .2s; }
.stat-card .sc-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-bottom: 4px; }
.stat-card .sc-value { font-size: 24px; font-weight: 600; color: var(--text); line-height: 1; }
.stat-card .sc-sub   { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ── Hours grid ── */
.grid-scroll { overflow-x: auto; }
.grid-name-cell { min-width: 160px; position: sticky; left: 0; background: var(--bg-card); z-index: 2; font-weight: 500; transition: background .2s; }
.grid-name-cell .sub { font-size: 11px; color: var(--text-3); font-weight: 400; }
th.grid-name-cell { background: var(--bg); z-index: 3; }
.grid-hours-cell { text-align: center; min-width: 80px; }
.grid-hours-cell.has-hours { background: #edf4ff; color: var(--navy); font-weight: 600; font-family: var(--mono); }
.grid-total-cell { font-weight: 700; font-family: var(--mono); text-align: center; min-width: 70px; background: #f0f4ff; }
th.grid-total-cell { background: #e4ecff; }

/* ── Category summary ── */
.cat-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 10px; }
.cat-item { background: var(--bg); border-radius: var(--radius); padding: 12px 14px; border: 1px solid var(--border); transition: background .2s; }
.cat-item .ci-label { font-size: 11px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.cat-item .ci-value { font-size: 20px; font-weight: 600; color: var(--navy); font-family: var(--mono); margin-top: 2px; }
.cat-item .ci-sub   { font-size: 11px; color: var(--text-3); }

/* ── Modals ── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,15,30,.5); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 24px; width: 540px; max-width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); transition: background .2s; }
.modal-lg { width: 720px; }
.modal-sm { width: 400px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.modal-title  { font-size: 16px; font-weight: 600; }
.modal-sub    { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.modal-close  { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-3); padding: 2px 4px; line-height: 1; }
.modal-close:hover { color: var(--text); }

/* ── Login ── */
.login-overlay { position: fixed; inset: 0; background: rgba(10,15,30,.7); z-index: 500; display: flex; align-items: center; justify-content: center; }
.login-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 32px; width: 380px; max-width: 95vw; box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.login-logo  { text-align: center; margin-bottom: 14px; }
.login-card h1 { font-size: 20px; font-weight: 600; text-align: center; color: var(--text); }
.login-sub   { font-size: 12px; color: var(--text-2); text-align: center; margin: 4px 0 20px; }
.login-card .form-group { margin-bottom: 12px; }

/* ── Alerts ── */
.alert { padding: 10px 12px; border-radius: var(--radius); font-size: 13px; margin-bottom: 12px; }
.alert-error   { background: var(--red-lt);   color: var(--red);   border: 1px solid #ef9a9a; }
.alert-success { background: var(--green-lt); color: var(--green); border: 1px solid #a5d6a7; }

/* ── Misc ── */
.hidden      { display: none !important; }
.empty-state { text-align: center; padding: 36px 20px; color: var(--text-3); font-size: 13px; }
.link        { color: var(--navy); cursor: pointer; text-decoration: underline; }
.link:hover  { color: var(--navy-dark); }

/* ── Print area (isolated, always white) ── */
#print-area { display: none; }
@media print {
  body > * { display: none !important; }
  #print-area {
    /* Force all CSS variables back to light mode values */
    --navy: #1a4f8a; --navy-dark: #0f3460; --navy-lt: #e8f0fb;
    --text: #1c1e24; --text-2: #5a5f70; --text-3: #9197a8;
    --border: #e2e5ec; --border-2: #cdd1da;
    --bg: #f4f5f8; --bg-card: #ffffff; --bg-hover: #f8f9fc;
    --green: #2e7d32; --green-lt: #e8f5e9;
    --red: #c62828; --red-lt: #ffebee;
    --amber-lt: #fff8e1; --amber: #e65100;
    --radius: 8px;
    display: block !important; background: #fff !important; color: #000 !important;
    font-family: Arial, sans-serif; font-size: 11pt; padding: 16px; margin: 0;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  #print-area * { color: #000 !important; border-color: #ccc !important; box-shadow: none !important; }
  #print-area th { background: #1a4f8a !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-area tr:nth-child(even) td { background: #f5f5f5 !important; }
  #print-area .badge-pass     { background: #e8f5e9 !important; color: #2e7d32 !important; }
  #print-area .badge-fail     { background: #ffebee !important; color: #c62828 !important; }
  #print-area .badge-attended { background: #fff8e1 !important; color: #e65100 !important; }
  #print-area .tag            { background: #e8f0fb !important; color: #0f3460 !important; }
  #print-area .has-hours      { background: #edf4ff !important; color: #1a4f8a !important; font-weight: 600; }
  #print-area .grid-total-cell { background: #e4ecff !important; }
  #print-area .grid-name-cell  { position: static !important; }
  #print-area .stat-card { background: #f5f5f5 !important; border: 1px solid #ddd !important; }
  #print-area .cat-item  { background: #f5f5f5 !important; border: 1px solid #ddd !important; }
  #print-area .card { border: 1px solid #ccc !important; }
  #print-area table { width: 100%; border-collapse: collapse; }
  #print-area td, #print-area th { padding: 5px 8px; border: 1px solid #ddd !important; }
  #print-area .section-heading { color: #333 !important; border-bottom-color: #ccc !important; }

  /* TCS drill cards */
  #print-area .tcs-drill-card        { background: #f5f5f5 !important; border-color: #ccc !important; }
  #print-area .tcs-drill-card.pass   { background: #e8f5e9 !important; border-color: #a5d6a7 !important; }
  #print-area .tcs-drill-card.fail   { background: #ffebee !important; border-color: #ef9a9a !important; }
  #print-area .tcs-drill-card .tcs-num   { color: #555 !important; }
  #print-area .tcs-drill-card .tcs-title { color: #000 !important; }
  #print-area .tcs-pass              { color: #2e7d32 !important; }
  #print-area .tcs-fail              { color: #c62828 !important; }
  #print-area .tcs-skip              { color: #999 !important; }
  #print-area .tcs-drill-grid        { display: grid !important; }

  /* Qual / TCS section headings */
  #print-area .qual-section-heading  { color: #333 !important; border-top-color: #ccc !important; }

  /* Attempt badges */
  #print-area .attempt-badge         { background: #e8f0fb !important; color: #0f3460 !important; }

  /* TCS type badges */
  #print-area .tcs-type-official     { background: #e8f0fb !important; color: #1a4f8a !important; }
  #print-area .tcs-type-baseline     { background: #fff8e1 !important; color: #e65100 !important; }
}

/* ── Firearms Qualifications ──────────────────────────────── */
.qual-pass { color: var(--green); font-weight: 600; }
.qual-fail { color: var(--red);   font-weight: 600; }
.attempt-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: var(--navy-lt);
  color: var(--navy-dark);
}
body.dark-mode .attempt-badge { background: #1a2d4a; color: #7eb3ff; }
.qual-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 14px 0 10px;
  border-top: 2px solid var(--border);
  margin-top: 20px;
  margin-bottom: 12px;
}
.qual-section-heading svg { flex-shrink: 0; }

/* ── TCS Proficiencies ────────────────────────────────────── */
.tcs-pass  { color: var(--green); font-weight: 600; }
.tcs-fail  { color: var(--red); }
.tcs-skip  { color: var(--text-3); }
.tcs-type-official { background: var(--navy-lt); color: var(--navy-dark); }
.tcs-type-baseline { background: var(--amber-lt); color: var(--amber); }
body.dark-mode .tcs-type-official { background: #1a2d4a; color: #7eb3ff; }
body.dark-mode .tcs-type-baseline { background: #2e2210; color: #f0b060; }

.tcs-drill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.tcs-drill-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 12px;
  background: var(--bg);
}
.tcs-drill-card.pass  { border-color: var(--green); background: var(--green-lt); }
.tcs-drill-card.fail  { border-color: #e57373; background: var(--red-lt); }
.tcs-drill-card .tcs-num   { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.tcs-drill-card .tcs-title { font-size: 11px; font-weight: 500; margin: 2px 0; color: var(--text); line-height: 1.3; }
.tcs-drill-card .tcs-time  { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.tcs-drill-card .tcs-std   { font-size: 10px; color: var(--text-3); }

.lb-rank { font-weight: 700; font-family: var(--mono); font-size: 15px; text-align: center; }
.lb-rank.gold   { color: #b8860b; }
.lb-rank.silver { color: #808080; }
.lb-rank.bronze { color: #8b4513; }

.tcs-entry-table input[type=number] { width: 80px; padding: 4px 6px; font-size: 12px; }
.tcs-entry-table input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }

/* ── Compliance ───────────────────────────────────────────── */
.comp-section-heading {
  display: flex; align-items: center; gap: 10px;
  border-top: 2px solid var(--border);
  padding-top: 14px; margin-bottom: 16px;
}
.comp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.comp-row   { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 9px; }
.comp-row:last-child { margin-bottom: 0; }
.comp-row-label { font-size: 13px; color: var(--text); }
.comp-row-sub   { font-size: 11px; color: var(--text-2); margin-top: 1px; }
.comp-row-sub.fail { color: var(--red); }
.comp-warn-bar {
  margin-top: 12px; padding: 10px 14px;
  background: var(--amber-lt); border-radius: var(--radius);
  font-size: 12px; color: var(--amber); line-height: 1.6;
}
.comp-ok-bar {
  margin-top: 12px; padding: 10px 14px;
  background: var(--green-lt); border-radius: var(--radius);
  font-size: 12px; color: var(--green); line-height: 1.6;
}
.comp-icon-ok   { color: var(--green); flex-shrink: 0; margin-top: 1px; }
.comp-icon-fail { color: var(--red);   flex-shrink: 0; margin-top: 1px; }

/* Officer compliance cards */
.comp-officer-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 14px; margin-bottom: 8px;
}
.comp-officer-card.non-compliant { border-left: 3px solid var(--red); }
.comp-officer-card.compliant     { border-left: 3px solid var(--green); }
.comp-officer-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comp-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-lt); color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.comp-officer-name { font-size: 13px; font-weight: 600; color: var(--text); }
.comp-officer-sub  { font-size: 11px; color: var(--text-2); }
.comp-officer-hrs  { margin-left: auto; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.comp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.comp-pill-danger { font-size: 11px; padding: 2px 9px; border-radius: 99px; background: var(--red-lt); color: var(--red); }
.comp-pill-warn   { font-size: 11px; padding: 2px 9px; border-radius: 99px; background: var(--amber-lt); color: var(--amber); }

/* ── TCS Baseline Analysis ────────────────────────────────── */
.drill-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  transition: background .2s;
}
.drill-stat-card .ds-num   { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--text-2); margin-bottom:3px; }
.drill-stat-card .ds-title { font-size:13px; font-weight:600; color:var(--text); margin-bottom:8px; line-height:1.3; }
.drill-stat-card .ds-std   { font-size:11px; color:var(--text-3); margin-bottom:10px; }
.drill-stat-card .ds-stats { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.drill-stat-card .ds-stat  { background:var(--bg); border-radius:6px; padding:6px 8px; }
.drill-stat-card .ds-stat-val  { font-size:14px; font-weight:700; font-family:var(--mono); color:var(--text); }
.drill-stat-card .ds-stat-lbl  { font-size:10px; color:var(--text-2); margin-top:1px; }
.drill-stat-card .ds-rate      { margin-top:10px; }
.pass-rate-bar { height:6px; border-radius:99px; background:var(--border); overflow:hidden; margin-top:4px; }
.pass-rate-fill { height:100%; border-radius:99px; background:var(--navy); transition:width .3s; }
.pass-rate-fill.high { background:var(--green); }
.pass-rate-fill.mid  { background:var(--amber); }
.pass-rate-fill.low  { background:var(--red); }
.drill-stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; margin-bottom:24px; }
