/* ==========================================================================
   HR Portal — design tokens + layout, adapted from the Claude Design export.
   ========================================================================== */

:root {
  --navy-900: #161d2c;
  --navy-800: #1a2740;
  --navy-700: #2c4a7d;
  --navy-700-hover: #233c68;
  --navy-600: #35548a;
  --navy-600-hover: #26406b;
  --gold: #b89243;
  --bg: #f5f6f9;
  --card-bg: #ffffff;
  --border: #e7e9f0;
  --border-soft: #f3f4f8;
  --text: #171d2b;
  --text-muted: #6a758d;
  --text-faint: #9aa4ba;
  --text-fainter: #8a94a8;
  --input-bg: #fbfcfe;
  --input-border: #dde1ea;
  --red: #d0403e;
  --red-dark: #b02f2d;
  --red-bg: #fdecec;
  --red-border: #f4cfcf;
  --green: #2f8a54;
  --green-hover: #277747;
  --green-bg: #e5f4ea;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
textarea { resize: vertical; }
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--navy-600-hover); }
::placeholder { color: var(--text-faint); }
.mono { font-family: 'IBM Plex Mono', monospace; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #d3d8e2; border-radius: 7px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #c1c8d6; }

@keyframes recpulse { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--input-border); border-radius: 9px; background: var(--input-bg);
}
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--navy-600); outline: none; background: #fff; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: #5b6478; margin-bottom: 6px; }

.btn { padding: 10px 18px; border-radius: 9px; font-weight: 600; font-size: 13.5px; transition: background .12s, border-color .12s, color .12s; display: inline-flex; align-items: center; gap: 7px; }
.btn-primary { background: var(--navy-700); color: #fff; }
.btn-primary:hover { background: var(--navy-700-hover); }
.btn-outline { background: #fff; border: 1px solid #d7dce6; color: #37445c; }
.btn-outline:hover { border-color: var(--navy-600); color: var(--navy-600); }
.btn-danger { background: #fff; border: 1px solid #e4bcbc; color: #c0403e; }
.btn-danger:hover { background: #fdf1f1; }
.btn-danger-solid { background: #c0403e; color: #fff; }
.btn-danger-solid:hover { background: #a8302e; }
.btn-accept { background: var(--green); color: #fff; }
.btn-accept:hover { background: var(--green-hover); }
.btn-dashed { background: #fff; border: 1px dashed #c9d0dc; color: #6a758d; }
.btn-dashed:hover { border-color: var(--navy-600); color: var(--navy-600); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }

.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); }
.card-body { padding: 18px 20px; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.role-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.cat-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; }

/* ---------- Login ---------- */
.login-screen {
  height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  background: radial-gradient(130% 130% at 100% 0%, #26365d 0%, #18202f 52%, #0f141d 100%);
}
.login-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(184,146,67,0.14); width: 680px; height: 680px; top: -180px; right: -160px; }
.login-ring--2 { width: 520px; height: 520px; top: -100px; right: -80px; border-color: rgba(184,146,67,0.07); }
.login-ring--3 { width: 440px; height: 440px; bottom: -140px; left: -90px; border-color: rgba(255,255,255,0.05); }
.login-glow { position: absolute; inset: 0; background: radial-gradient(50% 40% at 50% 55%, transparent 40%, rgba(10,14,20,0.5) 100%); }
.login-card { position: relative; width: 394px; max-width: calc(100vw - 32px); background: #fff; border-radius: 18px; padding: 40px 36px 30px; box-shadow: 0 30px 70px rgba(0,0,0,.42); }
.shield {
  width: 66px; height: 76px; margin: 0 auto 8px; background: linear-gradient(158deg,#2e4169,#1a2740);
  clip-path: polygon(50% 0,100% 16%,100% 60%,50% 100%,0 60%,0 16%);
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2px rgba(184,146,67,0.55);
}
.shield span { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 19px; letter-spacing: .05em; color: #d3b268; }
.shield--sm { width: 32px; height: 37px; box-shadow: inset 0 0 0 1.5px rgba(184,146,67,0.55); flex: 0 0 auto; }
.shield--sm span { font-size: 11px; }
.login-title { text-align: center; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.login-sub { text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-fainter); margin-top: 4px; }
.login-divider { height: 1px; background: #eceef3; margin: 24px 0 22px; }
.login-error { background: var(--red-bg); border: 1px solid var(--red-border); color: var(--red-dark); font-size: 13px; font-weight: 600; padding: 10px 13px; border-radius: 9px; margin-bottom: 16px; }
.login-footer { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 18px; color: var(--text-faint); font-size: 11.5px; }
.login-footer .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------- Layout ---------- */
.layout { height: 100vh; display: flex; }
.sidebar { width: 244px; flex: 0 0 244px; height: 100vh; background: var(--navy-900); display: flex; flex-direction: column; padding: 18px 14px 16px; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.sidebar-brand-name { color: #fff; font-weight: 700; font-size: 14px; line-height: 1.15; }
.sidebar-brand-sub { color: #7c88a0; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .12s; color: #9aa6bd;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: #e7ebf3; }
.nav-item.active { background: rgba(255,255,255,0.09); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav-item .icon { display: flex; flex: 0 0 auto; }
.nav-item .label { flex: 1; }
.nav-badge { background: #7a4fc0; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.sidebar-spacer { flex: 1; }
.sidebar-foot { padding: 12px 10px 4px; border-top: 1px solid rgba(255,255,255,0.06); }
.sidebar-foot-label { color: #7c88a0; font-size: 11px; font-weight: 600; }
.sidebar-foot-name { color: #c3ccdb; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.sidebar-foot-build { color: #5f6a80; font-size: 10.5px; margin-top: 6px; }

.main-col { flex: 1; height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 62px; flex: 0 0 62px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 18px; padding: 0 26px; z-index: 20; }
.page-title { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.search-wrap { position: relative; margin-left: 8px; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-faint); display: flex; pointer-events: none; }
.search-input { width: 266px; padding: 8px 12px 8px 34px; border: 1px solid #e2e5ee; border-radius: 9px; background: #f7f8fb; }
.search-input:focus { border-color: var(--navy-600); outline: none; background: #fff; }
.search-results { position: absolute; top: 44px; left: 0; width: 340px; background: #fff; border: 1px solid #e2e5ee; border-radius: 11px; box-shadow: 0 16px 40px rgba(23,34,53,.16); padding: 6px; z-index: 60; }
.search-result { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.search-result:hover { background: #f2f5fa; }
.avatar-sm { width: 30px; height: 30px; border-radius: 8px; background: #eef2f8; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #3a557f; flex: 0 0 auto; }
.spacer { flex: 1; }
.topbar-divider { width: 1px; height: 30px; background: var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip-name { font-size: 13px; font-weight: 700; line-height: 1.1; text-align: right; }
.user-chip-roles { display: flex; gap: 4px; justify-content: flex-end; margin-top: 3px; }
.user-avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--navy-700); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

.main-scroll { flex: 1; overflow-y: auto; position: relative; }
.page-pad { padding: 26px 30px 40px; }

/* ---------- Dashboard ---------- */
.dash-greeting { font-size: 23px; font-weight: 800; letter-spacing: -.015em; }
.dash-sub { color: var(--text-muted); font-size: 14px; margin-top: 3px; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 13px; padding: 16px 17px; }
.stat-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; }
.stat-sub { font-size: 12px; color: var(--text-fainter); margin-top: 2px; }
.dash-grid { display: grid; grid-template-columns: 1fr 328px; gap: 20px; align-items: start; }
.queue-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--border-soft); }
.queue-row:last-child { border-bottom: none; }
.avatar-md { width: 34px; height: 34px; border-radius: 9px; background: #eef2f8; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #3a557f; flex: 0 0 auto; }
.queue-name { font-weight: 600; font-size: 14px; }
.queue-sub { font-size: 12px; color: var(--text-muted); }
.chip-count { font-weight: 700; font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.activity-row { display: flex; gap: 11px; padding: 7px 0; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
.activity-text { font-size: 13px; line-height: 1.4; }
.activity-time { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }

/* ---------- Roster ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.stage-chip { padding: 8px 13px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; transition: .12s; background: #fff; border: 1px solid #e2e5ee; color: #5b6478; }
.stage-chip.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.stage-chip .count { opacity: .65; margin-left: 6px; font-variant-numeric: tabular-nums; }
.roster-table { width: 100%; border-collapse: collapse; }
.roster-table thead th { text-align: left; padding: 12px 20px; background: #fafbfd; border-bottom: 1px solid var(--border-soft); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-fainter); }
.roster-table th.sortable { cursor: pointer; }
.roster-table th.right, .roster-table td.right { text-align: right; }
.roster-table tbody td { padding: 13px 20px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; font-size: 13px; color: #4a566e; }
.roster-table tbody tr:hover { background: #fafbfd; }
.roster-table tbody tr:last-child td { border-bottom: none; }
.cand-cell { display: flex; align-items: center; gap: 12px; }
.cand-name { font-weight: 600; font-size: 14px; color: var(--text); }
.cand-id { font-size: 11.5px; color: var(--text-faint); }
.empty-row { padding: 34px; text-align: center; color: var(--text-faint); font-size: 13.5px; }

/* ---------- Interview grading ---------- */
.interview-page { padding: 20px 26px 30px; height: 100%; display: flex; flex-direction: column; }
.iv-header { background: #fff; border: 1px solid var(--border); border-radius: 13px; padding: 15px 20px; display: flex; align-items: center; gap: 20px; margin-bottom: 16px; flex: 0 0 auto; flex-wrap: wrap; }
.avatar-lg { width: 46px; height: 46px; border-radius: 11px; background: var(--navy-700); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: 0 0 auto; }
.iv-name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.iv-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.v-divider { width: 1px; height: 34px; background: var(--border-soft); }
.iv-field-label { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.iv-field-value { color: #37445c; font-weight: 600; }
.rec-badge { display: flex; align-items: center; gap: 14px; background: var(--red-bg); border: 1px solid var(--red-border); border-radius: 11px; padding: 8px 14px; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--red); animation: recpulse 1.3s infinite; }
.rec-time { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 16px; color: var(--red-dark); }
.rec-markers { font-size: 10.5px; color: #b06a68; font-weight: 600; }
.not-recording { display: flex; align-items: center; gap: 12px; }
.not-recording .hint { font-size: 11px; color: var(--text-faint); max-width: 150px; line-height: 1.35; text-align: right; }
.rubric-strip { background: #fff; border: 1px solid var(--border); border-radius: 13px; padding: 12px 18px; display: flex; align-items: center; gap: 20px; margin-bottom: 14px; flex: 0 0 auto; flex-wrap: wrap; }
.overall-score { text-align: center; flex: 0 0 auto; }
.overall-score .num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--navy-700); line-height: 1; }
.overall-score .lbl { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-fainter); margin-top: 3px; }
.rubric-cats { flex: 1; display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; min-width: 0; }
.rubric-cat-head { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.rubric-cat-dot { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }
.rubric-cat-name { font-size: 11px; font-weight: 600; line-height: 1.15; }
.rubric-cat-val { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 600; color: #37445c; flex: 0 0 auto; }
.bar-track { height: 6px; background: var(--border-soft); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.rubric-cat-weight { font-size: 10px; color: var(--text-faint); margin-top: 3px; }
.grading-grid { flex: 1; display: grid; grid-template-columns: 264px minmax(0,1fr); gap: 14px; min-height: 0; min-width: 0; }
.q-rail { background: #fff; border: 1px solid var(--border); border-radius: 13px; display: flex; flex-direction: column; min-height: 0; }
.q-rail-title { padding: 14px 16px 10px; font-weight: 700; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--text-fainter); }
.q-rail-list { flex: 1; overflow-y: auto; padding: 0 10px 10px; }
.q-rail-item { padding: 11px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 4px; transition: .12s; background: transparent; display: block; width: 100%; text-align: left; }
.q-rail-item.active { background: #f4f7fc; box-shadow: inset 0 0 0 1px #cdd9ec, inset 3px 0 0 var(--gold); }
.q-rail-row { display: flex; align-items: center; gap: 8px; }
.q-rail-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.q-rail-num { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; color: var(--text-fainter); }
.q-rail-status { padding: 1px 7px; border-radius: 5px; font-size: 10px; font-weight: 700; }
.q-rail-time { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; font-weight: 600; color: #167c8a; display: flex; align-items: center; gap: 3px; }
.q-rail-short { font-size: 12.5px; color: #37445c; margin-top: 6px; line-height: 1.4; }
.q-rail-foot { padding: 11px 12px; border-top: 1px solid var(--border-soft); }
.grading-panel { overflow-y: auto; min-height: 0; padding-right: 4px; display: flex; flex-direction: column; gap: 14px; }
.q-card { background: #fff; border: 1px solid var(--border); border-radius: 13px; padding: 18px 20px; transition: .15s; }
.q-card.active { border-color: #cdd9ec; box-shadow: 0 0 0 3px rgba(44,74,125,.08); }
.q-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; flex-wrap: wrap; }
.q-card-index { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; color: var(--text-fainter); }
.q-active-pill { margin-left: auto; display: flex; align-items: center; gap: 6px; background: var(--red-bg); color: var(--red-dark); font-weight: 700; font-size: 11px; padding: 3px 10px; border-radius: 999px; }
.q-active-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: recpulse 1.3s infinite; }
.q-text { font-size: 15.5px; font-weight: 600; line-height: 1.45; letter-spacing: -.005em; }
.score-row { display: flex; align-items: center; gap: 9px; margin: 15px 0 13px; flex-wrap: wrap; }
.score-btn { width: 38px; height: 38px; border-radius: 9px; font-weight: 700; font-size: 15px; cursor: pointer; transition: .12s; background: #f2f4f8; color: #5b6478; }
.score-btn.active { background: var(--navy-700); color: #fff; box-shadow: 0 2px 6px rgba(44,74,125,.3); }
.score-hint { font-size: 12.5px; color: var(--text-fainter); margin-left: 6px; }
.q-notes { width: 100%; min-height: 74px; padding: 11px 13px; border: 1px solid #e2e5ee; border-radius: 10px; background: var(--input-bg); line-height: 1.5; }
.q-notes:focus { border-color: var(--navy-600); outline: none; background: #fff; }

/* ---------- Playback ---------- */
.pb-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.pb-marker-count { display: flex; align-items: center; gap: 7px; background: #eef2f8; color: #3a557f; font-weight: 600; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; }
.player-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px 20px; margin-bottom: 20px; }
.wave-wrap { position: relative; padding-top: 22px; }
.wave-marker { position: absolute; top: 0; transform: translateX(-50%); cursor: pointer; z-index: 3; display: flex; flex-direction: column; align-items: center; }
.wave-marker-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 700; color: #fff; padding: 1px 6px; border-radius: 5px; margin-bottom: 2px; transition: .12s; }
.wave-marker-tick { width: 2px; height: 8px; }
#waveform { position: relative; }
.pb-controls { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.play-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--navy-700); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; flex: 0 0 auto; }
.play-btn:hover { background: var(--navy-700-hover); }
.pb-time { font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 600; color: #37445c; }
.pb-time .total { color: var(--text-faint); }
.pb-hint { font-size: 12px; color: var(--text-fainter); }
.pb-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.transcript-head { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.transcript-head .hint { font-size: 11.5px; font-weight: 600; color: var(--text-faint); }
.transcript-list { padding: 8px; max-height: 340px; overflow-y: auto; }
.transcript-row { padding: 11px 13px; border-radius: 10px; cursor: pointer; margin-bottom: 2px; transition: .12s; display: block; width: 100%; text-align: left; }
.transcript-row.active { background: #f4f7fc; box-shadow: inset 3px 0 0 var(--navy-700); }
.transcript-meta { display: flex; align-items: center; gap: 9px; margin-bottom: 3px; }
.transcript-time { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; }
.transcript-speaker { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.transcript-text { font-size: 13.5px; line-height: 1.5; }
.rubric-read-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.rubric-read-sub { font-size: 12px; color: var(--text-fainter); margin-bottom: 14px; }
.rubric-read-row { margin-bottom: 13px; }

/* ---------- Decision ---------- */
.dc-page { padding: 24px 30px 40px; max-width: 960px; }
.dc-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.dc-name { font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.dc-meta { font-size: 12.5px; color: var(--text-muted); }
.dc-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.dc-summary { display: flex; align-items: center; gap: 20px; padding: 16px 18px; background: #f7f9fc; border-radius: 11px; margin-bottom: 18px; flex-wrap: wrap; }
.dc-overall-num { font-size: 38px; font-weight: 800; letter-spacing: -.02em; color: var(--navy-700); line-height: 1; }
.dc-overall-lbl { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-fainter); margin-top: 4px; }
.dc-cats { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; min-width: 220px; }
.dc-cat-row { display: flex; align-items: center; gap: 8px; }
.dc-cat-name { font-size: 12.5px; color: #4a566e; flex: 1; }
.dc-section-label { font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-fainter); margin-bottom: 8px; }
.dc-comments { font-size: 13.5px; line-height: 1.6; color: #37445c; white-space: pre-wrap; }
.dc-panel { position: sticky; top: 0; }
.dc-panel-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.dc-panel-hint { font-size: 12.5px; color: var(--text-fainter); margin-bottom: 16px; line-height: 1.45; }
.deny-box { background: #fdf1f1; border: 1px solid #f2d4d4; border-radius: 11px; padding: 13px; margin-bottom: 14px; }
.deny-box-title { font-size: 12.5px; font-weight: 700; color: var(--red-dark); margin-bottom: 8px; }
.deny-textarea { width: 100%; min-height: 76px; padding: 10px; border: 1px solid #ebc9c9; border-radius: 9px; background: #fff; line-height: 1.5; }

/* ---------- Ride-along ---------- */
.ra-page { padding: 24px 30px 40px; max-width: 1000px; }
.ra-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ra-status-lbl { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-fainter); margin-bottom: 4px; text-align: right; }
.ra-rollup { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.ra-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.ra-tab { padding: 9px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; transition: .12s; background: #fff; border: 1px solid #e2e5ee; color: #5b6478; }
.ra-tab.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.ra-session-meta { display: flex; align-items: center; gap: 22px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); background: #fafbfd; flex-wrap: wrap; }
.ra-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-fainter); flex-wrap: wrap; }
.ra-legend span { display: flex; align-items: center; gap: 5px; }
.ra-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.ra-section-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.ra-section-name { font-weight: 600; font-size: 14px; }
.ra-section-desc { font-size: 12px; color: var(--text-fainter); margin-top: 1px; }
.ra-opt-group { display: flex; gap: 6px; }
.ra-opt-btn { min-width: 52px; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: .12s; background: #f5f6f9; color: #aeb5c2; }
.ra-opt-btn.active-pass { background: var(--green-bg); color: var(--green); box-shadow: inset 0 0 0 1.5px #2f8a5455; }
.ra-opt-btn.active-fail { background: #f9e8e7; color: #b64a48; box-shadow: inset 0 0 0 1.5px #b64a4855; }
.ra-opt-btn.active-ne { background: #eef1f6; color: #8a94a8; box-shadow: inset 0 0 0 1.5px #8a94a855; }

/* ---------- Denied archive ---------- */
.archive-flag { display: flex; align-items: center; gap: 7px; background: #f9e8e7; color: #b64a48; font-weight: 600; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; }
.denied-table td, .denied-table th { padding: 12px 20px; }

/* ---------- Admin ---------- */
.admin-flag { display: flex; align-items: center; gap: 7px; background: #f7efdb; color: #8f6f22; font-weight: 700; font-size: 12px; padding: 6px 12px; border-radius: 8px; letter-spacing: .02em; }
.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; flex-wrap: wrap; }
.admin-tab { padding: 11px 15px; font-size: 13.5px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; color: var(--text-fainter); margin-bottom: -1px; }
.admin-tab.active { border-bottom-color: var(--navy-700); color: var(--navy-700); }
.qrow { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.qrow:last-child { border-bottom: none; }
.drag-handle { cursor: grab; color: #c3ccd9; font-size: 15px; }
.weight-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.weight-dot { width: 10px; height: 10px; border-radius: 3px; }
.weight-control { display: flex; align-items: center; gap: 6px; }
.weight-btn { width: 28px; height: 28px; border-radius: 7px; background: #f2f4f8; color: #5b6478; font-weight: 700; font-size: 15px; }
.weight-btn:hover { background: #e7eaf1; }
.weight-value { width: 48px; text-align: center; font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 14px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.user-row:last-child { border-bottom: none; }
.user-row-name { width: 180px; }
.audit-table td, .audit-table th { padding: 10px 16px; font-size: 12.5px; }

/* ---------- Modal / toast ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(18,24,36,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { width: 520px; max-width: 100%; background: #fff; border-radius: 16px; box-shadow: 0 30px 70px rgba(0,0,0,.32); overflow: hidden; max-height: 90vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); }
.modal-title { font-weight: 800; font-size: 17px; }
.modal-sub { font-size: 12.5px; color: var(--text-fainter); margin-top: 1px; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; color: var(--text-fainter); font-size: 18px; }
.modal-close:hover { background: #f2f4f8; }
.modal-body { padding: 20px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; overflow-y: auto; }
.modal-body .full { grid-column: 1 / 3; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border-soft); background: #fafbfd; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 11px; font-size: 13.5px; font-weight: 600; z-index: 200; box-shadow: 0 14px 40px rgba(23,34,53,.22); animation: toastin .25s ease; }
.toast-ok { background: var(--green-bg); color: var(--green); }
.toast-tag { background: #e0f3f5; color: #137785; }
.toast-deny { background: #f9e8e7; color: #b64a48; }
.toast-default { background: #eef2f8; color: var(--navy-700); }

.svg-icon { display: block; }

@media (max-width: 900px) {
  .dash-grid, .dc-grid, .pb-grid { grid-template-columns: 1fr; }
  .grading-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
}
