:root {
  --bg: #06070a;
  --bg-elevated: #0c0e15;
  --glass: rgba(15, 19, 30, 0.72);
  --glass-solid: #101420;
  --glass-2: rgba(22, 27, 42, 0.82);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f6fb;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --crimson: #ff2a55;
  --crimson-deep: #d11138;
  --cyan: #00f0ff;
  --emerald: #10b981;
  --amber: #f59e0b;
  --danger: #fb7185;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.48);
  --font: "Vazirmatn", "IRANSans", Tahoma, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 45% at 88% -6%, rgba(255, 42, 85, 0.13), transparent 58%),
    radial-gradient(ellipse 70% 40% at 10% 4%, rgba(0, 240, 255, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.75;
  direction: rtl;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

input[type="number"],
.num,
.timer,
.cost-live,
.settle-box strong,
.stat strong,
td {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

h1,
h2,
h3 {
  letter-spacing: -0.015em;
  line-height: 1.32;
  font-weight: 800;
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.err {
  color: #fecdd3;
  background: rgba(255, 42, 85, 0.12);
  border: 1px solid rgba(255, 42, 85, 0.36);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 14px;
  font-size: 13.5px;
}

/* Non-blocking RTL Toast Notifications */
.toast-stack {
  position: fixed;
  top: 76px;
  inset-inline-end: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(14, 18, 28, 0.94);
  border: 1px solid rgba(0, 240, 255, 0.34);
  border-inline-start: 3px solid var(--cyan);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: toastIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  will-change: transform, opacity;
}

.toast.is-leaving {
  opacity: 0;
  transform: translate3d(-14px, 0, 0);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 16px;
  line-height: 1;
  border-radius: 6px;
}

.toast-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.toast-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--cyan));
  transform-origin: right center;
  animation: toastBar 4.5s linear forwards;
  will-change: transform;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate3d(-16px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes toastBar {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.flash {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-inline-start: 3px solid var(--cyan);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* Staggered Reveal */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-deep) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  opacity: 0.96;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(0, 240, 255, 0.35);
}

.btn.danger {
  background: linear-gradient(135deg, #f43f5e, #be123c);
}

.btn.ok {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn.warn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #140d00;
}

.btn.cyan {
  background: rgba(0, 240, 255, 0.14);
  border-color: rgba(0, 240, 255, 0.36);
  color: #cffafe;
}

.btn.sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 10px;
}

.btn.block {
  width: 100%;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 7, 10, 0.88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: 16px;
  white-space: nowrap;
}

.brand::before {
  content: "";
  width: 8px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--crimson), var(--cyan));
  flex-shrink: 0;
}

.brand span {
  color: var(--cyan);
}

.nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  position: relative;
  padding: 5px 2px;
  transition: color 0.16s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--cyan));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.ms {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Interactive Cyber-Tokyo Hero */
.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  opacity: 0.28;
}

.hero .shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(95deg, rgba(6, 7, 10, 0.96) 0%, rgba(6, 7, 10, 0.8) 54%, rgba(6, 7, 10, 0.56) 100%),
    linear-gradient(180deg, rgba(6, 7, 10, 0.3) 0%, rgba(6, 7, 10, 0.98) 100%);
}

#tokyoHeroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.tokyo-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.tokyo-stage svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tokyo-grid-plane {
  transform-origin: center bottom;
  animation: tokyoGridFloat 14s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.tokyo-wave {
  transform-origin: center;
  animation: tokyoWaveDrift 9s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.tokyo-scanbeam {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, rgba(0, 240, 255, 0.55) 45%, rgba(255, 42, 85, 0.55) 65%, transparent 95%);
  opacity: 0.45;
  animation: tokyoScan 8s linear infinite;
  will-change: transform, opacity;
}

@keyframes tokyoGridFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.55; }
  100% { transform: translate3d(0, -10px, 0) scale(1.02); opacity: 0.82; }
}

@keyframes tokyoWaveDrift {
  0% { transform: translate3d(-14px, 0, 0); opacity: 0.45; }
  100% { transform: translate3d(14px, -6px, 0); opacity: 0.85; }
}

@keyframes tokyoScan {
  0% { transform: translate3d(0, -10px, 0); opacity: 0; }
  12% { opacity: 0.55; }
  88% { opacity: 0.35; }
  100% { transform: translate3d(0, 560px, 0); opacity: 0; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 58px 28px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.hero .copy {
  max-width: 640px;
}

.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.34);
  margin-bottom: 18px;
}

.beacon {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  display: inline-block;
  flex-shrink: 0;
}

.beacon::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid currentColor;
  color: var(--emerald);
  animation: livePulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  will-change: transform, opacity;
}

.beacon.cyan {
  background: var(--cyan);
}
.beacon.cyan::after {
  color: var(--cyan);
}

@keyframes livePulse {
  0% { transform: scale(0.65); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

.hero h1 {
  font-size: clamp(34px, 5.5vw, 56px);
  margin: 0 0 14px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--crimson), #ff6b8b 50%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 24px;
  color: var(--text-soft);
  max-width: 560px;
  font-size: 15.5px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-top: 20px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}

/* Carbon Glass & Spotlight Cards */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 240, 255, 0.09), transparent 70%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.hero-telemetry {
  background: var(--glass);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--crimson);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-telemetry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cyan);
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.capacity-bar {
  margin-bottom: 16px;
}

.capacity-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  transform-origin: right center;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.progress-fill.crimson {
  background: linear-gradient(90deg, var(--crimson), var(--cyan));
}

.hero-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.telemetry-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.telemetry-cell strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.telemetry-cell span {
  font-size: 12px;
  color: var(--muted);
}

/* Sections & Bento Showcase */
.section {
  padding: 46px 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  margin: 0;
  font-size: 22px;
}

.section .lead {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 14px;
}

.bento-zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.bento-zone-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease;
  will-change: transform;
}

.bento-zone-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 240, 255, 0.32);
}

.zone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
  background: var(--bg-elevated);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
}

.gallery .big,
.gallery .stack > div {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
  background-color: var(--glass-solid);
}

.gallery .big {
  min-height: 330px;
}

.gallery .stack {
  display: grid;
  gap: 14px;
}

.gallery .stack > div {
  min-height: 158px;
}

.gallery .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 18px 14px;
  background: linear-gradient(180deg, transparent, rgba(6, 7, 10, 0.92));
  font-weight: 700;
  font-size: 14.5px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: rgba(255, 42, 85, 0.12);
  border: 1px solid rgba(255, 42, 85, 0.3);
  color: #ff6b8b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-soft);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.badge.ok {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge.warn {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.32);
}

.badge.danger {
  background: rgba(251, 113, 133, 0.14);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.32);
}

.badge.busy {
  background: rgba(0, 240, 255, 0.13);
  color: #67e8f9;
  border-color: rgba(0, 240, 255, 0.3);
}

/* Auth Pages */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--bg);
}

.login-visual {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 48px;
  overflow: hidden;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 7, 10, 0.35), rgba(6, 7, 10, 0.86)),
    linear-gradient(180deg, rgba(6, 7, 10, 0.2), rgba(6, 7, 10, 0.94));
}

.login-caption {
  position: relative;
  z-index: 1;
  max-width: 440px;
}

.login-caption .tag {
  display: inline-block;
  border: 1px solid rgba(255, 42, 85, 0.45);
  background: rgba(255, 42, 85, 0.14);
  color: #ff8ca3;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.06em;
}

.login-caption h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 10px;
}

.login-caption p {
  color: var(--text-soft);
  margin: 0;
  font-size: 15px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--bg-elevated);
  border-inline-start: 1px solid var(--line);
}

.login-box {
  width: 100%;
  max-width: 410px;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.login-box .logo {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.login-box .logo span {
  color: var(--cyan);
}

.login-box h2 {
  margin: 0 0 6px;
  font-size: 25px;
}

.login-box .sub {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 13.5px;
}

.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-wrap input {
  padding-inline-end: 64px;
}

.pw-toggle {
  position: absolute;
  inset-inline-end: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 11.5px;
  color: var(--text-soft);
  cursor: pointer;
}

.pw-toggle:hover {
  border-color: var(--cyan);
  color: var(--text);
}

/* Forms */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea,
.inline-input {
  width: 100%;
  background: rgba(8, 10, 16, 0.85);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 10px 13px;
  outline: none;
  color: var(--text);
  transition: border-color 0.15s ease;
}

.field select option,
.inline-input option {
  background: var(--glass-solid);
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-input:focus {
  border-color: var(--cyan);
}

.login-box .foot {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

.login-box .foot a {
  color: var(--cyan);
  font-weight: 700;
}

/* Digital Customer VIP Pass */
.vip-pass {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 240, 255, 0.18), transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(255, 42, 85, 0.22), transparent 50%),
    linear-gradient(135deg, #121728 0%, #0b0e18 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.vip-pass-id {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  font-weight: 700;
  margin-bottom: 6px;
}

.vip-pass-balance {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Admin Command Center Shell */
.admin-shell {
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 100vh;
}

.admin-mobile-bar {
  display: none;
}

.side {
  background: var(--bg-elevated);
  border-inline-end: 1px solid var(--line);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.side .logo {
  font-weight: 800;
  padding: 8px 12px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  font-size: 15px;
  letter-spacing: 0.05em;
}

.side .logo span {
  color: var(--cyan);
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  border-inline-start: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.side a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.side a.active {
  background: rgba(255, 42, 85, 0.13);
  border-inline-start-color: var(--crimson);
  color: var(--text);
}

.main {
  padding: 26px 28px;
  min-width: 0;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.page-title h1 {
  margin: 0;
  font-size: 23px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat {
  background: var(--glass);
  border: 1px solid var(--line);
  border-top: 2px solid rgba(0, 240, 255, 0.42);
  border-radius: var(--radius);
  padding: 15px 16px;
}

.stat.crimson {
  border-top-color: var(--crimson);
}

.stat.emerald {
  border-top-color: var(--emerald);
}

.stat strong {
  display: block;
  font-size: 21px;
  margin-bottom: 4px;
  font-weight: 800;
}

.stat span {
  color: var(--muted);
  font-size: 12.5px;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12.5px;
  white-space: nowrap;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

tr:last-child td {
  border-bottom: 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.panel-box {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

/* Tactical Station Grid */
.device-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 14px;
}

.device-tile {
  background: var(--glass);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.18s ease, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.device-tile:hover {
  transform: translateY(-3px);
}

.device-tile.available {
  border-inline-start-color: var(--emerald);
}

.device-tile.occupied {
  border-color: rgba(0, 240, 255, 0.34);
  border-inline-start-color: var(--cyan);
}

.device-tile.awaiting {
  border-color: rgba(245, 158, 11, 0.42);
  border-inline-start-color: var(--amber);
}

.device-tile.reserved {
  border-color: rgba(245, 158, 11, 0.34);
  border-inline-start-color: var(--amber);
}

.device-tile.maintenance,
.device-tile.offline {
  border-color: rgba(251, 113, 133, 0.34);
  border-inline-start-color: var(--danger);
}

.tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.device-tile .code {
  font-weight: 800;
  font-size: 16px;
}

.device-tile .meta {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 8px;
}

.device-tile .timer {
  font-size: 25px;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.03em;
  margin-top: 8px;
  line-height: 1.2;
}

.device-tile .cost-live {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.device-tile .settle-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.device-tile .settle-box strong {
  display: block;
  font-size: 18px;
  margin: 4px 0 10px;
  color: #fcd34d;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 28px;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-visual {
    min-height: 220px;
    padding: 28px 20px;
  }
  .login-panel {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 45;
  }
  .admin-mobile-bar .logo {
    font-weight: 800;
    font-size: 15px;
  }
  .admin-mobile-bar .logo span {
    color: var(--cyan);
  }
  .side {
    position: fixed;
    top: 53px;
    bottom: 0;
    inset-inline-start: 0;
    width: 260px;
    height: auto;
    z-index: 50;
    transform: translate3d(105%, 0, 0);
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: var(--shadow);
  }
  .side.is-open {
    transform: translate3d(0, 0, 0);
  }
  .side .logo {
    display: none;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px;
  }
  .nav {
    order: 3;
    width: 100%;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .section {
    padding: 32px 16px;
  }
  .main {
    padding: 18px 16px;
  }
  .hero {
    min-height: 460px;
  }
  .login-box {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
