/* =========================================================================
 * ScorePulse — feuille de styles principale
 *   - Thème clair + thème sombre via [data-theme="dark"] sur <html>
 *   - Layout: header fixe en haut, sidebar gauche, contenu central, panneau
 *     détails à droite (rétractable / overlay sur mobile)
 *   - Conçu pour beaucoup de matchs visibles à l'écran sans surcharge
 * ========================================================================= */

/* ---- Variables de thème ------------------------------------------------- */
:root {
  --bg:            #f4f6fa;
  --bg-elev:       #ffffff;
  --bg-elev-2:     #f8fafc;
  --border:        #e3e7ee;
  --border-strong: #cfd6e0;
  --text:          #1a2230;
  --text-muted:    #6b7585;
  --text-dim:      #9aa3b2;
  --accent:        #1d6fe5;
  --accent-hover:  #155bc1;
  --live:          #e23636;
  --live-bg:       #fdecec;
  --finished:      #6b7585;
  --scheduled:     #1d6fe5;
  --favorite:      #f5a623;
  --win:           #1faa59;
  --loss:          #e23636;
  --draw:          #b5bcc6;
  --shadow-sm:     0 1px 2px rgba(15, 25, 40, 0.04);
  --shadow-md:     0 4px 14px rgba(15, 25, 40, 0.06);
  --radius:        10px;
  --radius-sm:     6px;
  --header-h:      56px;
  --sidebar-w:     260px;
  --details-w:     360px;
}

[data-theme="dark"] {
  --bg:            #0f1620;
  --bg-elev:       #161e2b;
  --bg-elev-2:     #1c2533;
  --border:        #232c3b;
  --border-strong: #2e3a4d;
  --text:          #e6ebf3;
  --text-muted:    #95a0b3;
  --text-dim:      #6b7689;
  --accent:        #4f9bff;
  --accent-hover:  #76b2ff;
  --live:          #ff5050;
  --live-bg:       #3a1c1c;
  --finished:      #95a0b3;
  --scheduled:     #4f9bff;
  --favorite:      #ffc14d;
  --win:           #2ed273;
  --loss:          #ff5050;
  --draw:          #6b7689;
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:     0 4px 14px rgba(0, 0, 0, 0.35);
}

/* ---- Reset / base ------------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ---- Header ------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
  color: var(--text);
  white-space: nowrap;
}
.header__logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #6aaaff);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
}

.header__nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.header__nav::-webkit-scrollbar { display: none; }

.header__nav button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.header__nav button:hover { background: var(--bg-elev-2); color: var(--text); }
.header__nav button.is-active {
  background: var(--accent);
  color: #fff;
}

.header__search {
  position: relative;
  width: 240px;
  max-width: 32vw;
}
.header__search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.header__search input:focus { border-color: var(--accent); }
.header__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
}

.header__actions { display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: background .15s, color .15s;
  position: relative;
}
.icon-btn:hover { background: var(--bg-elev-2); color: var(--text); }
.icon-btn.is-active { color: var(--favorite); }
.icon-btn__badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid; place-items: center;
}

.header__menu-btn { display: none; }

/* ---- Layout principal --------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--details-w);
  gap: 16px;
  padding: 16px;
  max-width: 1600px;
  margin: 0 auto;
  align-items: start;
}

.layout.is-details-collapsed { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }

/* ---- Sidebar ------------------------------------------------------------ */
.sidebar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}

.sidebar__section { margin-bottom: 18px; }
.sidebar__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  font-weight: 700;
  margin: 4px 8px 8px;
}

.sidebar__list { list-style: none; padding: 0; margin: 0; }
.sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  transition: background .12s;
}
.sidebar__item:hover { background: var(--bg-elev-2); }
.sidebar__item.is-active { background: var(--bg-elev-2); color: var(--accent); font-weight: 600; }
.sidebar__item img {
  width: 18px; height: 18px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}
.sidebar__item-icon {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-size: 14px;
}
.sidebar__item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__item-count {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-elev-2);
  padding: 2px 6px;
  border-radius: 10px;
}
.sidebar__item.is-active .sidebar__item-count {
  background: var(--accent);
  color: #fff;
}

/* ---- Main panel --------------------------------------------------------- */
.main {
  min-width: 0; /* permet aux enfants de wrap */
}

.toolbar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.date-tabs { display: flex; gap: 4px; }
.date-tabs button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.date-tabs button:hover { background: var(--bg-elev-2); color: var(--text); }
.date-tabs button.is-active { background: var(--accent); color: #fff; }
.date-tabs button .date-tabs__sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: .8;
  margin-top: 2px;
}

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button {
  background: var(--bg-elev-2);
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filters button:hover { color: var(--text); border-color: var(--border); }
.filters button.is-active {
  background: var(--accent);
  color: #fff;
}
.filters .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(0.85); }
}

/* ---- Competition group -------------------------------------------------- */
.competition {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.competition__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.competition__header img {
  width: 20px; height: 20px;
  border-radius: 3px;
  object-fit: cover;
}
.competition__country {
  color: var(--text-muted);
  font-weight: 600;
}
.competition__sep { color: var(--text-dim); }
.competition__name {
  color: var(--text);
  font-weight: 700;
}
.competition__standings-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.competition__standings-link:hover { text-decoration: underline; }

/* ---- Match row ---------------------------------------------------------- */
.match {
  display: grid;
  grid-template-columns: 70px 24px 1fr 80px 1fr 28px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.match:last-child { border-bottom: 0; }
.match:hover { background: var(--bg-elev-2); }
.match.is-selected { background: var(--bg-elev-2); box-shadow: inset 3px 0 0 var(--accent); }

.match__status {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}
.match__status--live    { color: var(--live); }
.match__status--live-sub{ display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.4px; }
.match__status--finished{ color: var(--finished); }

.match__fav {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 16px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 4px;
  padding: 0;
}
.match__fav:hover { background: var(--border); color: var(--favorite); }
.match__fav.is-on { color: var(--favorite); }

.match__team {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; font-weight: 600; font-size: 13px;
}
.match__team--away { justify-content: flex-end; text-align: right; }
.match__team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.match__score {
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 0.5px;
}
.match__score--live { color: var(--live); }
.match__score--scheduled { color: var(--text-dim); font-weight: 500; font-size: 13px; }

.match__more {
  color: var(--text-dim);
  font-size: 16px;
  text-align: center;
}

/* ---- Empty state -------------------------------------------------------- */
.empty-state {
  background: var(--bg-elev);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state__icon { font-size: 40px; margin-bottom: 8px; }
.empty-state__title { font-weight: 700; color: var(--text); margin-bottom: 4px; }

/* ---- Details panel ------------------------------------------------------ */
.details {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}

.details__close {
  display: none;
  position: absolute;
  right: 8px; top: 8px;
  background: var(--bg-elev-2);
  border: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
}

.details__hero {
  padding: 18px 16px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
}
.details__competition {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted); font-weight: 600;
  margin-bottom: 14px;
}
.details__competition img { width: 18px; height: 18px; border-radius: 3px; }
.details__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.details__team { text-align: center; font-size: 14px; font-weight: 700; }
.details__team-logo {
  width: 48px; height: 48px;
  background: var(--bg-elev);
  border-radius: 50%;
  margin: 0 auto 6px;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800;
  color: var(--accent);
  border: 2px solid var(--border);
}
.details__score {
  font-size: 32px; font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.details__score--live { color: var(--live); }
.details__minute {
  text-align: center;
  font-size: 12px; font-weight: 700;
  color: var(--live);
  margin-top: 10px;
}
.details__minute--finished { color: var(--finished); }
.details__minute--scheduled { color: var(--text-muted); }

.details__tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.details__tabs button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 12px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.details__tabs button:hover { color: var(--text); }
.details__tabs button.is-active { color: var(--accent); border-color: var(--accent); }

.details__body { padding: 14px 16px; }

/* Stats */
.stat-row { margin-bottom: 12px; }
.stat-row__head {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 600; margin-bottom: 4px;
}
.stat-row__label { color: var(--text-muted); }
.stat-row__bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
}
.stat-row__bar-home { background: var(--accent); }
.stat-row__bar-away { background: var(--text-muted); }

/* Events */
.events { list-style: none; padding: 0; margin: 0; }
.event {
  display: grid;
  grid-template-columns: 40px 24px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.event:last-child { border-bottom: 0; }
.event__min { font-weight: 700; color: var(--text-muted); font-size: 12px; }
.event__icon { font-size: 14px; text-align: center; }
.event__text { font-size: 13px; }
.event__player { font-weight: 600; }
.event__detail { color: var(--text-muted); font-size: 12px; }

/* Lineups */
.lineup { margin-bottom: 14px; }
.lineup__title { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.lineup__list { list-style: none; padding: 0; margin: 0; }
.lineup__list li {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}
.lineup__list li:hover { background: var(--bg-elev-2); }

/* H2H table */
.h2h { width: 100%; border-collapse: collapse; font-size: 13px; }
.h2h th, .h2h td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
}
.h2h th { font-size: 11px; text-transform: uppercase; color: var(--text-dim); font-weight: 700; letter-spacing: 0.5px; }
.h2h td.score { font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }

/* Odds */
.odds {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 8px;
}
.odd {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.odd__label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.odd__value { font-size: 16px; font-weight: 800; margin-top: 2px; color: var(--accent); font-variant-numeric: tabular-nums; }
.odds__note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
}

/* Standings table (used in details + main) */
.standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.standings thead th {
  background: var(--bg-elev-2);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.4px;
}
.standings thead th:nth-child(2) { text-align: left; }
.standings tbody td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.standings tbody td:nth-child(2) {
  text-align: left;
  font-weight: 600;
}
.standings tbody tr:hover { background: var(--bg-elev-2); }
.standings tbody td.pts { font-weight: 800; }
.standings__pos {
  display: inline-block;
  width: 22px; height: 22px;
  line-height: 22px;
  border-radius: 4px;
  font-weight: 700;
}
.standings__pos--ucl { background: rgba(29, 111, 229, .14); color: var(--accent); }
.standings__pos--uel { background: rgba(245, 166, 35, .14); color: var(--favorite); }
.standings__pos--rel { background: rgba(226, 54, 54, .12); color: var(--loss); }

/* ---- Sidebar mobile overlay -------------------------------------------- */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 60;
}
.sidebar-backdrop.is-open { display: block; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1100px) {
  :root { --details-w: 320px; }
  .header__search { width: 180px; }
}

@media (max-width: 960px) {
  .layout, .layout.is-details-collapsed { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 70;
    border-radius: 0;
    border-left: 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
    max-height: none;
  }
  .sidebar.is-open { transform: translateX(0); }

  .details {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(420px, 100%);
    z-index: 70;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform .25s ease;
    max-height: none;
    box-shadow: var(--shadow-md);
  }
  .details.is-open { transform: translateX(0); }
  .details__close { display: grid; place-items: center; }

  .header__menu-btn { display: grid; place-items: center; }
  .header__search { display: none; }
}

@media (max-width: 600px) {
  .header { padding: 0 10px; gap: 10px; }
  .header__logo { font-size: 16px; }
  .header__nav { gap: 0; }
  .header__nav button { padding: 6px 8px; font-size: 12px; }
  .layout { padding: 10px; gap: 10px; }

  .match {
    grid-template-columns: 60px 22px 1fr 60px 1fr 22px;
    gap: 6px;
    padding: 10px;
  }
  .match__score { font-size: 14px; }
  .match__team { font-size: 12px; }

  .competition__header { padding: 8px 10px; font-size: 12px; }
  .competition__header img { width: 16px; height: 16px; }
}

/* ---- Logos équipes (Highlightly) ------------------------------------- */
.team-logo-img {
  width: 20px; height: 20px; object-fit: contain;
  display: inline-block; margin-right: 6px; vertical-align: middle;
  border-radius: 3px; background: var(--bg-elev-2);
}
.details__team-logo img {
  width: 44px; height: 44px; object-fit: contain; border-radius: 6px;
  background: var(--bg-elev-2); padding: 3px;
}
.match__team--away .team-logo-img { margin-right: 0; margin-left: 6px; }
.match__team--away { justify-content: flex-end; }

/* ---- Calendar (right column) ----------------------------------------- */
.calendar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}
.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.calendar__title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  text-transform: capitalize;
}
.calendar__nav {
  display: flex; gap: 4px;
}
.calendar__nav button {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0;
  font-size: 13px;
  display: grid; place-items: center;
  transition: background .12s, color .12s;
}
.calendar__nav button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.calendar__weekdays,
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.calendar__weekday {
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 4px 0;
}
.calendar__day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  transition: background .12s;
}
.calendar__day:hover { background: var(--bg-elev-2); border-color: var(--border); }
.calendar__day.is-other-month { color: var(--text-dim); font-weight: 400; }
.calendar__day.is-today { color: var(--accent); }
.calendar__day.is-selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.calendar__day.has-matches::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--live);
  border-radius: 50%;
}
.calendar__day.is-selected.has-matches::after { background: #fff; }
.calendar__footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ---- Prose / breadcrumb / utility ---------------------------------------- */
.crumb {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.crumb a { color: var(--text-muted); }
.crumb a:hover { color: var(--accent); }
.crumb-sep { color: var(--text-dim); margin: 0 6px; }

.page-header {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.page-header__title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}
.page-header__sub {
  font-size: 13px;
  color: var(--text-muted);
}
.page-header__meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 8px;
  font-size: 12px; color: var(--text-muted);
}

.prose { max-width: 720px; }
.prose p { margin: 0 0 10px; }
.prose h2 { margin-top: 20px; }

.kv { width: 100%; border-collapse: collapse; margin-bottom: 20px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.kv th, .kv td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.kv th { color: var(--text-muted); font-weight: 500; width: 260px; background: var(--bg-elev-2); }

.btn-primary { display: inline-block; padding: 10px 18px; background: var(--accent); color: #fff; border-radius: var(--radius-sm); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); }

.tag-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  background: var(--bg-elev-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.tag-pill--live { background: var(--live-bg); color: var(--live); border-color: transparent; }

.badge-notice {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--bg-elev-2);
  border-left: 3px solid var(--accent);
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0;
}

.hero-empty {
  background: var(--bg-elev);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.hero-empty h1 { color: var(--text); }

.match-hero {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
.match-hero__team { text-align: center; }
.match-hero__team-logo {
  width: 60px; height: 60px;
  background: var(--bg-elev-2);
  border: 2px solid var(--border);
  border-radius: 50%;
  margin: 0 auto 8px;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 800; color: var(--accent);
}
.match-hero__team-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.match-hero__score {
  text-align: center;
  min-width: 120px;
}
.match-hero__score-line {
  font-size: 40px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.match-hero__score-line--live { color: var(--live); }
.match-hero__score-sep { color: var(--text-dim); margin: 0 4px; }
.match-hero__badge {
  margin-top: 6px;
}
.match-hero__when {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.info-grid {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  font-size: 13px;
  margin-bottom: 12px;
}
.info-grid > div span:first-child { color: var(--text-muted); margin-right: 6px; }

/* Search suggestion dropdown */
.header__search-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 340px;
  overflow-y: auto;
  z-index: 60;
}
.header__search-suggest a {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}
.header__search-suggest a:hover { background: var(--bg-elev-2); }
.header__search-suggest a:last-child { border-bottom: 0; }
.header__search-suggest .stype { color: var(--text-dim); font-size: 11px; margin-left: 6px; }

/* Loading skeleton (unused but ready) */
.skel {
  background: linear-gradient(90deg, var(--bg-elev-2) 0%, var(--border) 50%, var(--bg-elev-2) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s infinite;
  border-radius: 4px;
}
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Footer minimal */
.footer {
  max-width: 1600px;
  margin: 20px auto 0;
  padding: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: space-between;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }

/* Screen-reader-only utility */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Accessibility: skip link */
.skip-link {
  position: absolute; left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 0 0 6px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* Print-friendly */
@media print {
  .header, .sidebar, .details, .footer { display: none; }
  .layout { grid-template-columns: 1fr; padding: 0; }
}

/* ---- Toolbar horizontal (filters left, compact date button right) -------- */
.toolbar.toolbar--horizontal {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 8px 12px;
}
.toolbar--horizontal .filters {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
}
.toolbar--horizontal .filters::-webkit-scrollbar { display: none; }
.toolbar--horizontal .date-picker { flex: 0 0 auto; }
@media (max-width: 700px) {
  .toolbar.toolbar--horizontal { flex-wrap: wrap; }
  .toolbar--horizontal .filters { flex: 1 1 100%; }
  .toolbar--horizontal .date-picker { flex: 1 1 100%; justify-content: space-between; }
  .toolbar--horizontal .date-picker__label { flex: 1; }
}

/* ---- Compact date picker (Flashscore-style pill) ------------------------- */
.date-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  font-size: 13px;
}
.date-picker__arrow {
  width: 28px; height: 28px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 50%;
  font-size: 16px;
  display: grid; place-items: center;
  transition: background .12s, color .12s;
  padding: 0;
}
.date-picker__arrow:hover { background: var(--bg-elev); color: var(--accent); }
.date-picker__label {
  display: inline-flex; align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 0;
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  min-width: 110px;
  justify-content: center;
  transition: background .12s;
}
.date-picker__label:hover { background: var(--accent); color: #fff; }
.date-picker__label:hover .date-picker__cal-icon { filter: brightness(3); }
.date-picker__label[aria-expanded="true"] { background: var(--accent); color: #fff; }
.date-picker__cal-icon { font-size: 12px; }
.date-picker__chev { font-size: 10px; opacity: 0.7; }

.date-picker__pop {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 12px;
  z-index: 100;
  width: 320px;
  max-width: 92vw;
}
.date-picker__pop.is-open { display: block; }
.date-picker__pop[hidden] { display: none !important; }

/* Calendar grid inside the date-picker dropdown */
.cal-grid { }
.cal-grid__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-grid__title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  text-transform: capitalize;
  flex: 1;
  text-align: center;
}
.cal-grid__nav {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0;
  font-size: 14px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .12s, color .12s;
}
.cal-grid__nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.cal-grid__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.cal-grid__weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 0;
}
.cal-grid__body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  position: relative;
}
.cal-cell:hover { background: var(--bg-elev-2); border-color: var(--border-strong); text-decoration: none; }
.cal-cell.is-other { color: var(--text-dim); font-weight: 400; }
.cal-cell.is-today { color: var(--accent); font-weight: 700; }
.cal-cell.is-current { background: var(--accent); color: #fff; border-color: var(--accent); }
.cal-cell.is-current.is-today { border-color: #fff; }
.cal-cell.has-matches::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--live);
  border-radius: 50%;
}
.cal-cell.is-current.has-matches::after { background: #fff; }
.cal-grid__foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.cal-grid__today-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

@media (max-width: 600px) {
  .toolbar--horizontal { gap: 8px; }
  .date-picker__label { min-width: 100px; padding: 4px 8px; font-size: 12px; }
  .date-picker__text { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
  .date-picker__pop { width: 300px; padding: 10px; }
}

/* ---- Section separators (Top compétitions / A→Z) ------------------------- */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 4px 8px;
  border-bottom: 1px solid var(--border);
  margin: 6px 0 10px;
}
.section-title__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.section-title__count {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}
.section-title--az { margin-top: 22px; }

/* ---- Country block (A→Z section) ---------------------------------------- */
.country-block { margin-bottom: 14px; }
.country-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 6px 2px;
  margin: 4px 0 6px;
}
.country-header__flag {
  width: 24px; height: 24px;
  border-radius: 3px;
  object-fit: cover;
}
.country-header__flag--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
}
.country-header__name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.4px;
}

/* ---- Collapsible competition header ------------------------------------- */
.competition__header {
  width: 100%;
  border: 0;
  background: var(--bg-elev-2);
  cursor: pointer;
  text-align: left;
  transition: background .12s;
}
.competition__header:hover { background: var(--border); }
.competition__header:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.competition__chevron {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
  transition: transform .18s ease;
  display: inline-block;
}
.competition__header[aria-expanded="false"] .competition__chevron {
  transform: rotate(-90deg);
}
.competition__header .comp-flag,
.competition__header .comp-logo { flex-shrink: 0; }
.comp-logo {
  width: 20px; height: 20px;
  object-fit: contain;
  border-radius: 3px;
}
.comp-logo--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
}
.competition__header .tag-pill--live { margin-left: 8px; margin-right: 4px; }
.competition__body[hidden] { display: none; }

/* ---- Fallback logo when the provider doesn't ship one -------------------- */
.team-badge-fb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}
.match__team--away .team-badge-fb { margin-right: 0; margin-left: 6px; }
.comp-flag {
  width: 20px; height: 20px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}
.comp-flag--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.competition__header .comp-flag { margin-right: 4px; }

.competition.is-highlighted {
  animation: comp-flash 1.2s ease;
}
@keyframes comp-flash {
  0% { box-shadow: 0 0 0 3px var(--accent); }
  100% { box-shadow: none; }
}

/* ---- Match-page layout override — wider details panel for the tabs -------- */
.layout.is-match-page { grid-template-columns: var(--sidebar-w) minmax(0, 1fr) 520px; }
@media (max-width: 1400px) {
  .layout.is-match-page { grid-template-columns: 220px minmax(0, 1fr) 460px; }
}
@media (max-width: 1180px) {
  .layout.is-match-page { grid-template-columns: 200px minmax(0, 1fr) 420px; }
}
@media (max-width: 1000px) {
  .layout.is-match-page { grid-template-columns: 1fr; }
}

/* ---- Match panel inside .details (right column, ScorePulse identity) ----- */
.md-panel { padding: 14px 14px; }
.md-panel .crumb { margin-bottom: 8px; font-size: 11px; }
.md-panel .mdh { padding: 12px; margin: 4px 0 10px; }
.md-panel .mdh__score-line { font-size: 30px; }
.md-panel .mdh__logo { width: 48px; height: 48px; }
.md-panel .md-tabs { top: 10px; }
.md-panel .md-block { padding: 12px; }
.md-panel .md-compos-grid { grid-template-columns: 1fr; }
.md-panel .md-recent li { grid-template-columns: 66px 1fr 44px 1fr; gap: 4px; font-size: 12px; }
.md-panel .md-recent li span:nth-child(2) { display: none; }

@media (max-width: 1000px) {
  .md-panel { padding: 12px; }
}

/* ---- Match detail v2 (Flashscore-inspired IA, ScoreEnDirect look) --------- */
.match-detail-v2 { max-width: 960px; margin: 0 auto; }
.mdh {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 8px 0 12px;
}
.mdh__meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 12px; color: var(--text-muted); margin-bottom: 14px;
}
.mdh__meta-sep { color: var(--text-dim); }
.mdh__status { font-weight: 700; }
.mdh__status.is-live  { color: var(--live); }
.mdh__status.is-final { color: var(--text-muted); }
.mdh__score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
.mdh__team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.mdh__team--away { }
.mdh__logo { width: 64px; height: 64px; background: var(--bg-elev-2); border-radius: 50%; display: grid; place-items: center; overflow: hidden; }
.mdh__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mdh__logo-fb { font-size: 26px; font-weight: 800; color: var(--text-muted); }
.mdh__name { font-weight: 700; font-size: 14px; color: var(--text); }
.mdh__result { text-align: center; }
.mdh__score-line { font: 800 42px/1 ui-monospace, monospace; letter-spacing: 1px; }
.mdh__score-line.is-live { color: var(--live); }
.mdh__sep { color: var(--text-dim); margin: 0 4px; }
.mdh__ht { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.md-tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  position: sticky; top: 60px; z-index: 5;
}
.md-tabs::-webkit-scrollbar { display: none; }
.md-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.md-tab:hover { background: var(--bg-elev); color: var(--text); text-decoration: none; }
.md-tab.is-active { background: var(--accent); color: #fff; }

.md-subtabs {
  display: flex; gap: 4px; margin: 10px 0; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.md-subtabs::-webkit-scrollbar { display: none; }
.md-subtab {
  padding: 8px 12px;
  color: var(--text-muted); font-weight: 500; font-size: 13px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap;
}
.md-subtab:hover { color: var(--text); text-decoration: none; }
.md-subtab.is-active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

.md-content { margin-top: 10px; }
.md-block {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.md-block__title { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }

.md-video { aspect-ratio: 16 / 9; background: var(--bg-elev-2); border-radius: 8px; overflow: hidden; }
.md-video iframe { width: 100%; height: 100%; border: 0; }

.md-scoreline { font: 700 15px/1.4 var(--font); }
.md-scoreline b { font-family: ui-monospace, monospace; }
.md-scoreline-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.md-timeline { list-style: none; padding: 0; margin: 0; }
.md-timeline__item {
  display: grid;
  grid-template-columns: 44px 24px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.md-timeline__item:last-child { border-bottom: 0; }
.md-timeline__min { font-weight: 700; color: var(--text-muted); font-family: ui-monospace, monospace; }
.md-timeline__icon { font-size: 15px; text-align: center; }
.md-timeline__team { font-size: 11px; }

.md-stats { display: flex; flex-direction: column; gap: 10px; }
.md-stat__label { text-align: center; font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.md-stat__row {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700;
}
.md-stat__val--home { text-align: right; }
.md-stat__val--away { text-align: left; }
.md-stat__bar {
  display: grid; grid-template-columns: 50% 50%; height: 6px; border-radius: 999px; overflow: hidden; background: var(--border);
}
.md-stat__bar span:first-child { background: var(--accent); }
.md-stat__bar span:last-child  { background: var(--text-muted); }

.md-compos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0; background: transparent; border: 0; }
.md-compo { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.md-compo__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.md-compo__form { color: var(--accent); font-family: ui-monospace, monospace; font-weight: 700; font-size: 12px; }
.md-compo__coach { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.md-compo__title { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin: 10px 0 4px; }
.md-compo__list { list-style: none; padding: 0; margin: 0; }
.md-compo__list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.md-compo__num { display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--bg-elev-2); border-radius: 4px; font-weight: 700; font-size: 11px; color: var(--text-muted); }
.md-rating {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
}
.md-table--players th, .md-table--players td { padding: 6px 4px; font-size: 12px; }
.md-table--players td:nth-child(2) { text-align: left; }

.md-comm { list-style: none; padding: 0; margin: 0; }
.md-comm li { display: grid; grid-template-columns: 50px 1fr; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--border); font-size: 13px; }
.md-comm__min { font-weight: 700; color: var(--text-muted); font-family: ui-monospace, monospace; }

.md-cr__title { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.md-cr__lead { font-size: 15px; color: var(--text); margin: 0 0 12px; }
.md-cr__body p { margin: 0 0 8px; font-size: 14px; color: var(--text); }

.md-recent { list-style: none; padding: 0; margin: 0; }
.md-recent li { display: grid; grid-template-columns: 80px 1fr 1fr 60px 1fr; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--border); font-size: 13px; align-items: center; }
.md-recent li b { text-align: center; font-family: ui-monospace, monospace; }

.md-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.md-table th { background: var(--bg-elev-2); font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--border); }
.md-table th:nth-child(2) { text-align: left; }
.md-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.md-table td:nth-child(2) { text-align: left; font-weight: 600; }
.md-table__row--home { background: rgba(29,111,229,0.06); }
.md-table__row--away { background: rgba(245,166,35,0.06); }

.md-empty {
  padding: 20px 16px; text-align: center; color: var(--text-muted); font-size: 13px;
  background: var(--bg-elev-2); border-radius: 8px;
}

@media (max-width: 700px) {
  .mdh__score { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .mdh__score-line { font-size: 32px; }
  .mdh__logo { width: 48px; height: 48px; }
  .mdh__name { font-size: 12px; }
  .md-compos-grid { grid-template-columns: 1fr; }
  .md-recent li { grid-template-columns: 70px 1fr 1fr 50px 1fr; font-size: 12px; }
}
@media (max-width: 430px) {
  .mdh { padding: 12px 12px; }
  .mdh__score-line { font-size: 26px; }
  .mdh__meta { font-size: 11px; gap: 6px; }
  .mdh__logo { width: 40px; height: 40px; }
  .mdh__name { font-size: 11px; }
  .md-tab { padding: 6px 10px; font-size: 12px; }
  .md-subtab { padding: 6px 10px; font-size: 12px; }
  .md-block { padding: 12px 12px; }
  .md-timeline__item { grid-template-columns: 36px 20px 1fr auto; gap: 6px; font-size: 12px; }
  .md-recent li { grid-template-columns: 60px 1fr 40px 1fr; gap: 4px; font-size: 11px; }
  .md-recent li span:nth-child(2) { display: none; } /* hide competition on very narrow */
}
@media (max-width: 340px) {
  .mdh__score-line { font-size: 22px; }
  .mdh__name { font-size: 10px; }
  .md-block__title { font-size: 11px; }
}

/* Small phones */
@media (max-width: 380px) {
  .header__logo-mark { width: 24px; height: 24px; }
  .header__logo { font-size: 14px; }
  .match { grid-template-columns: 52px 20px 1fr 54px 1fr 20px; gap: 4px; padding: 8px; }
  .match__team { font-size: 11.5px; }
  .match__score { font-size: 13px; }
}
