/* ════════════════════════════════════════════════
   NEW STYLES — appended to dashboard.css
   (Keeping existing vars, adding page/component styles)
════════════════════════════════════════════════ */
/* ────────────────────────────────────────────────
   This file REPLACES dashboard.css entirely
────────────────────────────────────────────────── */

:root {
  --bg-base:      #07111f;
  --bg-panel:     #0b1a2e;
  --bg-card:      #0d2040;
  --bg-card-alt:  #091628;
  --gold:         #c9a84c;
  --gold-light:   #e3c97e;
  --gold-dim:     #7a5e28;
  --gold-glow:    rgba(201,168,76,0.18);
  --blue-accent:  #1a5fa8;
  --white:        #eee8d8;
  --white-dim:    rgba(238,232,216,0.55);
  --border:       rgba(201,168,76,0.15);
  --text-muted:   rgba(238,232,216,0.32);
  --green:        #2ecc71;
  --red:          #e74c3c;
  --orange:       #f39c12;
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Montserrat', sans-serif;
  --sidebar-w:    238px;
  --radius:       12px;
  --transition:   0.3s cubic-bezier(0.4,0,0.2,1);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

body.dashboard-locked .sidebar,
body.dashboard-locked .main-content {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.dashboard-unlocked .sidebar,
body.dashboard-unlocked .main-content {
  visibility: visible;
  opacity: 1;
}

.hidden { display: none !important; }

.admin-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: radial-gradient(circle at 20% 20%, rgba(201,168,76,0.12), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(26,95,168,0.25), transparent 50%),
    rgb(4, 10, 20);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.admin-login-card {
  width: 100%;
  max-width: 410px;
  background: linear-gradient(160deg, rgb(13,32,64), rgb(9,22,40));
  border: 1px solid rgba(201,168,76,0.32);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  padding: 1.5rem;
}

.admin-login-mark {
  width: fit-content;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 999px;
  padding: 4px 10px;
}

.admin-login-title {
  margin-top: 0.8rem;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--gold-light);
}

.admin-login-sub {
  margin-top: 0.25rem;
  font-size: 0.73rem;
  color: var(--white-dim);
}

.admin-login-form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-login-label {
  margin-top: 0.35rem;
  font-size: 0.67rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-login-input {
  width: 100%;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px;
  background: rgba(7,17,31,0.8);
  color: var(--white);
  padding: 0.65rem 0.75rem;
  font-size: 0.84rem;
  outline: none;
}

.admin-login-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.admin-login-error {
  min-height: 1rem;
  font-size: 0.7rem;
  color: #ff8b8b;
  margin-top: 0.3rem;
}

.admin-login-submit {
  margin-top: 0.25rem;
  border: 1px solid rgba(201,168,76,0.38);
  background: linear-gradient(135deg, rgba(201,168,76,0.25), rgba(122,94,40,0.32));
  color: var(--gold-light);
  border-radius: 9px;
  padding: 0.72rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.admin-login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ═══════════ SIDEBAR ═══════════ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 200px;
  background: radial-gradient(ellipse at 50% 100%, rgba(201,168,76,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar-logo {
  padding: 1.3rem 1.3rem 1rem;
  border-bottom: 1px solid var(--border);
}

.logo-emblem {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  padding: 4px 10px;
  width: fit-content;
  margin-bottom: 6px;
}

.logo-title    { font-family: var(--font-serif); font-size: 0.9rem; color: var(--gold-light); letter-spacing: 0.05em; font-weight: 300; }
.logo-subtitle { font-size: 0.58rem; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 2px; }

.sidebar-nav {
  flex: 1;
  padding: 1.1rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.53rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 0.6rem 0.8rem 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--white-dim);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.55; transition: opacity var(--transition); }
.nav-item:hover { background: rgba(201,168,76,0.07); color: var(--gold-light); }
.nav-item:hover svg { opacity: 1; }
.nav-item.active { background: rgba(201,168,76,0.12); color: var(--gold); font-weight: 500; }
.nav-item.active svg { opacity: 1; color: var(--gold); }

.sidebar-footer {
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
}

.admin-badge { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bg-base);
  flex-shrink: 0;
}

.admin-name { font-size: 0.73rem; font-weight: 500; }
.admin-role { font-size: 0.58rem; color: var(--text-muted); }

.sidebar-logout {
  width: 100%;
  margin-top: 0.8rem;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px;
  background: rgba(201,168,76,0.08);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.6rem;
  text-transform: uppercase;
  cursor: pointer;
}

.sidebar-logout:hover {
  background: rgba(201,168,76,0.16);
}

/* ═══════════ MAIN CONTENT ═══════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.7rem;
  border-bottom: 1px solid var(--border);
  background: rgba(11,26,46,0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 300; color: var(--gold-light); }
.topbar-meta  { font-size: 0.65rem; color: var(--text-muted); margin-top: 2px; }

.topbar-right { display: flex; align-items: center; gap: 0.9rem; }

.campaign-picker-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 240px;
}

.campaign-picker-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.campaign-picker-select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.44rem 0.7rem;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.69rem;
  outline: none;
  cursor: pointer;
}

.campaign-picker-select:focus {
  border-color: var(--gold);
}

.campaign-picker-select:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.campaign-picker-select option {
  background: var(--bg-card);
}

.campaign-picker-status {
  min-height: 0.85rem;
  font-size: 0.58rem;
  color: var(--text-muted);
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(46,204,113,0.1);
  border: 1px solid rgba(46,204,113,0.3);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.12em;
}

.live-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-live 1.4s ease-in-out infinite;
}

@keyframes pulse-live {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

.topbar-btn {
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  letter-spacing: 0.07em;
  transition: background var(--transition);
}

.topbar-btn:hover { background: rgba(201,168,76,0.18); }

/* ═══════════ PAGE CONTENT ═══════════ */
.page-content { display: none; }
.page-content.active { display: block; }

.content-area {
  padding: 1.5rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.page-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-h1     { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 300; color: var(--gold-light); }
.page-h1-sub { font-size: 0.68rem; color: var(--text-muted); margin-top: 3px; }

/* ═══════════ KPI GRID ═══════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.45;
}

.kpi-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,168,76,0.15); }

.kpi-label  { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.45rem; }
.kpi-value  { font-family: var(--font-serif); font-size: 1.85rem; font-weight: 600; color: var(--gold-light); line-height: 1.1; margin-bottom: 0.35rem; }
.kpi-change { font-size: 0.65rem; font-weight: 500; }
.kpi-change.up   { color: var(--green); }
.kpi-change.down { color: var(--red); }

.kpi-icon {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  width: 32px; height: 32px;
  background: rgba(201,168,76,0.07);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* ═══════════ CHARTS ═══════════ */
.charts-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.1rem; }

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.chart-title { font-family: var(--font-serif); font-size: 0.95rem; font-weight: 300; color: var(--gold-light); }
.chart-sub   { font-size: 0.62rem; color: var(--text-muted); margin-top: 2px; }

.chart-legend { display: flex; gap: 0.8rem; }
.legend-item {
  font-size: 0.62rem;
  color: var(--white-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-item::before { content:''; width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.legend-item.gold::before { background: #c9a84c; }
.legend-item.blue::before { background: #5b9bd5; }

.chart-svg-wrap { width: 100%; overflow: hidden; }
.chart-svg-wrap svg { width: 100%; height: auto; display: block; }

#chart-gender {
  width: min(100%, 420px);
  height: auto;
  max-height: 220px;
  margin: 0 auto;
}

/* ═══════════ HOURLY HEATMAP ═══════════ */
.hourly-heatmap {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 4px;
  padding: 0.5rem 0;
}

.heat-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  transition: transform 0.15s ease;
  cursor: default;
  position: relative;
}

.heat-cell:hover { transform: scale(1.2); z-index: 2; }
.heat-cell::after {
  content: attr(data-hour);
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.45rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ═══════════ MAP ═══════════ */
.map-table-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.1rem; }

.map-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  position: relative;
}

.map-title { font-family: var(--font-serif); font-size: 0.95rem; font-weight: 300; color: var(--gold-light); }
.map-sub   { font-size: 0.62rem; color: var(--text-muted); margin-top: 2px; margin-bottom: 0.8rem; }

.turkey-map-container { width: 100%; overflow: hidden; }
.turkey-map-container svg { width: 100%; height: auto; display: block; }

/* Province paths — default state */
#turkey-map path.province,
#turkey-map-geo path.province {
  fill: rgba(18, 50, 100, 0.5);
  stroke: rgba(201,168,76,0.22);
  stroke-width: 0.5;
  cursor: pointer;
  transition: fill 0.22s ease, stroke 0.22s ease, stroke-width 0.22s ease, filter 0.22s ease;
}

/* Hover — golden glow */
#turkey-map path.province:hover,
#turkey-map-geo path.province:hover {
  fill: rgba(201,168,76,0.5);
  stroke: rgba(227,201,126,0.9);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 4px rgba(201,168,76,0.5));
}

/* Selected/highlighted */
#turkey-map path.province.highlighted,
#turkey-map-geo path.province.highlighted {
  fill: rgba(201,168,76,0.68);
  stroke: var(--gold-light);
  stroke-width: 1.8;
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.6));
}

/* City labels */
.labels-group text { user-select: none; }

/* City Tooltip */
.city-tooltip {
  position: fixed;
  background: linear-gradient(135deg, var(--bg-panel) 0%, rgba(11,26,46,0.98) 100%);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 10px;
  padding: 10px 13px;
  min-width: 195px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.65), 0 0 0 1px rgba(201,168,76,0.08) inset;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transform: scale(0.92) translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.city-tooltip.visible { opacity: 1; transform: scale(1) translateY(0); }
.tooltip-city { font-family: var(--font-serif); font-size: 1rem; color: var(--gold-light); margin-bottom: 7px; letter-spacing: 0.03em; }
.tooltip-row  { display: flex; justify-content: space-between; font-size: 0.68rem; padding: 3px 0; border-bottom: 1px solid rgba(201,168,76,0.08); color: var(--white-dim); }
.tooltip-row:last-child { border-bottom: none; }
.tooltip-row strong { color: var(--gold); font-weight: 600; }

/* ═══════════ DATA TABLES ═══════════ */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  overflow: hidden;
}

.table-title { font-family: var(--font-serif); font-size: 0.95rem; font-weight: 300; color: var(--gold-light); margin-bottom: 3px; }
.table-sub   { font-size: 0.62rem; color: var(--text-muted); margin-bottom: 0.9rem; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.data-table th {
  text-align: left;
  font-size: 0.57rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid rgba(201,168,76,0.05);
  color: var(--white-dim);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(201,168,76,0.04); color: var(--white); }

.city-rank { color: var(--gold-dim); font-weight: 600; font-size: 0.63rem; }

.product-pill {
  display: inline-block;
  font-size: 0.58rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.pill-36g  { background: rgba(201,168,76,0.12); color: var(--gold); border: 1px solid rgba(201,168,76,0.25); }
.pill-115g { background: rgba(26,95,168,0.15);  color: #7ab4f0;     border: 1px solid rgba(26,95,168,0.3); }

.bar-mini  { height: 3px; background: rgba(201,168,76,0.08); border-radius: 2px; overflow: hidden; margin-top: 3px; }
.bar-fill  { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); border-radius: 2px; }

/* ═══════════ RECENT TABLE ═══════════ */
.recent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  overflow-x: auto;
}

.recent-title { font-family: var(--font-serif); font-size: 0.95rem; font-weight: 300; color: var(--gold-light); margin-bottom: 3px; }
.recent-sub   { font-size: 0.62rem; color: var(--text-muted); margin-bottom: 0.9rem; }

.recent-table { width: 100%; border-collapse: collapse; font-size: 0.71rem; white-space: nowrap; }
.recent-table th {
  text-align: left;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.recent-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(201,168,76,0.05);
  color: var(--white-dim);
}

.recent-table tbody tr { transition: background 0.2s; cursor: pointer; }
.recent-table tbody tr:hover td { background: rgba(201,168,76,0.05); color: var(--gold-light); }
.recent-table tr:last-child td { border-bottom: none; }

.status-badge { display: inline-block; font-size: 0.57rem; font-weight: 600; letter-spacing: 0.07em; padding: 2px 8px; border-radius: 20px; }
.status-active  { background: rgba(46,204,113,0.1); border: 1px solid rgba(46,204,113,0.3); color: var(--green); }
.status-pending { background: rgba(243,156,18,0.1); border: 1px solid rgba(243,156,18,0.3); color: var(--orange); }

/* ═══════════ PARTICIPANTS PAGE EXTRAS ═══════════ */
.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  outline: none;
  width: 220px;
  transition: border-color var(--transition);
}

.search-input:focus { border-color: var(--gold); }
.search-input::placeholder { color: var(--text-muted); }

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  outline: none;
  cursor: pointer;
}

.filter-select option { background: var(--bg-card); }

.summary-strips {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.strip-item { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; }
.strip-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.strip-label { color: var(--text-muted); }
.strip-value { color: var(--white-dim); font-weight: 500; }

/* ═══════════ ANALYTICS PAGE ═══════════ */
.goal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.goal-label    { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.4rem; }
.goal-value    { font-size: 0.85rem; color: var(--gold-light); font-weight: 500; margin-bottom: 0.6rem; }
.goal-bar-wrap { background: rgba(201,168,76,0.08); border-radius: 4px; height: 6px; overflow: hidden; margin-bottom: 0.4rem; }
.goal-bar      { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); border-radius: 4px; transition: width 1.5s ease; }
.goal-pct      { font-size: 0.65rem; color: var(--text-muted); }

.funnel-chart { display: flex; flex-direction: column; gap: 8px; padding: 0.5rem 0; }

.funnel-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.funnel-label { min-width: 140px; font-size: 0.72rem; color: var(--white-dim); text-align: right; }
.funnel-bar-wrap { flex: 1; background: rgba(201,168,76,0.06); border-radius: 4px; height: 28px; overflow: hidden; }
.funnel-bar {
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--bg-base);
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transition: width 1.2s ease;
}

.funnel-value { min-width: 80px; font-size: 0.7rem; color: var(--gold); font-weight: 600; }

/* ═══════════ SETTINGS PAGE ═══════════ */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
}

.settings-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--gold-light);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(201,168,76,0.06);
  font-size: 0.72rem;
  color: var(--white-dim);
}

.settings-row:last-child { border-bottom: none; }
.settings-row strong { color: var(--white); font-weight: 500; text-align: right; }
.settings-row span:first-child { color: var(--text-muted); }

.tag-active { background: rgba(46,204,113,0.1); border: 1px solid rgba(46,204,113,0.3); color: var(--green); font-size: 0.6rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.tag-used   { background: rgba(243,156,18,0.1);  border: 1px solid rgba(243,156,18,0.3);  color: var(--orange); font-size: 0.6rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }

/* ═══════════ MODAL ═══════════ */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal.hidden { display: none !important; }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(7, 17, 31, 0.85);
  backdrop-filter: blur(8px);
}
.modal-content {
  position: relative; z-index: 1001;
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.1);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.95) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--gold); }

.modal-header {
  padding: 1.5rem 1.8rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1.2rem;
}
.modal-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg-card); font-size: 1.4rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.modal-title h2 { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 300; color: var(--gold-light); margin-bottom: 4px; }
.modal-subtitle { font-family: var(--font-sans); font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.05em; }

.modal-body { padding: 1.5rem 1.8rem; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.modal-info-card { background: rgba(201,168,76,0.03); border: 1px solid rgba(201,168,76,0.1); border-radius: 8px; padding: 1rem; }
.m-label { font-size: 0.6rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.1em; margin-bottom: 6px; }
.m-value { font-size: 0.85rem; color: var(--white); font-weight: 500; }

.modal-section-title { font-size: 0.75rem; color: var(--gold-dim); letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin-top: 1rem; }

.modal-totals { margin-top: 1rem; padding: 1rem; background: rgba(46,204,113,0.05); border: 1px solid rgba(46,204,113,0.2); border-radius: 8px; text-align: center; font-size: 0.8rem; color: var(--white-dim); }
.modal-totals strong { color: var(--green); }

/* ═══════════ SCROLLBAR ═══════════ */
::-webkit-scrollbar        { width: 5px; height: 5px; }
::-webkit-scrollbar-track  { background: var(--bg-base); }
::-webkit-scrollbar-thumb  { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ═══════════ MAP ANIMATIONS ═══════════ */
@keyframes provinceIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}
.provinces-group {
  animation: provinceIn 0.7s ease forwards;
}
.labels-group {
  animation: provinceIn 1s ease 0.4s both;
}

/* KPI card entrance */
@keyframes kpiSlideIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kpi-card:nth-child(1) { animation: kpiSlideIn 0.45s ease 0.05s both; }
.kpi-card:nth-child(2) { animation: kpiSlideIn 0.45s ease 0.12s both; }
.kpi-card:nth-child(3) { animation: kpiSlideIn 0.45s ease 0.19s both; }
.kpi-card:nth-child(4) { animation: kpiSlideIn 0.45s ease 0.26s both; }
.kpi-card:nth-child(5) { animation: kpiSlideIn 0.45s ease 0.33s both; }

/* Chart card entrance */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chart-card  { animation: cardFadeIn 0.5s ease 0.2s both; }
.table-card  { animation: cardFadeIn 0.5s ease 0.3s both; }
.recent-card { animation: cardFadeIn 0.5s ease 0.35s both; }

/* ═══════════ COUNTDOWN STRIP ═══════════ */
.countdown-strip {
  background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, rgba(13,32,64,0.4) 100%);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: var(--radius);
  padding: 0.85rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.countdown-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}
.cs-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  white-space: nowrap;
}
.cs-clock {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.cs-clock span {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1;
  min-width: 2.2rem;
  text-align: center;
}
.cs-clock span small {
  font-family: var(--font-sans);
  font-size: 0.45rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 600;
}
.cs-sep {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold-dim);
  margin-bottom: 0.5rem;
  line-height: 1;
}
.cs-date {
  margin-left: auto;
  font-size: 0.67rem;
  color: var(--gold-dim);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.cs-ended {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--gold);
}

/* ═══════════ MAP COLOR LEGEND ═══════════ */
.map-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 0 2px;
}
.ml-gradient {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    rgba(12,28,55,0.7)   0%,
    rgba(20,70,150,0.7)  25%,
    rgba(60,140,100,0.72) 55%,
    rgba(201,168,76,0.85) 100%
  );
}
.ml-label {
  font-size: 0.56rem;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* ═══════════ LIVE TICKER ANIMATION ═══════════ */
@keyframes rowSlideIn {
  0%   { opacity: 0; transform: translateX(-14px); }
  100% { opacity: 1; transform: translateX(0); }
}
.row-new td {
  animation: rowSlideIn 0.38s ease forwards;
}

/* ═══════════ PROVINCE SEARCH HIGHLIGHT ═══════════ */
#turkey-map-geo path.province.province-match {
  fill: rgba(201,168,76,0.68) !important;
  stroke: var(--gold-light) !important;
  stroke-width: 1.8 !important;
  filter: drop-shadow(0 0 5px rgba(201,168,76,0.55)) !important;
}
#turkey-map-geo path.province.province-nomatch {
  opacity: 0.22 !important;
  filter: none !important;
}
#turkey-map path.province.province-match {
  fill: rgba(201,168,76,0.68) !important;
  stroke: var(--gold-light) !important;
  stroke-width: 1.8 !important;
}
#turkey-map path.province.province-nomatch {
  opacity: 0.22 !important;
}

/* ═══════════ HAMBURGER BUTTON ═══════════ */
.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 4.5px;
  background: none;
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 7px;
  cursor: pointer;
  padding: 7px 8px;
  transition: background var(--transition), border-color var(--transition);
}
.hamburger-btn:hover { background: rgba(201,168,76,0.08); border-color: rgba(201,168,76,0.35); }
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: all 0.28s ease;
  transform-origin: center;
}
.hamburger-btn.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════ NOTIFICATION TOAST ═══════════ */
.notif-toast {
  position: fixed;
  bottom: 1.6rem;
  right: 1.6rem;
  background: linear-gradient(135deg, rgba(13,32,64,0.97), rgba(10,24,50,0.97));
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 12px;
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.08);
  max-width: 320px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2,0,0,1), opacity 0.35s ease;
}
.notif-toast.notif-visible {
  transform: translateY(0);
  opacity: 1;
}
.notif-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.notif-body { flex: 1; }
.notif-title { font-size: 0.78rem; font-weight: 600; color: var(--gold-light); letter-spacing: 0.02em; }
.notif-sub { font-size: 0.65rem; color: var(--text-muted); margin-top: 2px; }
.notif-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.1rem; cursor: pointer; padding: 0 2px; flex-shrink: 0;
  transition: color var(--transition);
}
.notif-close:hover { color: var(--white); }

/* ═══════════ NAV BADGE ═══════════ */
.nav-badge {
  background: var(--gold);
  color: #07111f;
  font-size: 0.52rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 5px;
  margin-left: auto;
  letter-spacing: 0.02em;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

/* ═══════════ RAFFLE BUTTON ═══════════ */
.raffle-btn {
  background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(201,168,76,0.08)) !important;
  border-color: rgba(201,168,76,0.4) !important;
  color: var(--gold-light) !important;
  font-weight: 600 !important;
  white-space: nowrap;
}
.raffle-btn:hover {
  background: linear-gradient(135deg, rgba(201,168,76,0.28), rgba(201,168,76,0.14)) !important;
  border-color: rgba(201,168,76,0.7) !important;
}

/* ═══════════ RAFFLE MODAL ═══════════ */
.raffle-box {
  max-width: 480px;
  width: 90vw;
  padding: 2rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.raffle-header { text-align: center; margin-bottom: 1.5rem; }
.raffle-title { font-family: var(--font-serif); font-size: 1.6rem; color: var(--gold-light); letter-spacing: 0.04em; }
.raffle-sub { font-size: 0.66rem; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.06em; text-transform: uppercase; }

.raffle-display {
  background: rgba(7,17,31,0.8);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.raffle-spin-label { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }
.raffle-spin-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--white);
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  transition: color 0.1s;
}
.raffle-spin-name.winner-name { color: var(--gold-light) !important; }
.raffle-spin-city { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.06em; }

.raffle-result-card {
  background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(13,32,64,0.4));
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
  margin-bottom: 1rem;
  animation: cardFadeIn 0.5s ease;
}
.raffle-result-card.hidden { display: none; }
.raffle-trophy { font-size: 2rem; margin-bottom: 0.4rem; }
.raffle-winner-name { font-family: var(--font-serif); font-size: 1.4rem; color: var(--gold-light); font-weight: 600; }
.raffle-winner-meta { font-size: 0.68rem; color: var(--white-dim); margin-top: 4px; }
.raffle-winner-email { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; }

.raffle-actions { display: flex; gap: 0.7rem; justify-content: center; margin-top: 0.5rem; }
.btn-raffle-draw {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #07111f;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-raffle-draw:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-raffle-draw:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-raffle-close {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0.65rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-raffle-close:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.raffle-note {
  text-align: center;
  font-size: 0.58rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  letter-spacing: 0.04em;
}

/* Raffle confetti */
.raffle-confetti {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60%;
  pointer-events: none;
  overflow: hidden;
}
@keyframes confettiFall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(200px) rotate(360deg); opacity: 0; }
}
.raffle-confetti-piece {
  position: absolute;
  top: 0;
  animation: confettiFall linear forwards;
}

/* ═══════════ RAFFLE PAGE ═══════════ */

/* Stats bar in header */
.raffle-stats-bar {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.rs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 1.1rem;
  min-width: 90px;
}
.rs-item span {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold-light);
  font-weight: 600;
  line-height: 1.1;
}
.rs-item small {
  font-size: 0.52rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-top: 3px;
  text-align: center;
}

/* Two-column layout */
.raffle-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.2rem;
  align-items: start;
}

/* ── Tambur ── */
.raffle-drum-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 2rem 1.8rem 1.5rem;
}

.rd-top-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.rd-spinner-wrap {
  width: 100%;
  max-width: 480px;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: rgba(7,17,31,0.7);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 12px;
}

/* Fade masks top and bottom */
.rd-blur {
  position: absolute;
  left: 0; right: 0;
  height: 44px;
  z-index: 2;
  pointer-events: none;
}
.rd-blur-top    { top: 0;    background: linear-gradient(to bottom, rgba(7,17,31,1) 0%, transparent 100%); }
.rd-blur-bottom { bottom: 0; background: linear-gradient(to top,   rgba(7,17,31,1) 0%, transparent 100%); }

/* Gold highlight strip across center */
.rd-center-highlight {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 52px;
  transform: translateY(-50%);
  border-top: 1px solid rgba(201,168,76,0.22);
  border-bottom: 1px solid rgba(201,168,76,0.22);
  background: rgba(201,168,76,0.04);
  pointer-events: none;
  z-index: 1;
}

/* Name track centered in drum */
.rd-track {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 0;
  transition: transform 0.05s linear;
}

.rd-track-item {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0.02em;
  transition: color 0.08s;
}

.rd-track-item.rd-idle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.rd-track-item.rd-winner-item {
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(201,168,76,0.5);
  animation: winnerPop 0.4s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
}

@keyframes winnerPop {
  0%   { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1);    opacity: 1; }
}

.rd-track-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Controls */
.rd-controls {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.btn-draw-start {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #07111f;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 4px 18px rgba(201,168,76,0.3);
}
.btn-draw-start:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.4);
}
.btn-draw-start:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-draw-reset {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.75rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-draw-reset:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.rd-weight-note {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-align: center;
}
.rd-weight-note strong { color: var(--gold-dim); }

/* ── Sağ sütun ── */
.raffle-side-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Winner card */
.raffle-winner-card {
  background: linear-gradient(135deg, rgba(201,168,76,0.1) 0%, rgba(13,32,64,0.5) 100%);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 14px;
  padding: 1.4rem 1.2rem;
  text-align: center;
  animation: cardFadeIn 0.45s ease;
}
.raffle-winner-card.hidden { display: none; }
.raffle-winner-card.rw-pop { animation: winnerCardPop 0.6s cubic-bezier(0.175,0.885,0.32,1.275); }

@keyframes winnerCardPop {
  0%   { transform: scale(0.9); }
  60%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.rw-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.rw-name {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--gold-light);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.rw-pkg {
  display: inline-block;
  font-size: 0.62rem;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 20px;
  padding: 2px 10px;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.rw-meta {
  font-size: 0.67rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* History card */
.raffle-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  min-height: 120px;
}
.rh-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.rh-title { font-family: var(--font-serif); font-size: 0.9rem; color: var(--gold-light); }
.rh-count { font-size: 0.62rem; color: var(--text-muted); letter-spacing: 0.06em; }

.rh-list { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.rh-empty { font-size: 0.7rem; color: var(--text-muted); text-align: center; padding: 1rem 0; }

.rh-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  background: rgba(201,168,76,0.03);
  border: 1px solid rgba(201,168,76,0.06);
  animation: rowSlideIn 0.3s ease;
}
.rh-rank { color: var(--gold-dim); font-weight: 700; min-width: 22px; }
.rh-name { color: var(--white); font-weight: 500; flex: 1; }
.rh-city { color: var(--text-muted); font-size: 0.65rem; }
.rh-time { color: var(--text-muted); font-size: 0.62rem; margin-left: auto; white-space: nowrap; }

/* Full-screen confetti for raffle page */
.raffle-confetti-full {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  overflow: hidden;
}
@keyframes rfcFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh)  rotate(540deg); opacity: 0; }
}
.rfc-piece {
  position: absolute;
  top: 10%;
  animation: rfcFall linear forwards;
}

@media (max-width: 900px) {
  .raffle-main-grid { grid-template-columns: 1fr; }
  .raffle-stats-bar { gap: 0.7rem; }
}

/* ═══════════ RESPONSIVE UI FIXES ═══════════ */
@media (max-width: 1100px) {
  .charts-row { grid-template-columns: 1fr; }
  .map-table-row { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 850px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .goal-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-right { gap: 0.55rem; }
  .campaign-picker-wrap { min-width: 170px; }
}

@media (max-width: 768px) {
  .hamburger-btn { display: flex; }

  .sidebar {
    position: fixed;
    top: 0; left: -250px;
    height: 100vh;
    z-index: 300;
    transition: left 0.3s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.3s ease;
    box-shadow: none;
  }
  .sidebar.sidebar-open {
    left: 0;
    box-shadow: 6px 0 40px rgba(0,0,0,0.7);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7,17,31,0.65);
    backdrop-filter: blur(3px);
    z-index: 299;
  }
  .sidebar-backdrop.visible { display: block; }

  body { overflow: hidden; }
  .main-content { width: 100%; overflow-x: hidden; }
  .topbar {
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
  }
  .topbar-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .campaign-picker-wrap {
    min-width: 0;
    width: min(100%, 360px);
  }
}

/* ═══════════ DASHBOARD FOOTER ═══════════ */
.dashboard-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 0.65rem 1.7rem;
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-top: auto;
}
.dashboard-footer .footer-sep { color: rgba(201,168,76,0.2); }
.dashboard-footer a { color: var(--gold-dim); text-decoration: none; transition: color 0.2s; }
.dashboard-footer a:hover { color: var(--gold); }

@media (max-width: 500px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .goal-grid { grid-template-columns: 1fr; }
  .countdown-strip { gap: 0.8rem; }
  .cs-date { display: none; }
}
