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

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e2e4e9;
  --text: #1a1d24;
  --text-muted: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand { display: flex; align-items: center; gap: .5rem; }
.header-brand > a { display: flex; align-items: center; line-height: 0; }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-sub { font-size: .85rem; color: var(--text-muted); }
.brand-beta { font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; background: #e8a020; color: #fff; padding: .15em .45em; border-radius: 4px; line-height: 1.4; }

.header-nav { display: flex; gap: 1.25rem; align-items: center; }
.header-nav a { font-size: .9rem; color: var(--text-muted); }
.header-nav a:hover { color: var(--text); }
.nav-reset { color: #dc2626 !important; }

/* ============================================================
   Progress bar
   ============================================================ */
.progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--border);
}
.progress-bar-inner {
  height: 100%;
  background: var(--primary);
  transition: width 0.4s ease;
}

/* ============================================================
   Main / Footer
   ============================================================ */
.main-content { flex: 1; max-width: 1100px; margin: 0 auto; width: 100%; padding: 2rem 1.5rem; }
.site-footer {
  text-align: center;
  padding: .75rem 1.5rem;
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h2 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--text); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }
.btn-lg { padding: .7rem 1.75rem; font-size: 1rem; }
.btn-secondary { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); text-decoration: none; }

.form-actions { display: flex; gap: 1rem; align-items: center; margin-top: 2rem; }

/* ============================================================
   Home page
   ============================================================ */
.page-hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}
.page-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.hero-sub { font-size: 1.05rem; color: var(--text-muted); max-width: 640px; margin: 0 auto; }

.home-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 768px) { .home-layout { grid-template-columns: 1fr; } }

.instructions-card ol { padding-left: 1.25rem; font-size: .95rem; color: var(--text-muted); }
.instructions-card ol li { margin-bottom: .4rem; }

.scale-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: .85rem;
}
.scale-item { color: var(--text-muted); }
.scale-item strong { color: var(--text); }

.dim-list-header { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .75rem; }
.dim-list-header h2 { font-size: 1.05rem; }
.hint { font-size: .8rem; color: var(--text-muted); font-weight: 400; }

/* Dimension cards (home) */
.dim-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.dim-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  cursor: grab;
  user-select: none;
  transition: box-shadow .15s, transform .15s;
  box-shadow: var(--shadow);
}
.dim-card:hover { box-shadow: var(--shadow-md); }
.dim-card.dragging { opacity: .5; box-shadow: var(--shadow-md); transform: scale(1.02); }
.dim-card.drag-over { border-color: var(--primary); background: #eff6ff; }

.dim-card-drag { font-size: 1.1rem; color: var(--text-muted); cursor: grab; }
.dim-card-color { width: 6px; height: 44px; border-radius: 3px; flex-shrink: 0; }
.dim-card-body { flex: 1; }
.dim-card-body strong { font-size: .95rem; }
.dim-card-body p { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }

.dim-card-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}
.dim-card-badge.completed { background: var(--success); color: #fff; }
.dim-card-badge.pending { background: var(--border); }

/* ============================================================
   Sector selector (home page)
   ============================================================ */
.sector-section { margin-bottom: 1.5rem; }
.sector-section h2 { font-size: 1.05rem; margin-bottom: .75rem; }

.sector-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
@media (max-width: 480px) { .sector-cards { grid-template-columns: 1fr; } }

.sector-card { cursor: pointer; }
.sector-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

.sector-card-inner {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .9rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s, background .15s;
  box-shadow: var(--shadow);
}
.sector-card input[type="radio"]:checked + .sector-card-inner {
  border-color: var(--primary);
  background: #eff6ff;
}
.sector-card:hover .sector-card-inner { border-color: var(--primary); }

.sector-card-title { font-size: .95rem; font-weight: 700; }
.sector-card-desc { font-size: .8rem; color: var(--text-muted); }

/* ============================================================
   About page
   ============================================================ */
.about-page { max-width: 820px; margin: 0 auto; }
.about-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.about-intro { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 2rem; }

.about-section { margin-bottom: 2rem; }
.about-section h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--border); }

.about-steps { display: flex; flex-direction: column; gap: .75rem; padding-left: 0; list-style: none; counter-reset: steps; }
.about-step { display: flex; align-items: flex-start; gap: .9rem; counter-increment: steps; }
.about-step::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .1rem;
}
.about-step span { font-size: .95rem; color: var(--text-muted); padding-top: .2rem; }
.about-step strong { color: var(--text); }

.dim-about-list { display: flex; flex-direction: column; gap: .6rem; list-style: none; }
.dim-about-item { display: flex; align-items: flex-start; gap: .75rem; font-size: .95rem; }
.dim-about-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: .35rem; }

.score-scale-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
  margin-bottom: 1rem;
}
@media (max-width: 560px) { .score-scale-grid { grid-template-columns: repeat(2, 1fr); } }

.scale-card {
  padding: .75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-align: center;
  background: var(--surface);
}
.scale-card-num { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.scale-card-label { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; }

.about-scoring-note { font-size: .9rem; color: var(--text-muted); }

.stages-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.stages-table th {
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: .5rem .75rem;
  border-bottom: 2px solid var(--border);
  background: #fafbfc;
}
.stages-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.stages-table tbody tr:hover > td { background: #f8faff; }
.stage-num-cell { font-weight: 800; color: var(--primary); white-space: nowrap; }
.stage-name-cell { font-weight: 700; white-space: nowrap; }
.stage-range-cell { color: var(--text-muted); white-space: nowrap; font-size: .85rem; }
.stage-focus-cell { font-size: .85rem; color: var(--text-muted); }

/* ============================================================
   Dimension page
   ============================================================ */
.dim-page { max-width: 780px; margin: 0 auto; }
.dim-page-header {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.dim-step-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: .35rem; }
.dim-page-header h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: .35rem; }
.dim-description { font-size: .95rem; color: var(--text-muted); }

.question-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.question-text { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.q-num { color: var(--text-muted); margin-right: .25rem; }

.answer-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
@media (max-width: 640px) {
  .answer-options { grid-template-columns: repeat(2, 1fr); }
}

.answer-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .75rem .5rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
  position: relative;
}
.answer-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.answer-option:hover { border-color: var(--dim-color, var(--primary)); background: #f8faff; }
.answer-option.selected {
  border-color: var(--dim-color, var(--primary));
  background: color-mix(in srgb, var(--dim-color, var(--primary)) 10%, white);
}
.option-score {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}
.answer-option.selected .option-score { color: var(--dim-color, var(--primary)); }
.option-label { font-size: .78rem; color: var(--text-muted); line-height: 1.3; }
.answer-option.selected .option-label { color: var(--text); }

/* ============================================================
   Results page
   ============================================================ */
.results-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.results-hero-inner { display: flex; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }

.overall-stage-block { min-width: 200px; }
.overall-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; margin-bottom: .5rem; }
.overall-stage-num { font-size: 1rem; opacity: .85; }
.overall-stage-name { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.overall-score-val { margin-top: .5rem; font-size: 1rem; opacity: .85; }
.incomplete { opacity: .6; }

.stage-detail-block {
  flex: 1;
  min-width: 220px;
  border-left: 1px solid rgba(255,255,255,0.25);
  padding-left: 2rem;
}
.stage-detail-row { margin-bottom: .6rem; font-size: .9rem; }
.sd-label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .65; margin-bottom: .1rem; }

.highlights-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 560px) { .highlights-row { grid-template-columns: 1fr; } }

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.highlight-card.strongest { border-top: 3px solid var(--success); }
.highlight-card.weakest { border-top: 3px solid #dc2626; }
.hl-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: .4rem; }
.hl-name { font-size: 1.05rem; font-weight: 700; margin-bottom: .25rem; }
.hl-score { font-size: 2rem; font-weight: 800; color: var(--text); }
.hl-stage { font-size: .85rem; color: var(--text-muted); margin-top: .15rem; }

.chart-scores-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (max-width: 768px) { .chart-scores-row { grid-template-columns: 1fr; } }

.radar-wrap { display: flex; flex-direction: column; align-items: center; }
.radar-wrap canvas { max-width: 420px; width: 100%; }

.scores-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.scores-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: .4rem .5rem; border-bottom: 2px solid var(--border); }
.scores-table td { padding: .6rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.scores-table tfoot td { border-top: 2px solid var(--border); border-bottom: none; }

.dim-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; vertical-align: middle; }

.score-cell { min-width: 120px; }
.score-bar-wrap { height: 6px; background: var(--border); border-radius: 3px; margin-bottom: .25rem; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 3px; }
.overall-bar { background: var(--primary); }
.score-num { font-size: .85rem; color: var(--text-muted); }
.score-na { color: var(--text-muted); }

.stage-badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 20px; border: 1.5px solid; }
.overall-badge { border-color: var(--primary); color: var(--primary); }

.supplementary-wrap { margin-bottom: 1.5rem; }
.supp-questions { display: flex; flex-direction: column; gap: 1rem; }
.supp-question { display: flex; flex-direction: column; gap: .35rem; }
.supp-question label strong { font-size: .9rem; }
.supp-q-text { display: block; font-size: .85rem; color: var(--text-muted); }
.supp-select {
  padding: .45rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: .9rem;
  background: var(--surface);
  color: var(--text);
  max-width: 360px;
  cursor: pointer;
}
.supp-select:focus { outline: none; border-color: var(--primary); }

.diagnosis-wrap { margin-bottom: 1.5rem; }
.diagnosis-hint { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }
.diagnosis-textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s;
}
.diagnosis-textarea:focus { outline: none; border-color: var(--primary); }
.diagnosis-status { font-size: .8rem; color: var(--text-muted); margin-top: .4rem; min-height: 1.2em; }

.results-actions { display: flex; gap: 1rem; padding-top: .5rem; }

/* ============================================================
   Print styles
   ============================================================ */
/* Print-report-header: hidden on screen */
.print-report-header { display: none; }

@media print {
  @page { size: A4; margin: 1.5cm 1.5cm 2cm 1.5cm; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  .site-header, .site-footer, .no-print { display: none !important; }
  .diagnosis-hint, .diagnosis-status { display: none !important; }

  body { background: #fff; font-size: 10.5pt; }

  .main-content { padding: 0; max-width: 100%; }

  /* Print report header */
  .print-report-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: .75rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #1e3a5f;
  }
  .print-logo { height: 36px; width: auto; }
  .print-report-title { font-size: 14pt; font-weight: 700; color: #1e3a5f; flex: 1; }
  .print-report-date { font-size: 9pt; color: #6b7280; }

  /* Hero: preserve gradient, ensure text is readable */
  .results-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%) !important;
    color: #fff !important;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  .overall-stage-name, .overall-score-val, .overall-stage-num, .overall-label,
  .stage-detail-row, .sd-label { color: #fff !important; }

  /* Two-column layout for chart + scores */
  .chart-scores-row { grid-template-columns: 1fr 1fr !important; gap: .75rem; }
  .highlights-row { grid-template-columns: 1fr 1fr !important; gap: .75rem; }
  .home-layout { grid-template-columns: 1fr !important; }

  /* Avoid breaking cards across pages */
  .card, .highlight-card, .results-hero { page-break-inside: avoid; break-inside: avoid; }

  .card { box-shadow: none; border: 1px solid #ccc; margin-bottom: .75rem; }

  .stage-detail-block { border-left-color: rgba(255,255,255,0.4) !important; }

  /* Score bars: preserve colours */
  .score-bar-fill { print-color-adjust: exact; }

  /* Radar chart canvas is hidden; the <img> substitute is shown by JS */
  .radar-wrap canvas { max-width: 380px; }

  /* Tighter table typography */
  .scores-table { font-size: 9pt; }
  .scores-table th { font-size: 7pt; }

  /* Diagnosis textarea print */
  .diagnosis-textarea { border: 1px solid #ccc; resize: none; }
}

/* ============================================================
   Contact page
   ============================================================ */
.contact-page { max-width: 720px; margin: 0 auto; }

.contact-assessment-summary {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.cas-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.cas-stage { font-size: 1.05rem; font-weight: 700; }
.cas-score { font-size: .9rem; color: var(--text-muted); }

.contact-form h2 { font-size: 1rem; margin-bottom: 1rem; padding-top: .25rem; }
.section-divider { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.form-group label { font-size: .88rem; font-weight: 600; color: var(--text); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  padding: .5rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: .92rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { resize: vertical; line-height: 1.5; }
.req { color: #dc2626; }
.supp-q-text { display: block; font-size: .82rem; color: var(--text-muted); font-weight: 400; }

.consent-row { margin: 1.25rem 0; }
.consent-label { display: flex; align-items: flex-start; gap: .65rem; font-size: .9rem; cursor: pointer; }
.consent-label input[type="checkbox"] { margin-top: .2rem; flex-shrink: 0; accent-color: var(--primary); width: 16px; height: 16px; }

.form-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: .75rem 1rem;
  border-radius: 6px;
  font-size: .9rem;
  margin-bottom: 1rem;
}

/* ============================================================
   Contact thanks page
   ============================================================ */
.thanks-page { display: flex; justify-content: center; padding: 3rem 1rem; }
.thanks-card { max-width: 480px; width: 100%; text-align: center; padding: 3rem 2rem; }
.thanks-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--success); color: #fff;
  font-size: 1.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.thanks-card h1 { font-size: 1.75rem; margin-bottom: .75rem; }
.thanks-card p { color: var(--text-muted); margin-bottom: 1.5rem; }
.thanks-actions { display: flex; justify-content: center; }

/* ============================================================
   Admin login page
   ============================================================ */
.admin-login-page { display: flex; justify-content: center; padding: 3rem 1rem; }
.admin-login-card { max-width: 380px; width: 100%; }
.admin-login-card h1 { font-size: 1.4rem; margin-bottom: 1.25rem; }

/* ============================================================
   Admin dashboard
   ============================================================ */
.admin-page { max-width: 1200px; margin: 0 auto; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.admin-header h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .15rem; }
.admin-subtitle { color: var(--text-muted); font-size: .9rem; }

.admin-stats {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .6rem 1.2rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 80px;
}
.stat-count { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .2rem; }
.stat-chip.stat-new .stat-count { color: var(--primary); }
.stat-chip.stat-contacted .stat-count { color: #16a34a; }
.stat-chip.stat-in-progress .stat-count { color: #d97706; }
.stat-chip.stat-closed .stat-count { color: var(--text-muted); }

.admin-table-wrap { padding: 0; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th {
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--border);
  background: #fafbfc;
  white-space: nowrap;
}
.admin-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:hover > td { background: #f8faff; }
.admin-row td { white-space: nowrap; }
.admin-date { color: var(--text-muted); font-size: .82rem; }
.admin-score { font-weight: 700; }

.admin-detail-row > td { padding: 0; }
.admin-detail {
  padding: 1.25rem 1.5rem;
  background: #f8faff;
  border-bottom: 1px solid var(--border);
}
.admin-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.admin-detail-section h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .4rem; }
.admin-detail-section p { font-size: .88rem; margin-bottom: .25rem; }

.admin-notes-wrap h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .4rem; }
.admin-notes-textarea {
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: .9rem;
  font-family: inherit;
  resize: vertical;
  background: var(--surface);
  color: var(--text);
  margin-bottom: .5rem;
  display: block;
}
.admin-notes-textarea:focus { outline: none; border-color: var(--primary); }
.admin-save-status { font-size: .8rem; color: var(--text-muted); margin-left: .5rem; }

.admin-empty { color: var(--text-muted); text-align: center; padding: 2rem; }

.btn-sm { padding: .3rem .75rem; font-size: .82rem; }

.status-select {
  padding: .3rem .5rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: .82rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.status-select:focus { outline: none; border-color: var(--primary); }
