/* ==========================================================================
   Event Pass System — design system v2
   Direction: "premium night-festival" — deep indigo/violet base, magenta +
   amber accents, layered depth, and restrained motion.
   Plain CSS, static file, no build step.
   ========================================================================== */

:root {
  /* Core brand ramp */
  --indigo-900: #1e1b4b;
  --indigo-800: #312e81;
  --indigo-700: #4338ca;
  --indigo-600: #4f46e5;
  --indigo-500: #6366f1;
  --indigo-100: #e0e7ff;
  --indigo-50:  #eef2ff;

  /* Accents */
  --magenta-600: #db2777;
  --magenta-500: #ec4899;
  --amber-500:   #f59e0b;
  --amber-400:   #fbbf24;
  --teal-500:    #14b8a6;

  /* Ink */
  --ink-900: #0f1024;
  --ink-800: #1c1d3a;
  --ink-700: #383a5c;
  --ink-500: #6b6f8d;
  --ink-400: #9497b4;
  --ink-200: #e4e6f1;
  --ink-100: #eff1f8;

  /* Surface */
  --surface:      #f4f5fb;
  --surface-card: #ffffff;

  /* Status */
  --success: #059669;
  --success-bg: #d1fae5;
  --danger:  #e11d48;
  --danger-bg: #ffe4e6;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --info: #0284c7;
  --info-bg: #e0f2fe;

  /* Geometry */
  --r-xl: 22px;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;

  /* Layered shadows — two-tone for real depth instead of one flat blur */
  --sh-1: 0 1px 2px rgba(15,16,36,.04), 0 2px 8px -2px rgba(15,16,36,.06);
  --sh-2: 0 2px 4px rgba(15,16,36,.04), 0 12px 28px -8px rgba(15,16,36,.12);
  --sh-3: 0 4px 8px rgba(15,16,36,.05), 0 24px 48px -12px rgba(30,27,75,.22);
  --sh-brand: 0 8px 24px -8px rgba(79,70,229,.55);
  --sh-inner-top: inset 0 1px 0 rgba(255,255,255,.6);

  /* Gradients */
  --g-brand:   linear-gradient(135deg, #6366f1 0%, #4f46e5 60%, #4338ca 100%);
  --g-festive: linear-gradient(135deg, #5b21b6 0%, #7c3aed 40%, #db2777 100%);
  --g-amber:   linear-gradient(135deg, #fbbf24, #f59e0b);
  --g-success: linear-gradient(135deg, #34d399, #059669);
  --g-danger:  linear-gradient(135deg, #fb7185, #e11d48);

  --ease-out: cubic-bezier(.22,.9,.3,1);
}

/* ---------- Base ---------- */

html, body { height: 100%; }

body {
  background-color: var(--surface);
  /* Soft colour mesh instead of flat grey — subtle, but kills the
     "default bootstrap admin" feel immediately. */
  background-image:
    radial-gradient(900px 500px at 8% -5%,  rgba(99,102,241,.13), transparent 60%),
    radial-gradient(800px 480px at 105% 5%, rgba(219,39,119,.10), transparent 60%),
    radial-gradient(700px 500px at 50% 105%, rgba(20,184,166,.07), transparent 60%);
  background-attachment: fixed;
  color: var(--ink-900);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

.font-display { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; }

a { color: var(--indigo-600); text-decoration: none; }
a:hover { color: var(--indigo-700); }

::selection { background: var(--indigo-100); color: var(--indigo-800); }

/* Numbers align properly in stat blocks */
.stat-value, .font-monospace, .qr-countdown { font-variant-numeric: tabular-nums; }

/* ---------- Motion ---------- */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(.9); }
  60%  { transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  100% { background-position: 200% 0; }
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5,150,105,.5); }
  70%      { box-shadow: 0 0 0 7px rgba(5,150,105,0); }
}
@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.rise-in { animation: riseIn .45s var(--ease-out) both; }

/* Stagger children — used on card grids so a list doesn't all slam in at once */
.stagger > * { animation: riseIn .45s var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .10s; }
.stagger > *:nth-child(4) { animation-delay: .14s; }
.stagger > *:nth-child(5) { animation-delay: .18s; }
.stagger > *:nth-child(6) { animation-delay: .22s; }
.stagger > *:nth-child(7) { animation-delay: .26s; }
.stagger > *:nth-child(8) { animation-delay: .30s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================================================
   App shell — dark gradient sidebar (desktop/tablet), bottom tabs (phone)
   ========================================================================== */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

@media (min-width: 768px) { .app-shell { flex-direction: row; } }

/* ---- Sidebar ---- */

.app-sidebar { display: none; }

@media (min-width: 768px) {
  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: 252px;
    flex: 0 0 252px;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.4rem 1rem;
    background: linear-gradient(170deg, #1e1b4b 0%, #312e81 55%, #3b1d6e 100%);
    color: #fff;
    box-shadow: 4px 0 24px -12px rgba(30,27,75,.5);
    z-index: 1040;
  }

  /* faint texture so the panel isn't a dead flat fill */
  .app-sidebar::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
  }
  .app-sidebar > * { position: relative; }

  .app-sidebar .sidebar-brand { margin-bottom: 1.6rem; padding: 0 .35rem; }
  .app-sidebar nav { display: flex; flex-direction: column; gap: .25rem; }
}

.brand-mark {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 800; font-size: 1.02rem;
  color: #fff !important;
  letter-spacing: -0.02em;
}

.brand-mark .brand-badge {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--g-amber);
  color: #3b2606;
  font-size: 1.05rem;
  box-shadow: 0 6px 16px -6px rgba(245,158,11,.8);
}

.app-sidebar .nav-link {
  color: rgba(255,255,255,.72);
  border-radius: var(--r-md);
  padding: .68rem .85rem;
  font-weight: 600;
  font-size: .9rem;
  display: flex; align-items: center; gap: .7rem;
  position: relative;
  transition: background .18s var(--ease-out), color .18s var(--ease-out), transform .18s var(--ease-out);
}

.app-sidebar .nav-link i { font-size: 1.08rem; width: 1.25rem; text-align: center; }

.app-sidebar .nav-link:hover {
  background: rgba(255,255,255,.09);
  color: #fff;
  transform: translateX(2px);
}

.app-sidebar .nav-link.active {
  background: rgba(255,255,255,.14);
  color: #fff;
  box-shadow: var(--sh-inner-top);
}

/* active accent bar */
.app-sidebar .nav-link.active::before {
  content: "";
  position: absolute; left: -1rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--g-amber);
}

/* ---- Right column ---- */

.app-column { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.app-bar {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--ink-200);
  padding: .8rem 1rem;
  padding-top: calc(.8rem + env(safe-area-inset-top));
  display: flex; align-items: center; gap: .75rem;
}

@media (min-width: 768px) { .app-bar { padding: 1rem 2rem; } }

.app-bar .app-bar-title { font-weight: 800; font-size: 1.08rem; flex: 1; letter-spacing: -0.02em; }

.app-bar .app-bar-icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--ink-100);
  color: var(--ink-700);
  border: none; font-size: 1.1rem;
  transition: background .18s var(--ease-out), transform .12s var(--ease-out);
}
.app-bar .app-bar-icon-btn:hover { background: var(--ink-200); }
.app-bar .app-bar-icon-btn:active { transform: scale(.94); }

.app-main {
  flex: 1; width: 100%;
  padding: 1.15rem;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
  .app-main { max-width: 1240px; margin: 0 auto; padding: 1.9rem 2rem; }
}

/* ---- Bottom tabs (phone) ---- */

.app-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--ink-200);
  box-shadow: 0 -6px 24px -8px rgba(15,16,36,.12);
  display: flex; z-index: 1030;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 768px) { .app-bottom-nav { display: none; } }

.app-bottom-nav .tab-link {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .2rem;
  padding: .6rem .25rem .55rem;
  color: var(--ink-400);
  font-size: .68rem; font-weight: 700;
  min-height: 58px;
  position: relative;
  transition: color .18s var(--ease-out);
}

.app-bottom-nav .tab-link i { font-size: 1.32rem; transition: transform .22s var(--ease-out); }
.app-bottom-nav .tab-link.active { color: var(--indigo-600); }
.app-bottom-nav .tab-link.active i { transform: translateY(-2px); }

.app-bottom-nav .tab-link.active::after {
  content: "";
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--g-brand);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.surface-card {
  background: var(--surface-card);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: box-shadow .25s var(--ease-out);
}

.surface-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--ink-100);
  font-weight: 700;
  font-size: .95rem;
  padding: 1rem 1.25rem;
  letter-spacing: -0.01em;
}

.surface-card .card-body { padding: 1.25rem; }

/* Entity card — the workhorse for every list in the app */
.entity-card {
  background: var(--surface-card);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 1.15rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s var(--ease-out);
}

/* gradient hairline along the top edge, revealed on hover */
.entity-card::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--g-brand);
  opacity: 0;
  transition: opacity .25s var(--ease-out);
}

.entity-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
  border-color: var(--indigo-100);
}
.entity-card:hover::after { opacity: 1; }

/* ---- Stat cards ---- */

.stat-card {
  border-radius: var(--r-lg);
  padding: 1.15rem 1.2rem;
  background: var(--surface-card);
  border: 1px solid var(--ink-200);
  box-shadow: var(--sh-1);
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}

.stat-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120px 80px at 100% 0%, rgba(99,102,241,.10), transparent 70%);
  pointer-events: none;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }

.stat-card .stat-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 1.2rem;
  margin-bottom: .75rem;
  color: #fff;
  box-shadow: var(--sh-1);
}

.stat-card .stat-value {
  font-size: 1.85rem; font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em;
}
.stat-card .stat-label { color: var(--ink-500); font-size: .8rem; font-weight: 600; margin-top: .15rem; }

/* Solid gradient icon tiles — much richer than the old flat tints */
.icon-tint-brand   { background: var(--g-brand); }
.icon-tint-success { background: var(--g-success); }
.icon-tint-warning { background: var(--g-amber); color: #3b2606 !important; }
.icon-tint-danger  { background: var(--g-danger); }
.icon-tint-info    { background: linear-gradient(135deg, #38bdf8, #0284c7); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  border-radius: var(--r-md);
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: transform .14s var(--ease-out), box-shadow .22s var(--ease-out), background .2s var(--ease-out), filter .2s var(--ease-out);
}

.btn:active { transform: translateY(1px) scale(.99); }

.btn-brand {
  background: var(--g-brand);
  border: none;
  color: #fff;
  box-shadow: var(--sh-brand);
}
.btn-brand:hover { color: #fff; filter: brightness(1.07); box-shadow: 0 12px 28px -8px rgba(79,70,229,.62); }
.btn-brand:disabled { opacity: .55; box-shadow: none; }

.btn-accent {
  background: var(--g-amber);
  border: none;
  color: #3b2606;
  box-shadow: 0 8px 22px -8px rgba(245,158,11,.75);
}
.btn-accent:hover { filter: brightness(1.06); color: #3b2606; }

.btn-outline-primary { border-color: var(--indigo-100); color: var(--indigo-600); }
.btn-outline-primary:hover, .btn-outline-primary:focus { background: var(--indigo-600); border-color: var(--indigo-600); color: #fff; }

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  border-radius: 999px;
  padding: .36em .75em;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .01em;
}

.badge-soft-success { background: var(--success-bg); color: #047857; }
.badge-soft-danger  { background: var(--danger-bg);  color: #be123c; }
.badge-soft-warning { background: var(--warning-bg); color: #b45309; }
.badge-soft-brand   { background: var(--indigo-50);  color: var(--indigo-700); }
.badge-soft-info    { background: var(--info-bg);    color: #0369a1; }
.badge-soft-muted   { background: var(--ink-100);    color: var(--ink-500); }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control, .form-select {
  border-radius: var(--r-md);
  border-color: var(--ink-200);
  padding: .62rem .9rem;
  background-color: #fcfcff;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out);
}

.form-control:focus, .form-select:focus {
  border-color: var(--indigo-500);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,.13);
}

.form-control::placeholder { color: var(--ink-400); }

/* Native number-input spinner arrows appear on hover and clash with our
   own +/- stepper buttons (see the scanner quantity picker) - hide them. */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.form-label { font-weight: 700; font-size: .82rem; color: var(--ink-700); margin-bottom: .35rem; }

.form-label.required::after { content: " *"; color: var(--danger); font-weight: 800; }

.input-group-text { border-radius: var(--r-md); border-color: var(--ink-200); color: var(--ink-500); }

.form-switch .form-check-input:checked { background-color: var(--indigo-600); border-color: var(--indigo-600); }

/* ==========================================================================
   Progress bars
   ========================================================================== */

.allocation-progress {
  height: 9px;
  border-radius: 999px;
  background: var(--ink-100);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15,16,36,.07);
}

.allocation-progress .bar {
  height: 100%;
  border-radius: 999px;
  background: var(--g-brand);
  transform-origin: left center;
  animation: barGrow .7s var(--ease-out) both;
  position: relative;
  overflow: hidden;
}

/* moving sheen so a full bar reads as "live", not static */
.allocation-progress .bar::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  background-size: 200% 100%;
  animation: shimmer 2.4s linear infinite;
}

.allocation-progress .bar.is-full { background: var(--g-amber); }

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline-item { display: flex; gap: .8rem; padding-bottom: 1.15rem; position: relative; }

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute; left: 17px; top: 36px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--ink-200), transparent);
}

.timeline-item .timeline-dot {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .95rem;
  color: #fff;
  z-index: 1;
  box-shadow: var(--sh-1);
}

/* ==========================================================================
   Auth
   ========================================================================== */

.auth-shell {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(124,58,237,.5), transparent 60%),
    radial-gradient(800px 480px at 110% 10%, rgba(219,39,119,.42), transparent 60%),
    linear-gradient(160deg, #1e1b4b, #312e81 60%, #3b1d6e);
}

.auth-card {
  width: 100%; max-width: 410px;
  background: rgba(255,255,255,.97);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 70px -20px rgba(10,8,30,.65);
  padding: 2.25rem;
  animation: riseIn .5s var(--ease-out) both;
}

.auth-card .brand-badge { color: #3b2606; }

/* ==========================================================================
   Digital pass (customer-facing — the most decorative surface)
   ========================================================================== */

.pass-screen {
  min-height: 100vh;
  padding: 2rem 1rem 3rem;
  display: flex; justify-content: center;
  background:
    radial-gradient(700px 340px at 12% 0%,  rgba(219,39,119,.36), transparent 62%),
    radial-gradient(760px 380px at 100% 16%, rgba(124,58,237,.42), transparent 62%),
    radial-gradient(600px 400px at 50% 108%, rgba(245,158,11,.18), transparent 60%),
    #120726;
}

.ticket {
  max-width: 420px; width: 100%; margin: 0 auto;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 36px 70px -22px rgba(0,0,0,.62);
  height: fit-content;
  animation: riseIn .55s var(--ease-out) both;
}

.ticket-header {
  background: var(--g-festive);
  color: #fff;
  padding: 1.8rem 1.5rem 2.6rem;
  position: relative;
  overflow: hidden;
}

.ticket-header::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.2) 1.5px, transparent 1.5px);
  background-size: 17px 17px;
  opacity: .55;
}

/* warm glow in the corner so the header has a light source */
.ticket-header::after {
  content: "";
  position: absolute; top: -40%; right: -20%;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(251,191,36,.42), transparent 62%);
}

.ticket-header > * { position: relative; z-index: 1; }

.ticket-header .event-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.34);
  padding: .24rem .7rem;
  border-radius: 999px;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  margin-bottom: .65rem;
  backdrop-filter: blur(4px);
}

.ticket-header .event-name { font-weight: 800; font-size: 1.38rem; letter-spacing: -0.025em; }
.ticket-header .event-meta { font-size: .85rem; opacity: .93; }

.ticket-notch { position: relative; height: 0; }
.ticket-notch::before, .ticket-notch::after {
  content: "";
  position: absolute; top: -15px;
  width: 30px; height: 30px;
  background: #120726;
  border-radius: 50%;
}
.ticket-notch::before { left: -15px; }
.ticket-notch::after  { right: -15px; }

.ticket-perforation {
  border-top: 2px dashed var(--ink-200);
  margin: 0 1.4rem;
}

.ticket-body { padding: 1.8rem 1.5rem; text-align: center; }

.qr-frame {
  display: inline-block;
  padding: 1.15rem;
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  animation: popIn .45s var(--ease-out) both;
}

.qr-locked-wrap { position: relative; width: 212px; height: 212px; margin: 0 auto; }

.qr-locked {
  width: 212px; height: 212px;
  border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #f2eefd, #f2eefd 10px, #e8e0fb 10px, #e8e0fb 20px);
  color: #7c3aed;
  filter: blur(1px);
}

.qr-locked-badge {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem;
  border-radius: var(--r-lg);
  background: rgba(18,7,38,.62);
  backdrop-filter: blur(3px);
  color: #fff;
}

.qr-countdown {
  font-weight: 800; font-size: 1.45rem; letter-spacing: .04em;
  color: var(--amber-400);
}

.pass-security-note {
  font-size: .78rem; color: var(--ink-500);
  display: flex; align-items: center; justify-content: center; gap: .35rem;
  margin-top: .95rem;
}

.pass-status-hero {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1.3rem 0;
  animation: popIn .45s var(--ease-out) both;
}

.pass-status-hero .status-icon {
  width: 78px; height: 78px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 2.1rem; color: #fff;
}

.pass-status-hero.is-success .status-icon { background: var(--g-success); box-shadow: 0 14px 30px -10px rgba(5,150,105,.7); }
.pass-status-hero.is-error   .status-icon { background: var(--g-danger);  box-shadow: 0 14px 30px -10px rgba(225,29,72,.7); }

.pass-status-hero .status-title { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }

/* ==========================================================================
   Scanner (operational — visibility over decoration)
   ========================================================================== */

.scanner-shell {
  min-height: 100vh;
  background: radial-gradient(800px 400px at 50% -10%, rgba(99,102,241,.16), transparent 60%), #080a15;
  color: #fff;
  display: flex; flex-direction: column;
}

.scanner-shell .scanner-topbar {
  padding: .95rem 1.1rem;
  padding-top: calc(.95rem + env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.045);
  border-bottom: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(10px);
}

.scanner-shell .connection-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #34d399; display: inline-block;
  animation: livePulse 2.2s ease-out infinite;
}

.scanner-frame {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  background: #000;
  position: relative;
  box-shadow: 0 24px 50px -18px rgba(0,0,0,.8);
}

/* corner brackets over the camera feed */
.scanner-frame::before, .scanner-frame::after {
  content: "";
  position: absolute;
  width: 34px; height: 34px;
  border: 3px solid var(--amber-400);
  z-index: 5; pointer-events: none;
}
.scanner-frame::before { top: 14px; left: 14px;  border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.scanner-frame::after  { bottom: 14px; right: 14px; border-left: none;  border-top: none;    border-radius: 0 0 8px 0; }

.scanner-status-banner { border-radius: var(--r-md); padding: .9rem 1.1rem; font-weight: 700; }

.scan-result-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .55rem; padding: 2rem; text-align: center; color: #fff;
  animation: popIn .32s var(--ease-out) both;
}

.scan-result-overlay.result-allowed  { background: linear-gradient(160deg, #059669, #064e3b); }
.scan-result-overlay.result-rejected { background: linear-gradient(160deg, #e11d48, #6b0f2a); }

.scan-result-overlay .result-icon { font-size: 5rem; line-height: 1; }
.scan-result-overlay .result-title { font-weight: 800; font-size: 1.75rem; letter-spacing: .01em; }
.scan-result-overlay .result-detail { opacity: .93; }

.scan-history-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.scan-history-item:last-child { border-bottom: none; }

/* Dark-surface form controls inside the scanner */
.scanner-shell .form-control {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.16);
  color: #000;
}
.scanner-shell .form-control::placeholder { color: rgba(255,255,255,.45); }
.scanner-shell .form-control:focus {
  background: rgba(255,255,255,.12);
  border-color: var(--amber-400);
  box-shadow: 0 0 0 4px rgba(251,191,36,.16);
  color: #000;
}

/* ==========================================================================
   Misc
   ========================================================================== */

.page-title { font-weight: 800; letter-spacing: -0.025em; }
.text-muted-soft { color: var(--ink-500); }

.empty-state { padding: 3rem 1rem; text-align: center; color: var(--ink-500); }
.empty-state i {
  font-size: 2.4rem; display: block; margin-bottom: .6rem;
  background: var(--g-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: .8;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--ink-100) 25%, #f7f8fd 37%, var(--ink-100) 63%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  border-radius: var(--r-sm);
}

/* Thumb-friendly targets on every platform */
.app-shell .btn { min-height: 44px; }
.app-shell .form-control, .app-shell .form-select { min-height: 44px; }
.app-shell .btn-sm { min-height: 36px; padding-inline: .8rem; }

.modal-content { border-radius: var(--r-xl); border: none; box-shadow: var(--sh-3); }

/* Bootstrap pagination recolour */
.page-link { color: var(--indigo-600); border-radius: var(--r-sm) !important; margin: 0 2px; border-color: var(--ink-200); }
.page-item.active .page-link { background: var(--g-brand); border-color: transparent; }