/* ═══════════════════════════════════════════════════════════════════════════
   PORRA MUNDIAL 2026 — Design System (mobile-first, 2026 edition)
   ═══════════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@600;700;800;900&display=swap');

/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --navy:    #0b1228;
  --navy-2:  #111b3d;
  --indigo:  #4f46e5;
  --blue:    #2f6bff;
  --blue-d:  #1e4fd6;
  --sky:     #38bdf8;
  --teal:    #0ea5a4;
  --green:   #10b981;
  --gold:    #f6a609;
  --amber:   #fbbf24;
  --pink:    #ec4899;
  --red:     #ef4444;

  /* Surfaces */
  --bg:      #eef1f8;
  --card:    #ffffff;
  --border:  #e6e9f2;
  --text:    #0f172a;
  --muted:   #6b7280;
  --white:   #ffffff;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #4f46e5 0%, #2f6bff 55%, #38bdf8 100%);
  --grad-gold:  linear-gradient(135deg, #f6a609 0%, #fbbf24 100%);
  --grad-hero:  linear-gradient(155deg, #0b1228 0%, #16264f 55%, #0d1b3a 100%);

  /* Shape & depth */
  --r:    16px;
  --r-sm: 11px;
  --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 2px 8px rgba(15,23,42,.05);
  --shadow:    0 2px 6px rgba(15,23,42,.06), 0 12px 30px rgba(15,23,42,.08);
  --shadow-lg: 0 10px 40px rgba(15,23,42,.16);

  /* Safe areas (notched phones) */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(56,189,248,.10), transparent 60%),
    radial-gradient(1000px 500px at -10% 0%, rgba(79,70,229,.10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
::selection { background: rgba(47,107,255,.18); }

/* ─── TOP NAV (glassy header) ────────────────────────────────────────────── */
.top-nav {
  background: rgba(11,18,40,.85);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  height: 60px;
  padding: 0 16px;
  padding-top: var(--safe-t);
  display: flex;
  align-items: center;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.top-nav .logo {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.2px;
  margin-right: auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(90deg, #fbbf24, #f6a609);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.top-nav .logo:hover { text-decoration: none; }
.top-nav .logo::before { content: '⚽'; -webkit-text-fill-color: initial; font-size: 19px; }
.top-nav .nav-link {
  color: rgba(255,255,255,.72);
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 10px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.top-nav .nav-link:hover  { background: rgba(255,255,255,.10); color: #fff; text-decoration: none; }
.top-nav .nav-link.active { color: #fff; background: rgba(47,107,255,.32); }
.nav-user {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#btn-logout {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  transition: all .15s;
  white-space: nowrap;
}
#btn-logout:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Hamburger kept hidden — replaced by bottom tab bar on mobile */
#nav-hamburger, #nav-mobile-menu { display: none !important; }

/* ─── BOTTOM TAB BAR (mobile, app-like) ──────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-b);
  box-shadow: 0 -6px 24px rgba(15,23,42,.10);
}
.bottom-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  max-width: 560px;
  margin: 0 auto;
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 2px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.bn-item svg { width: 24px; height: 24px; stroke-width: 2; transition: transform .18s; }
.bn-item span { line-height: 1; }
.bn-item.active { color: var(--blue); }
.bn-item.active svg { transform: translateY(-1px); }
.bn-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 26px; height: 3px;
  transform: translateX(-50%);
  border-radius: 0 0 4px 4px;
  background: var(--grad-brand);
}
.bn-item:active svg { transform: scale(.86); }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.page-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
  letter-spacing: -.4px;
}

/* ─── CARD ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  background: var(--grad-hero);
  padding: calc(52px + var(--safe-t)) 16px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 90%;
  background: radial-gradient(ellipse at 50% 0%, rgba(56,189,248,.22), transparent 62%),
              radial-gradient(ellipse at 20% 10%, rgba(236,72,153,.16), transparent 55%);
  pointer-events: none;
  animation: heroGlow 9s ease-in-out infinite alternate;
}
@keyframes heroGlow { from { opacity: .7; transform: translateY(-6px); } to { opacity: 1; transform: translateY(6px); } }
.hero > * { position: relative; }
.hero-hosts { display: flex; justify-content: center; gap: 22px; margin-bottom: 22px; }
.hero-host { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hero-host img {
  width: 60px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.18);
  transition: transform .25s;
}
.hero-host:hover img { transform: translateY(-3px) scale(1.04); }
.hero-host span { font-size: 11px; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.hero h1 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 10px;
  letter-spacing: -.5px;
  background: linear-gradient(92deg, #ffffff 20%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 30px rgba(0,0,0,.3);
}
.hero-sub { font-size: 15px; color: rgba(255,255,255,.72); margin-bottom: 14px; }
.hero-dates {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
}
.hero-stat { margin-top: 14px; font-size: 12.5px; color: rgba(255,255,255,.4); }

/* ─── FORMS ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 16px; /* ≥16px avoids iOS zoom-on-focus */
  font-family: inherit;
  color: var(--text);
  background: #fbfcff;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47,107,255,.14);
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s, box-shadow .18s, opacity .15s, filter .15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 18px rgba(47,107,255,.32); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 8px 24px rgba(47,107,255,.42); }
.btn-red  { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(239,68,68,.3); }
.btn-gold { background: var(--grad-gold); color: #3a2606; box-shadow: 0 6px 18px rgba(246,166,9,.36); }
.btn-gold:hover:not(:disabled) { filter: brightness(1.04); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(16,185,129,.3); }
.btn-outline { background: #fff; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover:not(:disabled) { background: var(--bg); border-color: #cdd3e3; }
.btn-sm { padding: 8px 15px; font-size: 13px; border-radius: 9px; }
.btn-xs { padding: 5px 11px; font-size: 12px; border-radius: 8px; }

/* ─── ALERTS ─────────────────────────────────────────────────────────────── */
.alert { padding: 13px 16px; border-radius: var(--r-sm); font-size: 14.5px; margin-bottom: 16px; border-left: 4px solid; font-weight: 500; }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: #dc2626; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #16a34a; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #2563eb; }

/* ─── TABS ───────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.tab-btn:hover { border-color: #cdd3e3; }
.tab-btn.active { color: #fff; background: var(--grad-brand); border-color: transparent; box-shadow: 0 4px 12px rgba(47,107,255,.3); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─── TEAM SELECTION ─────────────────────────────────────────────────────── */
.blocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.block-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.block-header {
  background: var(--grad-hero);
  color: #fff;
  padding: 14px 16px;
  position: relative;
}
.block-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(56,189,248,.25), transparent 60%);
}
.block-header strong { display: block; font-size: 15px; font-weight: 800; position: relative; }
.block-header span   { font-size: 12px; opacity: .65; margin-top: 2px; display: block; position: relative; }

.team-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--bg);
  transition: background .12s;
  position: relative;
  min-height: 58px;
  -webkit-tap-highlight-color: transparent;
}
.team-option:last-child { border-bottom: none; }
.team-option:hover    { background: #f5f8ff; }
.team-option.selected { background: linear-gradient(90deg, #eef4ff, #fff); box-shadow: inset 3px 0 0 var(--blue); }
.team-option.selected::after { content: '✓'; position: absolute; right: 16px; color: #fff; background: var(--grad-brand); width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; font-weight: 900; font-size: 13px; box-shadow: 0 2px 8px rgba(47,107,255,.4); }
.team-option input[type=radio] { display: none; }

.team-flag-img { width: 38px; height: auto; border-radius: 5px; box-shadow: 0 2px 6px rgba(0,0,0,.18); flex-shrink: 0; }
.team-name  { font-size: 15px; font-weight: 700; color: var(--text); }
.team-group { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.team-rank  { font-size: 12px; color: var(--indigo); background: #eef0fe; border-radius: 7px; padding: 3px 8px; margin-left: auto; font-weight: 800; flex-shrink: 0; }

/* ─── STATS ──────────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-brand);
}
.stat-value {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 12px; color: var(--muted); margin-top: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }

/* ─── SCOREBOARD TABLE ───────────────────────────────────────────────────── */
.scoreboard-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.scoreboard-table th {
  text-align: left;
  padding: 13px 16px;
  background: var(--navy);
  color: rgba(255,255,255,.7);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.scoreboard-table th:first-child { border-top-left-radius: var(--r); }
.scoreboard-table th:last-child  { border-top-right-radius: var(--r); }
.scoreboard-table td  { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.scoreboard-table tr:last-child td { border-bottom: none; }
.scoreboard-table tbody tr:hover td { background: #f5f8ff; }
.scoreboard-table tbody tr.me td    { background: #eef4ff; }
.rank-badge { font-size: 17px; font-weight: 900; display: inline-block; width: 30px; text-align: center; color: var(--navy); }
.pts-badge  { font-size: 18px; font-weight: 900; color: var(--blue); }
.paid-badge { font-size: 12px; padding: 4px 11px; border-radius: 999px; font-weight: 700; }
.paid-yes   { background: #dcfce7; color: #166534; }
.paid-no    { background: #fef3c7; color: #92400e; }
.flag-strip { display: flex; gap: 4px; flex-wrap: wrap; }
.flag-strip img { width: 23px; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }

/* ─── PODIUM (top 3) ─────────────────────────────────────────────────────── */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 10px;
  margin-bottom: 20px;
}
.podium-spot {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 10px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.podium-spot .medal { font-size: 30px; line-height: 1; }
.podium-spot .pname { font-size: 13.5px; font-weight: 800; margin-top: 6px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-spot .ppts  { font-family:'Outfit',sans-serif; font-size: 24px; font-weight: 900; margin-top: 2px; }
.podium-spot .pflags { display: flex; justify-content: center; gap: 3px; flex-wrap: wrap; margin-top: 8px; }
.podium-spot .pflags img { width: 17px; border-radius: 2px; }
.podium-1 { order: 2; padding-top: 24px; border-color: transparent; background: linear-gradient(180deg,#fffaf0,#fff); box-shadow: 0 10px 30px rgba(246,166,9,.25); }
.podium-1::before { content:''; position:absolute; inset:0 0 auto 0; height:5px; background: var(--grad-gold); }
.podium-1 .ppts { color: var(--gold); }
.podium-2 { order: 1; }
.podium-2 .ppts { color: #64748b; }
.podium-3 { order: 3; }
.podium-3 .ppts { color: #b45309; }

/* ─── MATCH CARDS ────────────────────────────────────────────────────────── */
.match-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  transition: box-shadow .15s, transform .12s;
}
.match-card:hover { box-shadow: var(--shadow-sm); }
.match-team { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.match-team.right { flex-direction: row-reverse; }
.match-team-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.match-score { font-family:'Outfit',sans-serif; font-size: 20px; font-weight: 900; color: var(--navy); min-width: 66px; text-align: center; letter-spacing: -1px; }
.match-score.pending { color: #cbd5e1; font-size: 14px; font-weight: 600; }
.match-badge { font-size: 12px; padding: 3px 9px; border-radius: 7px; background: #eef4ff; color: #1e40af; font-weight: 700; flex-shrink: 0; }
.jornada-tag { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #f3e8ff; color: #7c3aed; display: inline-block; margin-bottom: 8px; }

/* ─── ADMIN TABLE ────────────────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 11px 12px; border-bottom: 2px solid var(--border); font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.admin-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: #f9fafb; }

/* ─── MODAL ──────────────────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(11,18,40,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 400; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; animation: fadeIn .15s ease; }
.modal { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 24px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; animation: popIn .2s cubic-bezier(.2,.9,.3,1.2); }
.modal h3 { font-family:'Outfit',sans-serif; font-size: 19px; font-weight: 800; margin-bottom: 20px; }
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn  { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

/* ─── BREAKDOWN ──────────────────────────────────────────────────────────── */
.breakdown-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.bk-team { background: var(--bg); border-radius: var(--r-sm); padding: 11px 13px; font-size: 14px; min-width: 165px; border: 1px solid var(--border); }
.bk-team-name { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.bk-team-pts { font-size: 18px; font-weight: 900; color: var(--blue); margin-left: auto; }
.bk-detail { font-size: 13px; color: var(--muted); }
.bk-bonus  { font-size: 13px; color: var(--green); font-weight: 600; }

/* ─── SKELETON / LOADING ─────────────────────────────────────────────────── */
.loading { text-align: center; padding: 48px 16px; color: var(--muted); font-size: 15px; }
.loading::before {
  content: '';
  display: block;
  width: 30px; height: 30px;
  margin: 0 auto 14px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty   { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 15px; }
.section-head { font-family:'Outfit',sans-serif; font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }

/* ─── ANIMATIONS for content ─────────────────────────────────────────────── */
.card, .stat-card, .block-card, .podium-spot { animation: riseIn .4s ease both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ─── MISC UTILITIES ─────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.text-muted { color: var(--muted); font-size: 14px; }
.text-center { text-align: center; }
.text-sm { font-size: 14px; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.overflow-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .top-nav .nav-link  { display: none; }
  .top-nav .nav-user  { display: none; }
  .top-nav #btn-logout { display: inline-flex; }
  .bottom-nav { display: block; }
  /* leave room for the bottom tab bar */
  body { padding-bottom: calc(64px + var(--safe-b)); }
  .hero h1     { font-size: 28px; }
  .hero-host img { width: 52px; }
  .page-title  { font-size: 22px; }
  .scoreboard-table .hide-mobile { display: none; }
  .stat-value  { font-size: 30px; }
}
@media (max-width: 480px) {
  .container  { padding: 18px 13px 30px; }
  .blocks-grid { grid-template-columns: 1fr; }
  .hero       { padding: calc(40px + var(--safe-t)) 14px 30px; }
  .hero-hosts { gap: 16px; }
  .hero h1    { font-size: 25px; }
  .card       { padding: 16px; }
  .podium-spot .pname { font-size: 12px; }
  .podium-spot .ppts  { font-size: 20px; }
}
