/* =============================================================
   DPF26 Festival Passport System — Admin Stylesheet
   ============================================================= */

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

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

:root {
  --primary:    #1e3a8a;
  --primary-lt: #2563eb;
  --accent:     #41C1F9;
  --success:    #22c55e;
  --danger:     #ef4444;
  --warning:    #f59e0b;
  --bg:         #f1f5f9;
  --card:       #ffffff;
  --border:     #e2e8f0;
  --text:       #0f172a;
  --text-muted: #64748b;
  --sidebar-bg: #0f172a;
  --sidebar-w:  260px;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--primary-lt); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ────────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform .3s;
}

.sidebar__brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar__logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-lt), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.sidebar__logo-text {
  line-height: 1.2;
}

.sidebar__logo-title {
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
}

.sidebar__logo-sub {
  font-size: .7rem;
  color: rgba(255,255,255,.4);
}

.sidebar__nav {
  flex: 1;
  padding: 16px 12px;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section__label {
  font-size: .65rem;
  font-weight: 700;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,.6);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all .2s;
  cursor: pointer;
}

.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(37, 99, 235, .3); color: #fff; font-weight: 700; }
.nav-item.active .nav-item__icon { color: var(--accent); }

.nav-item__icon { font-size: 1.1rem; width: 20px; text-align: center; }

.nav-item__badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  border-radius: 50px;
  font-size: .68rem;
  font-weight: 800;
  padding: 2px 8px;
  min-width: 22px;
  text-align: center;
}

.sidebar__footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
}

.sidebar__user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary-lt), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.sidebar__user-name  { font-size: .82rem; font-weight: 700; color: #fff; }
.sidebar__user-role  { font-size: .68rem; color: rgba(255,255,255,.4); }

.sidebar__user-logout {
  margin-left: auto;
  color: rgba(255,255,255,.4);
  font-size: .9rem;
  cursor: pointer;
}

/* ── Main content ──────────────────────────────────────────── */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top bar ───────────────────────────────────────────────── */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar__title { font-size: 1rem; font-weight: 700; }
.topbar__sub   { font-size: .78rem; color: var(--text-muted); }

.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__time {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Content area ──────────────────────────────────────────── */
.content {
  padding: 32px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-title { font-size: 1.5rem; font-weight: 800; }
.page-sub   { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }

/* ── Stats cards ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-card__info {}
.stat-card__label { font-size: .78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.stat-card__value { font-size: 2rem; font-weight: 900; line-height: 1; }
.stat-card__change { font-size: .78rem; color: var(--text-muted); margin-top: 6px; }
.stat-card__change.up   { color: var(--success); }
.stat-card__change.down { color: var(--danger); }

.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-card__icon--blue   { background: rgba(37,99,235,.12);   color: var(--primary-lt); }
.stat-card__icon--green  { background: rgba(34,197,94,.12);   color: var(--success); }
.stat-card__icon--amber  { background: rgba(245,158,11,.12);  color: var(--warning); }
.stat-card__icon--purple { background: rgba(168,85,247,.12);  color: #a855f7; }
.stat-card__icon--red    { background: rgba(239,68,68,.12);   color: var(--danger); }
.stat-card__icon--cyan   { background: rgba(65,193,249,.12);  color: var(--accent); }

/* ── Admin Cards ───────────────────────────────────────────── */
.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 24px;
  overflow: hidden;
}

.admin-card__head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-card__title  { font-size: 1rem; font-weight: 700; }
.admin-card__sub    { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }
.admin-card__body   { padding: 24px; }

/* ── Management Screens ───────────────────────────────────── */
.mgmt-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  box-shadow: 0 10px 28px rgba(15,23,42,.04);
}
.mgmt-hero__eyebrow {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary-lt);
  margin-bottom: 6px;
}
.mgmt-hero__title {
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: -.01em;
}
.mgmt-hero__sub {
  max-width: 680px;
  margin-top: 5px;
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.mgmt-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 10px;
}
.mgmt-metric {
  min-width: 92px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.mgmt-metric__value {
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1;
}
.mgmt-metric__label {
  margin-top: 5px;
  font-size: .66rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.mgmt-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #eaf0f7;
  margin-bottom: 18px;
}
.mgmt-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}
.mgmt-tab:hover { text-decoration: none; background: rgba(255,255,255,.55); }
.mgmt-tab.active { color: var(--text); background: var(--card); box-shadow: 0 1px 4px rgba(15,23,42,.08); }
.mgmt-empty {
  padding: 42px 24px;
  text-align: center;
  color: var(--text-muted);
}
.mgmt-empty__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37,99,235,.08);
  color: var(--primary-lt);
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.mgmt-empty__title { font-weight: 800; color: var(--text); margin-bottom: 4px; }
.mgmt-empty__sub { font-size: .84rem; }
.action-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.code-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 7px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: #334155;
  font-family: 'Courier New', monospace;
  font-size: .78rem;
  font-weight: 700;
}

/* Compatibility polish for older admin pages using .card / legacy modifiers. */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15,23,42,.035);
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg,#fff,#fbfdff);
}
.card-title { font-size: 1rem; font-weight: 800; }
.card-body { padding: 24px; }
.mb-4 { margin-bottom: 24px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table tbody td { background: #fff; }
.data-table tbody tr:hover td { background: #f8fafc; }
.card .form-group label {
  display: block;
  font-size: .74rem;
  font-weight: 750;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.card input[type="text"],
.card input[type="password"],
.card input[type="tel"],
.card input[type="url"],
.card input[type="number"],
.card input[type="date"],
.card input[type="time"],
.card input[type="file"],
.card textarea,
.card select,
.modal-box input,
.modal-box textarea,
.modal-box select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: .88rem;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.card input:focus,
.card textarea:focus,
.card select:focus,
.modal-box input:focus,
.modal-box textarea:focus,
.modal-box select:focus {
  border-color: var(--primary-lt);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.card textarea { min-height: 76px; resize: vertical; }
.btn-primary { background: var(--primary-lt); color: #fff; }
.btn-primary:hover { background: var(--primary); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .8rem; border-radius: 7px; }
.badge-success { background: rgba(34,197,94,.12); color: #16a34a; }
.badge-muted { background: rgba(100,116,139,.12); color: var(--text-muted); }
.badge-danger { background: rgba(239,68,68,.12); color: #dc2626; }

.schedule-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.schedule-form-grid .form-group { margin-bottom: 0; min-width: 0; }
.schedule-form-grid .field-full { grid-column: span 12; }
.schedule-form-grid .field-third { grid-column: span 4; }
.schedule-form-grid .field-quarter { grid-column: span 3; }
.schedule-form-grid label {
  min-height: 2.2em;
  line-height: 1.15;
  display: flex !important;
  align-items: flex-end;
  flex-wrap: wrap;
  column-gap: 4px;
}
.schedule-form-grid input,
.schedule-form-grid select,
.schedule-form-grid textarea {
  min-height: 42px;
}
.schedule-check-row {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 2px;
}
.schedule-check-row label {
  min-height: 0;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  color: var(--text);
  font-size: .86rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
}
.schedule-check-row input { width: auto; min-height: 0; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

thead th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(0,0,0,.02); }

tbody td {
  padding: 14px 16px;
  vertical-align: middle;
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.badge--success   { background: rgba(34,197,94,.12);   color: #16a34a; }
.badge--warning   { background: rgba(245,158,11,.12);  color: #d97706; }
.badge--danger    { background: rgba(239,68,68,.12);   color: #dc2626; }
.badge--info      { background: rgba(65,193,249,.12);  color: #0284c7; }
.badge--secondary { background: rgba(100,116,139,.12); color: var(--text-muted); }
.badge--gold      { background: rgba(245,158,11,.15);  color: #d97706; }
.badge--purple    { background: rgba(168,85,247,.12);  color: #9333ea; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .87rem;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn--primary { background: var(--primary-lt); color: #fff; }
.btn--primary:hover { background: var(--primary); color: #fff; }

.btn--success { background: #16a34a; color: #fff; }
.btn--success:hover { background: #15803d; color: #fff; }

.btn--danger  { background: #dc2626; color: #fff; }
.btn--danger:hover { background: #b91c1c; color: #fff; }

.btn--warning { background: #d97706; color: #fff; }
.btn--warning:hover { background: #b45309; color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--outline:hover { background: var(--bg); }

.btn--sm { padding: 6px 12px; font-size: .8rem; border-radius: 7px; }
.btn--lg { padding: 12px 24px; font-size: 1rem; border-radius: 10px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: .9rem;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-lt);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 9px;
  margin-bottom: 18px;
  font-size: .88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.3);  color: #166534; }
.alert-error   { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.3);   color: #991b1b; }
.alert-danger  { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.3);   color: #991b1b; }
.alert-info    { background: rgba(37,99,235,.08);  border: 1px solid rgba(37,99,235,.25);  color: #1d4ed8; }
.alert-warning { background: rgba(245,158,11,.1);  border: 1px solid rgba(245,158,11,.3);  color: #92400e; }

/* ── Search & Filters ──────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .9rem; }
.search-input { padding-left: 36px !important; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}

.page-btn:hover { background: var(--bg); text-decoration: none; }
.page-btn.active { background: var(--primary-lt); color: #fff; border-color: var(--primary-lt); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Visitor avatar ────────────────────────────────────────── */
.vis-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-lt), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.vis-info-wrap { display: flex; align-items: center; gap: 10px; }
.vis-name      { font-weight: 600; font-size: .9rem; }
.vis-sub       { font-size: .75rem; color: var(--text-muted); }

/* ── Progress bar ──────────────────────────────────────────── */
.mini-progress {
  height: 6px;
  background: var(--bg);
  border-radius: 50px;
  overflow: hidden;
  min-width: 80px;
}

.mini-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-lt), var(--accent));
  border-radius: 50px;
  transition: width .4s;
}

.mini-progress__bar--complete { background: linear-gradient(90deg, #16a34a, #22c55e); }

/* ── Zone card ─────────────────────────────────────────────── */
.zone-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  transition: box-shadow .2s;
}

.zone-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }

.zone-card__left { display: flex; align-items: center; gap: 14px; }
.zone-card__emoji { font-size: 1.8rem; }
.zone-card__code  { font-family: 'Courier New', monospace; font-size: .78rem; color: var(--text-muted); background: var(--bg); padding: 2px 8px; border-radius: 4px; }
.zone-card__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zone-card__scans { font-size: .82rem; color: var(--text-muted); }

/* ── Dashboard two-col ─────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* ── Activity list ─────────────────────────────────────────── */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; margin-top: 6px; }
.activity-dot--warn { background: var(--warning); }
.activity-text  { font-size: .88rem; font-weight: 500; }
.activity-time  { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }

/* ── Login page ────────────────────────────────────────────── */
.login-body { margin: 0; background: #030B1F; }

.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative; overflow: hidden;
  background: #030B1F;
}

/* Background orbs */
.login-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.l-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .22;
  animation: lOrbDrift ease-in-out infinite;
}
.l-orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, #7c3aed, transparent 70%); top: -240px; left: -180px; animation-duration: 13s; }
.l-orb-2 { width: 480px; height: 480px; background: radial-gradient(circle, #2dd4bf, transparent 70%); bottom: -180px; right: -130px; animation-duration: 16s; animation-delay: -6s; }
.l-orb-3 { width: 340px; height: 340px; background: radial-gradient(circle, #ec4899, transparent 70%); top: 38%; left: 58%; animation-duration: 11s; animation-delay: -3s; opacity:.18; }
.l-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(59,130,246,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(59,130,246,.04) 1px, transparent 1px);
  background-size: 44px 44px;
}
@keyframes lOrbDrift {
  0%,100% { transform: translate(0, 0); }
  50%      { transform: translate(28px, -18px); }
}

/* Login card */
.login-box {
  position: relative; z-index: 1;
  background: rgba(8, 14, 36, 0.88);
  border: 1px solid rgba(124,58,237,.28);
  border-radius: 28px;
  padding: 52px 44px 44px;
  width: 100%; max-width: 430px;
  backdrop-filter: blur(32px) saturate(170%);
  -webkit-backdrop-filter: blur(32px) saturate(170%);
  box-shadow: 0 40px 100px rgba(0,0,0,.72),
              0 0 0 1px rgba(255,255,255,.05),
              inset 0 1px 0 rgba(255,255,255,.08),
              0 0 80px rgba(124,58,237,.08);
  overflow: hidden;
}
.login-box-shimmer {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(124,58,237,.06) 50%, transparent 70%);
  animation: lShimmer 6s ease-in-out infinite;
}
@keyframes lShimmer {
  0%,100% { opacity: .5; }
  50%      { opacity: 1; }
}

/* Logo */
.login-logo { text-align: center; margin-bottom: 38px; position: relative; z-index: 1; }
.login-logo-ring {
  width: 90px; height: 90px; border-radius: 24px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(124,58,237,.3), rgba(45,212,191,.2));
  border: 1px solid rgba(124,58,237,.4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 36px rgba(124,58,237,.38), inset 0 1px 0 rgba(255,255,255,.1);
}
.login-logo-img { width: 64px; height: 64px; object-fit: contain; }
.login-logo__event {
  display: inline-block;
  background: linear-gradient(90deg, #7c3aed, #2dd4bf);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-size: .68rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase;
  margin-bottom: 8px;
}
.login-logo__title {
  font-size: 1.45rem; font-weight: 900; color: #fff;
  letter-spacing: -.025em;
}
.login-logo__sub {
  font-size: .74rem; color: rgba(148,163,184,.68);
  margin-top: 5px; letter-spacing: .08em; text-transform: uppercase;
}
.login-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,.3), rgba(45,212,191,.3), transparent);
  margin: 0 0 28px; position: relative; z-index: 1;
}

/* Error alert */
.login-alert {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 22px; padding: 11px 14px;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.28);
  border-radius: 10px; color: #fca5a5; font-size: .83rem; font-weight: 600;
  position: relative; z-index: 1;
}
.login-alert svg { flex-shrink: 0; }

/* Fields */
.l-field {
  margin-bottom: 20px; position: relative; z-index: 1;
}
.l-field label {
  display: block; margin-bottom: 8px;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(148,163,184,.8);
}
.l-input-wrap { position: relative; }
.l-input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(124,58,237,.65); pointer-events: none; transition: color .2s;
}
.l-input-wrap input {
  width: 100%; padding: 13px 14px 13px 42px; box-sizing: border-box;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 13px; color: #e2e8f0;
  font-size: .9rem; font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.l-input-wrap input::placeholder { color: rgba(148,163,184,.35); }
.l-input-wrap input:focus {
  border-color: rgba(124,58,237,.65);
  background: rgba(124,58,237,.08);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.l-input-wrap input:focus + .l-input-icon,
.l-input-wrap:focus-within .l-input-icon { color: rgba(124,58,237,1); }

/* Submit button */
.l-btn {
  position: relative; z-index: 1;
  width: 100%; margin-top: 12px; padding: 15px 20px;
  background: linear-gradient(135deg, #7c3aed 0%, #2dd4bf 100%);
  border: none; border-radius: 13px; color: #fff;
  font-size: .95rem; font-weight: 800; letter-spacing: .04em;
  cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 6px 28px rgba(124,58,237,.5);
}
.l-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.14) 0%, transparent 60%);
  transition: opacity .2s;
}
.l-btn:hover:not(:disabled) {
  opacity: .95; transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(124,58,237,.6);
}
.l-btn:active:not(:disabled) { transform: translateY(0); }
.l-btn:disabled { cursor: not-allowed; opacity: .7; }
.l-btn-text { transition: opacity .2s; }
.l-btn-arrow { transition: opacity .2s, transform .2s; }
.l-btn-spinner {
  display: none; width: 17px; height: 17px; flex-shrink: 0;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; animation: lSpin .65s linear infinite;
}
.l-btn.is-loading .l-btn-text { opacity: .55; }
.l-btn.is-loading .l-btn-arrow { opacity: 0; transform: translateX(6px); }
.l-btn.is-loading .l-btn-spinner { display: block; }
@keyframes lSpin { to { transform: rotate(360deg); } }

/* Back link */
.login-back {
  text-align: center; margin-top: 26px; font-size: .78rem;
  position: relative; z-index: 1;
}
.login-back a {
  color: rgba(148,163,184,.5); text-decoration: none;
  transition: color .2s;
}
.login-back a:hover { color: rgba(148,163,184,.9); }

/* ── Redemption ────────────────────────────────────────────── */
.redemption-card {
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color .2s;
}

.redemption-card.eligible    { border-color: rgba(34,197,94,.4); }
.redemption-card.redeemed    { border-color: var(--border); opacity: .7; }
.redemption-card.not-eligible { border-color: var(--border); opacity: .6; }

/* ── Mobile sidebar toggle ─────────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .topbar { padding: 0 20px; }
  .content { padding: 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .mgmt-hero { grid-template-columns: 1fr; padding: 18px; }
  .mgmt-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .mgmt-metric { min-width: 0; padding: 10px; }
  .schedule-form-grid .field-quarter,
  .schedule-form-grid .field-third { grid-column: span 6; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-box { padding: 34px 24px; }
  .mgmt-metrics { grid-template-columns: 1fr; }
  .mgmt-tabs { width: 100%; overflow-x: auto; }
  .schedule-form-grid .field-quarter,
  .schedule-form-grid .field-third,
  .schedule-form-grid .field-full { grid-column: span 12; }
  .schedule-form-grid label { min-height: 0; }
}

/* ── Utility ───────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-success { color: #16a34a; }
.text-danger  { color: var(--danger); }
.text-sm      { font-size: .84rem; }
.text-xs      { font-size: .75rem; }
.fw-700       { font-weight: 700; }
.fw-800       { font-weight: 800; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-20        { margin-top: 20px; }
.mb-0         { margin-bottom: 0; }
.mb-16        { margin-bottom: 16px; }
.mb-24        { margin-bottom: 24px; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }
.justify-between { justify-content: space-between; }

/* ── Language Switcher ─────────────────────────────── */
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 26px; padding: 0 8px;
  font-size: .66rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none;
  border: 1.5px solid rgba(96, 165, 250, .25);
  border-radius: 6px; background: rgba(96, 165, 250, .08);
  color: #60a5fa; transition: all .2s;
  cursor: pointer; margin-left: 8px; line-height: 1;
}
.lang-switch:hover {
  background: rgba(96, 165, 250, .18);
  border-color: rgba(96, 165, 250, .5);
  color: #93c5fd;
}
