/* ============================================================
   Event Spot Registration — Firework Night theme
   Self-contained: no external fonts/CDNs (works offline on venue LAN).
   Animations are transform/opacity only to stay light on cheap tablets.
   ============================================================ */

:root {
  --bg-1: #05060f;
  --bg-2: #0d1130;
  --bg-3: #1a1440;
  --gold: #ffcf4d;
  --gold-strong: #ffb703;
  --orange: #ff7a33;
  --red: #ff4d5e;
  --card-bg: rgba(18, 16, 40, 0.72);
  --card-border: rgba(255, 207, 77, 0.35);
  --text: #f4f2ff;
  --text-dim: #b7b3d9;
  --input-bg: #1b1740;
  --input-border: #3a3470;
  --success: #37d67a;
  --error: #ff6b6b;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  /* Motion system: one easing curve + a small duration scale, reused everywhere
     so every animated element feels like it belongs to the same UI. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur-med: 320ms;
  --dur-slow: 560ms;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-3: 0 20px 60px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 40px rgba(255,183,3,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at 20% -10%, #26205a 0%, transparent 55%),
              radial-gradient(ellipse at 90% 0%, #3a1f4d 0%, transparent 45%),
              linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---------- decorative firework bursts (pure CSS, cheap) ---------- */
.fw-sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.fw-burst {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: fw-pop 3.4s ease-out infinite;
  opacity: 0;
}
.fw-burst::before, .fw-burst::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow:
    0 -34px 0 -1px currentColor, 24px -24px 0 -1px currentColor,
    34px 0 0 -1px currentColor, 24px 24px 0 -1px currentColor,
    0 34px 0 -1px currentColor, -24px 24px 0 -1px currentColor,
    -34px 0 0 -1px currentColor, -24px -24px 0 -1px currentColor;
}
.fw-burst.b1 { top: 12%; left: 15%; color: var(--gold); animation-delay: 0s; }
.fw-burst.b2 { top: 20%; left: 78%; color: var(--orange); animation-delay: 1.1s; }
.fw-burst.b3 { top: 55%; left: 8%;  color: var(--red);   animation-delay: 2.2s; }
.fw-burst.b4 { top: 65%; left: 88%; color: var(--gold-strong); animation-delay: 0.6s; }
.fw-burst.b5 { top: 8%;  left: 48%; color: var(--red);   animation-delay: 1.8s; }

@keyframes fw-pop {
  0%   { transform: scale(0.1); opacity: 0; }
  12%  { opacity: 1; }
  45%  { transform: scale(1.15); opacity: 0.9; }
  75%  { transform: scale(1.5); opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fw-burst { animation: none; opacity: 0.5; transform: scale(1); }
}

/* ---------- motion system ----------
   One easing curve + a handful of reusable keyframes so every entrance/interaction
   feels consistent. Every entrance keyframe animates FROM a hidden/offset state TO
   the element's normal resting style (opacity:1, no transform) - the resting style
   is never set as a separate static rule, so if prefers-reduced-motion disables the
   animation, the element just renders in its final state instead of staying hidden. */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.86); }
  70%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes growUpY {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
@keyframes shimmerSweep {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}
@keyframes ringPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,207,77,0.35); }
  100% { box-shadow: 0 0 0 14px rgba(255,207,77,0); }
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 6px;
  animation: fadeSlideUp var(--dur-slow) var(--ease-out) both;
}
.brand-lockup img {
  width: auto;
  display: block;
}
.brand-logo { height: 112px; filter: drop-shadow(0 6px 18px rgba(255,183,3,0.28)); }
.brand-badge { height: 78px; filter: drop-shadow(0 6px 14px rgba(255,183,3,0.22)); }
@media (max-width: 480px) {
  .brand-lockup { gap: 8px; margin-bottom: 0; }
  .brand-logo { height: 46px; }
  .brand-badge { height: 33px; }
}
@media (max-width: 360px) {
  .brand-logo { height: 40px; }
  .brand-badge { height: 29px; }
}

.page-header { animation: fadeSlideUp var(--dur-slow) var(--ease-out) both; }
.card { animation: fadeSlideUp var(--dur-slow) var(--ease-out) both; }
.card:nth-of-type(2) { animation-delay: 60ms; }

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

/* ---------- layout ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 48px;
}

.page-header {
  text-align: center;
  margin-bottom: 22px;
}
.page-header .eyebrow {
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}
.page-header h1 {
  font-size: clamp(24px, 5vw, 34px);
  margin: 0;
  color: var(--gold); /* fallback for browsers without background-clip:text (never leave this invisible) */
  font-weight: 800;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .page-header h1 {
    background: linear-gradient(90deg, var(--gold) 0%, var(--orange) 50%, var(--red) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.page-header p {
  color: var(--text-dim);
  margin-top: 8px;
  font-size: 14px;
}
@media (max-width: 480px) {
  .page-header { margin-bottom: 14px; }
  .page-header .eyebrow { font-size: 10.5px; letter-spacing: 2px; margin-bottom: 3px; }
  .page-header p { margin-top: 4px; font-size: 13px; }
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 0 20px 60px rgba(0,0,0,0.45), 0 0 40px rgba(255,183,3,0.06);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .page { padding: 18px 10px 36px; }
  .card { padding: 16px; }
}

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

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="number"],
.field input[type="password"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  color: var(--text);
  border-radius: 10px;
  padding: 12px;
  /* 16px is deliberate, not a style choice: iOS Safari auto-zooms the page
     on focus for any input with a computed font-size under 16px. */
  font-size: 16px;
  min-height: 44px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 70px; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 207, 77, 0.18);
}
.field select { cursor: pointer; }
.field select:disabled { opacity: 0.5; cursor: not-allowed; }

.field-error {
  color: var(--error);
  font-size: 12.5px;
  margin-top: 5px;
  min-height: 15px;
  display: block;
}
.field-error:not(:empty) { animation: fadeSlideUp var(--dur-fast) var(--ease-out) both; }

.radio-row, .yn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.yn-option {
  flex: 1;
  min-width: 100px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1.5px solid var(--input-border);
  background: var(--input-bg);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.yn-option input { display: none; }
.yn-option:active { transform: scale(0.96); }
.yn-option.selected {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(255,207,77,0.22), rgba(255,122,51,0.12));
  box-shadow: 0 0 0 3px rgba(255,207,77,0.15);
  animation: ringPulse 0.6s var(--ease-out);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 22px;
  border: none;
  border-radius: 12px;
  padding: 15px;
  min-height: 48px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #201200;
  background: linear-gradient(90deg, var(--gold) 0%, var(--orange) 100%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 24px rgba(255, 138, 0, 0.35);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  background-size: 250% 100%;
  background-position: 150% 0;
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(255, 138, 0, 0.45); }
.btn-primary:hover::after { opacity: 1; animation: shimmerSweep 1.1s var(--ease-out); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-primary:focus-visible, .btn-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 207, 77, 0.4);
}

.btn-secondary {
  border: 1.5px solid var(--input-border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 12px 16px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn-secondary:hover { border-color: var(--gold); background: rgba(255,207,77,0.06); }
.btn-secondary:active { transform: scale(0.97); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; border-color: var(--input-border); }
.btn-secondary:disabled:hover { border-color: var(--input-border); background: none; }
.btn-secondary:disabled:active { transform: none; }

.form-banner {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.form-banner.show { display: block; }
.form-banner.error { background: rgba(255,77,94,0.14); border: 1px solid rgba(255,77,94,0.4); color: #ffd7da; }
.form-banner.success { background: rgba(55,214,122,0.14); border: 1px solid rgba(55,214,122,0.4); color: #d8ffe9; }

/* success overlay shown after a submit, then form resets for next attendee */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 4, 14, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}
.success-overlay.show { display: flex; animation: fadeIn var(--dur-med) var(--ease-out) both; }
.success-overlay.show .success-card { animation: popIn var(--dur-slow) var(--ease-spring) both; animation-delay: 60ms; }
.success-overlay.show .fw-burst { animation-play-state: running; }
.success-card {
  position: relative;
  text-align: center;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 34px 26px;
  box-shadow: 0 0 60px rgba(255,183,3,0.18);
}
.success-check {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(55,214,122,0.22), rgba(55,214,122,0.04));
  border: 1.5px solid rgba(55,214,122,0.4);
}
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti span {
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 2px;
  animation: confettiPop 0.9s var(--ease-out) both;
  animation-delay: 0.25s;
}
.confetti span:nth-child(1) { background: var(--gold); --tx: -46px; --ty: -38px; }
.confetti span:nth-child(2) { background: var(--orange); --tx: 46px; --ty: -40px; }
.confetti span:nth-child(3) { background: var(--red); --tx: -60px; --ty: 10px; }
.confetti span:nth-child(4) { background: var(--gold-strong); --tx: 60px; --ty: 14px; }
.confetti span:nth-child(5) { background: var(--success); --tx: -20px; --ty: -58px; }
.confetti span:nth-child(6) { background: var(--orange); --tx: 22px; --ty: -56px; }
@keyframes confettiPop {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1) rotate(200deg); }
}
.success-check svg { width: 38px; height: 38px; overflow: visible; }
.success-check circle {
  stroke: var(--success);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 145;
  stroke-dashoffset: 145;
  animation: drawCheck 0.5s var(--ease-out) 0.15s forwards;
}
.success-check path {
  stroke: var(--success);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: drawCheck 0.3s var(--ease-out) 0.55s forwards;
}
.success-card .emoji { font-size: 52px; margin-bottom: 8px; }
.success-card h2 { margin: 6px 0 14px; color: var(--gold); }
.success-card .success-name { font-size: 19px; font-weight: 800; color: var(--text); }
.success-card .success-business { font-size: 14px; color: var(--gold); margin-top: 2px; margin-bottom: 10px; }
.success-card p { color: var(--text-dim); font-size: 14px; }

.footer-note {
  margin-top: 22px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12.5px;
}
.footer-note a { color: var(--gold); text-decoration: none; }

/* ---------- admin ---------- */
.admin-wrap { width: 100%; max-width: 1180px; }
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  animation: fadeSlideUp var(--dur-med) var(--ease-out) both;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: rgba(255,207,77,0.5); }
.stat-card:nth-child(1) { animation-delay: 0ms; }
.stat-card:nth-child(2) { animation-delay: 60ms; }
.stat-card:nth-child(3) { animation-delay: 120ms; }
.stat-card:nth-child(4) { animation-delay: 180ms; }
.stat-card .num { font-size: 30px; font-weight: 800; color: var(--gold); }
.stat-card .lbl { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.stat-card.accent { border-color: rgba(55,214,122,0.35); background: linear-gradient(135deg, rgba(55,214,122,0.10), var(--card-bg)); }
.stat-card.accent .num { color: var(--success); }
.stat-card .hc-icon.small { transition: transform var(--dur-fast) var(--ease-out); }
.stat-card:hover .hc-icon.small { transform: scale(1.15) rotate(-4deg); }
.stat-bar-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-top: 4px; color: var(--text-dim); }
.stat-bar-track { flex: 1; height: 6px; background: var(--input-bg); border-radius: 4px; overflow: hidden; }
.stat-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--orange)); }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--input-border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
}
.tab-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(255,207,77,0.08); }

.table-toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.table-toolbar input[type="search"] {
  background: var(--input-bg); border: 1.5px solid var(--input-border); color: var(--text);
  border-radius: 10px; padding: 9px 12px; font-size: 14px; min-width: 220px;
}

.table-scroll { width: 100%; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--card-border); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--card-bg); }
table.data-table th, table.data-table td {
  padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,0.06);
}
table.data-table th { color: var(--gold); font-weight: 700; position: sticky; top: 0; background: #16123a; }
table.data-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.018); }
table.data-table tbody tr:hover { background: rgba(255,207,77,0.06); }
table.data-table tbody tr.row-in { animation: rowFadeIn var(--dur-fast) var(--ease-out) both; }
@keyframes rowFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
table.data-table td.table-loading {
  text-align: center; opacity: 0.75; padding: 24px; white-space: normal;
  background: linear-gradient(90deg, transparent 0%, rgba(255,207,77,0.1) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmerSweep 1.3s ease-in-out infinite;
}

.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 14px; color: var(--text-dim); font-size: 13.5px; }

.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 80vh; width: 100%; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.badge.yes { background: rgba(55,214,122,0.16); color: #7CFFB2; }
.badge.no { background: rgba(255,77,94,0.16); color: #FF9AA5; }
.badge.role-master { background: rgba(255,207,77,0.18); color: var(--gold); }
.badge.role-admin { background: rgba(255,255,255,0.08); color: var(--text-dim); }

/* ---------- admin shell: sidebar + main ---------- */
.admin-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  z-index: 1;
  align-items: stretch;
}
.admin-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: rgba(9, 8, 24, 0.88);
  border-right: 1px solid var(--card-border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.admin-sidebar .brand {
  font-weight: 800;
  font-size: 15.5px;
  color: var(--gold);
  margin-bottom: 20px;
  padding: 0 10px;
  white-space: nowrap;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.nav-item::before {
  content: "";
  position: absolute;
  left: -14px; top: 20%;
  height: 60%; width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
  opacity: 0;
  transform: scaleY(0.3);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item:active { transform: scale(0.98); }
.nav-item.active { background: linear-gradient(90deg, rgba(255,207,77,0.16), rgba(255,122,51,0.05)); color: var(--gold); }
.nav-item.active::before { opacity: 1; transform: scaleY(1); }
.nav-item .count-pill {
  margin-left: auto;
  background: var(--input-bg);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-dim);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.nav-item.active .count-pill { background: rgba(255,207,77,0.18); color: var(--gold); }
.nav-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 10px 6px; }

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 26px 32px 60px;
  overflow-x: hidden;
}

.admin-view { display: none; }
.admin-view.active { display: block; animation: fadeSlideUp var(--dur-med) var(--ease-out) both; }

@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
    padding: 10px;
    gap: 6px;
  }
  .admin-sidebar .brand { display: none; }
  .nav-item { width: auto; white-space: nowrap; }
  .nav-item::before { left: 10%; top: auto; bottom: -8px; width: 80%; height: 3px; border-radius: 3px 3px 0 0; transform: scaleX(0.3); }
  .nav-item.active::before { transform: scaleX(1); }
  .admin-main { padding: 18px 14px 40px; }
}

/* ---------- filters ---------- */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}
.filter-field { display: flex; flex-direction: column; gap: 4px; }
.filter-field label {
  font-size: 11px; color: var(--text-dim); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.filter-field select, .filter-field input {
  background: var(--input-bg); border: 1.5px solid var(--input-border); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-size: 13.5px; min-width: 140px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.filter-field select:focus, .filter-field input:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 207, 77, 0.15);
}
.table-toolbar input[type="search"] {
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.table-toolbar input[type="search"]:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 207, 77, 0.15);
}
.filter-bar .btn-secondary { padding: 8px 14px; font-size: 13px; min-height: auto; }

/* ---------- sortable table headers ---------- */
table.data-table th.sortable { cursor: pointer; user-select: none; }
table.data-table th.sortable:hover { color: var(--gold-strong); }
table.data-table th .sort-arrow { margin-left: 4px; opacity: 0.7; font-size: 10px; }

/* ---------- overview ---------- */
.grand-total-card {
  background: linear-gradient(135deg, rgba(255,207,77,0.16), rgba(255,77,94,0.05));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 22px;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  animation: fadeSlideUp var(--dur-med) var(--ease-out) both;
}
.grand-total-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.grand-total-card .num { font-size: 42px; font-weight: 800; color: var(--gold); line-height: 1; }
.grand-total-card .lbl { color: var(--text-dim); font-size: 13.5px; margin-top: 8px; }

.headline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 0;
}
@media (max-width: 800px) {
  .headline-row { grid-template-columns: 1fr; }
}
.headline-row .grand-total-card { margin-bottom: 0; }
.tomorrow-card {
  background: linear-gradient(135deg, rgba(55,214,122,0.14), rgba(255,207,77,0.05));
}
.tomorrow-card .num { color: var(--success); }
.hc-icon { font-size: 22px; margin-bottom: 6px; opacity: 0.9; }
.hc-icon.small { font-size: 18px; margin-bottom: 4px; }
.hc-breakdown { color: var(--text-dim); font-size: 12.5px; margin-top: 4px; }

.overview-refresh-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.overview-refresh-bar .btn-secondary { padding: 7px 14px; font-size: 13px; min-height: auto; }
.last-updated { color: var(--text-dim); font-size: 12.5px; }
.refresh-icon { display: inline-block; }
.refresh-icon.spin { animation: spin360 0.6s var(--ease-out); }
@keyframes spin360 { to { transform: rotate(360deg); } }

.overview-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
@media (max-width: 800px) {
  .overview-grid { grid-template-columns: 1fr; }
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  padding: 10px 4px 0;
}
.trend-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}
.trend-bar {
  width: 100%;
  max-width: 30px;
  background: linear-gradient(180deg, var(--gold), var(--orange));
  border-radius: 4px 4px 0 0;
  min-height: 3px;
  transform-origin: bottom;
  animation: growUpY var(--dur-slow) var(--ease-out) both;
  transition: filter var(--dur-fast) var(--ease-out);
}
.trend-bar-wrap:hover .trend-bar { filter: brightness(1.25); }
.trend-count { font-size: 11px; color: var(--gold); font-weight: 700; }
.trend-label { font-size: 9.5px; color: var(--text-dim); white-space: nowrap; }
