/* =====================================================================
   Aadhaar & PAN OCR Studio — premium dark theme
   Brand colours carried over from the Android app (appColor #FFB300,
   appBgColor #0F1511, cardViewBg #202521 / #2E332F) + Poppins.
   ===================================================================== */

@font-face { font-family: "Poppins"; font-weight: 300; font-display: swap; src: url("../fonts/Poppins-Light.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("../fonts/Poppins-Regular.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/Poppins-Medium.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/Poppins-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/Poppins-Bold.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url("../fonts/Poppins-ExtraBold.ttf") format("truetype"); }

:root {
  --bg: #0A0E0B;
  --bg-2: #0F1511;
  --surface: rgba(32, 37, 33, 0.62);
  --surface-solid: #171C18;
  --surface-2: rgba(46, 51, 47, 0.55);
  --surface-3: #242A25;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #F4F4EF;
  --text-2: #C9CDC8;
  --muted: #8E958F;
  --accent: #FFB300;
  --accent-2: #FF8A00;
  --accent-soft: rgba(255, 179, 0, 0.12);
  --accent-glow: rgba(255, 179, 0, 0.35);
  --ok: #3DDC84;
  --ok-soft: rgba(61, 220, 132, 0.12);
  --warn: #FFB300;
  --warn-soft: rgba(255, 179, 0, 0.12);
  --err: #FF5D62;
  --err-soft: rgba(255, 93, 98, 0.12);
  --info: #5AA9FF;

  --grad: linear-gradient(135deg, #FFC94D 0%, #FFB300 45%, #FF8A00 100%);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -20px rgba(0,0,0,.6);
  --shadow-glow: 0 10px 40px -10px var(--accent-glow);
  --sidebar-w: 248px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: .86em; background: rgba(255,255,255,.06); padding: .1em .4em; border-radius: 6px; color: var(--accent); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #111; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.row { display: flex; align-items: center; }
.gap-sm { gap: 10px; }
.wrap { flex-wrap: wrap; }
.center { justify-content: center; }
svg.ic { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* ---------- scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: #2E332F transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2E332F; border-radius: 10px; border: 2px solid var(--bg); }

/* ---------- ambient background ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(255,179,0,.38), transparent 70%); top: -180px; right: -120px; animation: drift 22s ease-in-out infinite alternate; }
.orb-2 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(255,120,0,.20), transparent 70%); bottom: -200px; left: 10%; animation: drift 26s ease-in-out infinite alternate-reverse; }
.orb-3 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(61,220,132,.10), transparent 70%); top: 35%; left: 45%; animation: drift 30s ease-in-out infinite alternate; }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 60% 20%, #000 0%, transparent 70%);
}
@keyframes drift { to { transform: translate(-60px, 50px) scale(1.08); } }

/* =====================================================================
   Layout
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 26px 18px;
  background: linear-gradient(180deg, rgba(15,21,17,.88), rgba(10,14,11,.82));
  border-right: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 4px; }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 12px; box-shadow: var(--shadow-glow); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-weight: 700; font-size: 15px; white-space: nowrap; letter-spacing: -.01em; }
.brand-text small { color: var(--accent); font-weight: 500; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  color: var(--text-2); font-weight: 500;
  transition: background .2s, color .2s;
}
.nav-link svg.ic { width: 20px; height: 20px; }
.nav-link:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-link.active::before { content: ""; position: absolute; left: -18px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); box-shadow: 0 0 12px var(--accent); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.engine-pill { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.engine-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.engine-pill[data-state="ok"] .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft), 0 0 12px var(--ok); }
.engine-pill[data-state="error"] .dot { background: var(--err); box-shadow: 0 0 0 4px var(--err-soft); }
.engine-pill[data-state="loading"] .dot { animation: blink 1s infinite; }
.engine-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.engine-text strong { font-size: 13px; font-weight: 600; }
.engine-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.privacy-note { display: flex; gap: 8px; font-size: 12px; color: var(--muted); padding: 0 6px; }
.privacy-note svg { color: var(--ok); margin-top: 2px; }
.powered-by { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.02); text-decoration: none; transition: border-color .2s, background .2s, transform .2s; }
.powered-by span { font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.powered-by img { display: block; width: 140px; height: auto; opacity: .82; transition: opacity .2s; }
.powered-by:hover { border-color: rgba(255,179,0,.35); background: var(--accent-soft); transform: translateY(-1px); }
.powered-by:hover img { opacity: 1; }
.powered-by:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.main { min-width: 0; padding: 36px clamp(16px, 4vw, 52px) 60px; }
.view { animation: viewIn .45s var(--ease); max-width: 1320px; margin: 0 auto; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }

.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.view-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
.view-head p { color: var(--muted); margin-top: 6px; max-width: 640px; }
.head-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

/* =====================================================================
   Buttons / inputs
   ===================================================================== */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font-weight: 600; font-size: 14px;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s, opacity .2s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--grad); color: #17110A; box-shadow: 0 8px 24px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-primary:hover { box-shadow: 0 12px 32px -8px rgba(255,179,0,.6), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.btn-icon { width: var(--h); padding: 0; background: rgba(255,255,255,.05); border-color: var(--border-strong); }
.btn-icon:hover { background: rgba(255,255,255,.1); }
.btn-lg { --h: 52px; padding: 0 26px; font-size: 15px; border-radius: 14px; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 40px; height: 23px; border-radius: 20px; background: #2E332F; border: 1px solid var(--border-strong); transition: background .25s; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #D5D1D1; transition: transform .25s var(--ease), background .25s; }
.switch input:checked + .switch-ui { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(17px); background: #17110A; }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }

.input-wrap { position: relative; flex: 1; min-width: 200px; }
.input-wrap input, .search input {
  width: 100%; height: 42px; padding: 0 44px 0 14px;
  background: rgba(0,0,0,.25); border: 1px solid var(--border-strong); border-radius: 12px;
  color: var(--text); font: inherit; font-size: 14px; transition: border-color .2s, box-shadow .2s;
}
.input-wrap input:focus, .search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-btn { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.input-btn:hover { color: var(--text); background: rgba(255,255,255,.06); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 20px; background: rgba(10,14,11,.7); border: 1px solid var(--border-strong); font-size: 12px; font-weight: 500; backdrop-filter: blur(10px); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.neutral { background: rgba(255,255,255,.06); color: var(--text-2); }

/* =====================================================================
   Overview
   ===================================================================== */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding: 20px 0 50px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 30px; background: var(--accent-soft); border: 1px solid rgba(255,179,0,.25); color: var(--accent); font-size: 12.5px; font-weight: 500; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,179,0,0); } 100% { box-shadow: 0 0 0 0 rgba(255,179,0,0); } }
.hero h1 { font-size: clamp(36px, 5.2vw, 62px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 22px 0 18px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--text-2); font-size: 16.5px; max-width: 560px; font-weight: 300; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.session-stats { display: flex; gap: 34px; margin-top: 40px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12.5px; }

.hero-visual { display: grid; place-items: center; perspective: 1200px; }
.showcase { position: relative; width: min(100%, 440px); aspect-ratio: 1.15; display: grid; place-items: center; }
.showcase::before { content: ""; position: absolute; inset: 12% 8%; background: radial-gradient(circle, rgba(255,179,0,.28), transparent 65%); filter: blur(30px); }

.id-card {
  position: relative; width: 100%; aspect-ratio: 1.586; border-radius: 20px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,179,0,.22), transparent 55%),
    linear-gradient(145deg, #262C27 0%, #171B18 60%, #121512 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,179,0,.08), inset 0 1px 0 rgba(255,255,255,.08);
  padding: 7% 7.5%;
  display: flex; flex-direction: column;
}
.id-card--demo { transform: rotateY(-14deg) rotateX(8deg) rotateZ(-2deg); animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 50% { transform: rotateY(-8deg) rotateX(4deg) rotateZ(-1deg) translateY(-10px); } }
.id-card-glare { position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.09) 50%, transparent 60%); animation: glare 6s ease-in-out infinite; }
@keyframes glare { 0%, 100% { transform: translateX(-30%); } 50% { transform: translateX(30%); } }
.id-card-head { display: flex; align-items: center; gap: 12px; }
.chip-gold { width: 42px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #F5D27A, #B8862B); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); position: relative; }
.chip-gold::after { content: ""; position: absolute; inset: 7px 10px; border: 1px solid rgba(0,0,0,.25); border-radius: 3px; }
.id-card-title { font-size: 11px; letter-spacing: .22em; color: var(--text-2); font-weight: 600; }
.id-card-body { display: flex; gap: 18px; align-items: center; margin-top: auto; margin-bottom: auto; }
.avatar { width: 64px; height: 76px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--muted); }
.avatar svg.ic { width: 34px; height: 34px; }
.id-lines { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sk { height: 10px; border-radius: 6px; background: rgba(255,255,255,.1); display: block; }
.sk.hl { background: linear-gradient(90deg, rgba(255,179,0,.65), rgba(255,138,0,.35)); height: 13px; }
.sk-w70 { width: 75%; } .sk-w50 { width: 52%; } .sk-w40 { width: 38%; }
.id-card-number { font-family: var(--mono); font-size: clamp(16px, 2.2vw, 22px); letter-spacing: .14em; font-weight: 600; color: var(--text); }
.scanline { position: absolute; left: 0; right: 0; height: 70px; top: -70px; background: linear-gradient(180deg, transparent, rgba(255,179,0,.18) 80%, rgba(255,179,0,.9) 98%, transparent); animation: scan 3.2s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes scan { 0% { top: -70px; } 100% { top: 100%; } }

.float-chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px; background: rgba(23,28,24,.85); border: 1px solid var(--border-strong); font-size: 12.5px; font-weight: 500; backdrop-filter: blur(12px); box-shadow: 0 16px 30px -12px rgba(0,0,0,.7); animation: bob 5s ease-in-out infinite; }
.float-chip svg { color: var(--ok); }
.chip-a { top: 6%; left: -4%; }
.chip-b { bottom: 8%; right: -6%; animation-delay: -1.6s; }
.chip-c { top: 14%; right: 2%; animation-delay: -3s; }
.chip-c svg { color: var(--accent); }
@keyframes bob { 50% { transform: translateY(-8px); } }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  overflow: hidden;
}
.feature h3 { font-size: 17px; font-weight: 600; }
.feature p { color: var(--muted); font-size: 13.5px; }
.feature-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.05); border: 1px solid var(--border-strong); color: var(--accent); margin-bottom: 6px; }
.feature-icon svg.ic { width: 22px; height: 22px; }
.feature--primary { background: linear-gradient(160deg, rgba(255,179,0,.11), rgba(32,37,33,.6) 55%); border-color: rgba(255,179,0,.2); }
.feature--primary .feature-icon { background: var(--grad); color: #17110A; border: 0; box-shadow: var(--shadow-glow); }
.feature--primary:hover { transform: translateY(-4px); border-color: rgba(255,179,0,.45); box-shadow: 0 24px 50px -24px rgba(255,179,0,.45); }
.feature-link { margin-top: auto; padding-top: 8px; color: var(--accent); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.feature-link svg { transition: transform .25s var(--ease); }
.feature--primary:hover .feature-link svg { transform: translateX(4px); }

.how { margin-top: 50px; }
.section-title { font-size: 20px; font-weight: 600; margin-bottom: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { display: flex; gap: 16px; padding: 20px; border-radius: var(--radius); border: 1px dashed var(--border-strong); background: rgba(255,255,255,.015); }
.steps p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.step-n { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(255,179,0,.3); }

/* =====================================================================
   Live scan
   ===================================================================== */
.live-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.stage-panel { padding: 14px; }
.stage {
  position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1A201B, #0B0E0C 75%);
  border: 1px solid var(--border);
}
.stage video, .stage #stillPreview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage #stillPreview { object-fit: contain; background: #0B0E0C; }
.stage video.mirror { transform: scaleX(-1); }
.stage-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px; z-index: 3; }
.stage-empty h3 { font-size: 20px; font-weight: 600; }
.stage-empty p { color: var(--muted); max-width: 340px; font-size: 14px; }
.stage-empty .hint { color: var(--warn); font-size: 12.5px; }
.stage-empty .row { margin-top: 8px; }
.empty-orb { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid rgba(255,179,0,.3); color: var(--accent); margin-bottom: 6px; box-shadow: 0 0 60px -10px var(--accent-glow); }
.empty-orb svg.ic { width: 36px; height: 36px; }
.stage[data-state="live"] .stage-empty, .stage[data-state="paused"] .stage-empty, .stage[data-state="done"] .stage-empty, .stage[data-state="still"] .stage-empty { display: none; }

.guide { position: absolute; left: 50%; top: 50%; width: 80%; aspect-ratio: 1.586; transform: translate(-50%, -50%); z-index: 2; opacity: 0; transition: opacity .3s; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(5,7,6,.45); pointer-events: none; }
.stage[data-state="live"] .guide, .stage[data-state="paused"] .guide, .stage[data-state="done"] .guide { opacity: 1; }
.guide .c { position: absolute; width: 34px; height: 34px; border: 3.5px solid var(--accent); filter: drop-shadow(0 0 8px var(--accent-glow)); transition: border-color .3s; }
.guide .tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 16px 0 0 0; }
.guide .tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 16px 0 0; }
.guide .bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 16px; }
.guide .br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 16px 0; }
.guide-scan { position: absolute; left: 4%; right: 4%; height: 2px; top: 10%; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 18px 2px var(--accent-glow); opacity: 0; }
.stage[data-state="live"] .guide-scan { opacity: 1; animation: guideScan 2.2s ease-in-out infinite alternate; }
@keyframes guideScan { from { top: 8%; } to { top: 92%; } }
.guide-label { position: absolute; left: 50%; bottom: -44px; transform: translateX(-50%); white-space: nowrap; font-size: 12.5px; font-weight: 500; padding: 5px 12px; border-radius: 20px; background: rgba(10,14,11,.75); border: 1px solid var(--border-strong); backdrop-filter: blur(8px); }
.stage[data-state="done"] .guide .c { border-color: var(--ok); filter: drop-shadow(0 0 10px rgba(61,220,132,.6)); }

.stage-chips { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; z-index: 4; }
.chip-live[data-state="live"] .dot { background: var(--err); animation: blink 1.1s infinite; }
.chip-live[data-state="paused"] .dot { background: var(--warn); }
.chip-live[data-state="done"] .dot { background: var(--ok); }
#latencyChip svg { color: var(--accent); }
@keyframes blink { 50% { opacity: .3; } }

.stage-success { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; pointer-events: none; opacity: 0; }
.stage-success.show { animation: successPop 1.6s var(--ease) forwards; }
.stage-success strong { font-size: 18px; font-weight: 600; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.success-ring { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #06150C; box-shadow: 0 0 0 12px rgba(61,220,132,.18), 0 0 60px rgba(61,220,132,.6); }
.success-ring svg.ic { width: 42px; height: 42px; stroke-width: 3; }
@keyframes successPop { 0% { opacity: 0; transform: scale(.7); } 15% { opacity: 1; transform: scale(1.05); } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

.stage-processing { position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(8,10,9,.7); backdrop-filter: blur(4px); font-weight: 500; }
.stage-processing.show { display: flex; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.1); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.stage-controls { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 14px 4px 4px; flex-wrap: wrap; }

.result-panel { padding: 22px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 24px; }
.result-head { display: flex; align-items: center; gap: 14px; }
.result-head h3 { font-size: 17px; font-weight: 600; }
.result-head p { font-size: 13px; }
.result-head .badge { margin-left: auto; }

.progress-ring { --p: 0; position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.progress-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 4; }
.progress-ring .track { stroke: rgba(255,255,255,.08); }
.progress-ring .bar { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: calc(119.4 - 119.4 * var(--p)); transition: stroke-dashoffset .6s var(--ease), stroke .3s; filter: drop-shadow(0 0 4px var(--accent-glow)); }
.progress-ring.done .bar { stroke: var(--ok); }
.progress-ring span { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

.fields { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.field {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 12px; border-radius: 14px;
  background: rgba(0,0,0,.18); border: 1px solid var(--border);
  transition: border-color .35s, background .35s;
}
.f-icon { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.04); color: var(--muted); transition: all .35s; }
.f-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.f-body small { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.f-body small em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .7; }
.f-val { font-weight: 600; font-size: 15px; color: var(--text-2); overflow-wrap: anywhere; transition: color .3s; }
.field[data-state="empty"] .f-val { color: rgba(255,255,255,.25); }
.f-state { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px dashed rgba(255,255,255,.14); display: grid; place-items: center; transition: all .3s; }
.f-copy { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .2s, background .2s, color .2s; }
.field:hover .f-copy { opacity: 1; }
.f-copy:hover { background: rgba(255,255,255,.07); color: var(--text); }
.field[data-state="empty"] .f-copy { display: none; }

.field[data-state="reading"] { border-color: rgba(255,179,0,.3); }
.field[data-state="reading"] .f-icon { color: var(--accent); background: var(--accent-soft); }
.field[data-state="reading"] .f-state { border: 2px solid rgba(255,179,0,.25); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.field[data-state="locked"] { border-color: rgba(61,220,132,.28); background: linear-gradient(90deg, rgba(61,220,132,.06), rgba(0,0,0,.18) 60%); }
.field[data-state="locked"] .f-icon { color: var(--ok); background: var(--ok-soft); }
.field[data-state="locked"] .f-val { color: var(--text); }
.field[data-state="locked"] .f-state { border: 0; background: var(--ok); color: #06150C; }
.field[data-state="locked"] .f-state::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-1px) rotate(-45deg); }
.field.flash { animation: flash .9s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.5); } 100% { box-shadow: 0 0 0 12px rgba(61,220,132,0); } }
.detect-hint { display: flex; align-items: center; gap: 16px; padding: 22px 18px; border-radius: 14px; border: 1.5px dashed rgba(255,179,0,.28); background: rgba(255,179,0,.04); }
.detect-hint strong { display: block; font-size: 15px; font-weight: 600; }
.detect-hint small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.detect-icons { display: flex; flex: none; }
.detect-icons svg.ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--surface-solid); border: 1px solid var(--border); color: var(--accent); }
.detect-icons svg.ic + svg.ic { margin-left: -8px; }
.detect-icons svg.ic:nth-child(2) { color: var(--info); }
.detect-icons svg.ic:nth-child(3) { color: #B794F6; }
.field--wide .f-val { font-size: 13.5px; font-weight: 500; line-height: 1.5; }

.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.result-actions .btn { flex: 1; }

.raw { border-radius: 14px; border: 1px solid var(--border); background: rgba(0,0,0,.2); }
.raw summary { cursor: pointer; padding: 12px 14px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; list-style: none; color: var(--text-2); }
.raw summary::-webkit-details-marker { display: none; }
.raw summary .muted { margin-left: auto; font-size: 12px; }
.raw pre, .lb-body pre { margin: 0; padding: 0 14px 14px; max-height: 240px; overflow: auto; font: 12px/1.6 var(--mono); color: var(--text-2); white-space: pre-wrap; word-break: break-word; }

/* =====================================================================
   PDF batch
   ===================================================================== */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: clamp(40px, 7vw, 70px) 24px; cursor: pointer;
  border: 1.5px dashed rgba(255,179,0,.35);
  background: radial-gradient(ellipse at 50% 0%, rgba(255,179,0,.09), transparent 60%), var(--surface);
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: radial-gradient(ellipse at 50% 0%, rgba(255,179,0,.18), transparent 65%), var(--surface); }
.dropzone.drag { transform: scale(1.01); }
.dropzone h3 { font-size: 20px; font-weight: 600; }
.dropzone p { color: var(--muted); font-size: 13.5px; }
.dropzone .link { color: var(--accent); font-weight: 600; }
.dz-icon { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: var(--grad); color: #17110A; box-shadow: var(--shadow-glow); margin-bottom: 8px; transition: transform .3s var(--ease); }
.dz-icon svg.ic { width: 34px; height: 34px; }
.dz-icons { display: flex; align-items: flex-end; margin-bottom: 8px; }
.dz-icons .dz-icon { margin-bottom: 0; position: relative; z-index: 2; }
.dz-icon--side { width: 58px !important; height: 58px !important; border-radius: 17px !important; background: var(--surface-3) !important; color: var(--accent) !important; border: 1px solid var(--border-strong); box-shadow: none !important; z-index: 1 !important; }
.dz-icon--side svg.ic { width: 26px !important; height: 26px !important; }
.dz-icons .dz-icon--side:first-child { transform: rotate(-12deg) translateX(14px); }
.dz-icons .dz-icon--side:last-child { transform: rotate(12deg) translateX(-14px); }
.dropzone:hover .dz-icon:not(.dz-icon--side), .dropzone.drag .dz-icon:not(.dz-icon--side) { transform: translateY(-6px); }
.dropzone:hover .dz-icon--side:first-child, .dropzone.drag .dz-icon--side:first-child { transform: rotate(-18deg) translateX(4px); }
.dropzone:hover .dz-icon--side:last-child, .dropzone.drag .dz-icon--side:last-child { transform: rotate(18deg) translateX(-4px); }
.dropzone p b { color: var(--text-2); font-weight: 600; }
.dz-doc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; cursor: default; }
.dz-doc > span { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.seg button svg.ic { margin-right: 6px; width: 15px; height: 15px; }
.seg-doc .n { margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; background: rgba(255,255,255,.07); color: var(--muted); }
.seg-doc button.active .n { background: var(--accent-soft); color: var(--accent); }

/* Document tags: Aadhaar = amber, PAN personal = blue, PAN company = violet */
.doc-tag { --c: var(--accent); align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); white-space: nowrap; }
.doc-tag svg.ic { width: 13px; height: 13px; }
.doc-tag.pan-personal { --c: var(--info); }
.doc-tag.pan-business { --c: #B794F6; }
.pcard-head .doc-tag { margin: 2px 0 -2px; }
.dz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.dropzone .dz-tip { font-size: 12px; margin-top: 4px; }
.dz-tip kbd { font: 600 11px/1 var(--font-mono, monospace); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); background: rgba(255,255,255,.06); color: var(--text-2); }
.dz-types { display: flex; gap: 6px; margin-top: 6px; }
.dz-types span { font-size: 11px; font-weight: 600; letter-spacing: .08em; padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--muted); }

.password-card { display: flex; gap: 18px; padding: 24px; margin-top: 18px; border-color: rgba(255,179,0,.3); animation: viewIn .35s var(--ease); }
.password-card.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pw-icon { width: 50px; height: 50px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pw-icon svg.ic { width: 24px; height: 24px; }
.pw-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pw-body h3 { font-size: 17px; font-weight: 600; }
.pw-body p { font-size: 13.5px; }
.pw-body .row { margin-top: 8px; flex-wrap: wrap; }

.progress-card { padding: 22px; margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.file-chip { display: flex; align-items: center; gap: 12px; min-width: 0; }
#fileChipIcon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--err-soft); color: var(--err); }
#fileChipIcon.is-images { background: var(--accent-soft); color: var(--accent); }
#fileChipIcon svg.ic { width: 22px; height: 22px; }
.file-chip div { display: flex; flex-direction: column; min-width: 0; }
.file-chip strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-chip small { color: var(--muted); font-size: 12.5px; }
.pc-status { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-2); }
.progress { height: 10px; border-radius: 10px; background: rgba(255,255,255,.06); overflow: hidden; }
.progress-bar { display: block; height: 100%; width: 0; border-radius: 10px; background: var(--grad); background-size: 200% 100%; box-shadow: 0 0 16px var(--accent-glow); transition: width .5s var(--ease); position: relative; overflow: hidden; }
.progress-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.pc-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid var(--border); transition: all .3s; }
.pc-dot.active { border-color: var(--accent); color: var(--accent); animation: blink 1s infinite; }
.pc-dot.complete { background: var(--ok-soft); color: var(--ok); border-color: rgba(61,220,132,.3); }
.pc-dot.partial { background: var(--warn-soft); color: var(--warn); border-color: rgba(255,179,0,.3); }
.pc-dot.none, .pc-dot.error { background: var(--err-soft); color: var(--err); border-color: rgba(255,93,98,.3); }

#pdfResults { margin-top: 22px; animation: viewIn .4s var(--ease); }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.sum-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.sum-card strong { font-size: 24px; font-weight: 700; display: block; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sum-card small { color: var(--muted); font-size: 12.5px; }
.sum-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--text-2); flex: none; }
.sum-card.ok .sum-icon { background: var(--ok-soft); color: var(--ok); }
.sum-card.warn .sum-icon { background: var(--warn-soft); color: var(--warn); }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search > svg.ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 40px; padding-right: 14px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.seg-icons button { padding: 6px 9px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.pcard {
  display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  animation: cardIn .5s var(--ease) both;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 24px 40px -24px rgba(0,0,0,.8); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.pcard-top { display: flex; gap: 14px; padding: 14px; align-items: flex-start; }
.pcard-thumb { position: relative; width: 92px; aspect-ratio: .72; flex: none; border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; border: 1px solid var(--border-strong); }
.pcard-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pcard-thumb::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0); transition: background .2s; }
.pcard-thumb:hover::after { background: rgba(0,0,0,.25); }
.pcard-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pcard-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard-title strong { font-size: 13px; color: var(--muted); font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-name { font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.pcard-name.empty { color: var(--muted); font-weight: 500; font-style: italic; }
.pcard-num { font-family: var(--mono); font-size: 15px; letter-spacing: .08em; color: var(--accent); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard-num .badge { font-family: "Poppins", sans-serif; letter-spacing: 0; font-size: 11px; padding: 2px 8px; }
.pcard-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-top: 1px solid var(--border); }
.pcard-meta > div { background: var(--surface-solid); padding: 10px 14px; min-width: 0; }
.pcard-meta small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pcard-meta span { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.pcard-meta .full { grid-column: 1 / -1; }
.pcard-meta .full span { font-size: 13px; color: var(--text-2); font-weight: 400; }
.pcard-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); background: rgba(0,0,0,.12); }
.pcard-foot .tags { display: flex; gap: 8px; align-items: center; }
.pcard-foot button { border: 0; background: transparent; color: var(--text-2); cursor: pointer; padding: 4px 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.pcard-foot button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.val-missing { color: rgba(255,255,255,.25) !important; }

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.table th { text-align: left; padding: 13px 16px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; background: rgba(0,0,0,.2); border-bottom: 1px solid var(--border); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .2s; cursor: pointer; }
.table tbody tr:hover { background: rgba(255,255,255,.03); }
.table td.mono { color: var(--accent); }

.empty-filter { text-align: center; padding: 50px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-filter svg.ic { width: 30px; height: 30px; }

/* =====================================================================
   Lightbox / toasts
   ===================================================================== */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(4,6,5,.78); backdrop-filter: blur(10px); animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } }
.lb-inner { width: min(1100px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--surface-solid); border: 1px solid var(--border-strong); overflow: hidden; animation: viewIn .3s var(--ease); }
.lb-inner header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.lb-body { display: grid; grid-template-columns: 1.4fr 1fr; min-height: 0; flex: 1; }
.lb-body img { width: 100%; height: 100%; max-height: calc(100vh - 110px); object-fit: contain; background: #0B0E0C; }
.lb-body aside { border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.lb-body h4 { padding: 14px; font-size: 13px; color: var(--muted); font-weight: 500; }
.lb-body pre { max-height: none; flex: 1; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 380px; padding: 13px 16px; border-radius: 14px; background: rgba(28,33,29,.95); border: 1px solid var(--border-strong); box-shadow: 0 20px 40px -12px rgba(0,0,0,.7); backdrop-filter: blur(14px); font-size: 13.5px; animation: toastIn .35s var(--ease); }
.toast.out { animation: toastOut .3s forwards; }
.toast .t-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast.ok .t-icon { background: var(--ok-soft); color: var(--ok); }
.toast.err .t-icon { background: var(--err-soft); color: var(--err); }
.toast.info .t-icon { background: var(--accent-soft); color: var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1180px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .live-grid { grid-template-columns: 1fr; }
  .result-panel { position: static; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; z-index: 50; height: auto; flex-direction: row; align-items: center; gap: 12px;
    padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--border);
  }
  .brand { padding: 0; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-text small { display: none; }
  .nav { flex-direction: row; margin-left: auto; gap: 2px; }
  .nav-link { padding: 8px 12px; }
  .nav-link.active::before { display: none; }
  .sidebar-foot { display: none; }
  .main { padding-top: 24px; }
  .hero { grid-template-columns: 1fr; gap: 20px; padding-bottom: 30px; }
  .hero-visual { order: -1; }
  .showcase { width: min(100%, 380px); }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .lb-body { grid-template-columns: 1fr; overflow: auto; }
  .lb-body aside { border-left: 0; border-top: 1px solid var(--border); }
  .lb-body img { max-height: 60vh; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .nav-link span { display: none; }
  .nav-link svg.ic { width: 22px; height: 22px; }
  .feature-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .stage { aspect-ratio: 3 / 4; }
  .guide { width: 90%; }
  .chip-a { left: 0; } .chip-b { right: 0; }
  .session-stats { gap: 22px; }
  .toolbar > .row { width: 100%; }
  .toolbar > .row .btn { flex: 1; }
  .password-card { flex-direction: column; }
  .toasts { left: 16px; right: 16px; }
  .toast { max-width: none; }
  .f-copy { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
