:root {
  --navy: #1c2331;
  --navy-2: #252d3d;
  --nav: #2c3446;
  --red: #d0122d;
  --red-d: #b10e25;
  --bg: #dce1e8;
  --card: #fff;
  --text: #1b1f2a;
  --muted: #5b6575;
  --line: #cfd5de;
  --team: #c8102e;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}
a { color: #0b57a8; text-decoration: none; }
a:hover { text-decoration: underline; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 9; }

.topbar { background: var(--navy); color: #fff; }
.topbar-inner {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 16px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
}
.logo { color: #fff; text-decoration: none; line-height: 1.1; }
.logo-p { font-weight: 700; font-size: 1.35rem; }
.logo-x { font-weight: 800; color: var(--red); font-size: 1.35rem; }
.logo small { display: block; color: #9aa3b5; font-size: .7rem; margin-top: 2px; }
.botd {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy-2);
  border-radius: 4px;
  padding: 6px 10px;
  min-width: 0;
}
.botd-label {
  background: var(--red);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.botd-match { color: #fff; font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.botd-match strong { color: #ffd54a; margin-left: 8px; }
.botd-match em { color: #9fd3a3; font-style: normal; margin-left: 6px; }
.botd-go {
  background: #2e7d32;
  color: #fff;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
}
.top-utils { color: #c5cad6; font-size: .85rem; }
.subnav {
  background: var(--nav);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px 10px;
}
.subnav a { color: #fff; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; }
.subnav a:hover { color: #ffd4d8; }
.badge-link { position: relative; }
.nav-search { margin-left: auto; }
.nav-search input {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 6px 8px;
  min-width: 180px;
  border-bottom: 1px solid #5a6478;
}

.page {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  gap: 12px;
  max-width: 1280px;
  margin: 12px auto 24px;
  padding: 0 12px;
  align-items: start;
}
.sidebar-left, .sidebar-right { min-width: 0; }
.main {
  background: var(--card);
  padding: 16px 18px 28px;
  min-height: 60vh;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
h1 { font-size: 1.55rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 22px 0 10px; }
.lead { color: #333; font-size: 1.02rem; }
.hero p { margin: 8px 0; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 16px 0 8px; }
.toolbar h2 { margin: 0; }
.filters { display: flex; gap: 6px; }
.filters a {
  background: #eceff3;
  color: #333;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}
.filters a.on { background: var(--navy); color: #fff; }

.table-wrap { overflow-x: auto; }
table.matches { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.matches th {
  text-align: left;
  background: #eef1f5;
  padding: 8px;
  font-size: .75rem;
  text-transform: uppercase;
  color: #556;
  border-bottom: 1px solid var(--line);
}
table.matches td { padding: 8px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
.league-row td { background: #f4f6f8; font-weight: 700; font-size: .82rem; }
.event .teams { color: var(--team); font-weight: 700; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.event .team-name { display: inline-flex; align-items: center; gap: 6px; }
.event .sep { color: #889; font-weight: 600; }
.tm-logo, .lg-logo {
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
  flex: 0 0 auto;
}
.tm-logo { width: 20px; height: 20px; }
.tm-logo-sm { width: 16px; height: 16px; }
.tm-logo-lg { width: 48px; height: 48px; display: block; margin: 0 auto 6px; }
.lg-logo { width: 18px; height: 18px; margin-right: 4px; }
.lg-logo-lg { width: 28px; height: 28px; margin-right: 8px; }
h1 .lg-logo-lg, h1 .tm-logo-lg { display: inline-block; vertical-align: middle; margin: 0 8px 0 0; }
.team-title { display: flex; align-items: center; gap: 10px; }
.team-title .tm-logo-lg { margin: 0; }
.league-row td { display: table-cell; }
.league-row a { vertical-align: middle; }
.league-list a { display: flex; align-items: center; gap: 8px; }
.league-grid a strong, .team-elo a { display: flex; align-items: center; gap: 8px; }
.team-cell { display: flex; align-items: center; gap: 8px; }
.sb-team .tm-logo-lg { margin-bottom: 8px; }
.rec-match { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.event small { display: block; color: var(--muted); font-size: .75rem; }
.event .score { color: #1b5e20; }
.odd { font-weight: 700; text-align: center; width: 58px; }
.odd.pick { background: #fff3f3; color: var(--red); }
.pred { font-weight: 800; color: var(--red); text-align: center; }
.conf { text-align: center; font-size: .82rem; color: #333; }
.time { white-space: nowrap; color: #444; width: 90px; }

.box { background: var(--navy-2); color: #dfe4ee; margin-bottom: 10px; border-radius: 4px; overflow: hidden; }
.box-head { background: #323b4e; padding: 8px 10px; font-weight: 700; font-size: .82rem; }
.box-head.dark { background: #1e3a5f; }
.box-account { padding: 14px 12px; text-align: center; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: #3a455c; color: #fff; display: grid; place-items: center;
  margin: 0 auto 8px; font-weight: 800;
}
.box-title { margin: 0 0 8px; font-weight: 700; }
.checks { list-style: none; padding: 0; margin: 0; text-align: left; font-size: .82rem; }
.checks li { padding: 4px 0 4px 18px; position: relative; }
.checks li:before { content: "✓"; color: var(--red); position: absolute; left: 0; font-weight: 800; }
.league-list { list-style: none; margin: 0; padding: 6px 0 10px; }
.league-list a { display: block; color: #e8edf5; padding: 5px 12px; font-size: .82rem; text-decoration: none; }
.league-list a:hover { background: #323b4e; }
.league-list.compact a { padding: 3px 12px; font-size: .78rem; }

.rec-box { background: #fff; color: var(--text); border: 1px solid var(--line); }
.rec-box .box-head { color: #fff; }
.rec { display: block; padding: 10px 12px; border-bottom: 1px solid #eee; text-decoration: none; color: inherit; }
.rec-match { display: block; font-weight: 700; color: var(--team); font-size: .88rem; }
.rec-market { color: var(--muted); font-size: .78rem; }
.rec-odd { float: right; font-weight: 800; color: var(--navy); }
.btn-all {
  display: block; text-align: center; background: var(--navy); color: #fff;
  padding: 10px; font-weight: 700; text-decoration: none;
}
.socials { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 8px; }
.socials a {
  width: 28px; height: 28px; display: grid; place-items: center;
  background: #3b4a63; color: #fff; border-radius: 3px; font-weight: 800; text-decoration: none;
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 12px;
  background: #f6f8fb;
  border: 1px solid var(--line);
  padding: 16px;
  margin: 16px 0;
  text-align: center;
}
.sb-team strong { display: block; font-size: 1.4rem; margin-top: 6px; }
.probs { display: flex; justify-content: center; gap: 18px; }
.probs .p { min-width: 70px; }
.probs b { display: block; font-size: 1.6rem; }
.probs .win b { color: var(--red); }
.pron { font-weight: 700; margin-top: 10px; }
.result { color: #1b5e20; }
table.factors, table.standings { width: 100%; border-collapse: collapse; }
table.factors td, table.standings td, table.standings th, table.factors th {
  border-bottom: 1px solid #eee; padding: 7px 8px; text-align: left;
}
.why { margin: 0 0 8px; padding-left: 18px; }
.why.plus li { color: #1b5e20; }
.why.minus li { color: #9b1c1c; }
.markets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mcard { background: #f4f6f9; padding: 10px; text-align: center; border-radius: 4px; }
.mcard b { display: block; font-size: 1.2rem; }
.top-scores { display: flex; gap: 12px; flex-wrap: wrap; list-style: none; padding: 0; }
.league-grid, .team-elo { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.league-grid a, .team-elo li {
  display: flex; justify-content: space-between; background: #f5f7fa; padding: 10px; border-radius: 4px;
}
.stats-row { display: flex; gap: 18px; list-style: none; padding: 0; }
.kicker { color: var(--muted); text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }

.site-footer {
  background: var(--navy);
  color: #9aa3b5;
  padding: 20px 16px;
  text-align: center;
  font-size: .82rem;
}
.site-footer a { color: #d5dbe6; }

.admin-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.admin-kpis div { background: #f4f6f9; padding: 12px; }
.admin-kpis b { display: block; font-size: 1.3rem; }
.weights { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.weights label { display: flex; justify-content: space-between; gap: 8px; background: #f5f7fa; padding: 8px; }
.login-form, .search-page { display: grid; gap: 10px; max-width: 320px; }
input, button { font: inherit; }
button, .weights button {
  background: var(--red); color: #fff; border: 0; padding: 8px 14px; font-weight: 700; cursor: pointer;
}
.error { color: var(--red); }
.ok { color: #1b5e20; }
.logs { background: #111; color: #cde; padding: 12px; overflow: auto; max-height: 240px; font-size: .75rem; }
.hint { font-size: .85rem; color: var(--muted); }

@media (max-width: 980px) {
  .page { grid-template-columns: 1fr; }
  .sidebar-left { display: none; }
  .topbar-inner { grid-template-columns: 1fr auto; }
  .botd { display: none; }
  .markets { grid-template-columns: 1fr 1fr; }
  .scoreboard { grid-template-columns: 1fr; }
  .league-grid, .team-elo, .admin-kpis, .weights { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .subnav { font-size: .75rem; }
  table.matches .conf, table.matches th:last-child { display: none; }
}
