/* ─── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; }
.hidden { display: none !important; }

/* ─── Design tokens ─────────────────────────────────────────────────── */
:root {
  --bg-page:    #f5f4f1;
  --bg-card:    #ffffff;
  --bg-subtle:  #fafaf9;
  --bg-hover:   #f4f4f5;
  --border:     #e5e7eb;
  --border-h:   #d1d5db;
  --text-1:     #111827;
  --text-2:     #4b5563;
  --text-3:     #6b7280;
  --text-4:     #a1a1aa;
  --text-5:     #d4d4d8;
  --brand:      #f59e0b;
  --brand-lt:   #fef3c7;
  --brand-dk:   #78350f;
  --font-body:  'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
  --nav-h:      56px;
  /* severity */
  --crit-bg:    #fef2f2; --crit-text: #b91c1c; --crit-brd: #fecaca; --crit-pin: #dc2626;
  --maj-bg:     #fffbeb; --maj-text:  #92400e; --maj-brd:  #fde68a; --maj-pin:  #d97706;
  --min-bg:     #eff6ff; --min-text:  #1e40af; --min-brd:  #bfdbfe; --min-pin:  #2563eb;
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-1);
  line-height: 1.5;
}

/* ─── Scrollbar ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* ─── Animations ─────────────────────────────────────────────────────── */
@keyframes ping    { 0% { transform: scale(1); opacity: .3; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

/* ─── Navbar ─────────────────────────────────────────────────────────── */
.navbar {
  height: var(--nav-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 20;
}
.nav-logo { display: flex; align-items: center; gap: 8px; }
.nav-logo-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(245,158,11,.3);
  flex-shrink: 0;
}
.nav-logo-text { font-size: 16px; font-weight: 700; color: var(--text-1); letter-spacing: -.3px; }
.nav-sep { width: 1px; height: 26px; background: var(--border); flex-shrink: 0; }
.nav-project-pill {
  padding: 5px 14px; border-radius: 6px;
  background: #f9fafb; border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 300px;
}
.nav-score { display: flex; align-items: center; gap: 7px; }
.nav-score-label { font-size: 11px; font-weight: 600; color: var(--text-4); letter-spacing: .6px; }
.btn-export {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 500;
}
.btn-export:hover { background: var(--bg-hover); }
.btn-new-review {
  padding: 7px 18px; border-radius: 8px;
  background: var(--brand); color: var(--brand-dk);
  font-size: 13px; font-weight: 700;
  box-shadow: 0 1px 3px rgba(245,158,11,.3);
  white-space: nowrap;
}
.btn-new-review:hover { background: #e58e00; }

/* ─── Page layout ─────────────────────────────────────────────────────── */
.review-page { display: flex; flex-direction: column; height: 100vh; }
.main-body   { flex: 1; display: flex; overflow: hidden; min-height: 0; }

/* ─── Slide Viewer (left) ────────────────────────────────────────────── */
.slide-viewer {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
  background: var(--bg-page);
}

/* Slide nav header */
.slide-nav-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px 8px;
  flex-shrink: 0;
}
.btn-nav {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-3); flex-shrink: 0;
}
.btn-nav:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-h); }
.btn-nav:disabled { opacity: .35; cursor: default; }
.slide-nav-info { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.slide-nav-num  { font-size: 14px; font-weight: 700; color: var(--text-1); font-family: var(--font-mono); white-space: nowrap; }
.slide-nav-sep  { color: var(--text-5); font-weight: 400; }
.slide-nav-title{ font-size: 15px; font-weight: 600; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-sev-badges { display: flex; gap: 5px; flex-shrink: 0; }
.sev-badge {
  padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 700; font-family: var(--font-mono);
}
.sev-badge-clean { color: #22c55e; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* Slide canvas */
.slide-canvas {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 0 24px;
  overflow: hidden;
  min-height: 0;
}
.slide-page { display: none; width: 100%; max-width: 912px; }
.slide-page.active { display: block; animation: fadeUp .25s ease; }

.slide-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 810;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07), 0 0 0 1px var(--border);
  background: #1a1a2e;
}
.slide-vision-img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  display: block;
  object-fit: contain;
}

/* Pin layer */
.pin-layer {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
  z-index: 5;
}
.pin-circle {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.93);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: var(--font-mono);
  box-shadow: 0 1px 6px rgba(0,0,0,.2);
  transition: all .2s ease;
}
.pin-pulse {
  position: absolute; inset: -8px; border-radius: 50%;
  opacity: 0; pointer-events: none;
}
.pin.active .pin-pulse { opacity: .3; animation: ping 1.5s cubic-bezier(0,0,.2,1) infinite; }
.pin.active .pin-circle { width: 32px; height: 32px; color: #fff !important; }

.pin-critical .pin-circle { color: var(--crit-pin); border: 2.5px solid var(--crit-pin); }
.pin-critical.active .pin-circle { background: var(--crit-pin); }
.pin-critical .pin-pulse { border: 2px solid var(--crit-pin); }
.pin-major .pin-circle { color: var(--maj-pin); border: 2.5px solid var(--maj-pin); }
.pin-major.active .pin-circle { background: var(--maj-pin); }
.pin-major .pin-pulse { border: 2px solid var(--maj-pin); }
.pin-minor .pin-circle { color: var(--min-pin); border: 2.5px solid var(--min-pin); }
.pin-minor.active .pin-circle { background: var(--min-pin); }
.pin-minor .pin-pulse { border: 2px solid var(--min-pin); }

.pin.filtered-out { display: none; }

/* Filmstrip */
.filmstrip {
  display: flex; gap: 6px;
  padding: 8px 24px 10px;
  justify-content: center; align-items: flex-end;
  flex-shrink: 0; overflow-x: auto;
}
.filmstrip-thumb {
  width: 54px; height: 32px; border-radius: 4px;
  cursor: pointer; flex-shrink: 0; position: relative;
  border: 2px solid transparent; opacity: .65;
  transition: all .15s ease;
  display: flex; align-items: center; justify-content: center;
}
.filmstrip-thumb:hover { opacity: .85; }
.filmstrip-thumb.active {
  width: 72px; height: 42px;
  border-color: var(--brand); opacity: 1;
  box-shadow: 0 2px 8px rgba(245,158,11,.25);
}
.ft-num {
  font-size: 10px; font-weight: 700; font-family: var(--font-mono);
  color: rgba(255,255,255,.85); text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.filmstrip-thumb.ft-light .ft-num { color: rgba(0,0,0,.55); text-shadow: none; }
.ft-dot {
  position: absolute; top: 3px; right: 3px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid #fff;
}
.ft-dot-crit { background: #ef4444; }
.ft-dot-maj  { background: var(--brand); }
.ft-dot-min  { background: #3b82f6; }

/* ─── Right Panel ────────────────────────────────────────────────────── */
.right-panel {
  width: 480px; flex-shrink: 0;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Tab bar */
.tab-bar {
  display: flex; padding: 0 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tab {
  padding: 12px 10px; border: none; background: none;
  font-size: 13px; font-weight: 600;
  color: var(--text-4);
  border-bottom: 2.5px solid transparent;
  display: flex; align-items: center; gap: 5px;
  transition: all .15s ease; white-space: nowrap;
}
.tab:hover { color: var(--text-1); }
.tab.active { color: var(--text-1); border-bottom-color: var(--brand); }
.tab-count {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px;
  background: #f4f4f5; color: var(--text-4);
  font-family: var(--font-mono);
}
.tab.active .tab-count { background: var(--brand-lt); color: var(--brand-dk); }
.tab-count-warn { background: #fef2f2 !important; color: #b91c1c !important; }
#tbtn-missing.active { color: #dc2626; border-bottom-color: #dc2626; }
#tbtn-missing.active .tab-count-warn { background: #fecaca !important; color: #991b1b !important; }

/* Filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; flex-shrink: 0;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.filter-label { font-size: 12px; font-weight: 500; color: var(--text-4); margin-right: 2px; }
.filter-pill {
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-3); transition: all .15s ease;
}
.filter-pill:hover { border-color: var(--border-h); }
.filter-pill.active { background: var(--text-1); border-color: var(--text-1); color: #fff; }
.fp-critical.active { background: var(--crit-pin); border-color: var(--crit-pin); }
.fp-major.active    { background: var(--maj-pin);  border-color: var(--maj-pin);  }
.fp-minor.active    { background: var(--min-pin);  border-color: var(--min-pin);  }

/* Tab content scrollable area */
.tab-content { flex: 1; overflow-y: auto; min-height: 0; padding: 10px 12px; }

/* Tab panes */
.tab-pane { display: block; }
.tab-pane.hidden { display: none; }

/* ── Annotation list ── */
.anno-list { display: flex; flex-direction: column; gap: 6px; }
.anno-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 12px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  text-align: left; width: 100%;
  transition: border-color .15s ease;
  animation: fadeUp .2s ease;
}
.anno-card:hover { border-color: var(--border-h); }
.anno-card.current-slide { background: #fefce8; border-color: #fde68a; }
.anno-card.filtered-out { display: none; }

/* Severity circles */
.anno-card-circle, .detail-circle {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: var(--font-mono);
}
.sev-circle-critical { background: var(--crit-bg); border: 1.5px solid var(--crit-brd); color: var(--crit-text); }
.sev-circle-major    { background: var(--maj-bg);  border: 1.5px solid var(--maj-brd);  color: var(--maj-text);  }
.sev-circle-minor    { background: var(--min-bg);  border: 1.5px solid var(--min-brd);  color: var(--min-text);  }

.anno-card-body { flex: 1; min-width: 0; }
.anno-card-meta {
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.sev-pill {
  padding: 1px 7px; border-radius: 3px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.sev-pill-critical { background: var(--crit-bg); border: 1px solid var(--crit-brd); color: var(--crit-text); }
.sev-pill-major    { background: var(--maj-bg);  border: 1px solid var(--maj-brd);  color: var(--maj-text);  }
.sev-pill-minor    { background: var(--min-bg);  border: 1px solid var(--min-brd);  color: var(--min-text);  }
.meta-dot  { font-size: 10px; color: var(--text-5); }
.cat-label { font-size: 10px; font-weight: 600; color: var(--text-4); }
.card-slide-ref { font-size: 10px; color: var(--text-5); margin-left: auto; flex-shrink: 0; }
.anno-card-headline { font-size: 13px; font-weight: 600; color: #1f2937; line-height: 1.4; }

/* ── Annotation detail ── */
.btn-back {
  background: none; border: none; padding: 0; margin-bottom: 16px;
  font-size: 12px; font-weight: 500; color: var(--text-4);
  display: flex; align-items: center; gap: 4px;
}
.btn-back:hover { color: var(--text-1); }
#annoDetailContent { animation: slideIn .2s ease; }
.detail-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.cat-tag {
  padding: 2px 8px; border-radius: 4px;
  background: #f4f4f5; font-size: 10px; font-weight: 600;
  color: #71717a; text-transform: uppercase; letter-spacing: .3px;
}
.detail-slide-ref { font-size: 11px; color: var(--text-5); margin-left: auto; }
.detail-circle { width: 32px; height: 32px; border-width: 2px; font-size: 14px; }
.detail-num-headline { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.detail-headline { font-size: 17px; font-weight: 700; color: var(--text-1); line-height: 1.4; }
.detail-quote {
  padding: 10px 14px; margin-bottom: 14px;
  border-radius: 0 8px 8px 0;
  background: var(--bg-subtle);
  font-size: 13px; color: var(--text-3); font-style: italic; line-height: 1.6;
}
.detail-quote-critical { border-left: 3px solid var(--crit-pin); }
.detail-quote-major    { border-left: 3px solid var(--maj-pin);  }
.detail-quote-minor    { border-left: 3px solid var(--min-pin);  }
.detail-explanation { font-size: 14px; color: var(--text-2); line-height: 1.8; white-space: pre-line; }

/* ── Detail prev/next nav ── */
.detail-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.btn-anno-nav {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 7px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-3);
  transition: all .15s ease;
}
.btn-anno-nav:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-h); color: var(--text-1); }
.btn-anno-nav:disabled { opacity: .3; cursor: default; }
.detail-nav-counter { font-size: 12px; color: var(--text-4); font-family: var(--font-mono); }

/* ── Overview modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--bg-card); border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  width: 100%; max-width: 560px;
  max-height: 85vh; overflow-y: auto;
  padding: 28px 28px 24px;
  position: relative;
  animation: fadeUp .2s ease;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-size: 14px; color: var(--text-3); line-height: 1;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-1); }
.modal-title { font-size: 18px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.modal-subtitle { font-size: 13px; color: var(--text-4); margin-bottom: 20px; }
.modal-section { margin-bottom: 20px; }
.modal-section-label { font-size: 11px; font-weight: 700; color: var(--text-4); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 10px; }
.modal-summary-text { font-size: 13px; color: var(--text-2); line-height: 1.75; }
.dim-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dim-label { font-size: 12px; color: var(--text-3); width: 140px; flex-shrink: 0; }
.dim-bar-wrap { flex: 1; background: #f4f4f5; border-radius: 4px; height: 8px; overflow: hidden; }
.dim-bar { height: 100%; border-radius: 4px; background: var(--brand); }
.dim-bar.dim-bar-high { background: #22c55e; }
.dim-bar.dim-bar-low  { background: #ef4444; }
.dim-score { font-size: 12px; font-weight: 700; font-family: var(--font-mono); color: var(--text-2); width: 28px; text-align: right; }
.btn-overview {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 500;
}
.btn-overview:hover { background: var(--bg-hover); }

/* ── Contents tab ── */
.contents-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: 8px; cursor: pointer;
  transition: background .1s;
}
.contents-row:hover { background: var(--bg-subtle); }
.contents-row.active { background: var(--brand-lt); }
.contents-num {
  width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0;
  background: #f4f4f5; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #71717a;
  font-family: var(--font-mono);
}
.contents-num-clean { background: #f0fdf4; border-color: #bbf7d0; color: #22c55e; }
.contents-row.active .contents-num { background: var(--brand); border-color: var(--brand); color: var(--brand-dk); }
.contents-title { flex: 1; font-size: 13px; color: var(--text-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contents-row.active .contents-title { color: var(--text-1); font-weight: 600; }
.contents-dots { display: flex; gap: 3px; flex-shrink: 0; }
.sev-dot { width: 7px; height: 7px; border-radius: 50%; }
.sev-dot-critical { background: var(--crit-pin); }
.sev-dot-major    { background: var(--maj-pin);  }
.sev-dot-minor    { background: var(--min-pin);  }

/* ── Missing tab ── */
.missing-intro { font-size: 12px; color: var(--text-4); margin-bottom: 10px; }
.missing-card {
  padding: 14px; border-radius: 10px; margin-bottom: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  animation: fadeUp .2s ease;
}
.missing-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pri-badge {
  padding: 2px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
}
.pri-p0 { background: var(--crit-bg); color: var(--crit-pin); border: 1px solid var(--crit-brd); }
.pri-p1 { background: var(--maj-bg);  color: var(--maj-pin);  border: 1px solid var(--maj-brd);  }
.pri-p2 { background: var(--min-bg);  color: var(--min-pin);  border: 1px solid var(--min-brd);  }
.missing-title  { font-size: 14px; font-weight: 600; color: var(--text-1); }
.missing-reason { font-size: 13px; color: var(--text-3); line-height: 1.55; }

/* ── Summary strip ── */
.summary-strip {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-shrink: 0;
}
.summary-block {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px;
}
.summary-num   { font-size: 16px; font-weight: 700; font-family: var(--font-mono); }
.summary-label { font-size: 11px; font-weight: 500; opacity: .8; }
.summary-crit { background: var(--crit-bg); }
.summary-crit .summary-num, .summary-crit .summary-label { color: #ef4444; }
.summary-maj  { background: var(--maj-bg); }
.summary-maj  .summary-num, .summary-maj  .summary-label { color: var(--brand); }
.summary-min  { background: var(--min-bg); }
.summary-min  .summary-num, .summary-min  .summary-label { color: #3b82f6; }

/* ─── Upload page ─────────────────────────────────────────────────────── */
.upload-page { overflow: auto; background: var(--bg-page); }
.upload-main {
  min-height: calc(100vh - var(--nav-h)); margin-top: var(--nav-h);
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.upload-hero { max-width: 540px; width: 100%; text-align: center; }
.upload-title { font-size: 28px; font-weight: 800; color: var(--text-1); margin-bottom: 10px; }
.upload-subtitle { font-size: 14px; color: var(--text-3); margin-bottom: 30px; line-height: 1.7; }
.dropzone {
  border: 2px dashed var(--border); border-radius: 14px;
  padding: 44px 28px; cursor: pointer; background: var(--bg-card);
  margin-bottom: 14px; transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.drag-over { border-color: #1a73e8; background: #eff6ff; }
.dropzone-icon { font-size: 40px; margin-bottom: 10px; }
.dropzone-text { font-size: 15px; margin-bottom: 6px; }
.dropzone-hint { font-size: 12px; color: var(--text-3); }
.file-label { color: #1a73e8; cursor: pointer; text-decoration: underline; }
.file-info {
  display: flex; align-items: center; gap: 8px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 8px; padding: 9px 14px; margin-bottom: 14px;
  font-size: 13px; color: #1a73e8;
}
.file-info.hidden { display: none; }
.file-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-clear { background: none; border: none; color: var(--text-3); font-size: 15px; }
.btn-primary {
  background: #1a73e8; color: #fff; border: none;
  border-radius: 8px; padding: 13px 28px;
  font-size: 15px; font-weight: 600; width: 100%;
  transition: background .2s, opacity .2s;
}
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary:not(:disabled):hover { background: #1557b0; }
.upload-features { display: flex; justify-content: center; gap: 24px; margin-top: 32px; flex-wrap: wrap; }
.feature { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-3); }
.alert { border-radius: 8px; padding: 11px 14px; margin-bottom: 18px; font-size: 13px; }
.alert-error { background: #fff5f5; border: 1px solid #fed7d7; color: #dc2626; }

/* ─── Support doc upload zone ────────────────────────────────────────── */
.support-doc-section { margin-top: 20px; text-align: left; }
.support-doc-label {
  font-size: 13px; font-weight: 600; color: #374151;
  margin-bottom: 4px; display: flex; align-items: center; gap: 8px;
}
.optional-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  background: #f4f4f5; color: #a1a1aa; text-transform: uppercase; letter-spacing: .3px;
}
.support-doc-hint { font-size: 12px; color: #9ca3af; margin-bottom: 10px; line-height: 1.5; }
.dropzone-support { padding: 16px 20px; }

/* ─── Processing page ─────────────────────────────────────────────────── */
.processing-page { overflow: auto; background: var(--bg-page); }
.processing-main {
  margin-top: var(--nav-h); min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.processing-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; padding: 48px 44px; text-align: center;
  max-width: 440px; width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.spinner {
  width: 44px; height: 44px; border: 4px solid var(--border);
  border-top-color: #1a73e8; border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.proc-status { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 8px; }
.proc-message { font-size: 13px; color: var(--text-3); }

/* ─── Shared navbar for upload/processing ────────────────────────────── */
.navbar-brand { display: flex; align-items: center; gap: 8px; }
.brand-icon { font-size: 20px; }
.brand-name { color: #fff; font-size: 17px; font-weight: 700; }
.navbar-center { flex: 1; display: flex; justify-content: center; }
.navbar-right { display: flex; align-items: center; gap: 10px; }
.score-pill { font-size: 18px; font-weight: 800; padding: 2px 10px; border-radius: 6px; }
.score-green  { color: #4ade80; }
.score-yellow { color: #facc15; }
.score-orange { color: #fb923c; }
.score-red    { color: #f87171; }
.btn-ghost {
  background: none; border: 1px solid rgba(255,255,255,.2);
  color: #c8d8f0; border-radius: 6px; padding: 5px 14px;
  font-size: 13px; text-decoration: none;
}
.btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
