/* ── Reset & Variables ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f1f5f9;
  --surface:    #ffffff;
  --border:     #e2e8f0;
  --primary:    #2563eb;
  --primary-h:  #1d4ed8;
  --success:    #16a34a;
  --danger:     #dc2626;
  --warning:    #d97706;
  --text:       #0f172a;
  --muted:      #64748b;
  --radius:     8px;
  --shadow:     0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* ── Nav ────────────────────────────────────────────────────── */
nav {
  display: flex; align-items: center; gap: 4px;
  background: var(--text); color: #fff;
  padding: 0 16px; height: 48px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-lg);
}
.brand { font-weight: 700; font-size: 1rem; margin-right: 8px; white-space: nowrap; }
.tab-btn {
  padding: 6px 14px; border: none; background: transparent; color: #94a3b8;
  cursor: pointer; border-radius: 6px; font-size: .875rem; transition: .15s;
}
.tab-btn:hover  { background: rgba(255,255,255,.1); color: #fff; }
.tab-btn.active { background: var(--primary); color: #fff; }
#exam-badge { margin-left: auto; font-size: .75rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

/* ── Main ───────────────────────────────────────────────────── */
#app { padding: 20px; max-width: 100%; }
.loading { text-align: center; padding: 60px; color: var(--muted); }
.hint    { color: var(--muted); padding: 40px; text-align: center; }
.hint-sm { color: var(--muted); font-size: .85rem; }

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h2 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
.card h3 { font-size: .9rem; font-weight: 600; margin-bottom: 10px; }

/* ── Buttons ────────────────────────────────────────────────── */
button { cursor: pointer; border: none; border-radius: 6px; font-size: .875rem; transition: .15s; font-family: inherit; }
.btn-primary  { background: var(--primary); color: #fff; padding: 8px 16px; }
.btn-primary:hover  { background: var(--primary-h); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-sm       { background: var(--border); color: var(--text); padding: 5px 10px; font-size: .8rem; }
.btn-sm:hover { background: #cbd5e1; }
.btn-danger   { background: #fee2e2; color: var(--danger); }
.btn-danger:hover { background: #fecaca; }
.btn-xs       { background: transparent; color: var(--muted); padding: 2px 6px; font-size: .75rem; border: 1px solid var(--border); }
.btn-xs:hover { background: var(--border); }
.btn-unanswered { background: #fef3c7; color: var(--warning); padding: 6px 12px; font-size: .8rem; margin-top: 8px; }
.btn-annot { background: #ede9fe; color: #7c3aed; padding: 5px 10px; font-size: .8rem; }
.btn-annot.has-annot { background: #7c3aed; color: #fff; }

/* ── Inputs ─────────────────────────────────────────────────── */
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px;
  font-size: .875rem; font-family: inherit; color: var(--text);
  background: var(--surface); outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea { resize: vertical; min-height: 70px; width: 100%; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge       { background: #dbeafe; color: #1e40af; border-radius: 4px; padding: 2px 7px; font-size: .75rem; }
.badge-muted { background: var(--bg); color: var(--muted); border-radius: 4px; padding: 2px 7px; font-size: .75rem; }
.chip        { background: #e0f2fe; color: #0369a1; border-radius: 12px; padding: 2px 10px; font-size: .8rem; }

/* ── Import view ────────────────────────────────────────────── */
.view-import { max-width: 700px; margin: 0 auto; }
.exam-select-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.exam-select-row select { flex: 1; min-width: 200px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 32px; text-align: center; color: var(--muted);
  transition: .2s; cursor: pointer;
}
.drop-zone.drag-over { border-color: var(--primary); background: #eff6ff; }
.drop-zone p { margin-bottom: 10px; }
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 12px 0 4px; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width .2s; width: 0; }
.student-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.warn { color: var(--warning); }

/* ── Barème view ────────────────────────────────────────────── */
.view-bareme { max-width: 860px; margin: 0 auto; }
.bareme-toolbar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; }
.question-card { margin-bottom: 12px; }
.qcard-header  { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.qcard-title   { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; }
.qcard-label   { font-weight: 500; }
.qcard-actions { display: flex; gap: 4px; flex-shrink: 0; }
.criteria-section { border-top: 1px solid var(--border); padding-top: 10px; }
.crit-list     { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.crit-row      { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.crit-label-text { flex: 1; font-size: .875rem; }
.crit-pts-badge  { background: #f0fdf4; color: var(--success); border-radius: 4px; padding: 1px 6px; font-size: .75rem; white-space: nowrap; }
.add-crit-form   { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.form-card  { margin-top: 16px; }
.form-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.form-row label { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.form-btns  { display: flex; gap: 8px; }

/* ── Full-screen correction (new) ───────────────────────────── */
.corr-full {
  position: fixed; top: 48px; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; background: #1e1e1e; z-index: 10;
}
.corr-nav-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 5px 10px; background: var(--surface);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.corr-nav-group {
  display: flex; align-items: center; gap: 4px;
  padding: 0 6px; border-right: 1px solid var(--border);
}
.corr-nav-group:last-child { border-right: none; }
.corr-nav-group button {
  padding: 3px 9px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; font-size: .8rem; cursor: pointer;
}
.corr-nav-group button:disabled { opacity: .35; cursor: default; }
.corr-nav-label { font-size: .82rem; white-space: nowrap; }
.corr-nav-label em { color: var(--muted); font-style: normal; }
.corr-nav-label strong { color: var(--primary); }
.corr-annot-tools {
  display: flex; align-items: center; gap: 4px; padding: 0 6px;
  border-right: 1px solid var(--border);
}
.ec-tool-btn {
  padding: 3px 8px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; font-size: .82rem; cursor: pointer;
}
.ec-tool-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.corr-canvas-area {
  flex: 1; position: relative; overflow: hidden; background: #1e1e1e;
}
.corr-canvas-area canvas { display: block; }

/* Grade overlay panel */
.grade-overlay {
  position: absolute; top: 12px; right: 12px; width: 280px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,.25);
  max-height: calc(100% - 24px); display: flex; flex-direction: column;
  z-index: 20;
}
.go-header {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; cursor: pointer; flex-shrink: 0;
  border-bottom: 1px solid var(--border); user-select: none;
}
.go-q-label  { flex: 1; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go-score    { font-weight: 700; color: var(--primary); white-space: nowrap; }
.go-toggle-btn { color: var(--muted); font-size: .8rem; }
.go-body     { overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.go-footer   { display: flex; gap: 6px; justify-content: flex-end; padding-top: 4px; }

/* ── Correction layout (legacy, kept for CSS refs) ───────────── */
.correction-layout {
  position: fixed;
  top: 48px; left: 0; right: 0; bottom: 0;
  display: flex;
  background: var(--bg);
  z-index: 10;
}

/* Sidebar */
.correction-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  overflow-y: auto; padding: 8px 0;
}
.sidebar-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); padding: 6px 14px 4px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; cursor: pointer; transition: .12s;
  font-size: .82rem; border-left: 3px solid transparent;
}
.sidebar-item:hover  { background: var(--bg); }
.sidebar-item.active { background: #eff6ff; border-left-color: var(--primary); color: var(--primary); }
.si-num   { font-weight: 600; width: 28px; flex-shrink: 0; }
.si-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-count { font-size: .75rem; color: var(--muted); flex-shrink: 0; }

/* Main area */
.correction-main  { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.correction-topbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.mode-bar, .sort-bar { display: flex; gap: 4px; align-items: center; }
.mode-btn, .sort-btn {
  padding: 4px 12px; background: var(--bg); color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px; font-size: .8rem;
}
.mode-btn.active, .sort-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sort-label { font-size: .8rem; color: var(--muted); }

.correction-nav {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 8px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.correction-nav button { padding: 5px 14px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 6px; }
.correction-nav button:hover:not(:disabled) { background: var(--border); }
.correction-nav button:disabled { opacity: .4; cursor: default; }
.nav-info    { font-size: .9rem; }
.nav-id      { color: var(--muted); font-size: .8rem; }
.nav-skipped { font-size: .75rem; color: var(--muted); font-style: italic; }

.correction-content { flex: 1; overflow-y: auto; padding: 16px; }

/* Grading wrap */
.grading-wrap { display: flex; gap: 16px; align-items: flex-start; }
.page-col     { flex: 1.2; display: flex; flex-direction: column; gap: 12px; }
.panel-col    { width: 360px; flex-shrink: 0; }
.page-slot    { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.page-img     { width: 100%; display: block; }
.page-spinner { padding: 40px; text-align: center; color: var(--muted); font-size: .85rem; }

@media (max-width: 900px) {
  .grading-wrap { flex-direction: column; }
  .panel-col    { width: 100%; }
}

/* Grading panel */
.grading-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow);
}
.panel-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.panel-q-label {
  font-weight: 600; flex: 1; min-width: 120px;
  outline: none; border-radius: 4px; padding: 2px 4px;
}
.panel-q-label:focus { background: #eff6ff; }
.panel-q-max { color: var(--muted); font-size: .85rem; white-space: nowrap; }

.criteria-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.criterion {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  border: 1px solid transparent; transition: .12s; user-select: none;
}
.criterion:hover  { background: var(--bg); border-color: var(--border); }
.criterion.checked { background: #f0fdf4; border-color: #bbf7d0; }
.criterion input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: var(--success); width: 15px; height: 15px; }
.crit-label  { flex: 1; font-size: .875rem; outline: none; border-radius: 3px; }
.crit-label:focus { background: #eff6ff; }
.crit-pts    { font-size: .78rem; font-weight: 600; color: var(--success); white-space: nowrap; flex-shrink: 0; }

.score-summary { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.score-summary strong { color: var(--warning); }

.adj-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  background: var(--bg); border-radius: 6px; padding: 8px;
}
.adj-label  { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.adj-slider { flex: 1; accent-color: var(--primary); }
.adj-num    { width: 64px; text-align: center; }

.total-row {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; margin-bottom: 10px;
  padding: 8px 10px; background: #eff6ff; border-radius: 6px;
}
.total-value { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.total-max   { color: var(--muted); }
.comment-area { margin-bottom: 8px; }

/* ── Results view ───────────────────────────────────────────── */
.view-resultats { max-width: 1100px; margin: 0 auto; }
.stats-bar { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; font-size: .9rem; }
.stats-bar strong { color: var(--primary); }

.deanon-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-height: 400px; overflow-y: auto; }
.deanon-row  { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.deanon-num  { font-weight: 600; width: 40px; flex-shrink: 0; }
.garde-thumb { width: 80px; height: 56px; overflow: hidden; border: 1px solid var(--border); border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.garde-img   { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.deanon-name { flex: 1; }

.table-wrap  { overflow-x: auto; margin-bottom: 14px; }
.grades-table { border-collapse: collapse; width: 100%; font-size: .82rem; }
.grades-table th, .grades-table td { padding: 6px 10px; border: 1px solid var(--border); text-align: center; }
.grades-table th { background: var(--bg); font-weight: 600; white-space: nowrap; }
.grades-table td:nth-child(2) { text-align: left; white-space: nowrap; }
.row-incomplete { opacity: .65; }
.export-btns { display: flex; gap: 8px; }

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0,0,0,.88);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 16px;
  cursor: zoom-out;
}
.lightbox-img {
  max-width: 100%; max-height: calc(100vh - 80px);
  object-fit: contain; border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  cursor: default;
}
.lightbox-footer  { display: flex; gap: 16px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.lightbox-caption { color: #94a3b8; font-size: .85rem; flex: 1; }
.lightbox-counter { color: #64748b; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lightbox-actions { display: flex; gap: 8px; }
.lb-btn {
  padding: 5px 14px; border-radius: 6px; font-size: .82rem; cursor: pointer;
  background: rgba(255,255,255,.12); color: #e2e8f0; border: 1px solid rgba(255,255,255,.2);
  transition: .15s;
}
.lb-btn:hover    { background: rgba(255,255,255,.22); }
.lb-btn:disabled { opacity: .4; cursor: default; }
.lb-btn-active   { background: rgba(217,119,6,.35); color: #fcd34d; border-color: #d97706; }
.lightbox-close {
  position: absolute; top: 14px; right: 18px;
  background: rgba(255,255,255,.1); color: #fff;
  border-radius: 50%; width: 32px; height: 32px;
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }

/* ── Annotation modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  z-index: 1000; display: flex; align-items: stretch; justify-content: center;
}
.modal-annotation {
  display: flex; flex-direction: column;
  width: 100%; max-height: 100vh; background: var(--surface);
}
.annot-toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  background: var(--text); color: #fff; flex-shrink: 0;
}
.tool-group { display: flex; gap: 4px; align-items: center; }
.tool-btn   { padding: 5px 10px; background: rgba(255,255,255,.1); color: #cbd5e1; border-radius: 5px; font-size: .8rem; }
.tool-btn:hover  { background: rgba(255,255,255,.2); color: #fff; }
.tool-btn.active { background: var(--primary); color: #fff; }
.tool-label { font-size: .75rem; color: #94a3b8; }
.annot-canvas-wrap { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 12px; background: #1e293b; }

/* ── Vérification ───────────────────────────────────────────── */
.view-verif { max-width: 100%; }
.verif-header {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .875rem;
}
.verif-student-block { margin-bottom: 20px; }
.verif-student-label {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.verif-page-count { font-weight: 400; }
.verif-pages-row  { display: flex; flex-wrap: wrap; gap: 8px; }

.page-card {
  width: 130px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; transition: .15s;
  box-shadow: var(--shadow);
}
.page-card:hover { box-shadow: var(--shadow-lg); }
.page-card.page-empty { opacity: .45; border-color: var(--warning); }

.page-thumb-wrap { position: relative; width: 130px; height: 90px; overflow: hidden; background: var(--bg); }
.page-thumb      { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.empty-overlay   {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(217,119,6,.18); color: var(--warning);
  font-size: .7rem; font-weight: 800; letter-spacing: .1em;
  pointer-events: none;
}
.page-card-info { font-size: .75rem; color: var(--muted); padding: 3px 6px; }
.page-card-btns {
  display: flex; gap: 3px; padding: 4px 5px 5px;
}
.page-card-btns .btn-xs { flex: 1; text-align: center; font-size: .7rem; padding: 3px 2px; }
.btn-empty-active { background: #fef3c7; color: var(--warning); border-color: var(--warning); }

/* ── Import toast ───────────────────────────────────────────── */
.import-toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 2000;
  width: 320px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 12px 14px;
  animation: slide-in .2s ease;
}
@keyframes slide-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.toast-header  { display: flex; align-items: center; margin-bottom: 8px; }
.toast-title   { flex: 1; font-size: .875rem; font-weight: 600; }
.toast-close   { background: none; color: var(--muted); padding: 0 4px; font-size: 1rem; }
.toast-close:hover { color: var(--danger); }
.toast-bar     { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.toast-fill    { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; width: 0%; }
.toast-label   { font-size: .8rem; color: var(--muted); }
.toast-results { margin-top: 8px; font-size: .8rem; }

/* ── Misc ───────────────────────────────────────────────────── */
details { font-size: .85rem; }
summary { cursor: pointer; padding: 4px 0; }
ul      { padding-left: 20px; margin-top: 4px; }
li      { margin: 2px 0; }

/* ── Nav dropdown ───────────────────────────────────────────── */
.nav-dd-trigger { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.nav-dd-trigger:hover { color: var(--primary); }
.nav-dropdown {
  z-index: 3000; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto;
  min-width: 180px;
}
.nav-dd-item {
  padding: 6px 12px; font-size: .82rem; cursor: pointer;
  white-space: nowrap; border-bottom: 1px solid var(--border);
}
.nav-dd-item:last-child { border-bottom: none; }
.nav-dd-item:hover  { background: var(--primary); color: #fff; }
.nav-dd-item.active { font-weight: 700; background: #eff6ff; }

/* ── Grid modal ─────────────────────────────────────────────── */
.grid-modal-overlay {
  position: fixed; inset: 0; z-index: 2500;
  background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center;
}
.grid-modal {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  max-width: 92vw; max-height: 88vh; overflow: hidden;
}
.grid-modal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: .9rem; flex-shrink: 0;
}
.grid-modal-header button { margin-left: auto; background: none; font-size: 1rem; color: var(--muted); padding: 0 4px; }
.grid-modal-header button:hover { color: var(--danger); }
.grid-legend { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.grid-scroll { overflow: auto; flex: 1; }
.grid-table  { border-collapse: collapse; font-size: .8rem; }
.grid-table th, .grid-table td { border: 1px solid var(--border); padding: 0; }
.grid-table thead th {
  position: sticky; top: 0; background: var(--bg); z-index: 1;
  padding: 4px 8px; font-size: .75rem; color: var(--muted); text-align: center; white-space: nowrap;
}
.grid-table thead th:first-child { left: 0; z-index: 2; }
.grid-stnum {
  position: sticky; left: 0; background: var(--bg);
  padding: 3px 8px; white-space: nowrap; font-size: .78rem; font-weight: 600;
}
.grid-name  { font-weight: 400; color: var(--muted); margin-left: 4px; }
.gc {
  width: 22px; height: 22px; cursor: pointer; display: table-cell;
  transition: filter .1s;
}
.gc:hover      { filter: brightness(.85); }
.gc.done       { background: #bbf7d0; }
.gc.skip       { background: #e5e7eb; }
.gc.gc-cur     { outline: 2px solid var(--primary); outline-offset: -2px; }
