/* ============================================================
   app.css — Sistema de diseño compartido
   PollaFútbol — Rojo pasión / Negro / Blanco
   Fuentes: Bebas Neue (display) + DM Sans (body)
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --red:         #D0021B;
  --red-bright:  #FF1A33;
  --red-dark:    #8B0011;
  --red-deeper:  #5C0009;
  --red-glow:    rgba(208,2,27,0.18);
  --red-glow-sm: rgba(208,2,27,0.10);

  --white:       #FFFFFF;
  --off-white:   #F5F1EE;
  --gray-50:     #FAF8F6;
  --gray-100:    #E8E4E0;
  --gray-200:    #D0CBC5;
  --gray-300:    #B0AAA4;
  --gray-400:    #8C8680;
  --gray-500:    #6B6560;
  --gray-600:    #504B47;
  --gray-700:    #3A3530;
  --gray-800:    #252220;
  --gray-900:    #1A1714;
  --black:       #0F0D0C;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  --transition:  0.22s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.4s cubic-bezier(0.4,0,0.2,1);

  --nav-height:  64px;
}

/* ── LIGHT MODE ─────────────────────────────────────────── */
[data-theme="light"] {
  --bg:              var(--off-white);
  --bg-secondary:    var(--gray-50);
  --bg-card:         var(--white);
  --bg-card-hover:   var(--gray-50);
  --bg-input:        var(--white);
  --bg-nav:          rgba(245,241,238,0.88);
  --border:          var(--gray-100);
  --border-medium:   var(--gray-200);
  --border-focus:    var(--red);
  --text-primary:    var(--black);
  --text-secondary:  var(--gray-600);
  --text-muted:      var(--gray-400);
  --text-hint:       var(--gray-300);
  --shadow-sm:       0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:       0 2px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:       0 4px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --noise-opacity:   0.025;
  --stripe-color:    rgba(0,0,0,0.025);
  --badge-bg:        var(--gray-100);
  --badge-text:      var(--gray-600);
}

/* ── DARK MODE ──────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:              var(--black);
  --bg-secondary:    var(--gray-900);
  --bg-card:         var(--gray-900);
  --bg-card-hover:   var(--gray-800);
  --bg-input:        #221F1D;
  --bg-nav:          rgba(15,13,12,0.88);
  --border:          #2A2622;
  --border-medium:   #3A3530;
  --border-focus:    var(--red-bright);
  --text-primary:    var(--white);
  --text-secondary:  var(--gray-300);
  --text-muted:      var(--gray-500);
  --text-hint:       var(--gray-600);
  --shadow-sm:       0 1px 4px rgba(0,0,0,0.3);
  --shadow-md:       0 2px 24px rgba(0,0,0,0.5), 0 1px 6px rgba(0,0,0,0.3);
  --shadow-lg:       0 4px 48px rgba(0,0,0,0.7), 0 2px 12px rgba(0,0,0,0.4);
  --noise-opacity:   0.04;
  --stripe-color:    rgba(255,255,255,0.018);
  --badge-bg:        #2A2622;
  --badge-text:      var(--gray-300);
}

/* ── AUTO THEME ─────────────────────────────────────────── */
[data-theme="auto"] {
  --bg:              var(--off-white);
  --bg-secondary:    var(--gray-50);
  --bg-card:         var(--white);
  --bg-card-hover:   var(--gray-50);
  --bg-input:        var(--white);
  --bg-nav:          rgba(245,241,238,0.88);
  --border:          var(--gray-100);
  --border-medium:   var(--gray-200);
  --border-focus:    var(--red);
  --text-primary:    var(--black);
  --text-secondary:  var(--gray-600);
  --text-muted:      var(--gray-400);
  --text-hint:       var(--gray-300);
  --shadow-sm:       0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:       0 2px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:       0 4px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --noise-opacity:   0.025;
  --stripe-color:    rgba(0,0,0,0.025);
  --badge-bg:        var(--gray-100);
  --badge-text:      var(--gray-600);
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg:              var(--black);
    --bg-secondary:    var(--gray-900);
    --bg-card:         var(--gray-900);
    --bg-card-hover:   var(--gray-800);
    --bg-input:        #221F1D;
    --bg-nav:          rgba(15,13,12,0.88);
    --border:          #2A2622;
    --border-medium:   #3A3530;
    --border-focus:    var(--red-bright);
    --text-primary:    var(--white);
    --text-secondary:  var(--gray-300);
    --text-muted:      var(--gray-500);
    --text-hint:       var(--gray-600);
    --shadow-sm:       0 1px 4px rgba(0,0,0,0.3);
    --shadow-md:       0 2px 24px rgba(0,0,0,0.5), 0 1px 6px rgba(0,0,0,0.3);
    --shadow-lg:       0 4px 48px rgba(0,0,0,0.7), 0 2px 12px rgba(0,0,0,0.4);
    --noise-opacity:   0.04;
    --stripe-color:    rgba(255,255,255,0.018);
    --badge-bg:        #2A2622;
    --badge-text:      var(--gray-300);
  }
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text-primary);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: var(--font-body); }

/* ── BACKGROUND DECORATIONS ─────────────────────────────── */
.bg-decor {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-decor::before {
  content: '';
  position: absolute; top: -20%; right: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 65%);
  border-radius: 50%;
}
.bg-decor::after {
  content: '';
  position: absolute; bottom: -10%; left: -15%;
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, rgba(208,2,27,0.06) 0%, transparent 65%);
  border-radius: 50%;
}
.bg-stripes {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: repeating-linear-gradient(
    -55deg, var(--stripe-color) 0px, var(--stripe-color) 1px,
    transparent 1px, transparent 28px
  );
}

/* ── NAVIGATION ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-height);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center;
  padding: 0 clamp(16px, 4vw, 40px);
  gap: 8px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 6px;
  margin-right: auto;
}
.nav-logo .dot { color: var(--red); }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}
.nav-links a {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: var(--badge-bg);
}
.nav-links a.active { color: var(--red); }
.nav-links svg { flex-shrink: 0; }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ── LAYOUT WRAPPERS ────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}
.page-content {
  position: relative; z-index: 1;
  padding: 32px 0 80px;
}

/* ── CARD ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: background var(--transition), border-color var(--transition);
}
.card-p { padding: 24px; }
.card-p-lg { padding: 32px; }
.card-hover {
  transition: transform var(--transition), box-shadow var(--transition),
              background var(--transition), border-color var(--transition);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card-hover);
}

/* ── SECTION HEADER ─────────────────────────────────────── */
.section-header {
  display: flex; align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.section-link {
  font-size: 13px; font-weight: 500;
  color: var(--red);
  transition: opacity var(--transition);
}
.section-link:hover { opacity: 0.75; }

/* ── EYEBROW / TAG ──────────────────────────────────────── */
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 8px;
}
.eyebrow::before {
  content: '';
  display: block; width: 16px; height: 2px;
  background: var(--red); border-radius: 1px;
}

/* ── BADGE ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  background: var(--badge-bg);
  color: var(--badge-text);
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; white-space: nowrap;
}
.badge-red   { background: rgba(208,2,27,0.12); color: var(--red); }
.badge-green { background: rgba(16,185,129,0.12); color: #059669; }
.badge-blue  { background: rgba(59,130,246,0.12); color: #2563EB; }
.badge-amber { background: rgba(245,158,11,0.12); color: #D97706; }

/* ── INPUTS ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 16px; }
.field label {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
}
.input-wrap { position: relative; }
.input-wrap .icon-left {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-hint); pointer-events: none;
  transition: color var(--transition);
}
.input-wrap:focus-within .icon-left { color: var(--red); }
.input {
  width: 100%; height: 48px;
  padding: 0 16px 0 44px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px; font-weight: 400;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.input::placeholder { color: var(--text-hint); }
.input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.input.no-icon { padding-left: 16px; }
.input-error { border-color: var(--red) !important; }
.field-hint {
  font-size: 12px; color: var(--text-muted);
}
.field-error {
  font-size: 12px; color: var(--red);
  display: none;
}
.field-error.visible { display: block; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 0 20px; height: 44px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn-full { width: 100%; }

/* Primary */
.btn-primary {
  background: var(--red); color: var(--white);
  font-family: var(--font-display);
  font-size: 17px; letter-spacing: 0.06em;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover {
  background: var(--red-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--red-glow);
}
.btn-primary:active { transform: translateY(0); }

/* Secondary */
.btn-secondary {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Ghost / red outline */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--red);
  color: var(--red);
}
.btn-outline:hover {
  background: var(--red-glow-sm);
  transform: translateY(-1px);
}

/* Danger */
.btn-danger {
  background: rgba(208,2,27,0.1);
  border: 1px solid rgba(208,2,27,0.2);
  color: var(--red);
}
.btn-danger:hover { background: rgba(208,2,27,0.18); }

/* Loading state */
.btn.loading .btn-label { opacity: 0; }
.btn.loading .btn-spinner { display: flex; }
.btn-spinner {
  display: none; position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ICON BUTTON ────────────────────────────────────────── */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.icon-btn:hover { border-color: var(--red); color: var(--red); }

/* ── TABS ───────────────────────────────────────────────── */
.tabs {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px; gap: 2px;
  width: fit-content;
}
.tab {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: none; background: transparent;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab.active {
  background: var(--red);
  color: var(--white);
}
.tab:not(.active):hover { color: var(--text-primary); background: var(--badge-bg); }

/* ── THEME / LANG CONTROLS ──────────────────────────────── */
.theme-ring, .lang-toggle {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px; gap: 2px;
}
.theme-opt {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  border: none; background: transparent;
  color: var(--text-hint);
  cursor: pointer;
  transition: all var(--transition);
}
.theme-opt.active { background: var(--red); color: white; }
.theme-opt:not(.active):hover { color: var(--text-muted); }
.lang-opt {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: none; background: transparent;
  color: var(--text-hint);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-opt.active { background: var(--red); color: white; }

/* ── MATCH CARD ─────────────────────────────────────────── */
.match-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}
.match-team {
  display: flex; align-items: center; gap: 10px;
}
.match-team.right {
  flex-direction: row-reverse; text-align: right;
}
.team-logo {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--border);
  object-fit: cover;
  flex-shrink: 0;
}
.team-logo-placeholder {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--badge-bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.team-name {
  font-size: 14px; font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
}
.team-code {
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--text-muted);
}
.match-center {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  min-width: 80px;
}
.match-score {
  font-family: var(--font-display);
  font-size: 28px; letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1;
}
.match-vs {
  font-family: var(--font-display);
  font-size: 20px; color: var(--text-muted);
}
.match-time {
  font-size: 11px; color: var(--text-muted);
  text-align: center;
}
.match-phase {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-hint);
}

/* ── SCORE INPUT ────────────────────────────────────────── */
.score-input {
  width: 56px; height: 56px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 28px; letter-spacing: 0.04em;
  text-align: center;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  -moz-appearance: textfield;
}
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.score-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

/* ── RANKING TABLE ──────────────────────────────────────── */
.ranking-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.ranking-row:hover { background: var(--bg-card-hover); }
.ranking-row.me { background: var(--red-glow-sm); }
.ranking-pos {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-hint);
  text-align: center;
}
.ranking-pos.top1 { color: #F59E0B; }
.ranking-pos.top2 { color: var(--gray-400); }
.ranking-pos.top3 { color: #CD7F32; }
.ranking-user {
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--badge-bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar.red { background: var(--red); color: white; }
.ranking-name { font-size: 14px; font-weight: 500; }
.ranking-pts {
  font-family: var(--font-display);
  font-size: 22px; letter-spacing: 0.02em;
  color: var(--text-primary);
}
.ranking-pts-label {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-hint);
  text-align: right;
}

/* ── STAT CARD ──────────────────────────────────────────── */
.stat-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 40px; line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}
.stat-label {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
}
.stat-delta {
  font-size: 12px; font-weight: 500;
  color: #059669;
  display: flex; align-items: center; gap: 3px;
}

/* ── ALERT / TOAST ──────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px; line-height: 1.5;
  border: 1px solid transparent;
}
.alert-error   { background: rgba(208,2,27,0.08);   border-color: rgba(208,2,27,0.2);   color: var(--red); }
.alert-success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); color: #059669; }
.alert-info    { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.2); color: #2563EB; }
.alert-warn    { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.2); color: #D97706; }

/* ── TOAST CONTAINER ────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px; font-weight: 500;
  color: var(--text-primary);
  pointer-events: auto;
  animation: toastIn 0.3s ease both;
  max-width: 320px;
}
.toast.out { animation: toastOut 0.3s ease both; }
.toast-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.toast-dot.success { background: #10B981; }
.toast-dot.error   { background: var(--red); }
.toast-dot.info    { background: #3B82F6; }
@keyframes toastIn  { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }
@keyframes toastOut { from { opacity:1; transform:none; } to { opacity:0; transform:translateX(20px); } }

/* ── MODAL ──────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px;
  padding: 32px;
  animation: slideUp 0.25s ease;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 26px; letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.modal-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; }
@keyframes slideUp   { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
@keyframes fadeIn    { from { opacity:0; } to { opacity:1; } }

/* ── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; padding: 60px 24px; text-align: center;
}
.empty-icon { font-size: 40px; opacity: 0.3; }
.empty-title { font-size: 16px; font-weight: 500; color: var(--text-secondary); }
.empty-desc { font-size: 13px; color: var(--text-muted); max-width: 280px; }

/* ── DIVIDER ────────────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-hint); font-size: 12px;
  margin: 20px 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── TIMER COUNTDOWN ────────────────────────────────────── */
.countdown {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
}
.countdown.urgent { color: var(--red); }
.countdown.urgent .cd-dot { animation: blink 1s ease infinite; }
.cd-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }

/* ── PROGRESS BAR ───────────────────────────────────────── */
.progress {
  height: 4px; background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--red);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ── ANIMATIONS ─────────────────────────────────────────── */
.fade-up {
  animation: fadeUp 0.45s ease both;
}
.fade-up-delay-1 { animation-delay: 0.05s; }
.fade-up-delay-2 { animation-delay: 0.10s; }
.fade-up-delay-3 { animation-delay: 0.15s; }
.fade-up-delay-4 { animation-delay: 0.20s; }
@keyframes fadeUp {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:none; }
}

/* ── UTILITY ────────────────────────────────────────────── */
.flex   { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.text-sm   { font-size: 13px; }
.text-xs   { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-red   { color: var(--red); }
.font-display { font-family: var(--font-display); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── GRID HELPERS ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media (max-width: 768px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── RESPONSIVE NAV ─────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
@media (max-width: 640px) {
  .mobile-menu-btn { display: flex; }
}
