/* =============================================================
   RifaWS — Design System Global
   Stack: HTML + CSS Vanilla + JS Puro
   ============================================================= */

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

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Brand (Orange Theme) */
  --brand-purple:   #f97316;
  --brand-violet:   #ea580c;
  --brand-pink:     #f97316;
  --brand-emerald:  #10b981;
  --brand-amber:    #f59e0b;
  --brand-red:      #ef4444;

  /* Gradients */
  --grad-primary:   linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --grad-emerald:   linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-amber:     linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-dark:      linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);

  /* Surfaces */
  --bg:             #f5f7fa;
  --surface-1:      #ffffff;
  --surface-2:      #ffffff;
  --surface-3:      #f8fafc;

  /* Text */
  --text-primary:   #1f2937;
  --text-secondary: #4b5563;
  --text-muted:     #6b7280;

  /* Borders */
  --border:         #e5e7eb;
  --border-hover:   #d1d5db;
  --border-brand:   rgba(249, 115, 22, 0.4);

  /* Status */
  --color-paid:     #10b981;
  --color-pending:  #f59e0b;
  --color-avail:    #f3f4f6;
  --color-selected: #f97316;
  --color-cancelled:#ef4444;

  /* Glow */
  --glow-purple:    0 0 20px rgba(249, 115, 22, 0.2);
  --glow-emerald:   0 0 20px rgba(16, 185, 129, 0.2);

  /* Radius */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* Shadows (Light theme shadows) */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.05);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.05);
  --shadow-card:0 4px 20px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* ─── BACKGROUND ANIMATED ───────────────────────────────── */
.bg-scene {
  position: fixed; inset: 0; z-index: -1;
  background: var(--bg);
}

/* ─── GLASS CARD ─────────────────────────────────────────── */
.glass {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}

.glass-sm {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* ─── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  padding: 0 2rem;
  height: 80px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem; font-weight: 800; letter-spacing: -0.5px;
}
.navbar-brand .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.navbar-links { display: flex; gap: 0.25rem; }
.navbar-links a {
  padding: 0.5rem 1rem; border-radius: var(--r-md);
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  transition: all 0.2s;
}
.navbar-links a:hover { background: var(--surface-3); color: var(--text-primary); }

.navbar-actions { display: flex; gap: 0.75rem; align-items: center; }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.65rem 1.5rem;
  border-radius: var(--r-full);
  font-size: 0.9rem; font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(249,115,22,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(249,115,22,0.5); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-hover); }

.btn-emerald {
  background: var(--grad-emerald); color: #fff;
  box-shadow: 0 4px 20px rgba(16,185,129,0.35);
}
.btn-emerald:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16,185,129,0.45); }

.btn-amber {
  background: var(--grad-amber); color: #fff;
  box-shadow: 0 4px 20px rgba(245,158,11,0.35);
}
.btn-amber:hover { transform: translateY(-2px); }

.btn-ghost {
  background: transparent; color: var(--text-secondary); border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text-primary); }

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

.btn-whatsapp {
  background: #25D366; color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
}
.btn-whatsapp:hover { background: #22c55e; transform: translateY(-2px); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ─── FORM ELEMENTS ──────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.form-hint  { font-size: 0.78rem; color: var(--text-muted); }

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }
select.form-control option { background: var(--surface-1); color: var(--text-primary); }

.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form-check input[type="checkbox"] {
  width: 18px; height: 18px; border-radius: 5px;
  accent-color: var(--brand-purple); cursor: pointer;
}

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  border-radius: var(--r-xl);
  background: var(--surface-1);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

/* Raffle Card */
.raffle-card { cursor: pointer; }

.raffle-card .card-img {
  width: 100%; height: 200px;
  object-fit: cover;
  background: var(--surface-3);
  position: relative;
}
.raffle-card .card-img-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}

.raffle-card .card-body { padding: 1.25rem; }
.raffle-card .card-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.3rem 0.75rem; border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600;
  background: rgba(124,58,237,0.15); color: #a78bfa;
  border: 1px solid rgba(124,58,237,0.25);
  margin-bottom: 0.75rem;
}
.raffle-card .badge-featured {
  background: rgba(245,158,11,0.15); color: #fbbf24;
  border-color: rgba(245,158,11,0.25);
}

.raffle-card .card-title {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.raffle-card .card-price {
  font-size: 1.35rem; font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.raffle-card .card-price span { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }

.raffle-card .card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

/* Progress Bar */
.progress-bar {
  width: 100%; height: 8px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
  margin: 0.75rem 0;
}
.progress-bar-fill {
  height: 100%; border-radius: var(--r-full);
  background: var(--grad-emerald);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── NUMBER GRID ────────────────────────────────────────── */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 4px 4px 0;
}

@media (min-width: 768px) {
  .numbers-grid {
    grid-template-columns: repeat(10, 1fr);
    max-height: none;
    overflow-y: visible;
  }
}
.numbers-grid::-webkit-scrollbar { width: 6px; }
.numbers-grid::-webkit-scrollbar-track { background: transparent; }
.numbers-grid::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

.num-card {
  aspect-ratio: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: var(--r-md);
  font-weight: 700; font-size: 1rem;
  cursor: pointer; user-select: none;
  transition: all 0.18s ease;
  border: 1px solid var(--border);
  background: var(--color-avail);
}
.num-card.available:hover {
  background: rgba(124,58,237,0.12);
  border-color: rgba(124,58,237,0.4);
  transform: scale(1.06);
}
.num-card.selected {
  background: rgba(124,58,237,0.3);
  border-color: var(--brand-violet);
  box-shadow: 0 0 12px rgba(124,58,237,0.35);
  transform: scale(1.06);
}
.num-card.paid {
  background: rgba(16,185,129,0.2);
  border-color: var(--color-paid);
  color: var(--color-paid);
  cursor: not-allowed;
}
.num-card.pending {
  background: rgba(245,158,11,0.15);
  border-color: var(--color-pending);
  color: var(--color-pending);
  cursor: not-allowed;
}

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
  width: 100%; max-width: 520px; max-height: 90vh;
  overflow-y: auto;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg), var(--glow-purple);
  padding: 2rem;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
}
.modal-overlay.active .modal-box { transform: scale(1) translateY(0); }

.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--r-full); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; font-size: 1.1rem;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--surface-2); color: var(--text-primary); }

/* ─── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 24px;
  background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 12px 18px; border-radius: var(--r-full);
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-md);
  font-size: 0.88rem; font-weight: 600;
  z-index: 300; pointer-events: none;
  transform: translateX(calc(-100% - 40px));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show { transform: translateX(0); }
.toast-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: #e0e7ff; display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* ─── BADGE / PILLS ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.25rem 0.7rem; border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600;
}
.badge-paid     { background: rgba(16,185,129,0.15); color: #059669; }
.badge-pending  { background: rgba(245,158,11,0.15); color: #d97706; }
.badge-active   { background: rgba(249,115,22,0.15); color: #ea580c; }
.badge-finished { background: rgba(100,116,139,0.15); color: #475569; }
.badge-cancelled{ background: rgba(239,68,68,0.15); color: #b91c1c; }
.badge-featured { background: rgba(245,158,11,0.15); color: #d97706; }

/* ─── TABLE ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 0.9rem 1rem; text-align: left;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-muted); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 0.9rem 1rem; font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(0,0,0,0.02); }

/* ─── STATS CARD ─────────────────────────────────────────── */
.stat-card {
  padding: 1.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.stat-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; margin-bottom: 0.4rem; }
.stat-value {
  font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-value.emerald {
  background: var(--grad-emerald);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-value.amber {
  background: var(--grad-amber);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── CONTAINER / LAYOUT ─────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 680px; }
.container-md { max-width: 900px; }

.section { padding: 4rem 0; }
.section-sm { padding: 2rem 0; }

/* ─── GRID SYSTEM ────────────────────────────────────────── */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────── */
.heading-xl {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900; letter-spacing: -1.5px; line-height: 1.05;
}
.heading-lg {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800; letter-spacing: -0.5px;
}
.heading-md { font-size: 1.4rem; font-weight: 700; }
.heading-sm { font-size: 1.1rem; font-weight: 600; }

.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-emerald { color: var(--brand-emerald); }
.text-amber  { color: var(--brand-amber); }
.text-danger { color: var(--brand-red); }

/* ─── UTILITIES ──────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-4  { padding: 2rem; }

/* ─── PIX INFO BOX ───────────────────────────────────────── */
.pix-box {
  background: rgba(0,0,0,0.3);
  border: 1px dashed rgba(124,58,237,0.3);
  border-radius: var(--r-lg);
  padding: 1.5rem; text-align: center;
}
.pix-code {
  font-family: monospace; font-size: 0.8rem;
  word-break: break-all; color: var(--text-secondary);
  margin: 0.75rem 0; line-height: 1.5;
}
.pix-qr { margin: 1rem auto; width: fit-content;
  background: #fff; padding: 1rem; border-radius: var(--r-lg); }

/* ─── COUNTDOWN TIMER ────────────────────────────────────── */
.countdown {
  display: flex; gap: 0.5rem; justify-content: center; flex-wrap: nowrap;
}
.countdown-unit {
  text-align: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 0.5rem 0.75rem; flex: 1; min-width: 0;
}
.countdown-num { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.countdown-lbl { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-state p { font-size: 1.05rem; }

/* ─── LOADING SPINNER ────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px; margin: 2rem auto;
  border: 3px solid var(--border);
  border-top-color: var(--brand-purple);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-sm { width: 18px; height: 18px; border-width: 2px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── LOGIN PAGE ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.login-card {
  width: 100%; max-width: 420px;
  padding: 2.5rem;
}
.login-tabs {
  display: flex; gap: 0.5rem; margin-bottom: 2rem;
  background: var(--surface-3); padding: 4px; border-radius: var(--r-lg);
}
.login-tab {
  flex: 1; padding: 0.6rem; border-radius: var(--r-md);
  font-size: 0.88rem; font-weight: 600; color: var(--text-muted);
  background: transparent; cursor: pointer;
  transition: all 0.2s;
}
.login-tab.active { background: var(--surface-1); color: var(--text-primary); }

/* ─── DASHBOARD LAYOUT ───────────────────────────────────── */
.dashboard-layout {
  display: flex; min-height: 100vh;
}
.sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.2rem; font-weight: 800;
  margin-bottom: 2rem; padding: 0 0.5rem;
}
.sidebar-logo .logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-section-title {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); padding: 0 0.75rem; margin-bottom: 0.5rem;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 0.65rem 0.75rem; border-radius: var(--r-md);
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
  width: 100%; border: none; background: transparent; text-align: left;
}
.sidebar-link:hover  { background: var(--surface-3); color: var(--text-primary); }
.sidebar-link.active { background: rgba(124,58,237,0.15); color: #a78bfa; }
.sidebar-link .link-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.dashboard-main { flex: 1; overflow-x: hidden; }
.dashboard-content { padding: 2rem; max-width: 1600px; margin: 0 auto; }
.dashboard-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

/* ─── SECTION HEADER ─────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}

/* ─── NOTIFICATION DOT ───────────────────────────────────── */
.notif-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand-pink);
  margin-left: 4px; vertical-align: middle;
}

/* ─── FILTER BAR ─────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.filter-chip {
  padding: 0.4rem 1rem; border-radius: var(--r-full);
  font-size: 0.82rem; font-weight: 600;
  background: var(--surface-3); color: var(--text-secondary);
  border: 1px solid var(--border); cursor: pointer;
  transition: all 0.2s;
}
.filter-chip.active, .filter-chip:hover {
  background: rgba(124,58,237,0.15); color: #a78bfa;
  border-color: rgba(124,58,237,0.3);
}

/* ─── SEARCH ─────────────────────────────────────────────── */
.search-box {
  position: relative;
}
.search-box input {
  padding-left: 2.75rem;
}
.search-icon {
  position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem; pointer-events: none;
}

/* ─── SELECTION PANEL ────────────────────────────────────── */
.selection-panel {
  background: var(--surface-2);
  border: 1px solid var(--border-brand);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.selection-panel h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.selection-total { font-size: 1.5rem; font-weight: 800; color: var(--brand-violet); }

/* ─── HERO SECTION ───────────────────────────────────────── */
.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.4rem 1rem; border-radius: var(--r-full);
  background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.25);
  color: #a78bfa; font-size: 0.83rem; font-weight: 600;
  margin-bottom: 1.5rem;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 220px; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .navbar-links { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .dashboard-layout { flex-direction: column; }
  
  /* Melhorias do Menu Lateral no Mobile */
  .sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: column;
    padding: 1rem; gap: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-logo {
    text-align: center;
    margin-bottom: 1rem;
  }
  .sidebar-logo img {
    margin: 0 auto !important;
  }
  .sidebar-section-title { display: none; } /* Oculta o título 'Menu' para poupar espaço */
  .sidebar-section {
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .sidebar-link {
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.6rem;
  }
  
  /* Ajuste da área de Perfil/Sair que fica no final */
  .sidebar > div:last-child {
    margin-top: 0 !important;
    padding-top: 1rem !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .sidebar > div:last-child p { margin-bottom: 0 !important; text-align: left; }
  .sidebar > div:last-child button { width: auto; padding: 0.5rem 1rem; }

  .dashboard-content { padding: 1rem; }
  .numbers-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
  .container { padding: 0 1rem; }
}

@media (max-width: 480px) {
  .hero { padding: 3rem 0 2rem; }
  .modal-box { padding: 1.5rem; border-radius: var(--r-xl); }
  .numbers-grid { max-height: 280px; }
}

