html {
  scroll-padding-top: 64px;
}

/* ============================================================
   Monetise v2 — UI stylesheet
   Light mode, blue/teal palette, CSS-variable driven
   ============================================================ */

:root {
  --col-bg:          #f5f7fa;
  --col-surface:     #ffffff;
  --col-border:      #dde2ea;
  --col-primary:     #1a6fbf;
  --col-primary-lt:  #e8f1fb;
  --col-teal:        #0d9488;
  --col-teal-lt:     #e6f7f5;
  --col-text:        #1e2533;
  --col-muted:       #6b7a99;
  --col-high:        #15803d;
  --col-high-bg:     #dcfce7;
  --col-medium:      #b45309;
  --col-medium-bg:   #fef3c7;
  --col-low:         #b91c1c;
  --col-low-bg:      #fee2e2;
  --col-warn-bg:     #fef9c3;
  --col-warn-border: #ca8a04;
  --col-skeleton:    #e2e8f0;
  --col-skeleton-sh: #f1f5f9;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.14);
  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:       "JetBrains Mono", "Fira Code", "Consolas", monospace;
  --transition: 160ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--col-bg);
  color: var(--col-text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Mock banner ─────────────────────────────────────────── */
.mock-banner {
  background: var(--col-warn-bg);
  border-bottom: 2px solid var(--col-warn-border);
  color: #92400e;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 200;
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  background: var(--col-surface);
  border-bottom: 1px solid var(--col-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--col-primary);
  white-space: nowrap;
}
.brand-logo { font-size: 22px; }
.brand-v2 {
  background: var(--col-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: 2px;
}
.header-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
}
.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--col-primary-lt);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  min-width: 80px;
}
.stat-label { font-size: 10px; color: var(--col-muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 15px; font-weight: 700; color: var(--col-primary); }

/* ── Filter bar ──────────────────────────────────────────── */
.filter-bar {
  background: var(--col-surface);
  border-bottom: 1px solid var(--col-border);
  position: sticky;
  top: 56px;
  z-index: 90;
}
.filter-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-group { display: flex; }
.filter-input,
.filter-select {
  padding: 6px 10px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--col-text);
  background: var(--col-bg);
  outline: none;
  transition: border-color var(--transition);
}
.filter-input { min-width: 220px; }
.filter-input:focus, .filter-select:focus { border-color: var(--col-primary); }
.filter-reset {
  padding: 6px 14px;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-sm);
  background: var(--col-surface);
  color: var(--col-muted);
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition);
  margin-left: auto;
}
.filter-reset:hover { border-color: var(--col-primary); color: var(--col-primary); }

/* ── Main layout ─────────────────────────────────────────── */
.main-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.section-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--col-text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-count {
  background: var(--col-border);
  color: var(--col-muted);
  border-radius: 99px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Researcher tiles ────────────────────────────────────── */
.researcher-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.researcher-tile {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
  position: relative;
}
.researcher-tile:hover { box-shadow: var(--shadow-md); border-color: var(--col-primary); }
.researcher-tile.active { border-color: var(--col-teal); box-shadow: 0 0 0 2px var(--col-teal-lt); }
.tile-name { font-size: 15px; font-weight: 700; color: var(--col-text); }
.tile-affil { font-size: 12px; color: var(--col-muted); margin-top: 2px; }
.tile-papers { font-size: 12px; color: var(--col-muted); margin-top: 6px; }

.cri-mini-bar {
  display: flex;
  border-radius: 3px;
  overflow: hidden;
  height: 8px;
  margin-top: 10px;
  background: var(--col-border);
}
.cri-seg-high   { background: var(--col-high); }
.cri-seg-medium { background: var(--col-medium-bg); border-top: 2px solid var(--col-medium); }
.cri-seg-low    { background: var(--col-low-bg); border-top: 2px solid var(--col-low); }
.cri-mini-legend {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--col-muted);
}
.cri-mini-legend span::before { content: "●"; margin-right: 3px; }
.cri-mini-legend .leg-high::before   { color: var(--col-high); }
.cri-mini-legend .leg-medium::before { color: var(--col-medium); }
.cri-mini-legend .leg-low::before    { color: var(--col-low); }

.tile-threads { margin-top: 10px; }
.tile-threads-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--col-muted); }
.tile-thread-item {
  font-size: 12px;
  color: var(--col-teal);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Paper cards ─────────────────────────────────────────── */
#papers-list { display: flex; flex-direction: column; gap: 12px; }

.paper-card {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.paper-card:hover { box-shadow: var(--shadow-md); }

/* Status strip */
.card-status-strip {
  background: var(--col-warn-bg);
  border-bottom: 1px solid var(--col-warn-border);
  color: #92400e;
  padding: 4px 16px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-status-strip::before { content: "⚠"; }

/* Tier-1 collapsed row */
.card-tier1 {
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.card-tier1:hover { background: var(--col-bg); }

.t1-meta { flex: 1; min-width: 0; }
.t1-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.chip-researcher {
  background: var(--col-primary-lt);
  color: var(--col-primary);
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.paper-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--col-text);
  flex: 1;
  min-width: 0;
}
.paper-year {
  font-size: 12px;
  color: var(--col-muted);
  white-space: nowrap;
}

.cri-badge {
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.cri-HIGH   { background: var(--col-high-bg);   color: var(--col-high); }
.cri-MEDIUM { background: var(--col-medium-bg);  color: var(--col-medium); }
.cri-LOW    { background: var(--col-low-bg);     color: var(--col-low); }

.t1-takeaway { font-size: 13px; color: var(--col-muted); line-height: 1.4; }

.t1-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.pill-confidence {
  border-radius: 99px;
  border: 1px solid var(--col-border);
  padding: 2px 9px;
  font-size: 11px;
  color: var(--col-muted);
}
.pill-action {
  background: var(--col-teal-lt);
  color: var(--col-teal);
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
}

.t1-coverage {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--col-bg);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  min-width: 72px;
  text-align: center;
}
.coverage-num { font-size: 17px; font-weight: 700; color: var(--col-primary); }
.coverage-label { font-size: 10px; color: var(--col-muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 1px; }

.card-expand-icon {
  flex-shrink: 0;
  width: 22px;
  color: var(--col-muted);
  font-size: 16px;
  align-self: center;
  transition: transform var(--transition);
}
.card-expand-icon.open { transform: rotate(90deg); }

/* Tier-2 accordions */
.card-tier2 { border-top: 1px solid var(--col-border); }
.card-tier2.hidden { display: none; }

.accordion {
  border-bottom: 1px solid var(--col-border);
}
.accordion:last-child { border-bottom: none; }

.accordion-header {
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  background: var(--col-bg);
  transition: background var(--transition);
}
.accordion-header:hover { background: #edf1f7; }
.accordion-icon {
  color: var(--col-muted);
  font-size: 14px;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.accordion-icon.open { transform: rotate(90deg); }
.accordion-title { font-size: 13px; font-weight: 600; color: var(--col-text); flex: 1; }
.accordion-drill {
  font-size: 11px;
  color: var(--col-primary);
  border: 1px solid var(--col-primary);
  border-radius: 99px;
  padding: 2px 9px;
  cursor: pointer;
  background: transparent;
  white-space: nowrap;
}
.accordion-drill:hover { background: var(--col-primary-lt); }

.accordion-body {
  padding: 16px;
  display: none;
}
.accordion-body.open { display: block; }

/* Score chart */
.score-chart-wrap { position: relative; height: 220px; margin-bottom: 8px; }
.dim-tooltip {
  position: absolute;
  background: rgba(20,30,50,.92);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  pointer-events: none;
  max-width: 300px;
  line-height: 1.5;
  z-index: 50;
  display: none;
  white-space: pre-wrap;
}

/* Market snapshot */
.market-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.market-kv { }
.market-kv-label { font-size: 11px; text-transform: uppercase; color: var(--col-muted); letter-spacing: .04em; }
.market-kv-value { font-size: 15px; font-weight: 700; color: var(--col-text); }

.comparables-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
.comparables-table th {
  text-align: left;
  color: var(--col-muted);
  font-weight: 600;
  padding: 4px 8px;
  border-bottom: 1px solid var(--col-border);
}
.comparables-table td { padding: 5px 8px; border-bottom: 1px solid var(--col-border); }
.comparables-table tr:last-child td { border-bottom: none; }

.sparkline-wrap { height: 60px; margin-top: 12px; }

.market-citations { margin-top: 12px; }
.market-citations-label { font-size: 11px; text-transform: uppercase; color: var(--col-muted); letter-spacing: .04em; margin-bottom: 6px; }
.citation-link { display: block; font-size: 12px; color: var(--col-primary); margin-top: 4px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }

/* Business plan table */
.bp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bp-table tr:nth-child(even) td { background: var(--col-bg); }
.bp-table td { padding: 7px 10px; border-bottom: 1px solid var(--col-border); vertical-align: top; }
.bp-table td:first-child { font-weight: 600; color: var(--col-muted); width: 160px; white-space: nowrap; }
.bp-insufficient { font-style: italic; color: var(--col-muted); }

/* ── Tier-3 drawer ───────────────────────────────────────── */
.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 48;
  pointer-events: none;
}
.detail-drawer.open { pointer-events: auto; }

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(720px, 90vw);
  transform: translateX(100%);
  transition: transform .3s ease;
  z-index: 50;
  overflow-y: auto;
  background: var(--bg, #fff);
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
}
.drawer-panel.open { transform: translateX(0); }
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--col-border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--col-bg);
  flex-shrink: 0;
}
.drawer-title { font-size: 16px; font-weight: 700; flex: 1; line-height: 1.3; }
.drawer-close {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--col-border);
  border-radius: var(--radius-sm);
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  color: var(--col-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-close:hover { background: var(--col-border); }

.drawer-body { overflow-y: auto; flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 24px; }

.drawer-section { }
.drawer-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--col-muted);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--col-border);
}

/* Abstract highlight */
.abstract-text { font-size: 13px; line-height: 1.7; color: var(--col-text); }
.abstract-text mark {
  background: #fef08a;
  border-radius: 2px;
  padding: 0 2px;
}

/* Citation panel */
.citation-item { padding: 8px 0; border-bottom: 1px solid var(--col-border); }
.citation-item:last-child { border-bottom: none; }
.citation-title { font-size: 13px; font-weight: 500; }
.citation-title a { color: var(--col-primary); text-decoration: none; }
.citation-title a:hover { text-decoration: underline; }
.citation-publisher { font-size: 11px; color: var(--col-muted); margin-top: 2px; }

/* Critique panel */
.critique-verdict {
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  background: var(--col-low-bg);
  border-left: 4px solid var(--col-low);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 14px;
  color: var(--col-low);
}
.critique-verdict.pass {
  background: var(--col-high-bg);
  border-color: var(--col-high);
  color: var(--col-high);
}
.attack-item {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--col-border);
}
.attack-item:last-child { border-bottom: none; }
.attack-bullet { color: var(--col-low); flex-shrink: 0; }

/* CRI history sparkline */
.history-sparkline-wrap { height: 100px; }
.no-history { font-size: 12px; color: var(--col-muted); font-style: italic; }

/* ── Skeleton loading ─────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--col-skeleton) 25%, var(--col-skeleton-sh) 50%, var(--col-skeleton) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
  display: inline-block;
}
.skeleton-pill .stat-value { width: 40px; height: 15px; border-radius: 3px; }
.skeleton-text { height: 12px; width: 100%; margin: 4px 0; }
.skeleton-card {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius-md);
  padding: 16px;
  height: 90px;
}

/* ── Utilities ───────────────────────────────────────────── */
.hidden { display: none !important; }
a { color: var(--col-primary); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { padding: 0 12px; gap: 12px; }
  .header-stats { display: none; }
  .main-layout { padding: 12px; }
  .market-grid { grid-template-columns: 1fr; }
  .filter-inner { gap: 6px; }
  .filter-input { min-width: 160px; }
}

/* ── Coverage tile upgrade (C1) ─────────────────────────── */
.t1-coverage {
  min-width: 140px;
  max-width: 180px;
}
.coverage-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--col-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.coverage-bar {
  width: 100%;
  height: 7px;
  background: var(--col-border);
  border-radius: 99px;
  overflow: hidden;
  margin: 4px 0;
}
.coverage-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.coverage-missing-list {
  font-size: 10px;
  color: var(--col-muted);
  margin-top: 3px;
  line-height: 1.4;
  word-break: break-word;
}
.coverage-refresh-pill {
  display: inline-block;
  background: var(--col-bg);
  border: 1px solid var(--col-border);
  border-radius: 99px;
  padding: 0 5px;
  font-size: 9px;
  color: var(--col-muted);
  margin-left: 3px;
  vertical-align: 1px;
}

/* ── Business plan insufficient rows (C2) ───────────────── */
.bp-insufficient-row td { background: var(--col-bg); }
.bp-field-name { font-weight: 600; color: var(--col-muted); }
.bp-insufficient-text { font-style: italic; color: var(--col-muted); font-size: 12px; }

/* ── Evidence type rendering (C3) ───────────────────────── */
.ev-raw-source-footnote {
  font-size: 11px;
  color: var(--col-primary);
  text-decoration: none;
}
.ev-raw-source-footnote:hover { text-decoration: underline; }

.ev-extracted-tooltip {
  font-size: 11px;
  color: var(--col-muted);
  font-style: italic;
  border-bottom: 1px dashed var(--col-muted);
  cursor: help;
}

.ev-inferred-dot {
  color: #d97706;
  font-size: 13px;
  font-weight: 700;
}

.ev-llm-italic {
  font-style: italic;
  font-size: 11px;
  color: var(--col-text);
}
.ev-llm-badge {
  display: inline-block;
  background: var(--col-primary-lt);
  color: var(--col-primary);
  border-radius: var(--radius-sm);
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .03em;
  vertical-align: 2px;
}

/* ── Status strip colour variants (C4) ──────────────────── */
.card-status-strip { display: flex; align-items: center; gap: 6px; }
.card-status-strip::before { content: none; }  /* label has symbol already */
.card-status-strip.status-green  { background: var(--col-high-bg); border-color: var(--col-high); color: var(--col-high); border-bottom-color: var(--col-high); }
.card-status-strip.status-red    { background: var(--col-low-bg);  border-color: var(--col-low);  color: var(--col-low); }
.card-status-strip.status-amber  { background: var(--col-warn-bg); border-color: var(--col-warn-border); color: #92400e; }
.card-status-strip.status-grey   { background: #f3f4f6; border-color: #9ca3af; color: #6b7280; }

/* ── Greyed-out dimension row (C4) ──────────────────────── */
.greyed-out { opacity: 0.4; }
.greyed-out td { color: var(--col-muted) !important; }

/* ── Stat pill tooltip (D1) ─────────────────────────────── */
.stat-pill[title] { cursor: help; }

/* ── Add Researcher button ─────────────────────────────────────────── */
.btn-add-researcher {
  float: right;
  font-size: 12px;
  padding: 4px 12px;
  background: var(--accent, #0070f3);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
}
.btn-add-researcher:hover { opacity: 0.85; }

/* ── Researcher tile university badge ─────────────────────────────── */
.tile-meta { display: flex; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.tile-uni-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft, #e8f0fe);
  color: var(--accent, #0070f3);
  letter-spacing: 0.04em;
}
.tile-city {
  font-size: 10px;
  color: var(--text-muted, #888);
}

/* ── Modal overlay ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  background: var(--bg-card, #fff);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.modal-header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted, #888);
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--text, #111); }
.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.modal-search-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  font-size: 14px;
}
.modal-search-row select {
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg, #fff);
}
.btn-search-candidates {
  padding: 8px 16px;
  background: var(--accent, #0070f3);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.btn-search-candidates:hover { opacity: 0.85; }

/* ── Candidate cards ──────────────────────────────────────────────── */
.candidates-hint {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin-bottom: 10px;
}
.candidate-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--bg-card, #fff);
  transition: border-color 0.15s;
}
.candidate-card:hover:not(.candidate-dim) { border-color: var(--accent, #0070f3); }
.candidate-dim { opacity: 0.5; }
.candidate-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.candidate-name { font-size: 14px; font-weight: 600; }
.candidate-detail {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted, #666);
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.badge-uni-match {
  font-size: 11px;
  padding: 2px 7px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 4px;
  font-weight: 600;
}
.badge-uni-nomatch {
  font-size: 11px;
  padding: 2px 7px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-weight: 600;
}
.badge-added {
  font-size: 11px;
  padding: 2px 7px;
  background: var(--bg-muted, #f3f4f6);
  color: var(--text-muted, #888);
  border-radius: 4px;
}
.btn-add-confirm {
  padding: 6px 14px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.btn-add-confirm:hover { background: #047857; }
.btn-add-confirm:disabled { opacity: 0.5; cursor: default; }

/* ── Modal status / loading / error ──────────────────────────────── */
.modal-loading, .modal-empty { font-size: 13px; color: var(--text-muted,#888); padding: 12px 0; }
.modal-error { font-size: 13px; color: #dc2626; padding: 8px 0; }
.modal-status { font-size: 13px; margin-top: 10px; padding: 6px 0; }
.modal-status-loading { color: var(--text-muted,#888); }
.modal-status-ok { color: #059669; font-weight: 600; }
.modal-status-error { color: #dc2626; }
