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

:root {
  /* Navy dashboard base (OKLCH-tuned, expressed as hex for broad support) */
  --bg: #0a1120;
  --bg-2: #0c1526;
  --surface: #101b30;
  --surface-2: #142238;
  --surface-3: #1a2c46;
  --line: rgba(148,178,225,.12);
  --line-strong: rgba(148,178,225,.20);

  /* Primary blue accent */
  --accent: #0052ff;
  --accent-2: #0041cc;
  --accent-deep: #003399;
  --accent-glow: rgba(0,82,255,.32);
  --accent-soft: rgba(0,82,255,.12);
  --btn-glow: 0 0 15px rgba(0,82,255,.4);

  /* Status + semantic */
  --success: #23c274;
  --success-glow: rgba(35,194,116,.25);
  --gold: #f2b023;
  --gold-2: #ffc94d;
  --red: #ef4a5e;
  --black: #05070c;

  --ink: #eef3fb;
  --ink-2: #b9c6dc;
  --muted: #7c8bab;
  --muted-2: #5b6a89;

  --shadow-sm: 0 1px 2px rgba(2,6,16,.5);
  --shadow-md: 0 10px 26px rgba(2,6,20,.45);
  --shadow-lg: 0 24px 56px rgba(2,6,20,.55);
  /* Glassmorphism (match cards + standings table) — Tailwind equivalent of
     bg-slate-950/40 backdrop-blur-lg border border-white/10 rounded-2xl shadow-2xl p-5 */
  --glass-bg: rgba(2,6,23,.4);
  --glass-bg-hover: rgba(2,6,23,.55);
  --glass-border: rgba(255,255,255,.1);
  --glass-border-hover: rgba(255,255,255,.18);
  --glass-blur: blur(16px);
  --glass-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  --glass-radius: 16px;
  --radius: 16px;
  --radius-sm: 11px;
  --sidebar-w: 264px;
  --topbar-h: 68px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --z-dropdown: 20; --z-sticky: 30; --z-drawer: 45; --z-modal-backdrop: 90; --z-modal: 100; --z-toast: 200;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: #030712; }
body {
  font-family: var(--font);
  background: linear-gradient(135deg, #030712 0%, #061126 50%, #0b1c3a 100%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 560px at 82% -10%, rgba(59,124,246,.14), transparent 60%),
    radial-gradient(800px 460px at 4% 106%, rgba(35,194,116,.06), transparent 55%);
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }
.ic-svg { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
::selection { background: var(--accent-glow); color: #fff; }

/* Consistent keyboard focus ring (keyboard-only, no ring on mouse click) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
.nav-item:focus-visible, .team-card:focus-visible, .action-card:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- LAYOUT ---------------- */
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0d1830 0%, #0a1120 100%);
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column; z-index: var(--z-sticky);
  border-right: 1px solid var(--line);
  transition: transform .25s cubic-bezier(.22,1,.36,1);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; border-bottom: 1px solid var(--line); }
.brand .crest-box { width: 40px; height: 46px; flex: none; position: relative; filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
.brand .crest-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.brand .crest-svg { width: 100%; height: 100%; }
.brand .bt { line-height: 1.05; }
.brand h1 { font-size: 15.5px; font-weight: 800; letter-spacing: .3px; color: #fff; text-transform: uppercase; }
.brand h1 b { display: block; color: var(--accent); font-size: 15.5px; }
.brand span { font-size: 10.5px; color: var(--muted); letter-spacing: .8px; text-transform: uppercase; font-weight: 600; }

.nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted-2); padding: 14px 12px 6px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s; position: relative; margin-bottom: 2px;
}
.nav-item .ic-svg { color: var(--muted); transition: color .15s; }
.nav-item:hover { background: var(--surface-2); color: #fff; }
.nav-item:hover .ic-svg { color: var(--ink-2); }
.nav-item.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px var(--accent-glow); }
.nav-item.active .ic-svg { color: #fff; }
.nav-item .badge { margin-left: auto; background: rgba(255,255,255,.16); border-radius: 20px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; }

/* Sidebar profile / role switcher */
.sidebar-profile { position: relative; padding: 12px; border-top: 1px solid var(--line); }
.sidebar-copyright { padding: 0 14px 14px; font-size: 9.5px; color: var(--muted-2); line-height: 1.4; }
.profile-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; transition: background .15s; }
.profile-btn:hover { background: var(--surface-2); }
.profile-avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.profile-avatar.admin { background: rgba(242,176,35,.14); color: var(--gold-2); }
.profile-text { flex: 1; min-width: 0; text-align: left; }
.profile-text strong { display: block; font-size: 13px; color: #fff; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-text span { font-size: 11px; color: var(--muted); }
.profile-btn .chev { color: var(--muted); transition: transform .15s; }
.profile-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.profile-menu {
  position: absolute; left: 12px; right: 12px; bottom: calc(100% + 6px);
  background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: var(--z-dropdown);
}
.profile-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 13px; font-size: 13.5px; color: var(--ink-2); text-align: left; }
.profile-menu button:hover { background: var(--surface-2); color: #fff; }
.profile-menu button.on { color: var(--accent); font-weight: 700; }
.profile-menu button .ic-svg { width: 17px; height: 17px; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(10,17,32,.86); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 13px 30px;
  min-height: var(--topbar-h);
}
.topbar .title-block { line-height: 1.2; }
.topbar h2 { font-size: 20px; font-weight: 800; letter-spacing: -.2px; color: #fff; }
.topbar .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.topbar .spacer { flex: 1; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 10px 4px 8px; border-radius: 20px; }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.status-pill.live { background: rgba(35,194,116,.14); color: var(--success); }
.status-pill.live .dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-glow); }
.status-pill.done { background: var(--surface-3); color: var(--muted); }
.status-pill.done .dot { background: var(--muted); }
.status-pill.soon { background: rgba(242,176,35,.14); color: var(--gold-2); }
.status-pill.soon .dot { background: var(--gold-2); }

.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); position: relative; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-3); color: #fff; }
.icon-btn .dot-badge { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 1.5px solid var(--bg-2); }
.hamburger { display: none; }

/* Segmented toggles */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: all .15s; white-space: nowrap; }
.seg button .ic-svg { width: 15px; height: 15px; }
.seg button:hover { color: var(--ink-2); }
.seg button.on { background: var(--accent); color: #fff; box-shadow: 0 2px 8px var(--accent-glow); }

.content { padding: 24px 30px 60px; max-width: 1240px; }

/* ---------------- COMPONENTS ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.section-title { font-size: 17px; font-weight: 800; letter-spacing: -.1px; color: #fff; margin: 4px 0 14px; display: flex; align-items: center; gap: 12px; }
.section-title .rule { flex: 1; height: 1px; background: var(--line); }
.section-title .link { font-size: 12.5px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.section-title .link .ic-svg { width: 14px; height: 14px; }
.ic-svg.rot180 { transform: rotate(180deg); }

/* ---- Dashboard hero: Jornada X de Y ---- */
.dash-hero {
  border-radius: 24px; overflow: hidden; position: relative;
  background: linear-gradient(115deg, #0e1b34 0%, #0a1424 62%);
  border: 1px solid var(--line);
  padding: 0; margin-bottom: 22px; box-shadow: var(--shadow-lg);
  min-height: 320px;
}
.dash-hero .hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 74% 46%; z-index: 0;
  filter: saturate(1.2) contrast(1.08) brightness(1.04);
}
.dash-hero::before {
  /* dark at the text edge, fully clear over the ball/lights so the photo keeps its punch */
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(3,7,18,.95) 0%, rgba(3,7,18,.78) 34%, rgba(3,7,18,.32) 58%, transparent 82%);
}
.dash-hero::after {
  /* gentle top/bottom vignette so text and chips stay legible without flattening the photo */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(3,7,18,.35) 0%, transparent 22%, transparent 78%, rgba(3,7,18,.4) 100%);
}
.dash-hero .hc { position: relative; z-index: 2; width: 100%; min-height: 260px; display: flex; align-items: center; padding: 30px 36px; }
.hc-text { position: relative; z-index: 3; flex: 1; max-width: 460px; }
.dash-hero .eyebrow { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .3px; color: var(--ink-2); font-weight: 600; margin-bottom: 8px; }
.dash-hero .eyebrow strong { color: #fff; font-weight: 800; }
.dash-hero h1 { font-size: clamp(21px, 2.5vw, 28px); line-height: 1.08; font-weight: 800; letter-spacing: -.3px; color: #fff; margin-bottom: 11px; }
.progress-track { width: 100%; max-width: 320px; height: 6px; border-radius: 20px; background: rgba(255,255,255,.10); overflow: hidden; }
.progress-track .fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 10px rgba(0,82,255,.6); transition: width .4s cubic-bezier(.22,1,.36,1); }
.progress-lbl { font-size: 11px; color: var(--ink-2); margin-top: 7px; font-weight: 600; }
.hero-chips { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.hero-chip { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; backdrop-filter: blur(6px); }
.hero-chip .ic-svg { color: var(--accent); width: 15px; height: 15px; }
.hero-chip strong { display: block; font-size: 14px; font-weight: 800; color: #fff; line-height: 1; }
.hero-chip span { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.hero-edit { margin-top: 18px; backdrop-filter: blur(4px); }

/* ---- Dashboard grid ---- */
.dash-grid { display: grid; grid-template-columns: 1.62fr 1fr; gap: 20px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Próximo partido */
.next-match { padding: 22px 24px; }
.next-match .nm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.next-match .nm-head h3 { font-size: 14px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .6px; }
.next-match .nm-round { font-size: 11.5px; color: var(--accent); font-weight: 700; background: var(--accent-soft); padding: 3px 10px; border-radius: 20px; }
.nm-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.nm-team { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.nm-team .logo-wrap { width: 64px; height: 64px; }
.nm-team .tn { font-size: 15px; font-weight: 700; color: #fff; }
.nm-vs { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nm-vs .vslbl { font-size: 12px; font-weight: 800; color: var(--muted); background: var(--surface-3); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.nm-meta { display: flex; justify-content: center; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.nm-meta-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.nm-meta-item .ic-svg { width: 15px; height: 15px; color: var(--muted); }
.next-match .nm-cta { display: flex; justify-content: center; margin-top: 20px; }
.next-match .nm-empty { text-align: center; padding: 20px 0; color: var(--muted); font-size: 13.5px; }

/* Próximos partidos carousel */
.carousel { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.carousel::-webkit-scrollbar { height: 5px; }
.carousel::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; }
.mini-match {
  flex: 1 1 208px; max-width: 240px; scroll-snap-align: start;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--glass-radius); box-shadow: var(--glass-shadow);
  padding: 16px; transition: border-color .15s, background .15s, transform .15s;
}
.mini-match:hover { border-color: var(--glass-border-hover); background: var(--glass-bg-hover); transform: translateY(-2px); }
.mini-match .mm-round { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.mini-match .mm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-match .mm-team { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.mini-match .mm-team .logo-sm { width: 30px; height: 30px; }
.mini-match .mm-team .tn { font-size: 11px; font-weight: 600; color: var(--ink-2); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mini-match .mm-vs { font-size: 10.5px; color: var(--muted-2); font-weight: 700; flex: none; }
.mini-match .mm-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.mini-match .mm-foot .ic-svg { width: 12px; height: 12px; }

/* Widget: mini standings */
.widget {
  padding: 18px 20px 14px;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--glass-radius); box-shadow: var(--glass-shadow);
}
.widget-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.widget-head h3 { font-size: 13.5px; font-weight: 800; color: #fff; }
.widget-head .link { font-size: 11.5px; color: var(--accent); font-weight: 600; }
table.mini-standings { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.mini-standings th { text-align: left; font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted-2); padding: 6px 4px; font-weight: 700; }
table.mini-standings th.c, table.mini-standings td.c { text-align: center; }
table.mini-standings td { padding: 7px 4px; border-top: 1px solid var(--line); color: var(--ink-2); }
table.mini-standings tr:first-child td { border-top: none; }
.ms-team { display: flex; align-items: center; gap: 8px; }
.ms-team .pos { width: 17px; font-size: 11px; color: var(--muted); font-weight: 700; flex: none; }
.ms-team .logo-xs { width: 20px; height: 20px; border-radius: 5px; background: #fff; padding: 2px; flex: none; }
.ms-team .logo-xs img { width: 100%; height: 100%; object-fit: contain; }
.ms-team span.n { color: #fff; font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.ms-pts { font-weight: 800; color: #fff; }
tr.ms-lead .pos { color: var(--success); }

/* Widget: últimos resultados */
.results-list { display: flex; flex-direction: column; }
.result-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.result-row:first-child { border-top: none; }
.result-row .rr-teams { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.result-row .rr-t { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.result-row .rr-t.win { color: #fff; font-weight: 700; }
.result-row .rr-t .logo-xs { width: 18px; height: 18px; border-radius: 4px; background: #fff; padding: 2px; flex: none; }
.result-row .rr-t .logo-xs img { width: 100%; height: 100%; object-fit: contain; }
.result-row .rr-t .tn2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-row .rr-score { font-weight: 800; font-size: 13px; color: var(--muted); flex: none; }
.result-row .rr-t.win + .rr-score, .result-row .rr-score.win { color: #fff; }
.result-row .rr-date { font-size: 10.5px; color: var(--muted-2); flex: none; }

/* Teams grid */
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.team-card {
  padding: 20px 14px; display: flex; flex-direction: column; align-items: center; gap: 11px; text-align: center;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--glass-radius); box-shadow: var(--glass-shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s, background .15s; cursor: pointer;
}
.team-card:hover { transform: translateY(-3px); border-color: rgba(59,124,246,.4); background: var(--glass-bg-hover); }
.logo-wrap { width: 68px; height: 68px; border-radius: 14px; background: #fff; display: grid; place-items: center; padding: 8px; box-shadow: var(--shadow-sm); flex: none; }
.logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.team-card .tn { font-weight: 700; font-size: 14px; color: #fff; }
.team-card .tp { font-size: 12px; color: var(--muted); }

/* Table */
.table-wrap {
  overflow-x: auto; padding: 20px;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--glass-radius); box-shadow: var(--glass-shadow);
}
table.standings { width: 100%; border-collapse: collapse; background: transparent; font-size: 14px; min-width: 560px; }
table.standings thead th { background: rgba(255,255,255,.05); color: var(--ink-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; padding: 12px 8px; text-align: center; font-weight: 700; }
table.standings thead th:first-child { border-radius: 10px 0 0 10px; }
table.standings thead th:last-child { border-radius: 0 10px 10px 0; }
table.standings thead th.left { text-align: left; padding-left: 16px; }
table.standings tbody td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--glass-border); color: var(--ink-2); }
table.standings tbody tr:last-child td { border-bottom: none; }
table.standings tbody tr:hover td { background: rgba(255,255,255,.04); }
table.standings td.team { text-align: left; }
.team-cell { display: flex; align-items: center; gap: 11px; padding-left: 8px; }
.team-cell .logo-sm { width: 30px; height: 30px; border-radius: 8px; background: #fff; padding: 3px; flex: none; }
.team-cell .logo-sm img { width: 100%; height: 100%; object-fit: contain; }
.team-cell .pos { width: 24px; height: 24px; border-radius: 7px; background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.team-cell strong { font-size: 14px; color: #fff; }
table.standings tbody tr.q-champ td { background: linear-gradient(90deg, rgba(59,124,246,.10), transparent); }
table.standings tbody tr.q-champ .pos { background: var(--accent); color: #fff; }
table.standings tbody tr.q-semi .pos { background: var(--gold); color: var(--black); }
td.pts { font-weight: 800; color: #fff; font-size: 15px; }
.dg-pos { color: var(--success); font-weight: 600; }
.dg-neg { color: var(--red); font-weight: 600; }
.qual-legend { display: flex; gap: 20px; margin-top: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: middle; }

/* Matches */
.round-group { margin-bottom: 8px; }
.round-head { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; }
.round-head h3 { font-size: 13.5px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .8px; display: flex; align-items: center; gap: 8px; }
.round-head h3 .ic-svg { width: 16px; height: 16px; color: var(--accent); }
.round-head .rule { flex: 1; height: 1px; background: var(--line); }
.match {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 20px;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--glass-radius); box-shadow: var(--glass-shadow);
  margin-bottom: 9px; transition: border-color .15s, background .15s;
}
.match:hover { border-color: var(--glass-border-hover); background: var(--glass-bg-hover); }
.match .side { display: flex; align-items: center; gap: 11px; min-width: 0; }
.match .side.home { justify-content: flex-end; text-align: right; }
.match .side .logo-sm { width: 36px; height: 36px; border-radius: 9px; background: #fff; padding: 4px; flex: none; }
.match .side .logo-sm img { width: 100%; height: 100%; object-fit: contain; }
.match .side .nm { font-weight: 600; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match .score { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.match .score .box { min-width: 38px; height: 40px; padding: 0 7px; border-radius: 10px; background: var(--surface-3); color: #fff; font-size: 19px; display: grid; place-items: center; border: 1px solid var(--line); }
.match .score.done .box { background: linear-gradient(135deg, #16233d, #101a2f); border-color: rgba(59,124,246,.25); }
.match .score.pending .box { background: var(--surface-2); color: var(--muted); font-size: 14px; }
.match .score .vs { color: var(--muted-2); font-size: 11px; }
.match .win .nm { color: var(--accent); font-weight: 800; }
.match .edit-btn { grid-column: 1 / -1; margin-top: 10px; justify-self: center; }
.chip-wo { font-size: 10px; background: rgba(242,176,35,.15); color: var(--gold-2); border: 1px solid rgba(242,176,35,.3); padding: 2px 7px; border-radius: 20px; font-weight: 700; }

/* Rank lists */
.rank-list { display: flex; flex-direction: column; overflow: hidden; }
.rank-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: none; }
.rank-row .rk { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); color: var(--muted); font-weight: 800; font-size: 14px; display: grid; place-items: center; flex: none; }
.rank-row .rk .ic-svg { width: 17px; height: 17px; }
.rank-row.top1 .rk { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--black); }
.rank-row.top2 .rk { background: #9fb3c8; color: var(--black); }
.rank-row.top3 .rk { background: #c67b3f; color: #fff; }
.rank-row .info { flex: 1; min-width: 0; }
.rank-row .info .nm { font-weight: 600; color: #fff; font-size: 14.5px; }
.rank-row .info .tm { font-size: 12.5px; color: var(--muted); }
.rank-row .val { font-size: 20px; font-weight: 800; color: var(--accent); }
.rank-row .val small { font-size: 12px; color: var(--muted); font-weight: 500; }
.empty-state { padding: 30px; text-align: center; color: var(--muted); }
.cards-badges { display: flex; gap: 7px; align-items: center; }
.cardico { width: 15px; height: 20px; border-radius: 3px; display: inline-block; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.cardico.y { background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.cardico.r { background: linear-gradient(135deg, #f0596b, var(--red)); }
.count-badge { font-weight: 700; color: #fff; min-width: 20px; text-align: center; }
.susp-tag { font-size: 10px; background: rgba(239,74,94,.13); color: #ff8b98; border: 1px solid rgba(239,74,94,.3); padding: 3px 9px; border-radius: 20px; font-weight: 600; }

/* Tabs */
.tabbar { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; margin-bottom: 18px; }
.tabbar button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .15s; }
.tabbar button .ic-svg { width: 15px; height: 15px; }
.tabbar button.on { background: var(--accent); color: #fff; }
.tabbar button:hover:not(.on) { color: var(--ink-2); }

/* Search input */
.search-box { position: relative; max-width: 320px; margin-bottom: 16px; }
.search-box .ic-svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search-box input { width: 100%; padding: 10px 12px 10px 38px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 10px; font-size: 13.5px; color: var(--ink); }
.search-box input:focus { outline: none; border-color: var(--accent); }

/* Bracket */
.bracket { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 10px; max-width: 820px; }
.bracket .col { display: flex; flex-direction: column; gap: 24px; }
.bnode { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; box-shadow: var(--shadow-sm); }
.bnode .bhead { background: var(--surface-3); color: var(--ink-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; padding: 7px 13px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.bnode .bhead .ic-svg { width: 14px; height: 14px; }
.bnode.final { box-shadow: 0 0 0 1px rgba(242,176,35,.3), var(--shadow-md); }
.bnode.final .bhead { background: linear-gradient(135deg, var(--gold), #c98a12); color: var(--black); }
.brow { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.brow:last-child { border-bottom: none; }
.brow .logo-sm { width: 28px; height: 28px; border-radius: 7px; background: #fff; padding: 3px; flex: none; }
.brow .logo-sm img { width: 100%; height: 100%; object-fit: contain; }
.brow .ph { width: 28px; height: 28px; border-radius: 7px; background: var(--surface-3); flex: none; }
.brow .nm { flex: 1; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.brow .nm.slot { color: var(--muted); font-weight: 500; font-style: italic; }
.brow .sc { font-weight: 800; font-size: 17px; min-width: 26px; text-align: center; color: #fff; }
.brow.win { background: rgba(59,124,246,.08); }
.brow.win .nm { color: var(--accent); font-weight: 800; }
.champion-banner { grid-column: 1/-1; text-align: center; margin-top: 26px; padding: 24px; background: linear-gradient(135deg, #16130a, #0f1712); border: 1px solid rgba(242,176,35,.25); border-radius: var(--radius); }
.champion-banner .cup { color: var(--gold-2); }
.champion-banner .cup .ic-svg { width: 42px; height: 42px; }
.champion-banner .lbl { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold-2); font-weight: 700; margin-top: 6px; }
.champion-banner .nm { font-size: 30px; font-weight: 800; color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px; transition: all .15s; }
.btn .ic-svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; padding: 12px 24px; border-radius: 12px; box-shadow: var(--btn-glow); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 0 22px rgba(0,82,255,.55); }
.btn-navy { background: var(--surface-3); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-3); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: rgba(239,74,94,.12); color: #ff8b98; border: 1px solid rgba(239,74,94,.25); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--black); }

/* Admin banner */
.admin-banner { display: flex; align-items: center; gap: 13px; padding: 13px 18px; margin-bottom: 20px; background: linear-gradient(135deg, #1a1a12, #10120d); border: 1px solid rgba(242,176,35,.22); border-radius: 12px; }
.admin-banner .ico { color: var(--gold-2); }
.admin-banner .ico .ic-svg { width: 22px; height: 22px; }
.admin-banner .t { flex: 1; font-size: 13px; color: var(--ink-2); }
.admin-banner .t strong { display: block; font-size: 14px; color: #fff; }

/* Roster */
.roster-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.roster-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 12px; border-bottom: 1px solid var(--line-strong); }
.roster-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.roster-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.roster-table .dorsal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); border: 1px solid var(--line); color: #fff; font-weight: 800; }
.roster-table strong { color: #fff; }
.roster-table .ced { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.roster-table .redacted { letter-spacing: 2px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(2,6,16,.66); backdrop-filter: blur(4px); z-index: var(--z-modal-backdrop); display: grid; place-items: center; padding: 20px; }
.modal { position: relative; z-index: var(--z-modal); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); width: 100%; max-width: 470px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; font-weight: 800; color: #fff; }
.modal-head .x { margin-left: auto; color: var(--muted); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.modal-head .x:hover { background: var(--surface-3); color: #fff; }
.modal-head .x .ic-svg { width: 18px; height: 18px; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field input, .field select { width: 100%; padding: 11px 13px; background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--ink); transition: border .15s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Match-event rows: goals / cards attached to a specific match */
.event-block { margin-bottom: 14px; }
.event-block .eb-head { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.event-block .eb-head .logo-sm { width: 20px; height: 20px; }
.stat-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.stat-row select { flex: 1; min-width: 0; padding: 9px 10px; background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink); }
.stat-row select:focus { outline: none; border-color: var(--accent); }
.stat-row .sr-count { width: 56px; flex: none; padding: 9px 6px; background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink); text-align: center; }
.stat-row .sr-type { flex: none; width: 120px; }
.stat-row .sr-remove { flex: none; padding: 8px 9px; }
.event-empty-hint { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.score-inputs { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 8px 0 6px; }
.score-inputs .col { flex: 1; text-align: center; }
.score-inputs .team-lbl { font-weight: 600; color: #fff; margin-bottom: 9px; font-size: 13.5px; }
.score-inputs input { width: 68px; height: 68px; text-align: center; font-size: 28px; font-weight: 800; background: var(--bg-2); border: 2px solid var(--line); border-radius: 13px; color: #fff; }
.score-inputs .colon { font-size: 24px; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Admin actions */
.admin-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 24px; }
.action-card { padding: 18px; display: flex; gap: 13px; align-items: flex-start; text-align: left; transition: transform .15s, box-shadow .15s, border-color .15s; cursor: pointer; }
.action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(59,124,246,.35); }
.action-card .ico { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.action-card .ico .ic-svg { color: var(--accent); width: 21px; height: 21px; }
.action-card .t strong { display: block; color: #fff; font-size: 14.5px; }
.action-card .t span { font-size: 12.5px; color: var(--muted); }

/* Toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--line-strong); color: #fff; padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: var(--z-toast); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; animation: toastIn .25s cubic-bezier(.22,1,.36,1); }
.toast .ic-svg { width: 18px; height: 18px; color: var(--success); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } }
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  * { transition-duration: .01ms !important; }
}

.mobile-nav { display: none; }
.mobile-topbar { display: none; }
.sidebar-scrim { display: none; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 980px) {
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); z-index: var(--z-drawer); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(2,6,16,.6); z-index: 44; }
  .sidebar-scrim.show { display: block; }
  .main { margin-left: 0; padding-bottom: 78px; }
  .topbar { display: none; }
  .hamburger { display: grid; }
  .mobile-topbar {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px;
    background: rgba(10,17,32,.92); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: var(--z-sticky);
  }
  .mobile-topbar h1 { font-size: 15px; font-weight: 800; line-height: 1; flex: 1; color: #fff; letter-spacing: .1px; }
  .mobile-topbar .m-actions { display: flex; gap: 8px; align-items: center; }
  .format-toggle-mobile { display: inline-flex; align-items: center; gap: 5px; height: 44px; padding: 0 11px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
  .format-toggle-mobile .ic-svg { width: 15px; height: 15px; }

  .content { padding: 16px; }
  .dash-hero { min-height: unset; }
  .dash-hero .hc { padding: 18px 18px; min-height: unset; display: block; }
  .hc-text { max-width: none; }
  .dash-hero .eyebrow { font-size: 10px; margin-bottom: 6px; }
  .dash-hero h1 { font-size: 20px; margin-bottom: 8px; }
  .progress-track { max-width: none; }
  .progress-lbl { font-size: 10.5px; }
  .hero-chips { gap: 7px; margin-top: 12px; }
  .hero-chip { padding: 6px 9px; flex: 1; min-width: 80px; gap: 6px; }
  .hero-chip .ic-svg { width: 13px; height: 13px; }
  .hero-chip strong { font-size: 12.5px; }
  .hero-chip span { font-size: 8.5px; }
  /* player view: keep the hero clean on mobile, no stat chips */
  .dash-hero.is-jugador .hero-chips { display: none; }
  /* narrower crop: keep the ball in frame and dim it a touch more behind the stacked text */
  .dash-hero .hero-bg { object-position: 82% 46%; opacity: .5; }
  .bracket { grid-template-columns: 1fr; gap: 20px; }
  .nm-teams { gap: 8px; }
  .nm-team .logo-wrap { width: 52px; height: 52px; }
  .nm-team .tn { font-size: 13px; }

  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: var(--z-sticky); background: rgba(10,17,32,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 7px 4px 9px; }
  .mobile-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px; color: var(--muted); font-size: 10px; font-weight: 600; }
  .mobile-nav button .ic-svg { width: 21px; height: 21px; }
  .mobile-nav button.active { color: var(--accent); }
  .modal { max-width: 100%; }
}

@media (max-width: 420px) {
  .dash-hero h1 { font-size: 19px; }
  .match { padding: 13px 12px; gap: 8px; }
  .match .side .logo-sm { width: 30px; height: 30px; }
  .match .side .nm { font-size: 12.5px; }
  .mini-match { flex-basis: 176px; }
}
