/**
 * Spree admin dashboard stylesheet.
 * Based on pixel-parity design at 1692×898 baseline resolution.
 * All calc(N * var(--vw-unit)) → N/16.92 vw ≈ N px at 1692px wide.
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Scaling: 1 unit ≈ 1px at the 1692×898 design baseline */
  --vw-unit: calc(1vw / 16.92);
  --vh-unit: calc(1vh / 8.98);

  --brand-bg: #13142A;
  --brand-sidebar: #1A1B35;
  --brand-card: #171827;
  --brand-border: rgba(255, 255, 255, 0.07);
  --brand-accent: #F6339A;
  --brand-accent-bg: #F6339A33;
  --brand-accent-border: #F6339A4D;
  --brand-purple: #7c3aed;
  --brand-active: #00C950;
  --brand-active-bg: #00C95033;
  --brand-muted: rgba(255, 255, 255, 0.53);
  --brand-field-bg: #26273F;
  --brand-field-bg-hover: #252548;
  --brand-field-border: #2a2a4e;
  --brand-field-placeholder: rgba(255, 255, 255, 0.5);
  --pulse-tab-active-bg: #51163F;
  --pulse-tab-active-bd: #991958;
  --text-primary: #ffffff;
  --text-slate-300: #cbd5e1;
  --text-slate-400: #94a3b8;
  --text-slate-500: #64748b;
  --tier-chill: #22c55e;
  --tier-busy: #eab308;
  --tier-packed: #f97316;
  --tier-hot: #ef4444;
  --sidebar-w-expanded: calc(280 * var(--vw-unit));
  --sidebar-w-collapsed: calc(80 * var(--vw-unit));
  --radius-lg: calc(16 * var(--vw-unit));
  --radius-md: calc(12 * var(--vw-unit));
  --radius-sm: calc(8 * var(--vw-unit));
}

/* Tablet (769–1100px): scale as if viewport is 1100px wide so sidebar stays usable */
@media (min-width: 769px) and (max-width: 1100px) {
  :root {
    --vw-unit: calc(1vw / 11);
    --vh-unit: calc(1vh / 6);
  }
}

/* Mobile: revert to raw pixels so calc(N * var(--vw-unit)) ≈ N px */
@media (max-width: 768px) {
  :root {
    --vw-unit: 1px;
    --vh-unit: 1px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--brand-bg);
  color: var(--text-primary);
  font-family: 'Poppins', -apple-system, 'Segoe UI', Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
}

/* ── <select> dropdown options visible on dark theme ─────────────────────── */
select {
  color-scheme: dark;
}

select option,
select optgroup {
  background-color: #1A1B35;
  color: #ffffff;
}

/* ════════════════════════════════════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════════════════════════════════════ */
.app {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w-expanded);
  height: 100%;
  background: var(--brand-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  z-index: 70;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(22 * var(--vw-unit)) calc(20 * var(--vw-unit)) calc(16 * var(--vw-unit));
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0 calc(16 * var(--vw-unit));
}

.sidebar-nav::-webkit-scrollbar {
  width: calc(4 * var(--vw-unit));
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: calc(2 * var(--vw-unit));
}

.sidebar-bottom {
  margin-top: auto;
  padding: 0 0 calc(16 * var(--vw-unit));
}

/* ── Nav items ───────────────────────────────────────────────────────────── */
.nav-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 0 0 0 calc(16 * var(--vw-unit));
  gap: calc(12 * var(--vw-unit));
  width: calc(100% - calc(48 * var(--vw-unit)));
  height: calc(48 * var(--vh-unit));
  margin: calc(4 * var(--vw-unit)) calc(24 * var(--vw-unit));
  border-radius: calc(14 * var(--vw-unit));
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: calc(16 * var(--vw-unit));
  line-height: calc(24 * var(--vw-unit));
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
  transition: all .25s ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: rgba(246, 51, 154, 0.2);
  border-color: rgba(246, 51, 154, 0.3);
  color: #ffffff;
}

.nav-item .nav-icon {
  width: calc(20 * var(--vw-unit));
  height: calc(20 * var(--vw-unit));
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  margin-right: 0;
}

.nav-icon {
  margin-right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-item.danger:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.10);
}

/* ── Main content area ───────────────────────────────────────────────────── */
.main {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--brand-bg);
  padding: calc(32 * var(--vw-unit)) min(5%, calc(30 * var(--vw-unit)));
  box-sizing: border-box;
  position: relative;
}

.main::-webkit-scrollbar {
  width: calc(8 * var(--vw-unit));
}

.main::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: calc(4 * var(--vw-unit));
}

.page {
  padding: calc(24 * var(--vw-unit)) calc(32 * var(--vw-unit)) calc(40 * var(--vw-unit));
  max-width: calc(1600 * var(--vw-unit));
}

.page-header {
  margin-bottom: calc(24 * var(--vh-unit));
}

.page-title {
  font-size: calc(28 * var(--vw-unit));
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
}

.page-subtitle {
  font-size: calc(14 * var(--vw-unit));
  color: var(--text-slate-500);
  font-weight: 500;
  margin: calc(4 * var(--vw-unit)) 0 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   COMPONENTS
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--vw-unit));
  margin: calc(24 * var(--vw-unit)) 0;
  flex-wrap: wrap;
}

.tab {
  padding: calc(12 * var(--vw-unit)) calc(24 * var(--vw-unit));
  border-radius: var(--radius-md);
  font-size: calc(13 * var(--vw-unit));
  font-weight: 700;
  background: var(--brand-field-bg);
  color: var(--text-slate-400);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s;
}

.tab:hover {
  color: var(--text-slate-300);
  background: rgba(255, 255, 255, 0.10);
}

.tab.active {
  background: var(--pulse-tab-active-bg);
  border-color: var(--pulse-tab-active-bd);
  color: #fff;
  box-shadow: 0 calc(10 * var(--vw-unit)) calc(30 * var(--vw-unit)) rgba(81, 22, 63, 0.30);
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: calc(20 * var(--vw-unit)) calc(22 * var(--vw-unit));
  margin-bottom: calc(16 * var(--vh-unit));
}

.card-title {
  font-size: calc(11 * var(--vw-unit));
  font-weight: 700;
  letter-spacing: calc(1.5 * var(--vw-unit));
  text-transform: uppercase;
  color: var(--text-slate-400);
  margin: 0 0 calc(12 * var(--vw-unit));
}

/* ── Stat tiles ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc(220 * var(--vw-unit)), 1fr));
  gap: calc(16 * var(--vw-unit));
  margin-bottom: calc(24 * var(--vh-unit));
}

.stat {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: calc(18 * var(--vw-unit)) calc(20 * var(--vw-unit));
}

.stat .stat-label {
  font-size: calc(11 * var(--vw-unit));
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-slate-500);
  font-weight: 600;
}

.stat .stat-value {
  font-size: calc(28 * var(--vw-unit));
  font-weight: 800;
  color: #fff;
  margin-top: calc(6 * var(--vh-unit));
  letter-spacing: -0.01em;
}

.stat .stat-sub {
  font-size: calc(12 * var(--vw-unit));
  color: var(--text-slate-400);
  margin-top: calc(4 * var(--vh-unit));
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(13 * var(--vw-unit));
}

.table th {
  text-align: left;
  padding: calc(10 * var(--vw-unit)) calc(14 * var(--vw-unit));
  font-size: calc(11 * var(--vw-unit));
  letter-spacing: calc(1.2 * var(--vw-unit));
  text-transform: uppercase;
  color: var(--text-slate-500);
  font-weight: 600;
  border-bottom: 1px solid var(--brand-border);
}

.table td {
  padding: calc(14 * var(--vw-unit));
  border-bottom: 1px solid var(--brand-border);
  color: var(--text-slate-300);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table strong {
  color: #fff;
  font-weight: 600;
}

.table code {
  font-size: calc(12 * var(--vw-unit));
  background: rgba(255, 255, 255, 0.04);
  padding: calc(2 * var(--vw-unit)) calc(6 * var(--vw-unit));
  border-radius: calc(4 * var(--vw-unit));
  color: var(--text-slate-300);
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: calc(2 * var(--vw-unit)) calc(10 * var(--vw-unit));
  font-size: calc(10 * var(--vw-unit));
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: calc(999 * var(--vw-unit));
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.02);
}

.badge.chill {
  color: var(--tier-chill);
}

.badge.busy {
  color: var(--tier-busy);
}

.badge.packed {
  color: var(--tier-packed);
}

.badge.hot {
  color: var(--tier-hot);
}

.badge-verified {
  background: rgba(246, 51, 154, 0.2);
  border: 1px solid rgba(246, 51, 154, 0.3);
  color: #F6339A;
  border-radius: calc(100 * var(--vw-unit));
  font-size: calc(12 * var(--vw-unit));
  font-weight: 500;
  padding: calc(4 * var(--vw-unit)) calc(12 * var(--vw-unit));
  display: inline-flex;
}

.badge-active {
  background: rgba(0, 201, 80, 0.2);
  border: 1px solid rgba(0, 201, 80, 0.3);
  color: #05DF72;
  border-radius: calc(100 * var(--vw-unit));
  font-size: calc(12 * var(--vw-unit));
  font-weight: 500;
  padding: calc(4 * var(--vw-unit)) calc(12 * var(--vw-unit));
  display: inline-flex;
}

/* ── Inputs / Selects ────────────────────────────────────────────────────── */
.input,
.search,
.select,
textarea {
  width: 100%;
  padding: calc(11 * var(--vw-unit)) calc(14 * var(--vw-unit));
  border-radius: var(--radius-md);
  background: var(--brand-field-bg);
  border: 1px solid var(--brand-field-border);
  color: var(--text-primary);
  font-size: calc(14 * var(--vw-unit));
  font-family: inherit;
  transition: border-color .15s, background .15s;
}

.input::placeholder,
.search::placeholder {
  color: var(--brand-field-placeholder);
}

.input:focus,
.search:focus,
.select:focus {
  outline: none;
  border-color: var(--brand-accent);
  background: var(--brand-field-bg-hover);
}

.select {
  appearance: none;
  padding-right: calc(36 * var(--vw-unit));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23ffffff80' stroke-width='2'%3E%3Cpolyline points='2,4 6,8 10,4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right calc(12 * var(--vw-unit)) center;
}

.select option {
  background: var(--brand-field-bg);
  color: #fff;
}

/* Redesign inputs (newer pages) */
.redesign-input {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: calc(14 * var(--vw-unit)) !important;
  color: #ffffff !important;
  padding: calc(12 * var(--vw-unit)) calc(16 * var(--vw-unit)) !important;
  font-size: calc(16 * var(--vw-unit)) !important;
  transition: all 0.2s !important;
}

/* Inputs with an absolutely-positioned "$" prefix: the base class's
   `padding !important` overrides inline padding-left, which made the first
   digit render under the $ sign. */
.redesign-input.has-currency-prefix {
  padding-left: calc(34 * var(--vw-unit)) !important;
}

.redesign-input:focus {
  border-color: rgba(255, 255, 255, 0.3) !important;
  outline: none !important;
}

select.redesign-input option {
  background-color: #1A1B35 !important;
  color: #ffffff !important;
}

.redesign-label {
  font-weight: 500;
  font-size: calc(14 * var(--vw-unit));
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: calc(8 * var(--vh-unit));
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--vw-unit));
  padding: calc(11 * var(--vw-unit)) calc(18 * var(--vw-unit));
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: calc(13 * var(--vw-unit));
  background: var(--brand-accent);
  color: #fff;
  border: 0;
  cursor: pointer;
  transition: filter .15s, transform .05s;
}

.btn:hover {
  filter: brightness(1.08);
}

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

.btn.ghost {
  background: transparent;
  border: 1px solid var(--brand-border);
  color: var(--text-slate-300);
}

.btn.ghost:hover {
  border-color: var(--brand-accent-border);
  color: #fff;
  background: rgba(246, 51, 154, 0.05);
}

.btn.btn-primary {
  background: #FFF9AF;
  color: #0d0d1a;
  border: 0;
}

.btn.btn-primary:hover {
  background: #ffffa3;
}

.btn-danger,
.btn.btn-danger {
  background: #EF4444;
  border: 1px solid #EF4444;
  color: #ffffff;
}

.btn-emerald {
  background: rgba(5, 150, 105, 0.20);
  color: #34d399;
  border: 1px solid rgba(5, 150, 105, 0.30);
  padding: calc(14 * var(--vw-unit)) calc(20 * var(--vw-unit));
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: calc(13 * var(--vw-unit));
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--vw-unit));
  cursor: pointer;
  transition: background .15s;
  box-shadow: 0 0 calc(20 * var(--vw-unit)) rgba(52, 211, 153, 0.10);
}

.btn-emerald:hover {
  background: rgba(5, 150, 105, 0.40);
}

.btn-emerald .icon {
  width: calc(16 * var(--vw-unit));
  min-height: calc(16 * var(--vw-unit));
}

.btn-gradient-pill {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--vw-unit));
  padding: calc(10 * var(--vw-unit)) calc(16 * var(--vw-unit));
  background: linear-gradient(135deg, #AD46FF 0%, #F6339A 100%);
  color: #fff;
  font-weight: 600;
  font-size: calc(14 * var(--vw-unit));
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity .15s;
}

.btn-gradient-pill:hover {
  opacity: 0.90;
}

.btn-redesign-accent {
  background: rgba(246, 51, 154, 0.2) !important;
  border: 1px solid rgba(246, 51, 154, 0.3) !important;
  color: #ffffff !important;
  border-radius: calc(14 * var(--vw-unit)) !important;
  font-weight: 500;
  font-size: calc(16 * var(--vw-unit));
  cursor: pointer;
  transition: all 0.2s;
}

.btn-redesign-accent:hover {
  background: rgba(246, 51, 154, 0.35) !important;
  border-color: rgba(246, 51, 154, 0.5) !important;
}

/* Modal action buttons */
.btn-modal-create {
  flex: 1;
  padding: calc(14 * var(--vw-unit)) calc(20 * var(--vw-unit));
  background: linear-gradient(135deg, #AD46FF 0%, #F6339A 100%);
  color: #fff;
  font-weight: 700;
  font-size: calc(14 * var(--vw-unit));
  font-family: inherit;
  border: 0;
  border-radius: calc(12 * var(--vw-unit));
  cursor: pointer;
  transition: opacity .15s;
}

.btn-modal-create:hover {
  opacity: 0.87;
}

.btn-modal-cancel {
  flex: 1;
  padding: calc(14 * var(--vw-unit)) calc(20 * var(--vw-unit));
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.68);
  font-weight: 600;
  font-size: calc(14 * var(--vw-unit));
  font-family: inherit;
  border-radius: calc(12 * var(--vw-unit));
  cursor: pointer;
  transition: all .15s;
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

/* ── Form input helpers ─────────────────────────────────────────────────── */
input::-ms-reveal,
input::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ── Login page ──────────────────────────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(calc(600 * var(--vw-unit)) circle at 0% 0%, rgba(124, 58, 237, 0.35), transparent 50%),
    radial-gradient(calc(450 * var(--vw-unit)) circle at 100% 0%, rgba(246, 51, 154, 0.40), transparent 50%),
    radial-gradient(calc(500 * var(--vw-unit)) circle at 50% 100%, rgba(246, 51, 154, 0.20), transparent 50%),
    linear-gradient(180deg, #0b0b1e 0%, #161632 50%, #3a113f 100%);
  padding: calc(24 * var(--vw-unit));
}

.login-card {
  width: 100%;
  max-width: calc(460 * var(--vw-unit));
  background: rgba(35, 36, 65, 0.85);
  backdrop-filter: blur(calc(16 * var(--vw-unit)));
  border: 1px solid var(--brand-border);
  border-radius: calc(24 * var(--vw-unit));
  padding: calc(40 * var(--vw-unit));
  box-shadow: 0 calc(24 * var(--vw-unit)) calc(80 * var(--vw-unit)) rgba(0, 0, 0, 0.5);
}

.login-card h1 {
  font-size: calc(22 * var(--vw-unit));
  margin: 0 0 calc(4 * var(--vw-unit));
  text-align: center;
  font-weight: 700;
}

.login-card .sub {
  color: var(--text-slate-400);
  font-size: calc(13 * var(--vw-unit));
  text-align: center;
  margin: 0 0 calc(28 * var(--vw-unit));
}

.login-card label {
  display: block;
  font-size: calc(12 * var(--vw-unit));
  color: var(--text-slate-300);
  margin: calc(16 * var(--vw-unit)) 0 calc(6 * var(--vw-unit));
  font-weight: 500;
}

.login-card .btn {
  width: 100%;
  justify-content: center;
  padding: calc(14 * var(--vw-unit));
  font-size: calc(14 * var(--vw-unit));
}

.login-card .help {
  margin-top: calc(20 * var(--vh-unit));
  font-size: calc(11 * var(--vw-unit));
  color: var(--text-slate-500);
  text-align: center;
  line-height: 1.7;
}

.login-card .help code {
  color: var(--text-slate-300);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px calc(6 * var(--vw-unit));
  border-radius: calc(4 * var(--vw-unit));
}

.login-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: calc(11 * var(--vw-unit)) calc(14 * var(--vw-unit));
  border-radius: var(--radius-md);
  font-size: calc(13 * var(--vw-unit));
  margin-bottom: calc(14 * var(--vh-unit));
}

/* ── Page sticky header ──────────────────────────────────────────────────── */
.page-sticky-header {
  top: 0;
  z-index: 40;
  background: var(--brand-bg);
  padding: calc(24 * var(--vw-unit)) calc(32 * var(--vw-unit));
  border-bottom: 1px solid rgba(42, 42, 78, 0.2);
}

.page-sticky-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: calc(16 * var(--vw-unit));
  max-width: calc(1600 * var(--vw-unit));
  margin: 0 auto;
}

.page-sticky-header h1 {
  font-size: calc(30 * var(--vw-unit));
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.page-sticky-header p {
  font-size: calc(14 * var(--vw-unit));
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  margin: calc(4 * var(--vw-unit)) 0 0;
}

.page-sticky-header .actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(12 * var(--vw-unit));
}

.page-body {
  padding: calc(32 * var(--vw-unit));
  max-width: calc(1600 * var(--vw-unit));
  margin: 0 auto;
}

/* ── Gradient stat card ──────────────────────────────────────────────────── */
.gstat-card {
  position: relative;
  border-radius: calc(18 * var(--vw-unit));
  padding: 1px;
  background: linear-gradient(180deg,
      rgba(30, 30, 53, 1) 0%, rgba(42, 42, 78, 0.6) 60%,
      rgba(236, 72, 153, 0.15) 80%, rgba(124, 58, 237, 0.15) 90%, rgba(59, 130, 246, 0.15) 100%);
}

.gstat-card .gstat-inner {
  background: var(--brand-card);
  border-radius: calc(17 * var(--vw-unit));
  padding: calc(20 * var(--vw-unit));
}

.gstat-card .gstat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(38 * var(--vw-unit));
  height: calc(38 * var(--vw-unit));
  border-radius: calc(10 * var(--vw-unit));
  margin-bottom: calc(14 * var(--vh-unit));
}

.gstat-card .gstat-label {
  font-size: calc(11 * var(--vw-unit));
  font-weight: 500;
  color: var(--text-slate-500);
}

.gstat-card .gstat-value {
  font-size: calc(30 * var(--vw-unit));
  font-weight: 800;
  color: #fff;
  margin-top: calc(4 * var(--vh-unit));
  letter-spacing: -0.02em;
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(12 * var(--vw-unit));
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: calc(18 * var(--vw-unit));
  padding: calc(16 * var(--vw-unit)) calc(20 * var(--vw-unit));
  margin-bottom: calc(32 * var(--vh-unit));
}

.pill {
  padding: calc(6 * var(--vw-unit)) calc(16 * var(--vw-unit));
  border-radius: var(--radius-sm);
  font-size: calc(13 * var(--vw-unit));
  font-weight: 700;
  color: var(--text-slate-400);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
}

.pill:hover {
  color: #fff;
  background: rgba(42, 42, 78, 0.4);
}

.pill.active {
  background: rgba(246, 51, 154, 0.20);
  border-color: rgba(246, 51, 154, 0.50);
  color: #fff;
}

.filter-divider {
  width: 1px;
  height: calc(24 * var(--vh-unit));
  background: rgba(255, 255, 255, 0.10);
  margin: 0 calc(4 * var(--vw-unit));
}

/* ── Moderation photo cards ──────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(260 * var(--vw-unit)), 1fr));
  gap: calc(20 * var(--vw-unit));
}

.photo-card {
  background: var(--brand-card);
  border: 1px solid rgba(42, 42, 78, 0.6);
  border-radius: calc(18 * var(--vw-unit));
  overflow: hidden;
}

.photo-card .photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0c0c1d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.photo-card:hover .photo img {
  transform: scale(1.05);
}

.photo-card .photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(10 * var(--vw-unit));
  color: #475569;
}

.photo-card .photo-placeholder .pp-icon {
  width: calc(64 * var(--vw-unit));
  height: calc(64 * var(--vw-unit));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-card .photo-placeholder span {
  font-size: calc(10 * var(--vw-unit));
  font-weight: 700;
  letter-spacing: calc(2 * var(--vw-unit));
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.6);
}

.photo-status-pill {
  position: absolute;
  top: calc(12 * var(--vh-unit));
  right: calc(12 * var(--vw-unit));
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--vw-unit));
  padding: calc(4 * var(--vw-unit)) calc(12 * var(--vw-unit));
  border-radius: calc(999 * var(--vw-unit));
  font-size: calc(10 * var(--vw-unit));
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 calc(4 * var(--vw-unit)) calc(16 * var(--vw-unit)) rgba(0, 0, 0, 0.3);
  color: #fff;
}

.photo-status-pill.approved {
  background: #00C853;
}

.photo-status-pill.rejected {
  background: #DC2626;
}

.photo-card .info {
  padding: calc(16 * var(--vw-unit));
}

.photo-card .info-row {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--vw-unit));
  font-size: calc(13 * var(--vw-unit));
  font-weight: 600;
  color: #fff;
  margin-bottom: calc(10 * var(--vh-unit));
}

.photo-card .info-row .icon {
  width: calc(18 * var(--vw-unit));
  height: calc(18 * var(--vw-unit));
  color: var(--text-slate-400);
}

.photo-card .meta-row {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--vw-unit));
  flex-wrap: nowrap;
  font-size: calc(12 * var(--vw-unit));
  color: var(--text-slate-400);
  margin-bottom: calc(14 * var(--vh-unit));
}

.photo-card .meta-row .icon {
  width: calc(14 * var(--vw-unit));
  height: calc(14 * var(--vw-unit));
}

.photo-card .meta-row .dot {
  margin: 0 calc(4 * var(--vw-unit));
  color: var(--text-slate-500);
}

.photo-card .action-row {
  display: flex;
  gap: calc(10 * var(--vw-unit));
}

.action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(6 * var(--vw-unit));
  height: calc(38 * var(--vh-unit));
  border-radius: var(--radius-md);
  font-size: calc(12 * var(--vw-unit));
  font-weight: 700;
  border: 1px solid;
  cursor: pointer;
  transition: all .15s;
}

.action-btn .icon {
  width: calc(16 * var(--vw-unit));
  height: calc(16 * var(--vw-unit));
}

.action-btn.approve {
  background: #192E35;
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.30);
}

.action-btn.approve:hover {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.50);
}

.action-btn.reject {
  background: #321E32;
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.30);
}

.action-btn.reject:hover {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.50);
}

.action-btn.restore {
  background: transparent;
  color: var(--text-slate-300);
  border-color: rgba(100, 116, 139, 0.50);
}

.action-btn.restore:hover {
  background: rgba(100, 116, 139, 0.10);
  border-color: rgba(100, 116, 139, 0.70);
}

.status-banner {
  padding: calc(12 * var(--vw-unit));
  border-radius: var(--radius-md);
  font-size: calc(12 * var(--vw-unit));
  font-weight: 700;
}

.status-banner.approved {
  background: rgba(0, 200, 83, 0.05);
  border: 1px solid rgba(0, 200, 83, 0.20);
  color: #00C853;
}

.status-banner.approved .sub {
  color: var(--text-slate-400);
  font-size: calc(10 * var(--vw-unit));
  font-weight: 500;
  margin-top: calc(2 * var(--vh-unit));
}

.status-banner.rejected {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.20);
  color: #f87171;
}

.status-banner.rejected .sub {
  color: rgba(252, 165, 165, 0.70);
  font-size: calc(10 * var(--vw-unit));
  font-weight: 500;
  margin-top: calc(2 * var(--vh-unit));
}

/* ── Empty states ────────────────────────────────────────────────────────── */
.empty-state {
  padding: calc(80 * var(--vw-unit)) calc(24 * var(--vw-unit));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--brand-card);
  border: 1px dashed var(--brand-border);
  border-radius: calc(18 * var(--vw-unit));
}

.empty-state .es-icon {
  width: calc(48 * var(--vw-unit));
  height: calc(48 * var(--vw-unit));
  color: #475569;
  margin-bottom: calc(16 * var(--vh-unit));
}

.empty-state p {
  color: var(--text-slate-400);
  font-weight: 700;
  font-size: calc(16 * var(--vw-unit));
  margin: 0;
}

.dashed-empty {
  border: 1px dashed var(--brand-border);
  border-radius: calc(18 * var(--vw-unit));
  padding: calc(60 * var(--vw-unit)) calc(24 * var(--vw-unit));
  text-align: center;
}

.dashed-empty .es-icon {
  display: inline-flex;
  color: var(--brand-muted);
  margin-bottom: calc(14 * var(--vh-unit));
}

.dashed-empty h3 {
  font-size: calc(15 * var(--vw-unit));
  font-weight: 800;
  color: #fff;
  margin: 0 0 calc(4 * var(--vw-unit));
}

.dashed-empty p {
  color: var(--brand-muted);
  font-size: calc(13 * var(--vw-unit));
  margin: 0;
}

/* ── Light stat cards (Rewards style) ───────────────────────────────────── */
.lstat-card {
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: calc(18 * var(--vw-unit));
  padding: calc(16 * var(--vw-unit)) calc(18 * var(--vw-unit));
}

.lstat-card .lstat-label {
  font-size: calc(10 * var(--vw-unit));
  font-weight: 800;
  letter-spacing: calc(1.5 * var(--vw-unit));
  color: var(--text-slate-500);
  text-transform: uppercase;
}

.lstat-card .lstat-row {
  display: flex;
  align-items: baseline;
  gap: calc(6 * var(--vw-unit));
  margin-top: calc(4 * var(--vh-unit));
}

.lstat-card .lstat-value {
  font-size: calc(20 * var(--vw-unit));
  font-weight: 900;
  color: #fff;
}

.lstat-card .lstat-unit {
  font-size: calc(13 * var(--vw-unit));
  color: var(--text-slate-500);
  font-weight: 700;
}

.lstat-card .lstat-sub {
  font-size: calc(11 * var(--vw-unit));
  color: var(--text-slate-500);
  margin-top: calc(2 * var(--vh-unit));
}

/* ── Section headers ─────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: calc(12 * var(--vw-unit));
  margin-bottom: calc(20 * var(--vh-unit));
}

.section-header h2 {
  font-size: calc(22 * var(--vw-unit));
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-header h2.thin {
  font-weight: 500;
}

.section-block {
  margin-bottom: calc(40 * var(--vh-unit));
}

/* ── Striped gradient table panel ────────────────────────────────────────── */
.stripe-panel {
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: calc(18 * var(--vw-unit));
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.stripe-panel .table {
  font-size: calc(13 * var(--vw-unit));
}

.stripe-panel .table th {
  padding: calc(14 * var(--vw-unit)) calc(22 * var(--vw-unit));
  font-size: calc(11 * var(--vw-unit));
}

.stripe-panel .table td {
  padding: calc(16 * var(--vw-unit)) calc(22 * var(--vw-unit));
}

/* ── Reward cards ────────────────────────────────────────────────────────── */
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(220 * var(--vw-unit)), 1fr));
  gap: calc(16 * var(--vw-unit));
}

.reward-card {
  background: var(--brand-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(16 * var(--vw-unit));
  padding: calc(18 * var(--vw-unit));
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--vw-unit));
}

.reward-card .rc-type {
  display: inline-block;
  width: fit-content;
  padding: calc(2 * var(--vw-unit)) calc(9 * var(--vw-unit));
  border-radius: calc(999 * var(--vw-unit));
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  font-size: calc(10 * var(--vw-unit));
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.reward-card .rc-name {
  font-size: calc(15 * var(--vw-unit));
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.reward-card .rc-cost {
  font-size: calc(22 * var(--vw-unit));
  font-weight: 800;
  color: #FFF9AF;
}

.reward-card .rc-cost small {
  font-size: calc(11 * var(--vw-unit));
  font-weight: 600;
  color: var(--text-slate-500);
  margin-left: calc(4 * var(--vw-unit));
}

.reward-card .rc-meta {
  font-size: calc(11 * var(--vw-unit));
  color: var(--text-slate-500);
  display: flex;
  justify-content: space-between;
}

.reward-card .rc-meta strong {
  color: var(--text-slate-300);
  font-weight: 700;
}

/* ── Reward admin extras ─────────────────────────────────────────────────── */
.rc-type-icon {
  display: inline-flex;
  align-items: center;
  gap: calc(5 * var(--vw-unit));
  padding: calc(3 * var(--vw-unit)) calc(10 * var(--vw-unit));
  border-radius: calc(999 * var(--vw-unit));
  font-size: calc(10 * var(--vw-unit));
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.rw-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: calc(8 * var(--vw-unit));
  color: rgba(255, 255, 255, 0.45);
  width: calc(28 * var(--vw-unit));
  height: calc(28 * var(--vw-unit));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  padding: 0;
}

.rw-icon-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.dup-badge {
  display: inline-flex;
  align-items: center;
  gap: calc(3 * var(--vw-unit));
  padding: calc(2 * var(--vw-unit)) calc(7 * var(--vw-unit));
  border-radius: calc(999 * var(--vw-unit));
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: #fbbf24;
  font-size: calc(9 * var(--vw-unit));
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.rw-venue-list {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: calc(14 * var(--vw-unit));
  overflow: hidden;
  max-height: calc(204 * var(--vh-unit));
  overflow-y: auto;
}

.rw-venue-list::-webkit-scrollbar {
  width: calc(4 * var(--vw-unit));
}

.rw-venue-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: calc(2 * var(--vw-unit));
}

.rw-venue-item {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--vw-unit));
  padding: calc(11 * var(--vw-unit)) calc(16 * var(--vw-unit));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background .12s;
  user-select: none;
}

.rw-venue-item:last-child {
  border-bottom: none;
}

.rw-venue-item:hover {
  background: rgba(255, 255, 255, 0.045);
}

.rw-venue-item input[type="checkbox"] {
  width: calc(17 * var(--vw-unit));
  height: calc(17 * var(--vw-unit));
  accent-color: #AD46FF;
  cursor: pointer;
  flex-shrink: 0;
}

.rw-venue-item .venue-label {
  font-size: calc(14 * var(--vw-unit));
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.rw-venue-item:first-child .venue-label {
  font-weight: 600;
  color: #fff;
}

.modal-card.rw-modal {
  max-width: calc(560 * var(--vw-unit));
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.rw-modal .modal-header {
  flex-shrink: 0;
}

.rw-modal .modal-body {
  overflow-y: auto;
  flex: 1;
  padding: calc(20 * var(--vw-unit)) calc(24 * var(--vw-unit));
}

.rw-modal .modal-body::-webkit-scrollbar {
  width: calc(5 * var(--vw-unit));
}

.rw-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.09);
  border-radius: calc(3 * var(--vw-unit));
}

.rw-modal .modal-footer {
  flex-shrink: 0;
}

.rw-label {
  display: block;
  font-size: calc(14 * var(--vw-unit));
  font-weight: 600;
  color: #fff;
  margin: calc(20 * var(--vw-unit)) 0 calc(8 * var(--vw-unit));
}

.rw-label:first-child {
  margin-top: 0;
}

.rw-sublabel {
  display: block;
  font-size: calc(12 * var(--vw-unit));
  color: rgba(255, 255, 255, 0.48);
  margin-bottom: calc(6 * var(--vh-unit));
}

.rw-hint {
  font-size: calc(12 * var(--vw-unit));
  color: rgba(255, 255, 255, 0.35);
  margin-top: calc(6 * var(--vh-unit));
  line-height: 1.55;
}

.rw-date-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(12 * var(--vw-unit));
}

.rw-date-pair input[type="date"] {
  color-scheme: dark;
}

.rw-unlimited-row {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--vw-unit));
  padding: calc(12 * var(--vw-unit)) calc(16 * var(--vw-unit));
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: calc(12 * var(--vw-unit));
  cursor: pointer;
}

.rw-unlimited-row input[type="checkbox"] {
  width: calc(18 * var(--vw-unit));
  height: calc(18 * var(--vw-unit));
  accent-color: #F6339A;
  cursor: pointer;
}

.rw-unlimited-row span {
  font-size: calc(15 * var(--vw-unit));
  font-weight: 500;
  color: #fff;
}

.rw-toggle-row {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--vw-unit));
}

.rw-toggle-label {
  font-size: calc(15 * var(--vw-unit));
  color: rgba(255, 255, 255, 0.80);
  font-weight: 500;
}

/* ── Pill tab rows (Events/Specials) ─────────────────────────────────────── */
.main-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(19, 20, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: calc(999 * var(--vw-unit));
  padding: calc(4 * var(--vw-unit));
  gap: 0;
}

.main-tab {
  position: relative;
  padding: calc(10 * var(--vw-unit)) calc(22 * var(--vw-unit));
  border-radius: calc(999 * var(--vw-unit));
  font-size: calc(13 * var(--vw-unit));
  font-weight: 700;
  color: var(--text-slate-400);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color .15s;
  white-space: nowrap;
}

.main-tab:hover {
  color: #fff;
}

.main-tab.active {
  background: linear-gradient(135deg, #AD46FF 0%, #F6339A 100%);
  color: #fff;
  box-shadow: 0 calc(10 * var(--vw-unit)) calc(24 * var(--vw-unit)) rgba(173, 70, 255, 0.20);
}

/* ── Filter chips ────────────────────────────────────────────────────────── */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--vw-unit));
  padding: calc(8 * var(--vw-unit)) calc(14 * var(--vw-unit));
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: calc(12 * var(--vw-unit));
  color: #fff;
  font-size: calc(13 * var(--vw-unit));
  font-weight: 500;
  transition: border-color .15s;
}

.filter-chip:hover {
  border-color: var(--brand-accent-border);
}

.filter-chip .chevron {
  color: var(--brand-muted);
  width: calc(14 * var(--vw-unit));
  height: calc(14 * var(--vw-unit));
}

/* ── Event row cards ─────────────────────────────────────────────────────── */
.event-card {
  display: grid;
  grid-template-columns: calc(80 * var(--vw-unit)) 1fr auto;
  gap: calc(20 * var(--vw-unit));
  align-items: center;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: calc(18 * var(--vw-unit));
  padding: calc(18 * var(--vw-unit)) calc(22 * var(--vw-unit));
}

.event-card .date-pill {
  background: rgba(173, 70, 255, 0.15);
  border: 1px solid rgba(173, 70, 255, 0.40);
  border-radius: calc(12 * var(--vw-unit));
  padding: calc(10 * var(--vw-unit)) calc(8 * var(--vw-unit));
  text-align: center;
  color: #c084fc;
}

.event-card .date-pill .month {
  font-size: calc(10 * var(--vw-unit));
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.event-card .date-pill .day {
  font-size: calc(22 * var(--vw-unit));
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-top: calc(2 * var(--vh-unit));
}

.event-card .ev-title {
  font-size: calc(16 * var(--vw-unit));
  font-weight: 800;
  color: #fff;
  margin: 0 0 calc(4 * var(--vw-unit));
}

.event-card .ev-meta {
  font-size: calc(12 * var(--vw-unit));
  color: var(--text-slate-400);
  display: flex;
  gap: calc(8 * var(--vw-unit));
  align-items: center;
}

.event-card .ev-meta .dot {
  color: var(--text-slate-500);
}

.event-card .ev-stats {
  display: flex;
  gap: calc(16 * var(--vw-unit));
  align-items: center;
  margin-top: calc(10 * var(--vh-unit));
}

.event-card .ev-stats .ev-stat {
  font-size: calc(11 * var(--vw-unit));
  color: var(--text-slate-500);
}

.event-card .ev-stats .ev-stat strong {
  color: #fff;
  font-weight: 700;
  font-size: calc(13 * var(--vw-unit));
}

.event-card .ev-stats .ev-stat.rev strong {
  color: #34d399;
}

.event-card .ev-actions {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--vw-unit));
}

.event-card .ev-actions .ev-status-pill {
  padding: calc(4 * var(--vw-unit)) calc(10 * var(--vw-unit));
  border-radius: calc(999 * var(--vw-unit));
  font-size: calc(10 * var(--vw-unit));
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.event-card .ev-actions .ev-status-pill.upcoming {
  background: rgba(173, 70, 255, 0.15);
  color: #c084fc;
  border: 1px solid rgba(173, 70, 255, 0.40);
}

.event-card .ev-actions .ev-status-pill.live {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.40);
}

/* ── Search with icon ────────────────────────────────────────────────────── */
.search-with-icon {
  position: relative;
}

.search-with-icon .si-icon {
  position: absolute;
  left: calc(12 * var(--vw-unit));
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-slate-500);
  width: calc(16 * var(--vw-unit));
  height: calc(16 * var(--vw-unit));
}

.search-with-icon input {
  padding-left: calc(38 * var(--vw-unit));
  min-height: calc(42 * var(--vh-unit));
}

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(calc(6 * var(--vw-unit)));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24 * var(--vw-unit));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: calc(480 * var(--vw-unit));
  max-height: calc(850 * var(--vh-unit));
  display: flex;
  flex-direction: column;
  background: #1a1a2e;
  border: 1px solid #2a2a4e;
  border-radius: calc(18 * var(--vw-unit));
  box-shadow: 0 calc(24 * var(--vw-unit)) calc(60 * var(--vw-unit)) rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-card.large {
  max-width: calc(640 * var(--vw-unit));
}

.modal-card.xl {
  max-width: calc(760 * var(--vw-unit));
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: calc(12 * var(--vw-unit));
  padding: calc(22 * var(--vw-unit)) calc(22 * var(--vw-unit)) calc(12 * var(--vw-unit));
  flex-shrink: 0;
}

.modal-icon {
  border-radius: calc(10 * var(--vw-unit));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: calc(18 * var(--vw-unit));
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}

.modal-header p {
  font-size: calc(13 * var(--vw-unit));
  color: var(--text-slate-400);
  margin: calc(4 * var(--vw-unit)) 0 0;
}

.modal-header .close {
  margin-left: auto;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--text-slate-500);
  padding: calc(6 * var(--vw-unit));
}

.modal-header .close:hover {
  color: #fff;
}

.modal-body {
  padding: calc(8 * var(--vw-unit)) calc(22 * var(--vw-unit)) calc(22 * var(--vw-unit));
  overflow-y: auto;
  flex: 1;
}

.modal-body label {
  display: block;
  font-size: calc(12 * var(--vw-unit));
  color: var(--text-slate-300);
  margin: calc(14 * var(--vw-unit)) 0 calc(6 * var(--vw-unit));
  font-weight: 600;
}

.modal-body label:first-child {
  margin-top: 0;
}

.modal-body .input,
.modal-body .select,
.modal-body textarea {
  width: 100%;
  padding: calc(11 * var(--vw-unit)) calc(14 * var(--vw-unit));
  background: var(--brand-field-bg);
  border: 1px solid var(--brand-field-border);
  border-radius: calc(12 * var(--vw-unit));
  color: #fff;
  font-size: calc(13 * var(--vw-unit));
  font-family: inherit;
}

.modal-body textarea {
  min-height: calc(80 * var(--vh-unit));
  resize: vertical;
}

.modal-body .input:focus,
.modal-body .select:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--brand-accent);
}

.modal-body .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(12 * var(--vw-unit));
}

.modal-footer {
  padding: calc(16 * var(--vw-unit)) calc(22 * var(--vw-unit));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.20);
  display: flex;
  justify-content: flex-end;
  gap: calc(10 * var(--vw-unit));
}

.modal-footer .btn {
  padding: calc(10 * var(--vw-unit)) calc(18 * var(--vw-unit));
  font-size: calc(13 * var(--vw-unit));
}

/* Reject reason picker */
.reason-list {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--vw-unit));
}

.reason-list .reason-btn {
  text-align: left;
  padding: calc(14 * var(--vw-unit)) calc(16 * var(--vw-unit));
  border-radius: calc(12 * var(--vw-unit));
  background: rgba(22, 22, 42, 0.60);
  border: 1px solid rgba(42, 42, 78, 0.60);
  color: #fff;
  font-size: calc(13 * var(--vw-unit));
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.reason-list .reason-btn:hover {
  border-color: rgba(239, 68, 68, 0.40);
  background: rgba(239, 68, 68, 0.05);
}

/* User detail panel modal (udp) */
.udp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.udp-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Map ─────────────────────────────────────────────────────────────────── */
.map-toolbar {
  display: flex;
  gap: calc(12 * var(--vw-unit));
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: calc(14 * var(--vh-unit));
}

.map-toolbar .search {
  max-width: calc(380 * var(--vw-unit));
}

.map-counts {
  font-size: calc(12 * var(--vw-unit));
  color: var(--text-slate-400);
}

#map {
  height: calc(100vh - calc(320 * var(--vh-unit)));
  min-height: calc(480 * var(--vh-unit));
  border-radius: var(--radius-lg);
  border: 1px solid var(--brand-border);
  overflow: hidden;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: calc(16 * var(--vw-unit));
  font-size: calc(12 * var(--vw-unit));
  color: var(--text-slate-400);
  margin-top: calc(14 * var(--vh-unit));
}

.legend .swatch {
  display: inline-block;
  width: calc(12 * var(--vw-unit));
  height: calc(12 * var(--vw-unit));
  border-radius: calc(3 * var(--vw-unit));
  margin-right: calc(6 * var(--vw-unit));
  vertical-align: middle;
}

.leaflet-popup-content-wrapper {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  color: #fff;
  border-radius: var(--radius-md);
}

.leaflet-popup-tip {
  background: var(--brand-card);
}

.leaflet-popup-content {
  margin: calc(10 * var(--vw-unit)) calc(14 * var(--vw-unit));
  font-size: calc(12 * var(--vw-unit));
}

.leaflet-popup-content b {
  color: var(--brand-accent);
}

.leaflet-control-attribution {
  background: rgba(15, 15, 30, 0.85) !important;
  color: var(--text-slate-500) !important;
}

.leaflet-control-attribution a {
  color: var(--text-slate-400) !important;
}

/* ── Period selector (Dashboard) ─────────────────────────────────────────── */
.period-selector {
  display: inline-flex;
  gap: calc(8 * var(--vw-unit));
  align-items: center;
}

.period-btn {
  padding: calc(6 * var(--vw-unit)) calc(16 * var(--vw-unit));
  border-radius: calc(8 * var(--vw-unit));
  font-size: calc(12 * var(--vw-unit));
  font-weight: 700;
  transition: all 0.2s;
  cursor: pointer;
}

.period-btn.active {
  background: #51163F;
  border: 1px solid #991958;
  color: #fff;
}

.period-btn.inactive {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}

.period-btn.inactive:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ── Redesign classes (newer venue/dashboard pages) ──────────────────────── */
.redesign-gradient-bg {
  background: linear-gradient(135deg, #AD46FF 0%, #B247F8 7.14%, #B748F1 14.29%, #BC49EA 21.43%, #C149E3 28.57%, #C749DC 35.71%, #CC49D5 42.86%, #D148CE 50%, #D646C7 57.14%, #DC45BF 64.29%, #E142B8 71.43%, #E640B1 78.57%, #EB3CA9 85.71%, #F138A2 92.86%, #F6339A 100%);
}

.redesign-gradient-text {
  background: linear-gradient(90deg, #AD46FF 0%, #F6339A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.redesign-panel {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: calc(16 * var(--vw-unit)) !important;
  box-sizing: border-box;
}

/* ── Toggle switch ───────────────────────────────────────────────────────── */
.switch {
  position: relative;
  display: inline-block;
  width: calc(44 * var(--vw-unit));
  height: calc(24 * var(--vh-unit));
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: calc(24 * var(--vw-unit));
}

.slider:before {
  position: absolute;
  content: "";
  height: calc(18 * var(--vw-unit));
  width: calc(18 * var(--vw-unit));
  left: calc(3 * var(--vw-unit));
  bottom: calc(3 * var(--vh-unit));
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #F6339A;
}

input:checked+.slider:before {
  transform: translateX(calc(20 * var(--vw-unit)));
}

/* Database toggle variant */
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--brand-field-bg);
  border: 1px solid var(--brand-field-border);
  border-radius: calc(20 * var(--vw-unit));
  transition: background-color 0.3s, border-color 0.3s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: calc(14 * var(--vw-unit));
  width: calc(14 * var(--vw-unit));
  left: calc(2 * var(--vw-unit));
  bottom: calc(2 * var(--vh-unit));
  background-color: var(--text-slate-400);
  border-radius: 50%;
  transition: transform 0.3s, background-color 0.3s;
}

input:checked+.switch-slider {
  background-color: rgba(0, 201, 80, 0.2);
  border-color: rgba(0, 201, 80, 0.5);
}

input:checked+.switch-slider::before {
  transform: translateX(calc(20 * var(--vw-unit)));
  background-color: var(--brand-active);
}

/* ── Line-time buttons (venue manage) ───────────────────────────────────── */
.line-time-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: calc(14 * var(--vw-unit));
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  font-size: calc(16 * var(--vw-unit));
  padding: calc(12 * var(--vw-unit));
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  flex: 1;
}

.line-time-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.line-time-btn.active {
  background: rgba(246, 51, 154, 0.2) !important;
  border: 1px solid rgba(246, 51, 154, 0.3) !important;
  color: #ffffff !important;
}

/* ════════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: calc(16 * var(--vh-unit));
  left: calc(16 * var(--vw-unit));
  z-index: 90;
  background: #1a1b35;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: calc(44 * var(--vw-unit));
  height: calc(44 * var(--vw-unit));
  border-radius: calc(12 * var(--vw-unit));
  cursor: pointer;
  box-shadow: 0 calc(4 * var(--vw-unit)) calc(12 * var(--vw-unit)) rgba(0, 0, 0, 0.3);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1100;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: flex;
  }

  .mobile-sidebar-close {
    display: block !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: calc(-280 * var(--vw-unit)) !important;
    transition: transform 0.3s ease !important;
    z-index: 1200 !important;
  }

  body.sidebar-open .sidebar {
    transform: translateX(calc(280 * var(--vw-unit))) !important;
  }

  body.sidebar-open .sidebar-overlay {
    display: block !important;
  }

  .main {
    padding-top: calc(70 * var(--vh-unit)) !important;
  }

  .page {
    padding: calc(16 * var(--vw-unit)) calc(16 * var(--vw-unit)) calc(32 * var(--vw-unit));
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .event-card {
    grid-template-columns: auto 1fr;
  }

  .event-card .ev-actions {
    display: none;
  }

  .modal-card {
    max-width: 100% !important;
    max-height: 90vh !important;
  }
}
/* ── Mobile responsiveness (admin portal) ────────────────────────────────────
   Appended last on purpose: these override the fixed-shell rules above without
   needing to interleave with them, so the desktop layout is untouched. */
@media (max-width: 768px) {
  /* The shell above is position:fixed with overflow:hidden on html/body and
     .main as the only scroll container. On mobile browsers that fights the
     URL-bar resize and can leave the bottom of a page unreachable, so hand
     scrolling back to the document itself. */
  html,
  body {
    overflow: visible !important;
    overflow-x: hidden !important;
    height: auto !important;
  }

  .app {
    display: block !important;
    position: static !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  .main {
    overflow-y: visible !important;
  }

  /* Lock the page behind the drawer rather than letting both scroll. */
  body.sidebar-open {
    overflow: hidden !important;
  }

  /* Nothing may force the page wider than the viewport. */
  .page-sticky-header-inner,
  .page-body {
    width: 100%;
    max-width: 100vw !important;
    box-sizing: border-box;
  }

  .page-sticky-header-inner > div {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .main-tabs {
    width: 100%;
  }

  /* Two-up modal fields don't fit a phone. */
  .modal-body .field-row {
    grid-template-columns: 1fr !important;
  }

  /* Stacked fields need their own spacing here. Scoped to mobile deliberately:
     on desktop the surrounding flex/grid gaps already space these, and a global
     margin would double it on every form in the portal. */
  .input,
  .search,
  .select,
  textarea,
  .redesign-input {
    margin-bottom: calc(16 * var(--vh-unit));
  }

  /* Icon search sits in its own wrapper — no extra gap. */
  .search-with-icon input {
    margin-bottom: 0;
  }
}
