/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:      #e11d48;
  --red-glow: rgba(225, 29, 72, .55);
  --blue:     #38bdf8;
  --transit:  #f6c343;
  --text:     #dde1f0;
  --muted:    #5a5e78;
  --dim:      #272836;
  --bg:       #07070d;
}

html {
  height: 100%;
  overflow-y: auto;   /* html scrolls — fixes justify-content:center overflow trap */
}
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

.landing-body {
  background:
    radial-gradient(circle at 18% 18%, rgba(56,189,248,.08), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(246,195,67,.055), transparent 24%),
    linear-gradient(135deg, #05060a, var(--bg) 52%, #090812);
  font-family: 'Rajdhani', sans-serif;
  color: var(--text);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* no justify-content: center — use margin:auto on .l-center instead */
  min-height: 100%;
  padding: clamp(52px, 6vh, 90px) clamp(18px, 4vw, 48px) clamp(52px, 6vh, 90px);
  overflow-x: hidden;
}

/* ── Background layers ─────────────────────────────────────────────────── */
.l-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(115deg, transparent 0 58%, rgba(246,195,67,.052) 58% 59%, transparent 59% 100%),
    linear-gradient(rgba(225,29,72,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,.035) 1px, transparent 1px),
    repeating-linear-gradient(45deg, transparent 0 22px, rgba(246,195,67,.018) 22px 23px);
  background-size: 100% 100%, 60px 60px, 60px 60px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.l-scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, .18) 2px,
    rgba(0, 0, 0, .18) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.l-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0,0,0,.75) 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* ── Corner brackets ───────────────────────────────────────────────────── */
.corner {
  position: fixed;
  width: 52px;
  height: 52px;
  border-color: var(--red);
  border-style: solid;
  opacity: .4;
  z-index: 10;
}
.corner-tl { top: 28px; left: 28px;  border-width: 2px 0 0 2px; }
.corner-tr { top: 28px; right: 28px; border-width: 2px 2px 0 0; }
.corner-bl { bottom: 28px; left: 28px;  border-width: 0 0 2px 2px; }
.corner-br { bottom: 28px; right: 28px; border-width: 0 2px 2px 0; }

/* ── Center content ────────────────────────────────────────────────────── */
.l-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(12px, 2vh, 28px);
  padding: clamp(18px, 3vw, 36px) clamp(18px, 6vw, 60px);
  width: min(100%, 1100px);
  max-width: 1100px;
  margin: auto;          /* centers vertically when there's room; scrolls cleanly when not */
}
.l-center::before,
.l-center::after {
  content: '';
  position: absolute;
  left: 56px;
  right: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246,195,67,.34), rgba(225,29,72,.34), transparent);
  opacity: .58;
}
.l-center::before { top: 0; }
.l-center::after { bottom: 0; }

/* ── Eyebrow ───────────────────────────────────────────────────────────── */
.l-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .26em;
  color: rgba(246,195,67,.62);
  display: flex;
  align-items: center;
  gap: 10px;
}

.l-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red-glow), 0 0 20px var(--red-glow);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1;  box-shadow: 0 0 8px var(--red-glow), 0 0 20px var(--red-glow); }
  50%       { opacity: .5; box-shadow: 0 0 4px var(--red-glow); }
}

/* ── Main title ────────────────────────────────────────────────────────── */
.l-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1;
}

.l-title-line {
  font-size: clamp(32px, 5vw, 80px);
  font-weight: 700;
  letter-spacing: clamp(.06em, 1.1vw, .14em);
  text-transform: uppercase;
  color: var(--text);
  display: block;
  text-shadow:
    0 0 40px rgba(221, 225, 240, .08),
    2px 2px 0 rgba(0,0,0,.6);
  transition: color .1s;
}

.l-title-line.accent {
  color: var(--red);
  text-shadow:
    0 0 30px var(--red-glow),
    0 0 80px rgba(225,29,72,.25),
    2px 2px 0 rgba(0,0,0,.6);
}

/* ── Subtitle ──────────────────────────────────────────────────────────── */
.l-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 1.9;
  color: rgba(221,225,240,.58);
  letter-spacing: .05em;
  max-width: 520px;
}

/* ── CTA button ────────────────────────────────────────────────────────── */
.l-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: clamp(13px, 2.4vw, 18px) clamp(24px, 6vw, 52px);
  border: 1px solid var(--red);
  border-radius: 3px;
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 700;
  letter-spacing: clamp(.1em, 1.5vw, .2em);
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: color .25s, box-shadow .25s;
}

.l-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translateX(-102%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: -1;
}

.l-btn:hover {
  color: #fff;
  box-shadow: 0 0 40px var(--red-glow), 0 0 80px rgba(225,29,72,.2);
}
.l-btn:hover::before { transform: translateX(0); }

.l-btn-icon {
  font-size: 22px;
  transition: transform .25s;
}
.l-btn:hover .l-btn-icon { transform: translateX(6px); }

/* ── Countdown ─────────────────────────────────────────────────────────── */
.l-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 560px;
}

.l-countdown-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
}

.l-countdown-units {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  align-items: stretch;
  gap: 0;
  border: 1px solid rgba(225,29,72,.2);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(225,29,72,.03);
  box-shadow: 0 0 60px rgba(225,29,72,.07), inset 0 1px 0 rgba(255,255,255,.03);
  max-width: 100%;
}

.l-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: clamp(12px, 2vw, 20px) clamp(14px, 2.5vw, 28px) clamp(10px, 1.8vw, 18px);
  position: relative;
}

.l-unit + .l-unit {
  border-left: 1px solid rgba(225,29,72,.15);
}

.l-unit-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(28px, 3.5vw, 56px);
  font-weight: 500;
  color: var(--text);
  letter-spacing: .04em;
  line-height: 1;
  min-width: 2ch;
  text-align: center;
}

.l-unit-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--muted);
  text-transform: uppercase;
}

.l-unit-sep {
  display: none; /* replaced by border-left on .l-unit */
}

.l-unit:last-child .l-unit-val {
  color: var(--red);
  text-shadow: 0 0 20px var(--red-glow);
}

.l-session-now {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  letter-spacing: .2em;
  color: var(--red);
  text-transform: uppercase;
  padding: 24px 48px;
  animation: blink-live 1.5s ease-in-out infinite;
}

/* ── Stats row ─────────────────────────────────────────────────────────── */
.l-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  align-items: center;
  gap: 0;
  border: 1px solid rgba(225,29,72,.15);
  border-radius: 3px;
  background: rgba(225,29,72,.03);
  overflow: hidden;
  width: 100%;
  max-width: 480px;
}

.l-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: clamp(10px, 1.6vw, 16px) clamp(14px, 3vw, 36px);
}

.l-stat + .l-stat {
  border-left: 1px solid rgba(225,29,72,.15);
}

.l-stat-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: .04em;
  line-height: 1;
}

.status-live {
  color: #10b981;
  font-size: 16px;
  letter-spacing: .2em;
  animation: blink-live 3s ease-in-out infinite;
}
@keyframes blink-live {
  0%, 90%, 100% { opacity: 1; }
  95%            { opacity: .3; }
}

.l-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.l-stat-divider { display: none; }

/* ── Matrix rain canvas ─────────────────────────────────────────────────── */
#l-matrix {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .28;
  pointer-events: none;
}

/* ── Terminal login panel ───────────────────────────────────────────────── */
.l-terminal {
  width: min(100%, 460px);
  background: rgba(4,4,10,.88);
  border: 1px solid rgba(225,29,72,.35);
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(225,29,72,.08),
    0 24px 64px rgba(0,0,0,.7),
    0 0 40px rgba(225,29,72,.08);
}

/* Title bar */
.l-terminal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(225,29,72,.08);
  border-bottom: 1px solid rgba(225,29,72,.2);
}
.l-terminal-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.l-terminal-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.l-terminal-dots span:nth-child(1) { background: #e11d48; box-shadow: 0 0 6px rgba(225,29,72,.6); }
.l-terminal-dots span:nth-child(2) { background: #f6c343; opacity: .5; }
.l-terminal-dots span:nth-child(3) { background: #444; }
.l-terminal-bar-title {
  flex: 1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(221,225,240,.35);
  text-align: center;
}
.l-terminal-bar-enc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: .1em;
  color: rgba(16,185,129,.5);
  flex-shrink: 0;
}

/* Body */
.l-terminal-body {
  padding: 16px 18px 0;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

/* Fields */
.l-tfield {
  margin-bottom: 12px;
}
.l-tfield-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(225,29,72,.6);
  margin-bottom: 6px;
}
.l-tfield-wrap {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(221,225,240,.1);
  border-radius: 3px;
  transition: border-color .2s, box-shadow .2s;
}
.l-tfield-wrap:focus-within {
  border-color: rgba(225,29,72,.55);
  box-shadow: 0 0 0 2px rgba(225,29,72,.08), inset 0 0 8px rgba(225,29,72,.05);
}
.l-tfield-prompt {
  padding: 0 10px 0 13px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  color: rgba(225,29,72,.5);
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}
.l-tfield-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #dde1f0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: .06em;
  padding: 9px 13px 9px 0;
  min-width: 0;
}
.l-tfield-input::placeholder {
  color: rgba(221,225,240,.2);
  letter-spacing: .06em;
}

/* Submit button */
.l-tsubmit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 20px;
  margin-top: 2px;
  background: rgba(225,29,72,.1);
  border: 1px solid rgba(225,29,72,.3);
  border-radius: 3px;
  color: var(--red);
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.l-tsubmit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translateX(-102%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 0;
}
.l-tsubmit:hover { color: #fff; border-color: var(--red); box-shadow: 0 0 24px rgba(225,29,72,.3); }
.l-tsubmit:hover::before { transform: translateX(0); }
.l-tsubmit:disabled { opacity: .5; cursor: not-allowed; }
.l-tsubmit span { position: relative; z-index: 1; }
.l-tsubmit-key {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .1em;
  opacity: .55;
}

/* Status line */
.l-terminal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  color: rgba(221,225,240,.3);
  border-top: 1px solid rgba(225,29,72,.1);
  margin-top: 14px;
}
.l-status-prompt { color: rgba(225,29,72,.4); flex-shrink: 0; }
.l-terminal-status.l-status--error { color: rgba(225,29,72,.8); }
.l-terminal-status.l-status--error .l-status-prompt { color: var(--red); }
.l-terminal-status.l-status--ok { color: rgba(16,185,129,.7); }
.l-terminal-status.l-status--ok .l-status-prompt { color: #10b981; }
.l-status-cursor {
  display: inline-block;
  width: 7px; height: 12px;
  background: rgba(221,225,240,.3);
  animation: cur-blink 1s step-end infinite;
  vertical-align: middle;
}
@keyframes cur-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── GM denied link ─────────────────────────────────────────────────────── */
.l-gm-denied-link {
  position: fixed;
  bottom: 40px;
  right: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(225,29,72,.35);
  text-decoration: none;
  z-index: 20;
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.l-gm-denied-link:hover { color: rgba(225,29,72,.8); }

/* ── Footer bar ────────────────────────────────────────────────────────── */
.l-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 12px 32px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(246,195,67,.48);
  border-top: 1px solid rgba(225,29,72,.1);
  z-index: 10;
}

/* Short viewports: tighten further */
@media (max-height: 780px) {
  .l-center        { gap: 8px; }
  .l-sub           { display: none; }
  .l-terminal-body { padding: 10px 16px 0; }
  .l-tfield        { margin-bottom: 8px; }
  .l-tsubmit       { padding: 9px 20px; }
  .l-terminal-status { margin-top: 10px; padding: 6px 2px 8px; }
  .l-unit          { padding-top: 10px; padding-bottom: 8px; }
  .l-unit-val      { font-size: clamp(22px, 2.8vw, 44px); }
  .l-stat          { padding-top: 8px; padding-bottom: 8px; }
  .l-stat-val      { font-size: 22px; }
}

@media (max-height: 640px) {
  .l-title-line  { font-size: clamp(24px, 4vw, 48px); }
  .l-center      { gap: 6px; }
  .l-eyebrow     { display: none; }
  .l-countdown   { display: none; }  /* hide countdown, keep stats */
}

@media (max-width: 900px) {
  .corner {
    width: 38px;
    height: 38px;
  }
  .corner-tl { top: 18px; left: 18px; }
  .corner-tr { top: 18px; right: 18px; }
  .corner-bl { bottom: 18px; left: 18px; }
  .corner-br { bottom: 18px; right: 18px; }

  .l-eyebrow {
    justify-content: center;
    flex-wrap: wrap;
    font-size: 11px;
    letter-spacing: .16em;
  }

  .l-sub {
    max-width: 46rem;
  }

  .l-footer {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 18px;
    text-align: center;
  }
}

@media (max-width: 680px) {
  .landing-body {
    align-items: stretch;
    padding: 46px 14px 80px; /* bottom padding covers fixed footer */
  }

  .corner { display: none; }

  .l-center {
    width: 100%;
    padding: 16px 8px;
  }

  .l-center::before,
  .l-center::after {
    left: 10px;
    right: 10px;
  }

  .l-title-line {
    font-size: clamp(30px, 11vw, 56px);
    letter-spacing: .045em;
  }

  /* hide subtitle on mobile — saves ~80px */
  .l-sub { display: none; }

  /* terminal: full-width, smaller bar title */
  .l-terminal { width: 100%; }
  .l-terminal-bar-title { font-size: 9px; letter-spacing: .1em; }
  .l-terminal-bar-enc   { display: none; }
  .l-terminal-body      { padding: 12px 14px 0; }
  .l-tfield-label       { font-size: 8px; }
  .l-tfield-input       { font-size: 12px; }
  .l-tsubmit            { font-size: 13px; padding: 10px 16px; }
  .l-tsubmit-key        { display: none; } /* hide "↵ ENTER" hint */

  .l-countdown-units {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }
  .l-unit:nth-child(3) { border-left: none; }

  .l-stats {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
  }

  /* GM denied link: move above footer on mobile */
  .l-gm-denied-link {
    position: static;
    justify-content: center;
    margin-top: 8px;
    padding-bottom: 4px;
  }

  .l-footer {
    position: static;
    margin-top: 10px;
    border-top-color: rgba(225,29,72,.18);
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
  }
}

@media (max-width: 420px) {
  .l-title-line {
    font-size: clamp(26px, 10vw, 40px);
  }

  .l-eyebrow,
  .l-countdown-label,
  .l-stat-label,
  .l-footer {
    letter-spacing: .1em;
  }

  .l-countdown-units {
    grid-template-columns: 1fr 1fr;
  }

  .l-unit {
    padding-left: 10px;
    padding-right: 10px;
  }

  .l-stats { grid-template-columns: 1fr; }
  .l-stat + .l-stat {
    border-left: none;
    border-top: 1px solid rgba(225,29,72,.15);
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   OPERATIVE SELECT DROPDOWN
   ══════════════════════════════════════════════════════════════════════════ */

.l-tfield-wrap--select {
  cursor: pointer;
}

.l-tfield-select {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #dde1f0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: .06em;
  padding: 9px 32px 9px 0;
  min-width: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  /* Custom arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e11d48' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.l-tfield-select option {
  background: #0b0b18;
  color: #dde1f0;
  font-family: 'IBM Plex Mono', monospace;
}

.l-tfield-select option:disabled {
  color: rgba(221,225,240,.3);
}

/* Shake animation for validation error */
@keyframes l-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.l-shake { animation: l-shake .4s ease; }

/* ── Cache hint ──────────────────────────────────────────────────────────── */
.l-cache-hint {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 2px 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .14em;
  color: rgba(167,139,250,.55);  /* soft purple */
}
.l-cache-hint.is-visible {
  display: flex;
}
.l-cache-icon {
  font-size: 8px;
  animation: pulse-dot 2s ease-in-out infinite;
  color: #a78bfa;
}

/* ══════════════════════════════════════════════════════════════════════════
   PHASE 2  —  FINGERPRINT SCANNER
   ══════════════════════════════════════════════════════════════════════════ */

/* Phase containers */
#fp-phase-1 { display: block; }
#fp-phase-2 {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 0 0;
}

/* ── Scanner frame ────────────────────────────────────────────────────────── */
.fp-scanner {
  position: relative;
  width: 110px;
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pulsing outer ring */
.fp-scanner-ring {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(225,29,72,.25);
  border-radius: 38px 38px 38px 38px / 62px 62px 62px 62px;
  animation: fp-ring-pulse 2s ease-in-out infinite;
}
@keyframes fp-ring-pulse {
  0%, 100% { opacity: .3; box-shadow: 0 0 0 0 rgba(225,29,72,.2); }
  50%       { opacity: .7; box-shadow: 0 0 0 6px rgba(225,29,72,.0); }
}

/* Inner area containing SVG + scanline */
.fp-scanner-inner {
  position: relative;
  width: 90px;
  height: 112px;
  overflow: hidden;
  border-radius: 22px 22px 22px 22px / 40px 40px 40px 40px;
  background: rgba(225,29,72,.04);
}

/* ── Fingerprint SVG ridges ──────────────────────────────────────────────── */
.fp-svg {
  width: 90px;
  height: 112px;
  display: block;
}

/* Default ridge color: dim red */
.fp-ridges ellipse,
.fp-ridges circle {
  fill: none;
  stroke: rgba(225,29,72,.35);
  stroke-width: 1.4;
  transition: stroke .6s ease, filter .6s ease;
}
.fp-ridges circle { fill: rgba(225,29,72,.35); stroke: none; }

/* Confirmed: ridges go green */
.fp-ridges--ok ellipse,
.fp-ridges--ok circle {
  stroke: rgba(16,185,129,.7);
  filter: drop-shadow(0 0 3px rgba(16,185,129,.5));
}
.fp-ridges--ok circle {
  fill: rgba(16,185,129,.7);
  stroke: none;
}

/* ── Scan line ───────────────────────────────────────────────────────────── */
.fp-scanline {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--red) 40%, #ff6b8a 50%, var(--red) 60%, transparent 100%);
  box-shadow: 0 0 8px var(--red-glow), 0 0 16px rgba(225,29,72,.4);
  top: 0;
  animation: fp-scan-sweep 1.4s ease-in-out 2;
  animation-fill-mode: forwards;
}
@keyframes fp-scan-sweep {
  0%   { top: 0%;   opacity: 0; }
  5%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* When confirmed, scanline turns green */
.fp-scanner--ok .fp-scanline {
  background: linear-gradient(90deg, transparent 0%, #10b981 40%, #6ee7b7 50%, #10b981 60%, transparent 100%);
  box-shadow: 0 0 8px rgba(16,185,129,.5), 0 0 16px rgba(16,185,129,.3);
}

/* ── Corner tick marks ───────────────────────────────────────────────────── */
.fp-tick {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(225,29,72,.5);
  border-style: solid;
  transition: border-color .5s;
}
.fp-tick-tl { top: 0;  left: 0;  border-width: 2px 0 0 2px; }
.fp-tick-tr { top: 0;  right: 0; border-width: 2px 2px 0 0; }
.fp-tick-bl { bottom: 0; left: 0;  border-width: 0 0 2px 2px; }
.fp-tick-br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.fp-scanner--ok .fp-tick { border-color: rgba(16,185,129,.7); }
.fp-scanner--ok .fp-scanner-ring {
  border-color: rgba(16,185,129,.35);
  animation: fp-ring-ok 1.5s ease-in-out infinite;
}
@keyframes fp-ring-ok {
  0%, 100% { opacity: .5; box-shadow: 0 0 0 0 rgba(16,185,129,.3); }
  50%       { opacity: 1;  box-shadow: 0 0 0 8px rgba(16,185,129,.0); }
}

/* ── Message log ─────────────────────────────────────────────────────────── */
.fp-messages {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 84px;
  overflow: hidden;
}

.fp-msg {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .14em;
  color: rgba(221,225,240,.45);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fp-msg-in .3s ease;
}
.fp-msg::before {
  content: '›';
  color: rgba(225,29,72,.5);
  flex-shrink: 0;
}
@keyframes fp-msg-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Last message is brightest */
.fp-msg:last-child { color: rgba(221,225,240,.9); }

.fp-msg--ok {
  color: rgba(16,185,129,.85);
}
.fp-msg--ok::before { color: #10b981; }
.fp-msg--ok:last-child { color: #10b981; }

/* ── G.O.D. select option + rejected-scan styling ─────────────────────── */
.l-opt-god {
  color: #f6c343 !important;
  font-weight: 600;
  letter-spacing: .06em;
}

.fp-msg--err {
  color: #fca5a5;
  text-shadow: 0 0 4px rgba(248,113,113,.4);
}
.fp-msg--err::before { color: #ef4444; }
.fp-msg--err:last-child { color: #fca5a5; font-weight: 600; }

.fp-ridges--err ellipse,
.fp-ridges--err circle {
  stroke: rgba(239,68,68,.85) !important;
  fill: rgba(239,68,68,.08) !important;
}
.fp-scanner--err .fp-scanline {
  background: linear-gradient(180deg, transparent, rgba(239,68,68,.9), transparent) !important;
  box-shadow: 0 0 12px rgba(239,68,68,.6) !important;
}
.fp-scanner--err .fp-tick { border-color: rgba(239,68,68,.7) !important; }
.fp-scanner--err .fp-scanner-ring {
  border-color: rgba(239,68,68,.55) !important;
  box-shadow:
    0 0 24px rgba(239,68,68,.45),
    inset 0 0 18px rgba(239,68,68,.15) !important;
  animation: god-reject-shake .35s ease-in-out 3;
}
@keyframes god-reject-shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-4px); }
  75%     { transform: translateX(4px); }
}

/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR OPERATIVE DISPLAY  (in base.html)
   ══════════════════════════════════════════════════════════════════════════ */

.sidebar-operative {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0 2px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(167,139,250,.7);
  border-top: 1px solid rgba(167,139,250,.1);
  margin-top: 4px;
}
.sidebar-operative-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 6px rgba(167,139,250,.6);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
.sidebar-operative-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Logout / switch operative button */
.sidebar-operative-logout {
  background: transparent;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  padding: 0;
  margin-left: auto;
  padding-left: 10px;
  color: rgba(225,29,72,.5);
  font-size: 10px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  transition: color .18s;
}
.sidebar-operative-logout:focus { outline: none; box-shadow: none; }
.sidebar-operative-logout:hover { color: #e11d48; }

/* Clear-cache "broom" button — sits next to the logout button. Quiet by
   default so it doesn't draw the eye more than the logout action. */
.sidebar-operative-clean {
  background: transparent;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  padding: 0;
  margin-left: auto;
  padding-left: 10px;
  color: rgba(167, 139, 250, .35);
  font-size: 10px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  transition: color .18s;
}
.sidebar-operative-clean:focus { outline: none; box-shadow: none; }
.sidebar-operative-clean:hover { color: #a78bfa; }
/* When both buttons are present, only the first one needs margin-left:auto */
.sidebar-operative-clean + .sidebar-operative-logout { margin-left: 0; padding-left: 6px; }

/* ── Welcome-back panel (phase 0) ─────────────────────────────────────── */
.l-welcome-back {
  text-align: center;
  padding: 22px 16px 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(225, 29, 72, .18);
  background:
    radial-gradient(160px 80px at 50% 0%, rgba(225, 29, 72, .12), transparent 70%),
    rgba(15, 15, 28, .35);
  border-radius: 6px;
}
.l-welcome-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .22em;
  color: rgba(225, 29, 72, .7);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.l-welcome-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 4px;
  /* Faint glow to match the rest of the landing aesthetic */
  text-shadow: 0 0 12px rgba(225, 29, 72, .25);
}
.l-welcome-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .45);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Small secondary action below the big CONTINUE button */
.l-switch-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .55);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: color .15s, border-color .15s, background .15s;
}
.l-switch-btn:hover {
  color: #fff;
  border-color: rgba(225, 29, 72, .45);
  background: rgba(225, 29, 72, .05);
}
