/* ═════════════════════════════════════════════════════════════════
   Mapleproof — clean, professional, mobile-first
   ═════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  /* Surfaces — light, professional */
  --bg:           #f7f7f5;
  --surface:      #ffffff;
  --surface-2:    #fafaf8;
  --border:       #e6e6e2;
  --border-2:     #d4d4cf;

  /* Brand */
  --brand:        #1f7a3a;
  --brand-hover:  #1a6932;
  --brand-soft:   #e8f3eb;
  --accent-red:   #c8362b;
  --accent-orange:#d97a23;

  /* Text */
  --text:         #111111;
  --text-2:       #4a4a48;
  --text-3:       #767672;
  --text-4:       #9a9a96;

  /* Signal */
  --ok:           #1f7a3a;
  --ok-bg:        #e8f3eb;
  --warn:         #b66a13;
  --warn-bg:      #fcf3e2;
  --bad:          #c8362b;
  --bad-bg:       #fbeae8;

  /* Shape & motion */
  --r-sm:         8px;
  --r-md:         12px;
  --r-lg:         16px;
  --shadow-sm:    0 1px 2px rgba(17,17,17,0.04), 0 1px 1px rgba(17,17,17,0.03);
  --shadow-md:    0 4px 12px rgba(17,17,17,0.06), 0 2px 4px rgba(17,17,17,0.04);
  --shadow-lg:    0 12px 32px rgba(17,17,17,0.10), 0 4px 8px rgba(17,17,17,0.05);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bg-decor, .bg-grid { display: none; }
img, svg, video, canvas { max-width: 100%; display: block; }

/* ─── TOPBAR ─────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.brand-mark.sm { width: 22px; height: 22px; }
.brand-word {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: -0.01em;
}
.brand-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-left: 4px;
  padding: 2px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.topbar-meta { display: none; }
.topbar-link {
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  font-weight: 500;
}
.topbar-link:hover { color: var(--text); }

/* ─── CONTAINER ─────────────────────────────────── */
.container {
  max-width: 540px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* ─── PHASES ────────────────────────────────────── */
.phase { display: none; }
.phase.active { display: block; }

.phase-head { text-align: center; margin-bottom: 20px; }
.phase-head h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.phase-head p { margin: 0; color: var(--text-3); font-size: 14px; }

/* ─── HOME ──────────────────────────────────────── */
.phase-home .hero { text-align: center; padding: 32px 0 16px; }
.hero-mark { width: 56px; height: 56px; margin: 0 auto 20px; }
.hero-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.05;
}
.hero-tag { font-size: 16px; color: var(--text-2); margin: 0 0 28px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 28px;
  background: var(--text);
  color: var(--surface);
  border: none;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.06s, background 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover { background: #2a2a28; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-lg { padding: 15px 32px; font-size: 16px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  background: var(--bad); color: white;
  border: none; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-danger:hover { background: #a82d24; }

.trust-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 32px 0 24px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.trust-item svg { width: 22px; height: 22px; color: var(--brand); }

.hero-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.step-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.step-mini span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
}

/* ─── CAMERA ────────────────────────────────────── */
.camera-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 16px;
  aspect-ratio: 4 / 3;
  background: #1a1a18;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.camera-wrap video,
.camera-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-wrap.selfie-wrap video { transform: scaleX(-1); }

.scan-frame {
  position: absolute;
  inset: 14%;
  pointer-events: none;
  border-radius: 8px;
}
.scan-frame .corner {
  position: absolute;
  width: 22px; height: 22px;
  border: 2.5px solid white;
}
.scan-frame .corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 4px; }
.scan-frame .corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 4px; }
.scan-frame .corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 4px; }
.scan-frame .corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 4px; }

.scan-line {
  position: absolute;
  left: 8%; right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3fb152, transparent);
  top: 50%;
  animation: scan 2.4s ease-in-out infinite alternate;
  box-shadow: 0 0 8px rgba(63, 177, 82, 0.6);
}
@keyframes scan { from { top: 14%; } to { top: 86%; } }

.cam-status {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* ─── SCAN STATUS ──────────────────────────────── */
.scan-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-2);
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.spinner.big { width: 32px; height: 32px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.phase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}
.phase-actions .btn-primary,
.phase-actions .btn-ghost { flex: 1 1 auto; min-width: 140px; }

/* ─── PASS CARD ──────────────────────────────── */
.saving-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 64px 20px;
  color: var(--text-2);
}

.pass-section { margin-top: 4px; }

.pass-card {
  background: white;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

.pass-accent {
  height: 5px;
  background: linear-gradient(90deg, #c8362b 0%, #d97a23 50%, #1f7a3a 100%);
}

.pass-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
}
.pass-row.top { padding-bottom: 8px; }
.pass-row.bottom { padding-top: 8px; padding-bottom: 14px; }

.brand-small {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
}
.pass-region { display: none; }

.pass-verified { text-align: center; padding: 8px 22px 22px; }
.pf-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.pf-label.tiny { font-size: 10px; }

.pf-bigage {
  font-family: var(--font-display);
  font-size: 78px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1;
  margin: 6px 0 12px;
  letter-spacing: -0.04em;
}

.check-circle {
  width: 48px; height: 48px;
  margin: 0 auto;
  border: 2.5px solid var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.check-circle svg { width: 26px; height: 26px; }

.pf-musthecheck {
  margin: 14px 0 4px;
  font-size: 16px;
  color: var(--text);
}
.pf-musthecheck strong { font-weight: 600; }
.pf-subline { margin: 0; font-size: 13px; color: var(--text-3); }

.perforation {
  border-top: 1.5px dashed var(--border-2);
  margin: 4px 22px;
}

.pass-barcode-area {
  padding: 18px 22px;
  text-align: center;
  background: white;
}
.barcode-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
}

.pass-row.bottom .pf-label.tiny {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: none;
  font-size: 11px;
}
.pf-thanks {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--text-2);
}

.pass-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 22px;
  border-top: 1px solid var(--border);
}
.pass-photo {
  width: 76px; height: 76px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.pass-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  flex: 1;
}
.pf-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-top: 2px;
}
.pf-value.ok { color: var(--brand); }

.duplicate-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--brand-soft);
  border: 1px solid #b6dbc1;
  border-radius: var(--r-sm);
  margin: 14px 0 0;
  font-size: 13px;
  color: #1a5128;
}
.duplicate-banner svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--brand); }

.pass-error {
  padding: 12px 14px;
  background: var(--bad-bg);
  border: 1px solid #f0c5bf;
  border-radius: var(--r-sm);
  color: var(--bad);
  font-size: 13px;
  margin-top: 12px;
}

.pass-actions { margin-top: 16px; }

/* ─── RETAILER ───────────────────────────────── */
.container.retailer { max-width: 540px; }

.retailer-cam { max-width: 380px; }

.scan-frame.retailer { inset: 8% 6%; }

.manual-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  margin: 16px 0 0;
}
.manual-entry label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.manual-row {
  display: flex;
  gap: 8px;
}
.manual-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: white;
  color: var(--text);
  transition: border-color 0.15s;
}
.manual-row input:focus { outline: none; border-color: var(--brand); }
.manual-row input::placeholder {
  color: var(--text-4);
  letter-spacing: 0.04em;
  font-weight: 500;
}
.manual-row .btn-primary {
  flex-shrink: 0;
  padding: 12px 20px;
}

.mode-toggle {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px;
  margin: 0 0 16px;
  gap: 4px;
}
.mode-toggle button {
  flex: 1;
  padding: 9px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mode-toggle button.active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.scan-section { display: none; }
.scan-section.active { display: block; }

.start-camera-prompt {
  text-align: center;
  padding: 32px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 12px;
}
.start-camera-prompt svg {
  width: 44px; height: 44px;
  color: var(--text-3);
  margin: 0 auto 12px;
}
.start-camera-prompt p {
  margin: 0 0 16px;
  color: var(--text-3);
  font-size: 14px;
}

/* ─── RESULT MODAL ───────────────────────────── */
.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(17, 17, 17, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.result-overlay[hidden] { display: none; }

.result-card {
  background: white;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border);
}

.result-tone-strip {
  display: block;
  height: 5px;
  background: var(--text-3);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.result-card.tone-approved .result-tone-strip { background: var(--ok); }
.result-card.tone-warning  .result-tone-strip { background: var(--warn); }
.result-card.tone-denied   .result-tone-strip { background: var(--bad); }

.countdown-wrap {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  z-index: 5;
}
.countdown-ring { width: 36px; height: 36px; transform: rotate(-90deg); }
.countdown-track { fill: none; stroke: var(--border); stroke-width: 3; }
.countdown-prog {
  fill: none;
  stroke: var(--text-3);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}
.result-card.tone-approved .countdown-prog { stroke: var(--ok); }
.result-card.tone-warning  .countdown-prog { stroke: var(--warn); }
.result-card.tone-denied   .countdown-prog { stroke: var(--bad); }
.countdown-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.result-head { padding: 22px 22px 12px; position: relative; }
.result-head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 8px 0 4px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.result-card.tone-approved .result-head h2 { color: var(--ok); }
.result-card.tone-warning  .result-head h2 { color: var(--warn); }
.result-card.tone-denied   .result-head h2 { color: var(--bad); }

.result-subtitle { margin: 0; font-size: 13px; color: var(--text-3); }

.result-body {
  padding: 6px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-photo {
  width: 100%;
  max-width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: var(--r-md);
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.result-age-block { text-align: center; }
.result-age {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-top: 4px;
}
.result-card.tone-warning .result-age { color: var(--warn); }
.result-card.tone-denied  .result-age { color: var(--bad); }

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.result-stat label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.result-stat strong { font-size: 14px; font-weight: 600; color: var(--text); }

.result-must-check {
  padding: 12px 14px;
  background: var(--brand-soft);
  border: 1px solid #b6dbc1;
  border-radius: var(--r-sm);
  text-align: center;
  font-size: 13px;
  color: #1a5128;
}
.result-must-check strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.result-flags {
  padding: 12px 14px;
  background: var(--warn-bg);
  border: 1px solid #f0d7a3;
  border-radius: var(--r-sm);
}
.result-flags h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--warn);
}
.result-flags ul {
  margin: 0;
  padding-left: 20px;
  font-size: 12px;
  color: #6e4006;
}
.result-flags li { margin-bottom: 2px; }
.result-card.tone-denied .result-flags {
  background: var(--bad-bg);
  border-color: #f0c5bf;
}
.result-card.tone-denied .result-flags h4,
.result-card.tone-denied .result-flags ul li { color: var(--bad); }

/* ─── ADMIN ───────────────────────────────────── */
.container.admin,
.container.admin-login { max-width: 1100px; }

.admin-login {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.login-card h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
}
.login-card p {
  margin: 0 0 18px;
  color: var(--text-3);
  font-size: 14px;
}
.login-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 14px;
  margin-bottom: 12px;
  background: white;
}
.login-card input:focus { outline: none; border-color: var(--brand); }
.login-card .btn-primary { width: 100%; }
.login-card .hint { margin: 14px 0 0; font-size: 12px; color: var(--text-4); }
.login-card .hint code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.login-error {
  margin: 0 0 12px;
  padding: 8px 12px;
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: var(--r-sm);
  font-size: 13px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.admin-head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px;
}
.stat-card label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.stat-card strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.admin-tools { display: flex; gap: 10px; margin-bottom: 16px; }
.admin-tools input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 14px;
  background: white;
}
.admin-tools input:focus { outline: none; border-color: var(--brand); }

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  gap: 12px;
}
.user-card img {
  width: 64px; height: 64px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.user-card-meta { flex: 1; min-width: 0; }
.user-card-token {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.user-card-row { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.user-card-row strong { color: var(--text-2); font-weight: 600; }
.user-card-tier {
  display: inline-block;
  padding: 2px 8px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.user-card-actions { margin-top: 8px; }
.user-card-actions button {
  font-size: 12px;
  padding: 5px 10px;
  background: white;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  color: var(--bad);
  font-weight: 500;
  cursor: pointer;
}
.user-card-actions button:hover {
  background: var(--bad-bg);
  border-color: #f0c5bf;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
  font-size: 14px;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.confirm-overlay[hidden] { display: none; }
.confirm-card {
  background: white;
  border-radius: var(--r-md);
  padding: 22px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.confirm-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}
.confirm-card p { margin: 0 0 8px; color: var(--text-2); font-size: 14px; }
.confirm-token {
  font-family: var(--font-mono);
  font-weight: 600;
  background: var(--surface-2);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  text-align: center;
  letter-spacing: 0.08em;
  margin: 12px 0 18px;
}
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ─── FOOTER ─────────────────────────────────── */
.foot {
  text-align: center;
  padding: 24px 20px;
  font-size: 12px;
  color: var(--text-4);
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: var(--surface);
}

/* ─── MOBILE TWEAKS ─────────────────────────── */
@media (max-width: 480px) {
  .topbar { padding: 12px 14px; }
  .container { padding: 16px 14px 48px; }
  .hero-title { font-size: 32px; }
  .hero-tag { font-size: 14px; }
  .pf-bigage { font-size: 64px; }
  .result-age { font-size: 56px; }
  .result-photo { max-width: 160px; height: 160px; }
  .pass-row { padding: 14px 16px; }
  .pass-meta-row { padding: 12px 16px 16px; }
  .perforation { margin: 4px 16px; }
  .pass-barcode-area { padding: 14px 16px; }
  .barcode-svg { max-width: 100%; }
  .trust-row { gap: 16px; margin: 24px 0 20px; }
  .phase-actions .btn-primary,
  .phase-actions .btn-ghost { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .scan-line { animation: none; display: none; }
  .spinner { animation-duration: 1.6s; }
}

/* ───────── BRAND IMAGE LOGO ───────── */
.brand-mark-img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}
.brand-mark-img.sm {
  width: 26px;
  height: 26px;
}
.hero-mark-img {
  width: 160px;
  height: auto;
  max-width: 50vw;
  margin: 0 auto 24px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.10));
}

/* ───────── ID UPLOAD CARDS ───────── */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 18px;
}
.upload-card {
  cursor: pointer;
  border: 2px dashed var(--line, #e2ebe5);
  border-radius: 14px;
  background: var(--bg-soft, #f3f7f4);
  padding: 0;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  overflow: hidden;
  display: block;
}
.upload-card:hover {
  border-color: #2d8a3e;
  background: #eaf4ed;
  transform: translateY(-1px);
}
.upload-card.has-image {
  border-style: solid;
  border-color: #2d8a3e;
  background: #fff;
}
.upload-card.single {
  max-width: 480px;
  margin: 20px auto 0;
}
.upload-thumb {
  aspect-ratio: 1.6 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #5a7065;
  text-align: center;
  padding: 18px;
  position: relative;
  background-size: cover;
  background-position: center;
}
.upload-thumb svg {
  width: 38px;
  height: 38px;
  color: #1f6f48;
}
.upload-thumb.has-image {
  background-color: #000;
  color: #fff;
}
.upload-thumb.has-image > svg,
.upload-thumb.has-image > .upload-label,
.upload-thumb.has-image > .upload-hint {
  display: none;
}
.upload-thumb.has-image::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f6f48;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.upload-label {
  font-weight: 600;
  font-size: 14px;
  color: #0a1f17;
}
.upload-hint {
  font-size: 12px;
  color: #5a7065;
}

/* Photo match status in pass card meta-grid */
.pf-value.match-strong { color: #1f6f48; font-weight: 700; }
.pf-value.match-weak   { color: #b85510; font-weight: 600; }
.pf-value.match-fail   { color: #c8362b; font-weight: 600; }

/* Disabled button state */
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ───────── LIVENESS CHECK UI ───────── */
.liveness-intro {
  text-align: center;
  padding: 24px 16px;
  max-width: 520px;
  margin: 0 auto;
}
.liveness-intro-icon {
  font-size: 56px;
  margin-bottom: 8px;
}
.liveness-intro h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 18px;
  color: #0a1f17;
}
.liveness-steps {
  text-align: left;
  display: inline-block;
  padding: 0 0 0 24px;
  margin: 0 0 22px;
  color: #2d4438;
  font-size: 15px;
  line-height: 1.7;
}
.liveness-steps li { margin-bottom: 6px; }
.liveness-steps strong { color: #1f6f48; }
.liveness-privacy {
  font-size: 13px;
  color: #5a7065;
  background: #f3f7f4;
  padding: 12px 14px;
  border-radius: 10px;
  margin: 0 0 24px;
}
.liveness-intro .btn-primary { display: block; width: 100%; margin-bottom: 10px; }
.liveness-intro .btn-ghost   { display: block; width: 100%; }

/* Active liveness session */
.selfie-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.liveness-prompt-card {
  background: #fff;
  border: 2px solid #1f6f48;
  border-radius: 18px;
  padding: 22px 18px;
  margin: 18px auto;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 6px 20px -8px rgba(31, 111, 72, 0.25);
  animation: liveness-pop 0.4s ease;
}
@keyframes liveness-pop {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.liveness-step {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1f6f48;
  margin-bottom: 12px;
}
.liveness-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 10px;
}
.liveness-prompt {
  font-size: 22px;
  font-weight: 700;
  color: #0a1f17;
  letter-spacing: -0.01em;
}

#liveness-loading {
  text-align: center;
  padding: 60px 16px;
}
#liveness-loading p {
  margin-top: 16px;
  color: #5a7065;
  font-size: 14px;
}

#liveness-fail {
  text-align: center;
  padding: 32px 16px;
  max-width: 440px;
  margin: 0 auto;
}
.liveness-fail-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fde8e6;
  color: #c8362b;
  font-size: 38px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
#liveness-fail h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #0a1f17;
}
#liveness-fail p {
  color: #5a7065;
  margin: 0 0 20px;
  font-size: 15px;
}

/* Camera wrap needs relative positioning so overlay sits on top */
.camera-wrap.selfie-wrap {
  position: relative;
}
.camera-wrap.selfie-wrap video {
  transform: scaleX(-1); /* mirror for natural feel */
}

.liveness-hint {
  margin-top: 10px;
  font-size: 14px;
  color: #5a7065;
  min-height: 1.3em;
  font-weight: 500;
}

.liveness-manual-btn {
  margin-top: 14px;
  font-size: 13px;
  padding: 8px 14px;
}

/* ───────── PASS CARD — TWIN PHOTOS ───────── */
.pass-twin-photos {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px 22px 6px;
  background: #f9fbf9;
}
.pass-photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.pass-photo-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #1f6f48;
}
.pass-photo-img {
  width: 100%;
  max-width: 130px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #e2ebe5;
  background: #fff;
}
.pass-photo-divider {
  width: 1px;
  height: 90px;
  background: linear-gradient(to bottom, transparent, #cfd8d2, transparent);
}
.pass-meta-row.compact {
  padding: 12px 22px 18px;
}
.pass-meta-grid.full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}
.pass-meta-grid.full > div {
  text-align: center;
}

/* ───────── CONSENT CHECKBOX ───────── */
.consent-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f3f7f4;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e2ebe5;
  margin: 16px 0;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  color: #2d4438;
}
.consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #1f6f48;
  cursor: pointer;
}
.consent-row .consent-text a {
  color: #1f6f48;
  font-weight: 600;
  text-decoration: underline;
}
.consent-row .consent-text a:hover {
  color: #2d8a3e;
}

/* ───────── COMPLIANCE STRIP ON PASS ───────── */
.compliance-disclaimer {
  background: #fef5e9;
  border: 1px solid #f0c894;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b3d12;
}
.compliance-disclaimer strong {
  display: block;
  color: #8a5018;
  margin-bottom: 4px;
}

/* ───────── BIGGER, BOLDER RETAILER BANNER ───────── */
.result-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  border-radius: 16px 16px 0 0;
}
.result-banner.banner-approved { background: linear-gradient(135deg, #1f6f48, #2d8a3e); }
.result-banner.banner-warning  { background: linear-gradient(135deg, #b85510, #d97a23); }
.result-banner.banner-denied   { background: linear-gradient(135deg, #c8362b, #d63a2e); }

/* ───────── TOPBAR LEGAL LINKS ───────── */
.topbar-legal-links {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft, #2d4438);
}
.topbar-legal-links a {
  color: inherit;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.topbar-legal-links a:hover { opacity: 1; }
@media (max-width: 600px) {
  .topbar-legal-links { display: none; }
}

/* ───────── RETAILER RESULT — TWIN PHOTOS ───────── */
.result-twin-photos {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
}
.result-photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.result-photo-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #1f6f48;
}
.result-twin-img {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid #e2ebe5;
  background: #fff;
}
.result-photo-divider {
  font-size: 14px;
  font-weight: 700;
  color: #5a7065;
  letter-spacing: 0.05em;
}

/* ───────── FLAG FRAUD BUTTON ───────── */
.result-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn-flag-fraud {
  background: transparent;
  color: #c8362b;
  border: 2px solid #c8362b;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-flag-fraud:hover {
  background: #c8362b;
  color: #fff;
}
.btn-flag-fraud:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ───────── SETTINGS MODAL ───────── */
.settings-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 24px 60px -20px rgba(13, 51, 38, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   v10 — WORLDWIDE ID FORM, TRULIOO, REDESIGNED PASS
   ═══════════════════════════════════════════════════════════════ */

/* ── ID TYPE SELECTOR ── */
.id-type-selector {
  margin-bottom: 20px;
}
.id-type-selector label,
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2d4438;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.id-type-selector select,
.form-field input,
.form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2ebe5;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: #0a1f17;
  background: #fff;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.id-type-selector select,
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7065' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.id-type-selector select:focus,
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: #1f6f48;
}

/* ── MANUAL ID ENTRY ── */
.manual-id-entry {
  margin-bottom: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.form-row:last-child {
  margin-bottom: 0;
}
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ── ID PHOTO SECTION ── */
.id-photo-section {
  margin-bottom: 18px;
}
.upload-card.single {
  display: block;
  width: 100%;
}

/* ── CONSENT ROW (ensure spacing in v10 flow) ── */
.phase#phase-scan .consent-row {
  margin: 18px 0;
}

/* ── TRULIOO VERIFICATION BADGE ON PASS ── */
.pass-trulioo-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1f6f48;
  background: #e8f1ec;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── PASS SELFIE BLOCK (single photo, replaces twin photos) ── */
.pass-selfie-block {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  justify-content: center;
}
.pass-photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.pass-photo-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #1f6f48;
}
.pass-photo-img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #e0eae3;
  background: #f3f7f4;
}
.pass-photo-img.large {
  width: 116px;
  height: 116px;
  border-radius: 14px;
}
.pass-match-block {
  text-align: center;
}
.pass-match-big {
  font-size: 38px;
  font-weight: 700;
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.1;
  color: #5a7065;
}
.pass-match-big.match-strong { color: #1f6f48; }
.pass-match-big.match-weak   { color: #b85510; }
.pass-match-big.match-fail   { color: #c8362b; }
.pass-match-note {
  font-size: 11px;
  color: #5a7065;
  margin-top: 2px;
  max-width: 130px;
}

/* ── TRULIOO PROGRESS (during saving) ── */
.trulioo-progress {
  margin-top: 22px;
  text-align: left;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.trulioo-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: #9aa8a0;
  transition: color 0.3s;
}
.trulioo-step .trulioo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d4ddd7;
  flex-shrink: 0;
  transition: background 0.3s;
}
.trulioo-step.active {
  color: #2d4438;
}
.trulioo-step.active .trulioo-dot {
  background: #f08c2a;
  animation: trulioo-pulse 0.8s ease-in-out infinite;
}
.trulioo-step.done {
  color: #1f6f48;
}
.trulioo-step.done .trulioo-dot {
  background: #1f6f48;
  animation: none;
}
@keyframes trulioo-pulse {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

/* ── RETAILER SINGLE-PHOTO RESULT (override twin layout) ── */
.result-twin-photos {
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════
   v11 — PREMIUM BLACK & GOLD THEME OVERRIDE
   Remaps the entire design system to the luxury dark aesthetic.
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root{
  --bg:#060504; --surface:#0e0c08; --surface-2:#13100a;
  --border:rgba(212,168,56,.18); --border-2:rgba(212,168,56,.30);
  --brand:#e8c25a; --brand-hover:#f3d27a; --brand-soft:rgba(212,168,56,.10);
  --accent-red:#e0654f; --accent-orange:#e8a24a;
  --text:#f6f1e6; --text-2:#cdc3aa; --text-3:#b6ab92; --text-4:#8c8369;
  --ok:#7bd88f; --ok-bg:rgba(123,216,143,.10);
  --warn:#e8b04a; --warn-bg:rgba(232,176,74,.10);
  --bad:#e0654f; --bad-bg:rgba(224,101,79,.12);
  --shadow-sm:0 1px 2px rgba(0,0,0,.5);
  --shadow-md:0 6px 20px rgba(0,0,0,.55);
  --shadow-lg:0 18px 44px rgba(0,0,0,.65);
  --font-display:'Outfit',system-ui,sans-serif;
  --font-body:'Outfit',system-ui,sans-serif;
  --gold-grad:linear-gradient(135deg,#fbe6a2 0%,#e8c25a 34%,#d4a838 60%,#9c6f1c 100%);
}

body{
  background:
    linear-gradient(180deg,rgba(6,5,4,.86),rgba(6,5,4,.96)),
    url('/bg-nightclub.jpg') center top / cover fixed no-repeat,
    var(--bg) !important;
  color:var(--text);
}
body::before{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.035;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E")}
.app-shell,.wrap,main,header,footer{position:relative;z-index:1}

/* Surfaces that were hardcoded white → dark glass */
.phase,.card,.panel,.scan-status,.upload-card,.pass-card,.result-modal,
.result-card,.modal,.sheet,.box,.tile,.stat,.audit-row,.user-card,
.retailer-card,[class*="card"],[class*="panel"]{
  background:rgba(20,17,11,.72) !important;
  border-color:var(--border) !important;
  color:var(--text);
  backdrop-filter:blur(8px);
}

/* Brand wordmark → gold */
.brand,.brand span,.brand-small span,.logo-text,h1,h2{color:var(--text)}
.brand span,.brand-small span{
  background:var(--gold-grad);-webkit-background-clip:text;background-clip:text;color:transparent}

/* Inputs & selects → dark with gold focus */
input,select,textarea{
  background:rgba(0,0,0,.4) !important;
  border:1.5px solid var(--border) !important;
  color:var(--text) !important;
}
input::placeholder{color:var(--text-4)}
input:focus,select:focus,textarea:focus{
  border-color:var(--brand) !important;
  outline:none;box-shadow:0 0 0 3px rgba(212,168,56,.14)}
select option{background:#13100a;color:var(--text)}
label{color:var(--text-2) !important}

/* Buttons → gold gradient primary, gold-outline ghost */
.btn-primary,button.btn-primary,.start-btn,#start-btn,
button[type="submit"]:not(.btn-ghost){
  background:var(--gold-grad) !important;
  color:#1a1305 !important;border:0 !important;font-weight:700;
  box-shadow:0 10px 28px -10px rgba(212,168,56,.5)}
.btn-primary:hover{transform:translateY(-1px);
  box-shadow:0 16px 38px -10px rgba(212,168,56,.65)}
.btn-ghost,a.btn-ghost,button.btn-ghost{
  background:transparent !important;color:var(--brand) !important;
  border:1px solid var(--border) !important}
.btn-ghost:hover{border-color:var(--brand-hover) !important;
  background:rgba(212,168,56,.06) !important}

/* Nav / header links */
nav a,header a,.nav a{color:var(--text-3)}
nav a:hover,header a:hover{color:var(--brand)}

/* Pass card → premium black/gold collectible */
.pass-card{
  background:linear-gradient(165deg,#13100a 0%,#0b0906 100%) !important;
  border:1px solid var(--border-2) !important;
  box-shadow:0 24px 60px -16px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(251,230,162,.12) !important;
}
.pass-accent{background:var(--gold-grad) !important}
.pf-bigage,.pass-match-big.match-strong{color:var(--brand) !important}
.pf-bigage{background:var(--gold-grad);-webkit-background-clip:text;
  background-clip:text;color:transparent !important}
.check-circle{border-color:var(--brand) !important;color:var(--brand) !important}
.pass-trulioo-badge{background:rgba(212,168,56,.14) !important;color:var(--brand) !important}
.pass-photo-img,.pass-photo-img.large{border-color:var(--border-2) !important;
  background:#0b0906 !important}
.pass-photo-label{color:var(--brand) !important}
.perforation{border-color:var(--border) !important}
.barcode-svg rect[fill="#ffffff"],.barcode-svg rect[fill="#fff"]{fill:#0b0906}
.pass-barcode-area{background:#f6f1e6;border-radius:10px;padding:10px}

/* Status pills keep semantic colors but on dark */
.pf-value.ok,.ok{color:var(--ok) !important}
.pf-value.warn,.warn{color:var(--warn) !important}
.pf-value.bad,.bad{color:var(--bad) !important}

/* Trulioo progress on dark */
.trulioo-step.active{color:var(--text) !important}
.trulioo-step.done{color:var(--ok) !important}
.trulioo-step .trulioo-dot{background:rgba(212,168,56,.25)}
.trulioo-step.active .trulioo-dot{background:var(--brand)}
.trulioo-step.done .trulioo-dot{background:var(--ok)}

/* Consent / hints */
.consent-text,.upload-hint,.pf-subline,small,.muted{color:var(--text-3) !important}
.consent-text a,a{color:var(--brand)}

/* Spinner gold */
.spinner,.spinner.big{border-color:rgba(212,168,56,.2) !important;
  border-top-color:var(--brand) !important}

/* Dividers */
hr,.divider,.perforation{border-color:var(--border) !important}

/* Scrollbar */
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:#0b0906}
::-webkit-scrollbar-thumb{background:rgba(212,168,56,.3);border-radius:6px}
::-webkit-scrollbar-thumb:hover{background:rgba(212,168,56,.5)}

/* Phase headings */
.phase-head h2{color:var(--text)}
.phase-head p{color:var(--text-3)}

/* ID type / form sections */
.id-type-selector label,.form-field label{color:var(--brand) !important;
  font-weight:600;letter-spacing:.02em}
.upload-card{border:1.5px dashed var(--border-2) !important}
.upload-card:hover{border-color:var(--brand) !important;background:rgba(212,168,56,.04) !important}
.upload-thumb svg{stroke:var(--brand)}
.upload-label{color:var(--text-2) !important}

/* ═══ v11 — OCR REVIEW + UPLOAD STATES ═══ */
.review-banner{
  background:rgba(212,168,56,.10);border:1px solid var(--border);
  color:var(--text-2);border-radius:12px;padding:13px 16px;margin-bottom:18px;
  font-size:13.5px;line-height:1.5}
.review-banner.warn{
  background:rgba(232,176,74,.12);border-color:rgba(232,176,74,.4);color:#f0c674}
.upload-card.single.disabled,.upload-card.disabled{
  opacity:.45;pointer-events:none;filter:grayscale(.3)}
#ocr-progress{margin-top:4px}
.scan-status[data-tone="bad"] #upload-status-text,
.scan-status[data-tone="bad"]{color:var(--bad) !important}
.upload-thumb.has-image{
  background-size:cover !important;background-position:center !important;
  min-height:180px;border-radius:12px;position:relative}
.upload-thumb.has-image svg,.upload-thumb.has-image .upload-label,
.upload-thumb.has-image .upload-hint{
  background:rgba(6,5,4,.66);color:#f6f1e6;padding:4px 8px;border-radius:6px;
  position:relative;z-index:1}
.upload-thumb.has-image::after{
  content:"✓ Uploaded — tap to replace";position:absolute;left:0;right:0;bottom:0;
  background:linear-gradient(transparent,rgba(6,5,4,.85));color:var(--brand);
  font-size:12px;font-weight:600;padding:14px 0 8px;text-align:center}
.id-type-selector select{font-weight:500}

/* ═══ v12 — TRULIOO EMBEDID VERIFICATION UI ═══ */
.trulioo-wrap{
  border:1px solid var(--border);border-radius:18px;
  background:rgba(20,17,11,.6);padding:24px;margin:6px 0 20px;
  backdrop-filter:blur(8px)}
.trulioo-mode{
  display:inline-flex;align-items:center;gap:8px;font-size:11px;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;color:#0c0a06;
  background:linear-gradient(135deg,#fbe6a2,#d4a838 60%,#9c6f1c);
  padding:6px 14px;border-radius:999px;margin-bottom:18px}
.trulioo-mode.sim{
  background:rgba(232,176,74,.16);color:#f0c674;
  border:1px solid rgba(232,176,74,.4)}
#trulioo-embedid{min-height:420px;border-radius:12px;overflow:hidden}
.trulioo-sim{display:flex;justify-content:center}
.trulioo-sim-card{
  width:100%;max-width:440px;background:rgba(0,0,0,.35);
  border:1px solid var(--border);border-radius:16px;padding:28px 26px;text-align:left}
.trulioo-sim-logo{
  display:flex;align-items:center;gap:12px;justify-content:center;
  font-weight:700;font-size:17px;margin-bottom:22px;
  background:linear-gradient(135deg,#fbe6a2,#d4a838 60%,#9c6f1c);
  -webkit-background-clip:text;background-clip:text;color:transparent}
.trulioo-sim-logo img{filter:drop-shadow(0 4px 12px rgba(212,168,56,.3))}
.trulioo-sim-note{
  margin-top:20px;font-size:12px;color:var(--text-3);text-align:center;
  border-top:1px solid var(--border);padding-top:16px}

/* ═══ v13 — ID DOCUMENT CAPTURE GRID ═══ */
.id-doc-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0 4px}
@media(max-width:560px){.id-doc-grid{grid-template-columns:1fr}}
.id-doc-grid .upload-card{margin:0}
.id-doc-grid .upload-label em{font-style:normal;color:var(--text-3);font-weight:400;font-size:.85em}

/* ═══ v14 — TRULIOO WEB SDK MOUNT ═══ */
.trulioo-sdk-mount{
  min-height:0;border-radius:14px;overflow:hidden;margin:16px 0}
.trulioo-sdk-mount:not(:empty){
  min-height:460px;border:1px solid var(--border);background:rgba(0,0,0,.25)}
#flow-sdk .id-type-selector{margin-bottom:6px}
