/* ============================================================
   VERSUS Queue — Design System v2.0
   Dark-mode gaming aesthetic · Glassmorphism · Neon accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ----- Tokens ----- */
:root {
  color-scheme: dark;

  /* Base palette */
  --bg: #0a0e17;
  --bg-strong: #0d1220;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-solid: #111827;
  --surface-hover: rgba(255, 255, 255, 0.07);
  --surface-soft: rgba(255, 255, 255, 0.025);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);

  /* Text */
  --text: #e8ecf4;
  --text-strong: #ffffff;
  --muted: #7b8ba5;
  --muted-strong: #9aa8bd;

  /* Borders */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-glow: rgba(14, 246, 204, 0.18);

  /* Brand accents */
  --primary: #0ef6cc;
  --primary-strong: #08d4af;
  --primary-soft: rgba(14, 246, 204, 0.1);
  --primary-glow: rgba(14, 246, 204, 0.35);
  --hot: #e642a1;
  --hot-soft: rgba(230, 66, 161, 0.12);
  --hot-glow: rgba(230, 66, 161, 0.35);
  --violet: #7c3aed;
  --violet-soft: rgba(124, 58, 237, 0.12);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.12);

  /* Semantic */
  --danger: #f43f5e;
  --danger-soft: rgba(244, 63, 94, 0.12);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.1);
  --ink: #0f172a;

  /* Effects */
  --shadow-sm: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow-cyan: 0 0 30px rgba(14, 246, 204, 0.15);
  --shadow-glow-pink: 0 0 30px rgba(230, 66, 161, 0.15);
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Typography */
  --font-heading: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle grid pattern background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(14, 246, 204, 0.04), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(230, 66, 161, 0.03), transparent),
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255,255,255,0.015) 59px, rgba(255,255,255,0.015) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255,255,255,0.015) 59px, rgba(255,255,255,0.015) 60px);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text-strong);
}

h1 {
  margin-bottom: 8px;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: 16px;
  font-weight: 700;
}

.lead {
  max-width: 620px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.6;
}

.muted { color: var(--muted); }
.block { display: block; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 23, 0.85);
  color: var(--text);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--glass);
  overflow: hidden;
  transition: box-shadow 300ms ease;
}

.brand-mark:hover {
  box-shadow: var(--shadow-glow-cyan);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-strong);
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.mobile-logout-form {
  display: none;
  margin: 0;
}

.mobile-logout-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0;
  background: var(--glass);
  color: var(--text-strong);
  cursor: pointer;
}

.mobile-logout-button:hover,
.mobile-logout-button:focus-visible {
  border-color: rgba(244, 63, 94, 0.45);
  background: var(--danger-soft);
  color: var(--danger);
}

.language-switcher {
  display: inline-grid;
  grid-template-columns: repeat(2, 36px);
  gap: 3px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 3px;
  background: var(--glass);
}

.language-switcher a {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 7px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.language-switcher a:hover,
.language-switcher a.is-active {
  background: var(--primary);
  color: var(--ink);
  box-shadow: 0 0 14px rgba(14, 246, 204, 0.2);
}

.button svg,
.hero-button svg {
  flex: 0 0 auto;
  margin: 0 8px 0 0 !important;
}

[dir="rtl"] body {
  font-family: 'Noto Kufi Arabic', Tahoma, Arial, sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
  font-family: 'Noto Kufi Arabic', Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  line-height: 1.35;
}

[dir="rtl"] .hero-copy,
[dir="rtl"] .lead {
  line-height: 1.95;
}

[dir="rtl"] .button svg,
[dir="rtl"] .hero-button svg {
  margin: 0 0 0 8px !important;
}

/* Hero inline offset now uses logical margin-inline-start, so it flips
   automatically for RTL — no physical-margin override needed. */

[dir="rtl"] .modal-close {
  right: auto;
  left: 12px;
}

[dir="rtl"] .login-modal h2,
[dir="rtl"] .join-modal h2 {
  padding-right: 0;
  padding-left: 34px;
}

[dir="rtl"] input[type="tel"],
[dir="rtl"] .phone-preview {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .choice-group input,
[dir="rtl"] .checkbox-row input {
  margin: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 7px 14px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 600;
  transition: all 200ms ease;
}

.nav-link:hover {
  border-color: var(--line-strong);
  background: var(--glass);
  color: var(--text-strong);
}

.nav-link.is-active {
  border-color: rgba(14, 246, 204, 0.25);
  background: var(--primary-soft);
  color: var(--primary);
}

.link-button {
  background: transparent;
  cursor: pointer;
}

/* ============================================================
   PAGE SHELLS
   ============================================================ */
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.page-shell.landing-shell {
  width: 100%;
  margin-top: 0;
}

.page-shell.admin-login-shell {
  width: 100%;
  margin: 0;
}

.page-shell.admin-shell {
  /* admin pages get slightly more width */
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: #ffffff;
  opacity: 1;
  transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1), visibility 600ms;
}

.splash-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(14, 246, 204, 0.12), transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(230, 66, 161, 0.08), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(124, 58, 237, 0.06), transparent 40%);
  animation: splashBgPulse 3s ease-in-out infinite alternate;
}

.splash-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.splash-card {
  position: relative;
  display: grid;
  place-items: center;
  gap: 16px;
  animation: splashRise 800ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.splash-card img {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 0 60px rgba(14, 246, 204, 0.3), 0 0 120px rgba(230, 66, 161, 0.15);
  animation: splashLogoPulse 2s ease-in-out infinite;
}

/* Pulse ring around logo */
.splash-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 130px;
  margin-top: -73px;
  margin-left: -65px;
  border: 2px solid rgba(14, 246, 204, 0.3);
  border-radius: 50%;
  animation: splashRingExpand 2s ease-out infinite;
}

.splash-ring:nth-child(2) {
  animation-delay: 0.6s;
}

.splash-card span {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary), var(--hot));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-card small {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@keyframes splashRise {
  0% { opacity: 0; transform: translateY(24px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes splashLogoPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(14, 246, 204, 0.25), 0 0 80px rgba(230, 66, 161, 0.1); }
  50% { box-shadow: 0 0 60px rgba(14, 246, 204, 0.4), 0 0 120px rgba(230, 66, 161, 0.2); }
}

@keyframes splashRingExpand {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes splashBgPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* ============================================================
   MOBILE TABBAR
   ============================================================ */
.mobile-tabbar {
  display: none;
}

/* ============================================================
   PAGE HEADINGS
   ============================================================ */
.page-heading,
.queue-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.queue-hero {
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: linear-gradient(135deg, rgba(14, 246, 204, 0.06), rgba(230, 66, 161, 0.04)), var(--surface);
  box-shadow: var(--shadow-sm);
}

.queue-stat {
  display: grid;
  min-width: 170px;
  border-radius: var(--radius);
  padding: 16px;
  background: var(--glass-strong);
  border: 1px solid var(--line-strong);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.queue-stat strong {
  font-family: var(--font-heading);
  font-size: 42px;
  line-height: 1;
  color: var(--primary);
}

.queue-stat span { font-weight: 700; }
.queue-stat small { color: var(--muted); }

/* ============================================================
   HERO — LANDING (login.php)
   ============================================================ */
.landing-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(760px, calc(100vh - 118px));
  overflow: hidden;
  background: var(--bg);
  color: #ffffff;
  isolation: isolate;
}

/* Animated gradient mesh background */
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("gaming-lounge-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
  animation: heroDrift 20s ease-in-out infinite alternate;
  filter: brightness(0.5) saturate(1.3);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 14, 23, 0.97) 0%, rgba(10, 14, 23, 0.82) 40%, rgba(10, 14, 23, 0.4) 100%),
    linear-gradient(180deg, rgba(10, 14, 23, 0.2) 0%, rgba(10, 14, 23, 0.9) 100%);
}

/* Neon line at bottom of hero */
.landing-hero::after {
  content: "";
  position: absolute;
  inset: auto 8% 0 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--hot), transparent);
  filter: blur(0.5px);
  box-shadow: 0 0 20px rgba(14, 246, 204, 0.3);
}

.hero-content {
  width: min(720px, calc(100% - 36px));
  margin-inline-start: max(18px, calc((100vw - 1180px) / 2));
  padding: min(7vw, 72px) 18px;
  animation: contentIn 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 14px 8px 8px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: box-shadow 400ms ease;
}

.hero-brand-lockup:hover {
  box-shadow: var(--shadow-glow-cyan);
}

.hero-brand-lockup img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.hero-brand-lockup span {
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-hero h1 {
  max-width: 760px;
  margin-bottom: 18px;
  color: #ffffff;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero-copy {
  max-width: 600px;
  margin-bottom: 28px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions,
.hero-metrics,
.welcome-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero CTA buttons */
.hero-button {
  min-height: 50px;
  border: 1px solid rgba(14, 246, 204, 0.3);
  border-radius: var(--radius);
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--primary), #08d4af);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 8px 32px rgba(14, 246, 204, 0.2), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(14, 246, 204, 0.3), 0 6px 20px rgba(14, 246, 204, 0.15);
}

.hero-button.ghost {
  background: var(--glass);
  border-color: var(--line-strong);
  color: var(--text-strong);
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hero-button.ghost:hover {
  background: var(--glass-strong);
  border-color: rgba(14, 246, 204, 0.3);
  box-shadow: var(--shadow-glow-cyan);
}

.hero-button:disabled,
.hero-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.48;
  filter: saturate(0.55);
  box-shadow: none;
  transform: none;
}

.cafe-live-status {
  display: grid;
  width: min(100%, 650px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.cafe-live-status.is-compact {
  width: 100%;
  margin: 0 0 18px;
}

.cafe-status-card {
  position: relative;
  display: grid;
  min-height: 94px;
  grid-template-columns: 42px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  background: rgba(11, 17, 29, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms ease;
}

.cafe-status-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--status-color, #f6bd3b);
  content: "";
}

[dir="rtl"] .cafe-status-card::before {
  inset: 0 0 0 auto;
}

.cafe-status-card:hover {
  transform: translateY(-2px);
  border-color: var(--status-color, #f6bd3b);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.cafe-status-card.state-available,
.cafe-status-card.state-enabled {
  --status-color: #28f3a0;
  border-color: rgba(40, 243, 160, 0.28);
}

.cafe-status-card.state-full,
.cafe-status-card.state-disabled {
  --status-color: #ff4f72;
  border-color: rgba(255, 79, 114, 0.3);
}

.cafe-status-card.state-syncing,
.cafe-status-card.state-unknown {
  --status-color: #f6bd3b;
  border-color: rgba(246, 189, 59, 0.3);
}

[data-outside-status-card] {
  grid-template-columns: 42px minmax(0, 1fr) 30px;
}

.cafe-status-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(246, 189, 59, 0.32);
  border-radius: 8px;
  background: rgba(246, 189, 59, 0.08);
  color: var(--status-color, #f6bd3b);
}

.state-available .cafe-status-icon,
.state-enabled .cafe-status-icon {
  border-color: rgba(40, 243, 160, 0.32);
  background: rgba(40, 243, 160, 0.08);
}

.state-full .cafe-status-icon,
.state-disabled .cafe-status-icon {
  border-color: rgba(255, 79, 114, 0.32);
  background: rgba(255, 79, 114, 0.08);
}

.cafe-status-icon svg {
  width: 22px;
  height: 22px;
}

.cafe-status-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.cafe-status-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cafe-status-copy strong {
  color: var(--text-strong);
  font-family: var(--font-heading);
  font-size: 15px;
  line-height: 1.25;
}

.cafe-status-copy > span {
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.35;
}

.cafe-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--status-color, #f6bd3b);
  box-shadow: 0 0 12px var(--status-color, #f6bd3b);
}

.cafe-status-side {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.outside-portal-link {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(40, 243, 160, 0.42);
  border-radius: 7px;
  background: rgba(40, 243, 160, 0.09);
  color: var(--status-color, #28f3a0);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.outside-portal-link[hidden] {
  display: none;
}

.outside-portal-link:hover,
.outside-portal-link:focus-visible {
  border-color: var(--status-color, #28f3a0);
  background: rgba(40, 243, 160, 0.17);
  outline: none;
  transform: translateY(-1px);
}

.outside-portal-link svg {
  width: 15px;
  height: 15px;
}

.state-syncing .cafe-status-dot {
  animation: statusPulse 1.2s ease-in-out infinite;
}

.join-availability-message {
  width: min(100%, 650px);
  margin: 10px 0 0;
  border-inline-start: 3px solid #f6bd3b;
  padding: 8px 11px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
  background: rgba(246, 189, 59, 0.07);
}

.join-stage > .join-availability-message {
  width: 100%;
  margin: -8px 0 18px;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Hero metric cards */
.hero-metrics {
  margin-top: 36px;
}

.hero-metrics div {
  min-width: 128px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 300ms ease;
}

.hero-metrics div:hover {
  border-color: rgba(14, 246, 204, 0.25);
  box-shadow: var(--shadow-glow-cyan);
}

.hero-metrics strong {
  display: block;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.scroll-cue {
  position: absolute;
  right: 28px;
  bottom: 24px;
  width: 30px;
  height: 48px;
  border: 1.5px solid rgba(14, 246, 204, 0.4);
  border-radius: 15px;
}

.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateX(-50%);
  animation: scrollDot 1.6s ease-in-out infinite;
  box-shadow: 0 0 8px var(--primary);
}

/* How-it-works strip */
.welcome-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: center;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.landing-shell .welcome-strip,
.landing-shell .landing-queue {
  width: min(1180px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.welcome-strip h2 {
  max-width: 620px;
  margin-bottom: 0;
  font-size: 26px;
}

.welcome-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: end;
  gap: 10px;
}

.welcome-step {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--glass);
  color: var(--text-strong);
  font-weight: 700;
  font-size: 12px;
  transition: border-color 280ms ease, background 280ms ease, color 280ms ease, box-shadow 280ms ease, transform 280ms ease;
}

.welcome-step-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(10, 14, 23, 0.52);
  color: var(--muted-strong);
  transition: inherit;
}

.welcome-step-icon svg {
  width: 18px;
  height: 18px;
}

.welcome-step-copy {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.welcome-step-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.welcome-step:hover,
.welcome-step.is-active {
  border-color: rgba(14, 246, 204, 0.3);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-3px);
}

.welcome-step.is-active .welcome-step-icon {
  border-color: rgba(14, 246, 204, 0.48);
  background: var(--primary);
  color: var(--ink);
  box-shadow: 0 0 20px rgba(14, 246, 204, 0.32);
  animation: stepIconPulse 1.15s ease-in-out;
}

.welcome-step.is-active .welcome-step-copy small {
  color: var(--primary);
}

[dir="rtl"] .welcome-steps {
  direction: rtl;
}

.landing-queue {
  scroll-margin-top: 90px;
}

/* ============================================================
   ANIMATIONS — Hero
   ============================================================ */
@keyframes heroDrift {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-12px, -8px, 0); }
}

@keyframes contentIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollDot {
  0% { opacity: 0; transform: translate(-50%, 0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 20px); }
}

/* ============================================================
   PANELS & CARDS
   ============================================================ */
.panel,
.table-panel,
.feature-panel,
.step-card,
.active-ticket {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.panel {
  padding: 28px;
}

.panel.narrow {
  width: min(460px, 100%);
  margin: 42px auto;
}

.panel.wide {
  width: min(920px, 100%);
}

.auth-card {
  box-shadow: var(--shadow-md);
}

.feature-panel {
  min-height: 420px;
  padding: 28px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(14, 246, 204, 0.06), rgba(10, 14, 23, 0.95));
  border-color: var(--line-glow);
}

.feature-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feature-kicker { color: var(--primary); }

.feature-panel h2 {
  max-width: 420px;
  color: var(--text-strong);
  font-size: 32px;
  line-height: 1.08;
}

.feature-panel p {
  max-width: 420px;
  color: var(--muted-strong);
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 26px 0;
}

.feature-list span {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 11px 14px;
  background: var(--glass);
  color: var(--text-strong);
  font-weight: 700;
}

/* ============================================================
   STEP CARDS (for joining flow)
   ============================================================ */
.flow-stack {
  display: grid;
  gap: 16px;
}

.step-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.step-card.needs-action {
  border-color: rgba(245, 158, 11, 0.3);
  background: var(--amber-soft);
}

.step-card.is-complete {
  border-color: rgba(16, 185, 129, 0.3);
}

.step-card.is-muted {
  background: var(--surface-soft);
}

.step-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #08d4af);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 900;
}

.step-content { min-width: 0; }

/* ============================================================
   ACTIVE TICKET
   ============================================================ */
.active-ticket {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(14, 246, 204, 0.06), var(--surface));
  border-color: var(--line-glow);
}

.active-ticket > strong {
  font-family: var(--font-heading);
  font-size: 56px;
  line-height: 0.95;
  color: var(--primary);
}

.ticket-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   TABLE PANELS
   ============================================================ */
.table-panel {
  overflow: hidden;
}

.queue-panel,
.queue-side-panel,
.logs-panel,
.admin-board {
  margin-bottom: 22px;
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.table-tools h2,
.table-tools p { margin: 0; }

.notification-job-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.table-subtitle {
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   PILLS & STATUS BADGES
   ============================================================ */
.meta-pill,
.status,
.confirmed-badge,
.required-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.meta-pill {
  border: 1px solid var(--line-strong);
  background: var(--glass);
  color: var(--muted-strong);
}

.status {
  background: var(--glass-strong);
  color: var(--text);
}

.status-active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-called {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-seated,
.status-completed {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-skipped,
.status-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.confirmed-badge {
  background: var(--success-soft);
  color: var(--success);
}

.required-note {
  background: var(--amber-soft);
  color: var(--amber);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-stack {
  display: grid;
  gap: 16px;
}

.compact-form { gap: 12px; }

label, fieldset {
  display: grid;
  gap: 7px;
}

fieldset {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface-soft);
}

legend, label span {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-strong);
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
}

input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 246, 204, 0.1), 0 0 20px rgba(14, 246, 204, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

textarea { resize: vertical; }

.choice-group { gap: 10px; }

.choice-group label,
.checkbox-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.choice-group label:hover,
.checkbox-row:hover {
  border-color: rgba(14, 246, 204, 0.3);
  background: var(--primary-soft);
}

.choice-group input,
.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.rules-box {
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--amber-soft);
}

.rules-box h3 {
  margin-bottom: 8px;
  color: var(--amber);
}

.rules-box ol {
  margin: 0;
  padding-left: 21px;
  color: var(--muted-strong);
}

.summary-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.summary-list dt { color: var(--muted); }

.summary-list dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
  color: var(--text-strong);
}

.inline-actions,
.button-row,
.button-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 18px;
  background: var(--glass-strong);
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), #08d4af);
  color: var(--ink);
  border-color: rgba(14, 246, 204, 0.3);
}

.button.primary:hover {
  box-shadow: 0 8px 32px rgba(14, 246, 204, 0.25);
}

.button.secondary {
  border-color: var(--line-strong);
  background: var(--glass);
}

.button.secondary:hover {
  border-color: rgba(14, 246, 204, 0.2);
  background: var(--primary-soft);
}

.button.secondary.inverted {
  border-color: var(--line-strong);
  background: var(--glass);
  color: var(--text-strong);
}

.button.danger {
  background: linear-gradient(135deg, var(--danger), #e11d48);
  color: #ffffff;
  border-color: rgba(244, 63, 94, 0.3);
}

.button.danger:hover {
  box-shadow: 0 8px 32px rgba(244, 63, 94, 0.25);
}

.button.warning {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.2);
}

.button.tiny {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.full-width { width: 100%; }

.login-actions {
  display: grid;
  gap: 10px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

/* ============================================================
   QUEUE TABLE
   ============================================================ */
.queue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.queue-table th,
.queue-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.queue-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.queue-table tbody tr {
  transition: background 200ms ease;
}

.queue-table tbody tr:hover {
  background: var(--surface-hover);
}

.queue-table tbody tr.is-current-user {
  background: linear-gradient(90deg, rgba(14, 246, 204, 0.08), rgba(14, 246, 204, 0.015));
  box-shadow: inset 3px 0 0 var(--primary);
}

[dir="rtl"] .queue-table tbody tr.is-current-user {
  box-shadow: inset -3px 0 0 var(--primary);
}

.masked-username {
  display: inline-block;
  min-width: 76px;
  color: var(--muted-strong);
  letter-spacing: 0.16em;
  filter: blur(1.8px);
  user-select: none;
}

.queue-table.compact th,
.queue-table.compact td {
  padding: 11px 14px;
}

.position,
.mini-position {
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #08d4af);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 900;
  box-shadow: 0 0 16px rgba(14, 246, 204, 0.2);
}

.position {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.mini-position {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.responsive-table { overflow-x: auto; }

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-form input { min-width: 270px; }

.note-form {
  display: grid;
  gap: 7px;
  min-width: 190px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-panel {
  box-shadow: var(--shadow-md);
}

.confirm-modal {
  max-width: 460px;
  text-align: center;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.12);
}

.confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.admin-mobile-tabbar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-mobile-tabbar.is-manager {
  grid-template-columns: 1fr;
}

.joined-at {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.manager-accounts-panel {
  margin-top: 22px;
}

.manager-create-form {
  border-bottom: 1px solid var(--line);
  padding: 20px;
}

.manager-create-form > .button {
  width: fit-content;
}

.manager-table-wrap {
  border-top: 1px solid var(--line);
}

.manager-actions,
.manager-password-form {
  display: grid;
  gap: 8px;
}

.manager-actions {
  min-width: 220px;
}

.manager-actions > form:first-child .button {
  width: 100%;
}

.manager-password-form {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.manager-password-form .button {
  grid-column: 1 / -1;
}

/* ============================================================
   ALERTS / FLASH MESSAGES
   ============================================================ */
.alert {
  position: relative;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
  background: var(--surface);
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.alert.is-dismissing {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.alert-message {
  min-width: 0;
  overflow-wrap: anywhere;
}

.alert-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid currentColor;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}

.alert-close:hover,
.alert-close:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.alert-success {
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--success-soft);
  color: var(--success);
}

.alert-danger {
  border-color: rgba(244, 63, 94, 0.3);
  background: var(--danger-soft);
  color: var(--danger);
}

.alert-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: var(--amber-soft);
  color: var(--amber);
}

.landing-shell > .alert {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto;
}

.debug {
  max-height: 420px;
  overflow: auto;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.4);
  color: var(--primary);
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  border: 1px solid var(--line);
}

/* ============================================================
   SPLIT / AUTH LAYOUTS
   ============================================================ */
.split,
.auth-shell,
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.92fr);
  gap: 20px;
  align-items: start;
}

.auth-shell {
  min-height: calc(100vh - 180px);
  align-items: center;
}

/* ============================================================
   CLIENT HERO (login.php — Landing Page)
   ============================================================ */
body.modal-open {
  overflow: hidden;
}

.client-landing,
.join-stage {
  width: 100%;
}

.client-hero {
  position: relative;
  display: grid;
  min-height: min(820px, calc(100vh - 64px));
  align-items: center;
  overflow: hidden;
  background: var(--bg);
  color: #ffffff;
  isolation: isolate;
}

/* Gradient mesh background for client hero */
.client-hero .hero-backdrop {
  background-image: url("gaming-lounge-hero.png");
  background-position: center;
  background-size: cover;
  filter: brightness(0.4) saturate(1.4);
  animation: heroDrift 20s ease-in-out infinite alternate;
}

.client-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 14, 23, 0.97) 0%, rgba(10, 14, 23, 0.8) 45%, rgba(10, 14, 23, 0.35) 100%),
    linear-gradient(180deg, rgba(10, 14, 23, 0.1), rgba(10, 14, 23, 0.9));
}

/* Neon line at bottom */
.client-hero::after {
  content: "";
  position: absolute;
  inset: auto 8% 0 8%;
  height: 2px;
  z-index: 1;
  background: linear-gradient(90deg, transparent, var(--primary), var(--hot), transparent);
  box-shadow: 0 0 20px rgba(14, 246, 204, 0.25);
}

.client-hero-content {
  width: min(760px, calc(100% - 36px));
  margin-inline-start: max(18px, calc((100vw - 1180px) / 2));
  padding: min(7vw, 76px) 18px;
  animation: contentIn 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.versus-lockup {
  transform-origin: left center;
  animation: lockupPulse 3.5s ease-in-out infinite;
}

.client-hero h1 {
  max-width: 760px;
  margin-bottom: 20px;
  color: #ffffff;
  font-size: clamp(34px, 6.4vw, 68px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.landing-actions .button {
  min-width: 178px;
}

/* Welcome panel (below hero) */
.welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: -44px auto 22px;
  position: relative;
  z-index: 2;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: rgba(17, 24, 39, 0.85);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.welcome-panel h2 {
  max-width: 620px;
  margin-bottom: 8px;
  font-size: 26px;
}

.welcome-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

/* Queue panel reveal animation */
.client-queue-panel {
  transform: translateY(12px);
  opacity: 0;
}

.client-queue-panel.is-revealed {
  animation: queueReveal 450ms ease both;
}

.public-active-ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto;
}

.public-active-summary {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.public-active-summary > div {
  flex: 0 0 auto;
}

.public-active-summary > div > strong {
  display: block;
  margin-top: 4px;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 42px;
  line-height: 1;
}

.public-active-summary .summary-list {
  min-width: min(360px, 42vw);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 14, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: rgba(17, 24, 39, 0.95);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), var(--shadow-glow-cyan);
  animation: modalIn 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Gradient accent bar at top */
.modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--primary), var(--hot), var(--accent));
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--glass);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 200ms ease;
}

.modal-close:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-glow-cyan);
}

.modal-kicker {
  width: fit-content;
  margin-bottom: 12px;
  border: 1px solid rgba(14, 246, 204, 0.2);
  border-radius: 8px;
  padding: 5px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-modal h2,
.join-modal h2 {
  padding-right: 40px;
  font-size: 26px;
}

.join-modal {
  width: min(680px, 100%);
}

.phone-preview {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--glass);
  color: var(--text-strong);
  font-weight: 700;
}

.phone-preview.is-required {
  border-color: rgba(245, 158, 11, 0.3);
  background: var(--amber-soft);
  color: var(--amber);
}

.preference-cards {
  background: var(--surface-soft);
}

.themed-rules {
  border-color: rgba(230, 66, 161, 0.2);
  background: linear-gradient(135deg, rgba(230, 66, 161, 0.05), rgba(14, 246, 204, 0.05));
}

.themed-rules h3 {
  color: var(--hot);
}

.glow-button {
  box-shadow: 0 8px 28px rgba(14, 246, 204, 0.18);
}

.glow-button:hover {
  box-shadow: 0 12px 40px rgba(14, 246, 204, 0.28), 0 6px 20px rgba(230, 66, 161, 0.12);
}

/* ============================================================
   JOIN STAGE (waiting_list.php)
   ============================================================ */
.join-stage {
  display: grid;
  gap: 22px;
}

.join-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: 220px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(10, 14, 23, 0.94), rgba(10, 14, 23, 0.7)),
    url("gaming-lounge-hero.png") center / cover;
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.join-hero::after {
  content: "";
  position: absolute;
  inset: auto 10% 0 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--hot), transparent);
  box-shadow: 0 0 12px rgba(14, 246, 204, 0.2);
}

.join-hero h1,
.join-hero .lead {
  color: #ffffff;
}

.join-hero .lead { opacity: 0.8; }

.join-quick-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.customer-active-ticket,
.limit-panel {
  width: min(620px, 100%);
}

/* ============================================================
   ADMIN PAGES
   ============================================================ */
.admin-shell .panel.narrow {
  margin-top: 28px;
  background: rgba(17, 24, 39, 0.8);
  border-color: var(--line-strong);
}

.client-mobile-tabbar {
  grid-template-columns: repeat(2, 1fr);
}

.admin-mobile-tabbar {
  grid-template-columns: repeat(2, 1fr);
}

/* Admin login */
.admin-login-stage {
  width: 100%;
  min-height: calc(100dvh - 65px);
}

.admin-login-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 65px);
  overflow: hidden;
  border-radius: 0;
  background: var(--bg);
  isolation: isolate;
}

.admin-login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(10, 14, 23, 0.94), rgba(10, 14, 23, 0.7)),
    url("gaming-lounge-hero.png") center / cover;
  filter: brightness(0.5) saturate(1.2);
}

/* Neon line behind admin login */
.admin-login-hero::after {
  content: "";
  position: absolute;
  inset: auto 15% 30% 15%;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(14, 246, 204, 0.15), transparent);
}

.panel.narrow.admin-login-card {
  width: min(460px, calc(100% - 24px));
  margin: 12px;
  background: rgba(17, 24, 39, 0.9);
  border-color: var(--line-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.admin-lockup {
  display: flex;
  width: fit-content;
  margin-bottom: 20px;
  color: var(--text-strong);
  background: var(--glass);
  border-color: var(--line-strong);
}

.admin-login-card > .eyebrow {
  display: flex;
}

/* ============================================================
   ANIMATIONS — Modals & UI
   ============================================================ */
@keyframes lockupPulse {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 rgba(14, 246, 204, 0);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 28px rgba(14, 246, 204, 0.15);
  }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes queueReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes stepIconPulse {
  0% { transform: scale(0.88); box-shadow: 0 0 0 rgba(14, 246, 204, 0); }
  55% { transform: scale(1.08); box-shadow: 0 0 26px rgba(14, 246, 204, 0.42); }
  100% { transform: scale(1); box-shadow: 0 0 20px rgba(14, 246, 204, 0.32); }
}

/* Staggered row entrance */
@keyframes rowFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.queue-table tbody tr {
  animation: rowFadeIn 350ms ease both;
}

.queue-table tbody tr:nth-child(1) { animation-delay: 0ms; }
.queue-table tbody tr:nth-child(2) { animation-delay: 50ms; }
.queue-table tbody tr:nth-child(3) { animation-delay: 100ms; }
.queue-table tbody tr:nth-child(4) { animation-delay: 150ms; }
.queue-table tbody tr:nth-child(5) { animation-delay: 200ms; }
.queue-table tbody tr:nth-child(6) { animation-delay: 250ms; }
.queue-table tbody tr:nth-child(7) { animation-delay: 300ms; }
.queue-table tbody tr:nth-child(8) { animation-delay: 350ms; }
.queue-table tbody tr:nth-child(n+9) { animation-delay: 400ms; }

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 960px) {
  .auth-shell,
  .grid-two,
  .welcome-strip {
    grid-template-columns: 1fr;
  }

  .auth-shell { align-items: start; }
  .feature-panel { min-height: 0; }

  .landing-hero h1 { font-size: 52px; }
  .client-hero h1 { font-size: 54px; }

  .welcome-steps { justify-content: stretch; }

  .welcome-panel {
    grid-template-columns: 1fr;
    margin-top: -22px;
  }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  body.admin-area {
    padding-bottom: 76px;
  }

  .topbar {
    padding: 10px 14px;
  }

  .brand-copy small,
  .nav {
    display: none;
  }

  .topbar-actions {
    margin-inline-start: auto;
    gap: 6px;
  }

  .mobile-logout-form {
    display: block;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .page-shell {
    width: min(100% - 22px, 1180px);
    margin: 18px auto 42px;
  }

  /* Mobile tab bar */
  .mobile-tabbar {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 6px;
    background: rgba(17, 24, 39, 0.92);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .mobile-tabbar a {
    display: grid;
    place-items: center;
    min-height: 42px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
    transition: all 200ms ease;
  }

  .mobile-tabbar a.is-active {
    background: linear-gradient(135deg, var(--primary), #08d4af);
    color: var(--ink);
    box-shadow: 0 0 16px rgba(14, 246, 204, 0.25);
  }

  .page-heading,
  .queue-hero,
  .table-tools {
    display: grid;
    align-items: start;
  }

  .notification-job-summary {
    justify-content: flex-start;
  }

  .queue-hero {
    min-height: 0;
    padding: 18px;
  }

  .landing-hero {
    min-height: calc(100vh - 118px);
  }

  .landing-hero::before {
    background:
      linear-gradient(180deg, rgba(10, 14, 23, 0.92) 0%, rgba(10, 14, 23, 0.78) 48%, rgba(10, 14, 23, 0.95) 100%);
  }

  .hero-backdrop {
    background-position: 64% center;
  }

  .hero-content {
    margin-left: 0;
    padding: 26px 18px 72px;
  }

  .hero-brand-lockup { margin-bottom: 22px; }

  .landing-hero h1 { font-size: 40px; }

  .hero-copy { font-size: 16px; }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-metrics div {
    min-width: 0;
    padding: 10px;
  }

  .hero-metrics strong { font-size: 22px; }
  .hero-metrics span { font-size: 10px; }

  .scroll-cue { display: none; }

  .welcome-strip { padding: 17px; }
  .welcome-strip h2 { font-size: 21px; }

  .welcome-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-step { text-align: start; }

  .queue-stat {
    min-width: 0;
    width: 100%;
  }

  h1 { font-size: 32px; }
  h2 { font-size: 20px; }
  .lead { font-size: 15px; }

  .panel,
  .feature-panel,
  .step-card,
  .active-ticket {
    padding: 17px;
  }

  .step-card { grid-template-columns: 38px minmax(0, 1fr); }
  .step-number { width: 38px; height: 38px; }

  .form-grid { grid-template-columns: 1fr; }

  .inline-form,
  .inline-actions,
  .button-row,
  .button-grid {
    width: 100%;
  }

  .inline-form input,
  .inline-form .button,
  .button-grid form,
  .button-row form,
  .button-grid .button,
  .button-row .button {
    width: 100%;
    min-width: 0;
  }

  /* Mobile card tables */
  .queue-table thead { display: none; }

  .queue-table,
  .queue-table tbody,
  .queue-table tr,
  .queue-table td { display: block; width: 100%; }

  .queue-table tr {
    width: calc(100% - 20px);
    margin: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
  }

  .queue-table tr:hover { background: var(--surface-hover); }

  .queue-table td {
    display: grid;
    grid-template-columns: minmax(110px, 0.42fr) minmax(0, 0.58fr);
    gap: 12px;
    align-items: center;
    min-height: 42px;
    border-bottom: 1px solid var(--line);
    padding: 11px 14px;
    text-align: end;
    overflow-wrap: anywhere;
  }

  .queue-table td:last-child { border-bottom: 0; }

  .queue-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: start;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .queue-table td.empty {
    display: block;
    text-align: center;
  }

  .queue-table td.empty::before { content: none; }

  .note-form { min-width: 0; }
  .note-form .button { width: 100%; }

  .summary-list div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .summary-list dd { text-align: start; }

  /* Client hero mobile */
  .client-hero {
    min-height: calc(100vh - 58px);
  }

  .client-hero::before {
    background:
      linear-gradient(180deg, rgba(10, 14, 23, 0.93) 0%, rgba(10, 14, 23, 0.75) 48%, rgba(10, 14, 23, 0.96) 100%);
  }

  .client-hero-content {
    margin-left: 0;
    margin-right: 0;
    padding: 26px 18px 70px;
  }

  .client-hero h1 { font-size: 42px; }

  .landing-actions .button { min-width: 0; }

  .welcome-panel {
    width: min(100% - 22px, 1180px);
    padding: 17px;
  }

  /* Modal mobile */
  .modal-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    padding: 22px;
    overscroll-behavior: contain;
  }

  .login-modal h2,
  .join-modal h2 { font-size: 22px; }

  .join-hero {
    display: grid;
    min-height: 0;
    padding: 20px;
  }

  .join-quick-actions,
  .join-quick-actions .button,
  .join-quick-actions .meta-pill {
    width: 100%;
  }

  .public-active-ticket,
  .public-active-summary {
    display: grid;
    width: 100%;
  }

  .public-active-ticket {
    width: min(100% - 22px, 1180px);
    gap: 16px;
  }

  .public-active-summary {
    gap: 14px;
  }

  .public-active-summary .summary-list {
    min-width: 0;
  }

  .public-active-ticket form,
  .public-active-ticket .button {
    width: 100%;
  }

  /* Admin login mobile */
  .admin-login-hero {
    min-height: calc(100dvh - 59px);
  }
}

/* ============================================================
   RESPONSIVE — Small Mobile
   ============================================================ */
@media (max-width: 420px) {
  .page-shell {
    width: min(100% - 16px, 1180px);
  }

  h1 { font-size: 28px; }
  .landing-hero h1 { font-size: 34px; }
  .client-hero h1 { font-size: 36px; }

  .hero-brand-lockup { width: 100%; }
  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .queue-table td {
    grid-template-columns: 1fr;
    text-align: start;
  }

  .button { width: 100%; }

  .modal-card { padding: 18px; }

  .topbar {
    gap: 8px;
    padding-inline: 10px;
  }

  .brand {
    gap: 7px;
  }

  .brand-copy strong {
    max-width: 120px;
    font-size: 13px;
  }

  .language-switcher {
    grid-template-columns: repeat(2, 32px);
  }

  .hero-metrics div {
    padding: 8px 5px;
  }

  .hero-metrics span {
    overflow-wrap: anywhere;
  }

  .cafe-status-card {
    min-height: 88px;
    grid-template-columns: 38px minmax(0, 1fr) 8px;
    gap: 10px;
    padding: 12px;
  }

  [data-outside-status-card] {
    grid-template-columns: 38px minmax(0, 1fr) 34px;
  }

  .cafe-status-icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 760px) {
  .cafe-live-status {
    grid-template-columns: 1fr;
  }

  .admin-mobile-tabbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-mobile-tabbar.is-manager {
    grid-template-columns: 1fr;
  }

  html[lang="en"] .client-hero .hero-metrics > div {
    display: flex;
    min-height: 76px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 7px;
  }

  html[lang="en"] .client-hero .hero-metrics strong {
    margin-bottom: 5px;
  }

  html[lang="en"] .client-hero .hero-metrics span {
    display: grid;
    min-height: 24px;
    place-items: center;
    line-height: 1.2;
  }

  .confirm-actions {
    grid-template-columns: 1fr;
  }

  .manager-create-form {
    padding: 16px;
  }

  .manager-create-form > .button {
    width: 100%;
  }

  .manager-actions,
  .manager-password-form {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .manager-password-form .button {
    grid-column: auto;
  }
}

@media (max-width: 340px) {
  .brand-copy {
    display: none;
  }

  .client-hero h1,
  .landing-hero h1 {
    font-size: 32px;
  }

  .client-hero-content,
  .hero-content {
    padding-inline: 14px;
  }

  .welcome-panel,
  .landing-shell .welcome-strip,
  .landing-shell .landing-queue {
    width: calc(100% - 12px);
  }
}

@media (max-width: 760px) {
  .client-hero-content,
  .hero-content {
    margin-inline: auto;
    text-align: center;
  }

  .client-hero h1,
  .landing-hero h1 {
    line-height: 1.12;
  }

  [dir="rtl"] .client-hero h1,
  [dir="rtl"] .landing-hero h1 {
    line-height: 1.35;
  }

  .hero-brand-lockup {
    width: fit-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    justify-content: center;
  }

  .hero-copy {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions,
  .hero-metrics {
    justify-content: center;
  }

  .welcome-panel,
  .welcome-strip {
    text-align: center;
  }

  .welcome-steps {
    justify-content: center;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   PREMIUM FX LAYER v3 — animated ambience, glow & motion
   Purely additive on top of Design System v2.0. Amplifies the
   neon-cyber look. Every animation here is auto-disabled by the
   REDUCED MOTION block above (global *, *::before, *::after),
   and the JS that drives it is motion-aware + feature-detected.
   ============================================================ */

/* ----- 1. Animated aurora background (element injected by app.js) ----- */
.fx-aurora {
  position: fixed;
  inset: -22vmax;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.fx-aurora span {
  position: absolute;
  display: block;
  width: 48vmax;
  height: 48vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}

.fx-aurora span:nth-child(1) {
  top: -6vmax;
  left: -4vmax;
  background: radial-gradient(circle, var(--primary-glow), transparent 62%);
  animation: fxFloat1 26s ease-in-out infinite alternate;
}

.fx-aurora span:nth-child(2) {
  right: -6vmax;
  bottom: -8vmax;
  background: radial-gradient(circle, var(--hot-glow), transparent 62%);
  animation: fxFloat2 32s ease-in-out infinite alternate;
}

.fx-aurora span:nth-child(3) {
  top: 32%;
  left: 38%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.34), transparent 62%);
  animation: fxFloat3 38s ease-in-out infinite alternate;
}

@keyframes fxFloat1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18vmax, 12vmax, 0) scale(1.25); }
}

@keyframes fxFloat2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to { transform: translate3d(-16vmax, -10vmax, 0) scale(0.85); }
}

@keyframes fxFloat3 {
  from { transform: translate3d(0, 0, 0) scale(0.9); }
  to { transform: translate3d(-13vmax, 15vmax, 0) scale(1.2); }
}

/* ----- 2. Shine sweep across buttons on hover ----- */
.button,
.hero-button {
  position: relative;
  overflow: hidden;
}

.button::after,
.hero-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.button:hover::after,
.hero-button:hover::after {
  animation: fxShine 720ms ease;
}

@keyframes fxShine {
  to { left: 140%; }
}

/* ----- 3. Live pulse dot beside the live-queue label ----- */
[data-queue-refresh] .table-tools .eyebrow {
  align-items: center;
  gap: 8px;
}

[data-queue-refresh] .table-tools .eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: fxLivePulse 1.8s ease-out infinite;
}

@keyframes fxLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 246, 204, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(14, 246, 204, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 246, 204, 0); }
}

/* ----- 4. Podium ranks — gold / silver / bronze for the top 3 ----- */
.queue-table tbody tr:nth-child(1) .position {
  background: linear-gradient(135deg, #ffd76a, #ff9d2e);
  color: #2a1a00;
  animation: fxRankGlow 2.4s ease-in-out infinite;
}

.queue-table tbody tr:nth-child(2) .position {
  background: linear-gradient(135deg, #eef3fb, #9fb6d4);
  color: #1a2533;
  box-shadow: 0 0 14px rgba(180, 200, 230, 0.45);
}

.queue-table tbody tr:nth-child(3) .position {
  background: linear-gradient(135deg, #ffb37a, #d97740);
  color: #2a1400;
  box-shadow: 0 0 14px rgba(217, 119, 64, 0.45);
}

@keyframes fxRankGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 184, 77, 0.45); }
  50% { box-shadow: 0 0 28px rgba(255, 184, 77, 0.8); }
}

/* Gentle "next up" tint on the first queue row (desktop) */
.queue-panel .queue-table tbody tr:nth-child(1) td {
  background: linear-gradient(90deg, rgba(255, 184, 77, 0.07), transparent 72%);
}

/* ----- 5. Pulse the "called" status so staff/customers catch it ----- */
.status-called {
  animation: fxCalledPulse 1.6s ease-in-out infinite;
}

@keyframes fxCalledPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }
}

/* ----- 6. Pointer-reactive glow on cards (driven by app.js) ----- */
.fx-glow {
  position: relative;
  isolation: isolate;
}

.fx-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--fx-x, 50%) var(--fx-y, 50%), rgba(14, 246, 204, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}

.fx-glow:hover::before {
  opacity: 1;
}

/* ----- 7. Scroll-reveal for content sections (class toggled by app.js) ----- */
.fx-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 640ms cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 640ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fx-reveal.fx-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   PHASE A — UX fixes (toasts, admin controls)
   ============================================================ */

/* ----- Flash messages as bottom toasts (request #6) -----
   Pinned to the viewport so they never push page content. */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(440px, calc(100% - 24px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast-stack:empty {
  display: none;
}

/* Small helper text under inputs (e.g. phone format hint). */
.field-hint {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.toast-stack .alert {
  margin: 0;
  pointer-events: auto;
  box-shadow: var(--shadow-md);
  animation: toastIn 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.toast-stack .alert.is-dismissing {
  transform: translateY(14px);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- Admin queue: equal-size action buttons (request #9-second) ----- */
.admin-table .button-row,
.admin-table .button-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: 100%;
  min-width: 92px;
}

.admin-table .button-row form,
.admin-table .button-grid form {
  display: contents;
  margin: 0;
}

.admin-table .button-row .button,
.admin-table .button-grid .button {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px;
  text-align: center;
}

/* ----- Admin queue: search by username (request #9-third) ----- */
.admin-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 0;
}

.admin-search input {
  width: 100%;
}

.queue-table tbody tr.is-filtered-out {
  display: none;
}

@media (max-width: 760px) {
  /* Keep toasts clear of the fixed mobile tab bar on admin pages. */
  body.admin-area .toast-stack {
    bottom: 84px;
  }

  .admin-tools {
    align-items: stretch;
  }

}

/* ============================================================
   PHASE B — queue lifecycle (countdown, expired status, history)
   ============================================================ */

/* Live 24h countdown numerals */
[data-countdown] {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  direction: ltr;
  unicode-bidi: isolate;
}

.countdown {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--primary);
}

.countdown-mini {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-strong);
}

[data-countdown].is-expired {
  color: var(--danger);
}

/* "Expired" status badge */
.status-expired {
  background: var(--surface-hover);
  color: var(--muted-strong);
  border: 1px solid var(--line-strong);
}

/* Completed / cancelled history panel sits below the live board */
.history-panel {
  margin-bottom: 22px;
  opacity: 0.92;
}

/* Keep phase-two controls visually themed without allowing geometry changes. */
.join-modal,
.join-modal .form-stack,
.join-modal .preference-cards {
  overflow-anchor: none;
  scroll-behavior: auto;
}

.join-modal .preference-cards label,
.join-modal .checkbox-row {
  box-sizing: border-box;
  min-height: 58px;
  border-width: 1px;
  padding: 12px 14px;
  box-shadow: none;
  transform: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.join-modal .preference-cards label:hover,
.join-modal .checkbox-row:hover {
  border-color: rgba(14, 246, 204, 0.3);
  background: var(--primary-soft);
  box-shadow: none;
  transform: none;
}

.join-modal .preference-cards label:has(input:checked),
.join-modal .checkbox-row:has(input:checked) {
  border-color: rgba(14, 246, 204, 0.62);
  background: rgba(14, 246, 204, 0.1);
  box-shadow: none;
  transform: none;
}

.join-modal .preference-cards input[type="radio"],
.join-modal .checkbox-row input[type="checkbox"] {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  margin: 0;
  border: 2px solid rgba(255, 255, 255, 0.38);
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: none;
}

.join-modal .preference-cards input[type="radio"] {
  border-radius: 50%;
}

.join-modal .preference-cards input[type="radio"]:checked {
  border-color: var(--primary);
  background: radial-gradient(circle, var(--primary) 0 5px, transparent 6px);
}

.join-modal .checkbox-row input[type="checkbox"] {
  border-radius: 4px;
  border: 0;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--primary);
}

.join-modal .preference-cards input[type="radio"]:focus,
.join-modal .checkbox-row input[type="checkbox"]:focus {
  border-color: var(--primary);
  padding: 0;
  box-shadow: none;
}

.join-modal .preference-cards input[type="radio"]:focus-visible,
.join-modal .checkbox-row input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(14, 246, 204, 0.42);
  outline-offset: 3px;
}
