@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

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

:root {
  --bg-primary:    #1a1a2e;
  --bg-secondary:  #16213e;
  --bg-card:       #0f3460;
  --bg-cell:       #252535;
  --bg-cell-done:  #1a3a1a;
  --bg-header:     #12122a;
  --accent-green:  #4caf50;
  --accent-green2: #388e3c;
  --accent-gold:   #f0b429;
  --accent-blue:   #53a8e2;
  --text-primary:  #e8e8f0;
  --text-secondary:#a0a0c0;
  --text-muted:    #6060a0;
  --border:        #2a2a4a;
  --border-bright: #3a3a6a;
  --bronze:        #cd7f32;
  --silver:        #c0c0c0;
  --gold:          #f0b429;
  --platinum:      #a78bfa;
  --radius:        8px;
  --radius-lg:     12px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
}

html { font-size: 14px; }

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

/* ─── Demo Banner ───────────────────────────────────────────────── */
#demo-banner {
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: none;
}
#demo-banner.visible { display: block; }
#demo-banner.live    { background: linear-gradient(90deg, #166534, #15803d); }
#demo-banner span    { opacity: 0.85; font-weight: 400; margin-left: 8px; }

/* ─── Header ────────────────────────────────────────────────────── */
header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo svg { width: 36px; height: 36px; flex-shrink: 0; }

.header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.header-title span { color: var(--accent-gold); }

.header-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-org {
  font-size: 13px;
  color: var(--text-secondary);
}
.header-org strong { color: var(--text-primary); }

.header-updated {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.fetch-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #53a8e2;
  background: rgba(83,168,226,0.12);
  border: 1px solid rgba(83,168,226,0.3);
  border-radius: 10px;
  padding: 2px 8px;
}
.fetch-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.btn-admin-lock {
  background: none;
  border: 1px solid #3a3a5a;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  line-height: 1;
}
.btn-admin-lock:hover { border-color: #6366f1; color: #fff; }
.btn-admin-lock.unlocked {
  border-color: #4caf50;
  color: #4caf50;
  background: rgba(76,175,80,0.1);
}

/* ─── PIN Modal ─────────────────────────────────────────────── */
.pin-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
}
.pin-modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, 92vw);
  background: #1e1e30;
  border: 1px solid #3a3a5a;
  border-radius: 12px;
  padding: 32px 28px 24px;
  z-index: 2001;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  text-align: center;
}
.pin-backdrop.open, .pin-modal.open { display: block; }
.pin-icon  { font-size: 32px; margin-bottom: 10px; }
.pin-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.pin-subtitle { font-size: 13px; color: #8080a8; margin-bottom: 20px; }
.pin-input {
  width: 100%;
  padding: 12px 16px;
  background: #13131f;
  border: 1px solid #3a3a5a;
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
  margin-bottom: 8px;
}
.pin-input:focus { border-color: #6366f1; }
.pin-error {
  font-size: 12px;
  color: #f87171;
  min-height: 18px;
  margin-bottom: 16px;
}
.pin-actions { display: flex; gap: 10px; justify-content: center; }
.pin-btn-cancel {
  padding: 10px 20px; border-radius: 8px; font-size: 14px; cursor: pointer;
  background: #2a2a40; border: 1px solid #3a3a5a; color: #a0a0c0;
}
.pin-btn-cancel:hover { background: #3a3a55; }
.pin-btn-submit {
  padding: 10px 24px; border-radius: 8px; font-size: 14px; font-weight: 700;
  cursor: pointer; background: #4f46e5; border: none; color: #fff;
}
.pin-btn-submit:hover { background: #6366f1; }

.btn-refresh {
  background: var(--accent-green2);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.btn-refresh:hover { background: var(--accent-green); }

/* ─── Tabs ──────────────────────────────────────────────────────── */
.tabs {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  gap: 4px;
}

.tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  font-family: inherit;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* ─── Views ─────────────────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; }

/* ─── Grid View Layout ──────────────────────────────────────────── */
.grid-layout {
  display: flex;
  gap: 0;
  align-items: flex-start;
  height: calc(100vh - 120px);
}

.grid-main {
  flex: 1;
  overflow: auto;
  padding: 24px;
  min-width: 0;
}

.awards-panel {
  width: 290px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  padding: 20px 16px;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ─── Certification Grid Table ──────────────────────────────────── */
/* ─── Grid Controls ─────────────────────────────────────────────── */
.grid-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #0e0e1c;
  border-bottom: 1px solid #2a2a40;
  flex-wrap: wrap;
}
.grid-search {
  padding: 6px 12px;
  background: #1a1a2e;
  border: 1px solid #3a3a5a;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  width: 200px;
  outline: none;
}
.grid-search:focus { border-color: #6366f1; }
.cert-filters, .sort-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}
.sort-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 2px;
}
.cert-filter, .sort-btn {
  padding: 4px 10px;
  background: #1a1a2e;
  border: 1px solid #3a3a5a;
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.cert-filter:hover, .sort-btn:hover { border-color: #6366f1; color: #fff; }
.cert-filter.active, .sort-btn.active {
  background: #3730a3;
  border-color: #6366f1;
  color: #fff;
  font-weight: 600;
}

/* ─── Flipped Grid ──────────────────────────────────────────────── */
.fg-wrap {
  overflow: auto;
  max-height: calc(100vh - 300px);
  min-height: 200px;
}

.fg-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 13px;
}

/* Sticky header */
.fg-table thead th {
  position: sticky;
  top: 0;
  background: #0b0b18;
  z-index: 2;
  border-bottom: 1px solid #2a2a40;
  white-space: nowrap;
  padding: 6px 4px;
  text-align: center;
}

/* Sticky left column */
.fg-sticky-col {
  position: sticky;
  left: 0;
  background: var(--bg-primary);
  z-index: 1;
}
.fg-table thead .fg-sticky-col { z-index: 3; background: #0b0b18; }

/* Corner */
.fg-corner {
  min-width: 220px;
  text-align: left !important;
  padding: 8px 16px !important;
  border-right: 1px solid #2a2a40;
}
.fg-champion-count {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Section label row */
.fg-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 4px !important;
  text-align: center;
}
.fg-section-label.fg-col-core          { color: #53a8e2; border-top: 2px solid #53a8e2; }
.fg-section-label.fg-col-day1          { color: #dd6b20; border-top: 2px solid #dd6b20; }
.fg-section-label.fg-col-day2          { color: #38b2ac; border-top: 2px solid #38b2ac; }
.fg-section-label.fg-col-self-learning { color: #9b59b6; border-top: 2px solid #9b59b6; }
.fg-section-label.fg-col-advance       { color: #f0b429; border-top: 2px solid #f0b429; }
.fg-cell.fg-col-day1.fg-done          { background: rgba(221,107,32,0.18);  color: #dd6b20; }
.fg-cell.fg-col-day2.fg-done          { background: rgba(56,178,172,0.18);  color: #38b2ac; }
.fg-cell.fg-col-self-learning.fg-done { background: rgba(155,89,182,0.18);  color: #9b59b6; }
.fg-ms-hdr.fg-col-advance { }
.fg-cell.fg-col-advance.fg-done { background: rgba(240,180,41,0.18); color: #f0b429; }

/* Milestone icon headers */
.fg-ms-hdr {
  width: 38px;
  min-width: 38px;
  font-size: 16px;
  cursor: default;
  padding: 4px 2px !important;
}

/* Column separators */
.fg-col-sep-header { width: 8px; min-width: 8px; background: #08080f; padding: 0 !important; }
.fg-col-sep        { background: #08080f; }

/* Progress header */
.fg-progress-hdr { min-width: 130px; padding: 6px 12px !important; text-align: left !important; color: var(--text-muted); font-size: 11px; }

/* User rows */
.fg-user-row { border-bottom: 1px solid #1a1a28; transition: background 0.12s; }
.fg-user-row:hover { background: rgba(255,255,255,0.025); }
.fg-user-row:hover .fg-sticky-col { background: #1f1f35; }

/* User info cell */
.fg-user-cell {
  padding: 0;
  border-right: 1px solid #2a2a40;
  min-width: 220px;
}
.fg-user-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
}
.fg-rank       { font-size: 11px; color: var(--text-muted); min-width: 26px; text-align: center; flex-shrink: 0; }
.fg-rank-medal { font-size: 15px; min-width: 26px; text-align: center; flex-shrink: 0; }
.fg-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.fg-name-wrap  { min-width: 0; }
.fg-name       { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fg-cert-label { font-size: 10px; margin-top: 1px; }

/* Milestone cells */
.fg-cell {
  width: 38px; min-width: 38px; height: 36px;
  text-align: center; vertical-align: middle;
  border: 1px solid #14141e;
  font-size: 13px; font-weight: 700;
  transition: background 0.12s;
}
.fg-cell.fg-done     { background: rgba(76,175,80,0.18); color: #4caf50; }
.fg-cell.fg-todo     { background: #101018; color: #2a2a40; }
.fg-cell.fg-manual      { cursor: pointer; }
.fg-cell.fg-manual:hover { background: rgba(240,180,41,0.12); border-color: #f0b429; color: #f0b429; }
.fg-cell.fg-manual-done { cursor: pointer; }
.fg-cell.fg-manual-done:hover { background: rgba(248,113,113,0.15); border-color: #f87171; color: #f87171; }
.fg-cell .fg-lock    { font-size: 11px; opacity: 0.35; }

/* Progress cell */
.fg-progress-cell { padding: 0 12px; min-width: 130px; }
.fg-bar-bg  { height: 5px; background: #1e1e30; border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.fg-bar-fill { height: 100%; background: linear-gradient(90deg,#388e3c,#4caf50); border-radius: 3px; transition: width 0.4s; }
.fg-pct     { font-size: 10px; color: var(--text-muted); text-align: right; }

/* Empty state */
.fg-empty { text-align: center; padding: 40px; color: var(--text-muted); font-size: 13px; }

/* Keep user-avatar for other uses */
.user-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ─── Awards Panel ──────────────────────────────────────────────── */
.awards-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.awards-summary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}
.awards-summary-num { font-size: 28px; font-weight: 800; color: #fff; }
.awards-summary-lbl { font-size: 12px; color: var(--text-muted); }

.awards-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Tier cards */
.tier-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  background: #13131f;
  transition: border-color 0.15s;
}
.tier-card-bronze  { border-left: 3px solid #cd7f32; }
.tier-card-silver  { border-left: 3px solid #c0c0c0; }
.tier-card-gold    { border-left: 3px solid #f0b429; }
.tier-card-platinum{ border-left: 3px solid #a78bfa; }

.tier-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.tier-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.tier-card-info { flex: 1; min-width: 0; }
.tier-name  { display: block; font-size: 14px; font-weight: 700; }
.tier-prize { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.tier-prereq {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  padding: 4px 8px;
  margin: 8px 0 4px;
  border-left: 2px solid rgba(255,255,255,0.15);
}
.tier-reqs-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 8px 0 4px;
}
.tier-bullets {
  margin: 0 0 8px 14px;
  padding: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.tier-bullets li { padding-left: 2px; }
.tier-progress {
  font-size: 11px;
  font-weight: 600;
}
.tier-earned { opacity: 0.8; }

/* Special prize cards */
.special-prize-card {
  background: #13131f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.special-prize-card.sp-claimed { border-color: #38a169; }
.sp-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.sp-icon { font-size: 20px; flex-shrink: 0; }
.sp-info { flex: 1; }
.sp-label { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.sp-prize { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sp-winner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(56,161,105,0.1);
  border-radius: 6px;
  padding: 5px 8px;
}
.sp-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sp-winner-name { font-size: 12px; font-weight: 600; color: #68d391; }
.sp-unclaimed {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  padding: 3px 4px;
}

/* ─── Scoreboard View ───────────────────────────────────────────── */
#view-scoreboard {
  padding: 24px;
}

.scoreboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  max-width: 1400px;
}

@media (max-width: 1100px) {
  .scoreboard-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .scoreboard-grid { grid-template-columns: 1fr; }
}

.score-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.score-card-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Champion table */
.champion-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.champion-row:last-child { border-bottom: none; }

.champion-rank {
  width: 28px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}
.champion-rank.top1 { color: var(--gold); font-size: 16px; }
.champion-rank.top2 { color: var(--silver); font-size: 15px; }
.champion-rank.top3 { color: var(--bronze); font-size: 14px; }

.champion-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.champion-info { flex: 1; min-width: 0; }
.champion-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.champion-title {
  font-size: 11px;
  color: var(--text-muted);
}

.champion-bar-wrap { width: 80px; flex-shrink: 0; }
.champion-bar-bg {
  height: 6px;
  background: var(--bg-cell);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
}
.champion-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green2), var(--accent-green));
  border-radius: 3px;
  transition: width 0.6s ease;
}
.champion-bar-pct {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
}

/* Certified practitioners */
.cert-practitioner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.cert-practitioner:last-child { border-bottom: none; }
.cert-practitioner .cp-badge { font-size: 18px; }
.cert-practitioner .cp-name { font-size: 13px; font-weight: 600; }
.cert-practitioner .cp-level {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}
.cert-practitioner .cp-level.platinum { background: rgba(167,139,250,0.15); color: var(--platinum); }
.cert-practitioner .cp-level.gold     { background: rgba(240,180,41,0.15);  color: var(--gold); }
.cert-practitioner .cp-level.silver   { background: rgba(192,192,192,0.15); color: var(--silver); }
.cert-practitioner .cp-level.bronze   { background: rgba(205,127,50,0.15);  color: var(--bronze); }

.empty-state {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
  font-style: italic;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  max-width: 1400px;
}
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-align: center;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-card.green .stat-value  { color: var(--accent-green); }
.stat-card.gold .stat-value   { color: var(--accent-gold); }
.stat-card.purple .stat-value { color: var(--platinum); }
.stat-card.blue .stat-value   { color: var(--accent-blue); }

/* ─── Tooltip ───────────────────────────────────────────────────── */
.tooltip-overlay {
  position: fixed;
  background: var(--bg-header);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 9999;
  max-width: 220px;
  box-shadow: var(--shadow);
  display: none;
}
.tooltip-overlay.visible { display: block; }
.tooltip-name { font-weight: 700; margin-bottom: 4px; }
.tooltip-pts { color: var(--accent-gold); }
.tooltip-type { color: var(--text-muted); font-size: 11px; margin-top: 2px; }

/* ─── Org Status Bar (removed) ──────────────────────────────────── */
/* #org-status-bar, .org-bar-label, .org-bar-sep, .org-chip, .org-chip-pass, .org-chip-fail removed */

/* ─── Evidence Modal ────────────────────────────────────────────── */
.ev-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1000;
}
.ev-modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(540px, 92vw);
  background: #1e1e30;
  border: 1px solid #3a3a5a;
  border-radius: 10px;
  padding: 28px 28px 24px;
  z-index: 1001;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.ev-backdrop.open, .ev-modal.open { display: block; }
.ev-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: #888; font-size: 22px;
  cursor: pointer; line-height: 1; padding: 2px 6px;
}
.ev-close:hover { color: #fff; }
.ev-title {
  font-size: 16px; font-weight: 700; color: #fff;
  margin-bottom: 4px;
}
.ev-subtitle { font-size: 13px; color: #a0a0c0; margin-bottom: 18px; }
.ev-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 15px; margin-bottom: 16px;
}
.ev-status.pass { color: #4caf50; }
.ev-status.fail { color: #9090b0; }
.ev-field {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 4px 10px; margin-bottom: 8px;
  font-size: 13px; align-items: start;
}
.ev-field-label { color: #8080a8; }
.ev-field-value {
  color: #d8d8f0; word-break: break-all;
  font-family: 'Courier New', monospace; font-size: 12px;
}
.ev-field-value.mono { background: #13131f; padding: 4px 8px; border-radius: 4px; }
.ev-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.ev-btn {
  padding: 8px 16px; border-radius: 6px; font-size: 13px;
  font-weight: 600; cursor: pointer; border: none; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.ev-btn-verify { background: #4f46e5; color: #fff; }
.ev-btn-verify:hover { background: #6366f1; }
.ev-btn-manual { background: #2a2a40; color: #d0d0f0; border: 1px solid #4a4a6a; }
.ev-btn-manual:hover { background: #3a3a55; }
.ev-divider { border: none; border-top: 1px solid #2a2a40; margin: 16px 0; }

/* ─── Scrollbar styling ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555580; }
