/* ============================================================
   StatArena — Global Stylesheet  (main_design.png palette)
   ============================================================ */

:root {
  color-scheme: dark; /* dark-mode form controls so input text/caret stay visible */
  --bg:           #0a0e0d;
  --panel:        #11171a;
  --panel-high:   #161d20;
  --panel-higher: #1c2428;
  --border:       rgba(255,255,255,0.06);
  --border-soft:  rgba(255,255,255,0.04);
  --text:         #e6edf0;
  --text-dim:     rgba(189,200,206,0.6);
  --text-faint:   rgba(189,200,206,0.35);
  --cyan:         #00e5ff;
  --cyan-glow:    rgba(0,229,255,0.55);
  --orange:       #ff9100;
  --orange-glow:  rgba(255,145,0,0.55);
  --purple:       #9d00ff;
  --purple-glow:  rgba(157,0,255,0.55);
  --red:          #f87171;
  --pill:         #1a2226;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Instrument Sans', sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(0,229,255,0.06), transparent 60%),
    radial-gradient(ellipse 50% 35% at 90% 100%, rgba(157,0,255,0.04), transparent 60%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism */
.glass { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }

/* Scrollbars */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.thin-scroll { scrollbar-width: thin; scrollbar-color: rgba(0,229,255,0.12) transparent; }
.thin-scroll::-webkit-scrollbar { width: 3px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }
.thin-scroll::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.12); border-radius: 4px; }

/* Material Symbols */
.ms {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-variation-settings: 'FILL' 0,'wght' 300,'GRAD' 0,'opsz' 20;
  line-height: 1;
  user-select: none;
  display: inline-block;
}
.ms-fill { font-variation-settings: 'FILL' 1,'wght' 400,'GRAD' 0,'opsz' 20; }

/* Animations */
@keyframes blink   { 0%,100%{opacity:1} 50%{opacity:.2} }
@keyframes shimmer { to { background-position: -200% center } }
@keyframes spin    { to { transform: rotate(360deg); } }

.live-dot  { animation: blink 1.4s ease-in-out infinite; }
.bar-fill  { transition: width 0.55s cubic-bezier(.4,0,.2,1); }
.anim-spin { animation: spin 1s linear infinite; }

.skeleton {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-high) 50%, var(--panel) 75%);
  background-size: 200%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 4px;
}

.is-hidden { display: none !important; }

/* ============================================================
   3-COLUMN LAYOUT — floating panels on dark bg
   ============================================================ */

.layout-3col {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 14px;
  padding: 14px;
}

.col-sidebar {
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  flex-shrink: 0;
}
.col-sidebar--left  { flex: 0 0 20%; }
.col-sidebar--right { flex: 0 0 25%; background: transparent; border: none; gap: 14px; }

@media (min-width: 1024px) { .col-sidebar--left  { display: flex; } }
@media (min-width: 1280px) { .col-sidebar--right { display: flex; } }

.col-main {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
/* Subpages (no dashboard shell) get inner padding */
.col-main:not(:has(.dashboard-content)) { padding: 18px; }

.breadcrumbs {
  display: flex; align-items: center; gap: 2px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.breadcrumbs__item { font-size: 11px; font-weight: 500; }
.breadcrumbs__item--link {
  color: var(--text-dim); text-decoration: none;
  transition: color 0.15s;
}
.breadcrumbs__item--link:hover { color: var(--cyan); }
.breadcrumbs__item--current { color: var(--text); }
.breadcrumbs__sep { font-size: 13px; color: var(--text-faint); }

/* ============================================================
   TOP NAV
   ============================================================ */

.top-nav {
  height: 52px;
  background: rgba(10,14,13,0.97);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.top-nav__inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  gap: 14px;
}

.logo-link { display: flex; align-items: center; gap: 9px; flex-shrink: 0; margin-right: 8px; text-decoration: none; }
.logo-img {
  width: 30px; height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(0,229,255,0.25));
}
.logo-text { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: 0.08em; color: rgba(255,255,255,0.92); text-transform: uppercase; }
.logo-text em { font-style: normal; color: var(--cyan); }

.nav-search-wrap { position: relative; display: none; align-items: center; }
@media (min-width: 768px) { .nav-search-wrap { display: flex; } }
.nav-search-btn {
  width: 32px; height: 32px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-high);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.nav-search-btn .ms { font-size: 16px; }
.nav-search-btn:hover { color: var(--cyan); border-color: rgba(0,229,255,0.3); }
/* input.<class> (0,1,1) beats the Tailwind forms-plugin reset on [type='text'] (0,1,0). */
input.nav-search {
  font-size: 12px;
  padding: 0;
  border-radius: 999px;
  width: 0;
  margin-left: 0;
  opacity: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: width 0.2s ease, opacity 0.15s, padding 0.2s, margin 0.2s;
  background: var(--panel-high);
  border: 1px solid var(--border);
  color: var(--text);
  pointer-events: none;
  box-shadow: none;
}
.nav-search-wrap.open .nav-search {
  width: 200px;
  padding: 7px 14px;
  margin-left: 8px;
  opacity: 1;
  pointer-events: auto;
  border-color: rgba(0,229,255,0.3);
}
.nav-search::placeholder { color: var(--text-faint); }

/* Keep autofilled inputs on-theme (Chrome paints a light bg + dark text otherwise) */
.nav-search:-webkit-autofill,
.auth-field__input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--panel-high) inset;
  transition: background-color 9999s ease-in-out 0s;
}

/* Global search dropdown */
.nav-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  padding: 6px;
  z-index: 60;
  display: none;
}
.nav-search-results.open { display: block; }
.nav-search-results__msg { padding: 14px 12px; font-size: 12px; color: var(--text-dim); text-align: center; }
.nav-search-results__group { padding: 4px 0; }
.nav-search-results__group + .nav-search-results__group { border-top: 1px solid var(--border-soft); }
.nav-search-results__label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); padding: 6px 10px 4px; }
.nav-search-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; cursor: pointer; color: var(--text); }
.nav-search-row:hover { background: rgba(255,255,255,0.05); }
.nav-search-row--static { cursor: default; opacity: 0.55; }
.nav-search-row--static:hover { background: none; }
.nav-search-row__img  { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; border-radius: 4px; }
.nav-search-row__icon { font-size: 18px; color: var(--text-dim); width: 22px; text-align: center; flex-shrink: 0; }
.nav-search-row__name { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-search-row__sub  { font-size: 10px; color: var(--text-faint); margin-left: auto; flex-shrink: 0; padding-left: 8px; white-space: nowrap; }

.nav-tabs { display: none; align-items: center; flex: 1; justify-content: center; gap: 4px; }
@media (min-width: 768px) { .nav-tabs { display: flex; } }

.nav-tab {
  position: relative;
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
  font-family: 'Manrope', sans-serif;
}
.nav-tab::after {
  content: '';
  position: absolute;
  bottom: 0; left: 16px; right: 16px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 8px var(--cyan-glow);
  transform: scaleX(0);
  transition: transform 0.18s cubic-bezier(.4,0,.2,1);
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active { color: #fff; }
.nav-tab.active::after { transform: scaleX(1); }
.nav-tab--disabled { opacity: 0.3; cursor: not-allowed; }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-icon-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim);
  transition: background 0.12s;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.05); }
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-higher);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
}

.live-badge {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.18);
  color: var(--red);
}
.live-badge.visible { display: flex; }
.live-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }

/* ============================================================
   LEAGUE SIDEBAR
   ============================================================ */

.sidebar-content { display: flex; flex-direction: column; height: 100%; }

.sidebar-header { padding: 14px 14px 10px; flex-shrink: 0; }
.sidebar-header__label {
  font-size: 12px; font-weight: 700;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
}

.sidebar-country-wrap { padding: 0 10px 8px; flex-shrink: 0; }
.sidebar-country-select {
  width: 100%;
  background: var(--panel-high);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.sidebar-all-wrap { padding: 0 8px 4px; flex-shrink: 0; }

.league-list { flex: 1; overflow-y: auto; padding: 2px 8px 10px; }
.league-list__empty { padding: 16px 12px; font-size: 11px; color: var(--text-faint); text-align: center; }
.league-list__sentinel { height: 4px; }

.league-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 10px;
  margin-bottom: 2px;
}
.league-item { position: relative; }
.league-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.league-item.active {
  background: rgba(0,229,255,0.08);
  color: var(--text);
}
.league-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0,229,255,0.5);
}
.league-item.active .league-item__name    { color: var(--cyan); }
.league-item.active .league-item__country { color: var(--text-dim); }
.league-item.active .league-item__count   { color: var(--text-dim); }

.league-item__logo-wrap { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.league-item__logo     { width: 18px; height: 18px; object-fit: contain; }
.league-item__flag     { font-size: 13px; line-height: 1; }
.league-item__info     { flex: 1; min-width: 0; overflow: hidden; }
.league-item__name     { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; color: inherit; }
.league-item__country  { font-size: 9px; color: var(--text-faint); line-height: 1.2; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-item__count    { font-size: 9px; color: var(--text-faint); margin-left: auto; flex-shrink: 0; }

/* ============================================================
   DASHBOARD CENTER PANEL
   ============================================================ */

.dashboard-content { display: flex; flex-direction: column; height: 100%; }

/* Featured event switch — prominent banner above the toolbar */
.event-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 12px 16px;
  border: 1px solid var(--cyan-glow);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(0,229,255,0.12), rgba(157,0,255,0.10));
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.event-switch:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,229,255,0.18); }
.event-switch__icon { font-size: 26px; color: var(--cyan); flex-shrink: 0; }
.event-switch:not(.active) .event-switch__icon { animation: event-pulse 1.8s ease-in-out infinite; }
.event-switch__body  { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.event-switch__label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--cyan); }
.event-switch__name  { font-size: 15px; font-weight: 800; color: var(--text); font-family: 'Manrope', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-switch__action {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--cyan);
  background: rgba(0,229,255,0.10);
  border: 1px solid var(--cyan-glow);
  border-radius: 999px;
  padding: 6px 12px;
}
.event-switch__action .ms { font-size: 16px; }
.event-switch.active {
  background: linear-gradient(90deg, rgba(0,229,255,0.22), rgba(157,0,255,0.18));
  border-color: var(--cyan);
}
@keyframes event-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  gap: 8px;
}
.toolbar__date-strip { display: flex; align-items: center; gap: 2px; overflow-x: auto; }
.toolbar__nav-btn { padding: 4px 6px; color: var(--text-faint); background: none; border: none; cursor: pointer; flex-shrink: 0; }

.matches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  flex-shrink: 0;
}
.matches-header__title { font-size: 15px; font-weight: 700; color: var(--text); font-family: 'Manrope', sans-serif; }
.matches-header__count {
  font-size: 10px;
  color: var(--text-dim);
  background: var(--panel-high);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

.match-list       { flex: 1; overflow-y: auto; padding-bottom: 10px; }
.match-list-empty { padding: 32px 16px; }

/* Date pill */
.date-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  color: var(--text-dim);
  font-family: 'Manrope', sans-serif;
  background: none;
  border: none;
  text-align: center;
  line-height: 1;
}
.date-pill:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.date-pill.active { background: var(--cyan); color: #04110e; box-shadow: 0 0 12px rgba(0,229,255,0.4); }
.date-pill__label { display: block; line-height: 1.2; }
.date-pill__sub   { display: block; font-size: 9px; opacity: 0.5; line-height: 1; margin-top: 1px; }

/* Live push button */
.live-push {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.15);
  color: rgba(248,113,113,0.45);
  font-family: 'Manrope', sans-serif;
}
.live-push.on {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.4);
  color: var(--red);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.35), 0 0 10px rgba(239,68,68,0.1);
}
.live-push .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.live-push.on .dot { animation: blink 1.2s ease-in-out infinite; }

/* ============================================================
   COMPETITION GROUP HEADER
   ============================================================ */

.comp-group__header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px 6px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(17,23,26,0.97);
  backdrop-filter: blur(8px);
}
.comp-group__logo     { width: 16px; height: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.comp-group__logo-img { width: 14px; height: 14px; object-fit: contain; opacity: 0.85; }
.comp-group__titles  { display: flex; flex-direction: column; min-width: 0; }
.comp-group__name     { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-dim); font-family: 'Manrope', sans-serif; }
.comp-group__country  { font-size: 9px; color: var(--text-faint); line-height: 1.2; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-group__count    { font-size: 9px; color: var(--text-faint); margin-left: auto; }

/* ============================================================
   MATCH ROWS  (main_design.png layout)
   ============================================================ */

.match-row {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background: var(--panel-high);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  margin: 0 12px 8px;
}
.match-row:hover { background: var(--panel-higher); border-color: var(--border); }

/* Date/time pill */
.mr-date {
  flex-shrink: 0;
  width: 76px;
  background: var(--pill);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
}
.mr-date__day  { font-size: 9.5px; font-weight: 600; color: var(--text-dim); line-height: 1.3; white-space: nowrap; }
.mr-date__time { font-size: 10px; font-weight: 700; color: var(--text); line-height: 1.3; }
.mr-date--live .mr-date__time { color: var(--red); }
.mr-date__live-row { display: flex; align-items: center; justify-content: center; gap: 4px; }
.mr-date__live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.mr-date__ft { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.mr-date--disrupted { border-color: color-mix(in srgb, var(--amber, #f59e0b) 45%, var(--border-soft)); }
.mr-date__status { font-size: 9.5px; font-weight: 800; color: var(--amber, #f59e0b); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.3; }

/* Logos pair */
.mr-logos { display: flex; align-items: flex-start; gap: 8px; flex-shrink: 0; }
.mr-logos__team { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 44px; }
.mr-logos__img { width: 34px; height: 34px; object-fit: contain; }
.mr-logos__short {
  font-size: 8.5px; font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  max-width: 44px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center;
}
.mr-logos__placeholder { font-size: 22px; color: var(--text-faint); }

/* Score (live/finished) */
.mr-score      { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; }
.mr-score--ft  { opacity: 0.6; }
.mr-score__num { font-size: 20px; font-weight: 800; font-family: 'Manrope', sans-serif; color: var(--text); }
.mr-score__num--live { color: var(--cyan); text-shadow: 0 0 12px var(--cyan-glow); }
.mr-score__sep { font-size: 11px; color: var(--text-faint); }
.mr-score__ft-label { font-size: 8.5px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em; margin-left: 4px; }

/* Prediction columns */
.mr-preds { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.mr-seg   { flex: 1; min-width: 0; }

.mr-seg__label {
  font-size: 9px; font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mr-seg__track { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: visible; position: relative; margin-bottom: 5px; }
.mr-seg__fill  { position: absolute; left: 0; top: 0; height: 100%; border-radius: 4px; }
.mr-seg__pct   { font-size: 10px; font-weight: 700; }

.mr-seg--home .mr-seg__fill { background: var(--cyan);   box-shadow: 0 0 8px var(--cyan-glow); }
.mr-seg--home .mr-seg__pct  { color: var(--cyan); }
.mr-seg--draw .mr-seg__fill { background: var(--orange); box-shadow: 0 0 8px var(--orange-glow); }
.mr-seg--draw .mr-seg__pct  { color: var(--orange); }
.mr-seg--away .mr-seg__fill { background: var(--purple); box-shadow: 0 0 8px var(--purple-glow); }
.mr-seg--away .mr-seg__pct  { color: var(--purple); }

.mr-nodata     { display: flex; align-items: center; justify-content: center; flex: 1; }
.mr-nodata__vs { font-size: 10px; color: var(--text-faint); font-weight: 500; letter-spacing: 0.15em; }

.mr-chevron { color: var(--text-faint); font-size: 18px; flex-shrink: 0; }

.mr-pin {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px; border: none;
  background: transparent; cursor: pointer; flex-shrink: 0;
  color: var(--text-faint); transition: color 0.15s, background 0.15s;
}
.mr-pin:hover { color: var(--cyan); background: rgba(0,229,255,0.08); }
.mr-pin.active { color: var(--cyan); }
.mr-pin .ms { font-size: 16px; }

/* ============================================================
   RIGHT RAIL — floating cards
   ============================================================ */

.rail-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  flex-shrink: 0;
}
.rail-card__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  margin-bottom: 12px;
}

/* Top Player Stats */
.tp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--panel-high);
  border: 1px solid var(--border-soft);
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.tp-row:hover { background: rgba(255,255,255,0.04); border-color: var(--border); }
.tp-row__rank   { font-size: 10px; font-weight: 700; color: var(--text-faint); width: 12px; text-align: center; flex-shrink: 0; }
.tp-row__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--panel-higher); flex-shrink: 0; }
.tp-row__avatar-ph { width: 28px; height: 28px; border-radius: 50%; background: var(--panel-higher); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--text-faint); flex-shrink: 0; }
.tp-row__info   { flex: 1; min-width: 0; }
.tp-row__name   { font-size: 11px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-row__sub    { font-size: 9px; color: var(--text-faint); display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.tp-row__sub-logo { width: 10px; height: 10px; object-fit: contain; }
.tp-row__value  { font-size: 15px; font-weight: 800; color: var(--text); font-family: 'Manrope', sans-serif; flex-shrink: 0; }

/* AI Prediction Insight */
.insight-date-pill {
  display: inline-block;
  background: var(--pill);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.insight-teams      { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 6px; }
.insight-team       { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.insight-team__logo { width: 36px; height: 36px; object-fit: contain; }
.insight-team__placeholder { font-size: 24px; color: var(--text-faint); }
.insight-team__name { font-size: 10.5px; font-weight: 700; color: var(--text); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }

.insight-vs__text { font-size: 12px; font-weight: 700; color: var(--text-faint); }

/* Stats + gauge row: number — gauge — number */
.insight-gauge-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.insight-stat      { text-align: center; flex: 1; }
.insight-stat__num { font-size: 18px; font-weight: 800; color: var(--text); font-family: 'Manrope', sans-serif; }
.insight-stat__lbl { font-size: 9px; color: var(--text-faint); margin-top: 1px; }

.insight-gauge-wrap { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.insight-gauge-svg  { width: 64px; height: 64px; transform: rotate(-90deg); display: block; }
.insight-gauge-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.insight-gauge-pct  { font-size: 14px; font-weight: 800; color: var(--text); font-family: 'Manrope', sans-serif; }

.insight-best { text-align: center; font-size: 10px; color: var(--text-dim); margin-bottom: 12px; }
.insight-best strong { color: var(--cyan); }

/* Mini metric grid (Team / KPI / KPI / Away) */
.insight-metrics { display: flex; gap: 6px; margin-bottom: 12px; }
.insight-metric  {
  flex: 1;
  background: var(--panel-high);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
}
.insight-metric__lbl { font-size: 8px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.insight-metric__val { font-size: 11px; font-weight: 700; color: var(--text); margin-top: 2px; }

/* Outcome mini bars */
.insight-mini-bars       { display: flex; gap: 6px; margin-bottom: 12px; }
.insight-mini-bar        { flex: 1; text-align: center; }
.insight-mini-bar__label { font-size: 9px; font-weight: 600; color: var(--text-dim); margin-bottom: 4px; }
.insight-mini-bar__track { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: visible; position: relative; margin-bottom: 4px; }
.insight-mini-bar__fill  { position: absolute; left: 0; top: 0; height: 100%; border-radius: 4px; }
.insight-mini-bar__pct   { font-size: 10px; font-weight: 700; }

.insight-mini-bar--home .insight-mini-bar__fill { background: var(--cyan);   box-shadow: 0 0 8px var(--cyan-glow); }
.insight-mini-bar--home .insight-mini-bar__pct  { color: var(--cyan); }
.insight-mini-bar--draw .insight-mini-bar__fill { background: var(--orange); box-shadow: 0 0 8px var(--orange-glow); }
.insight-mini-bar--draw .insight-mini-bar__pct  { color: var(--orange); }
.insight-mini-bar--away .insight-mini-bar__fill { background: var(--purple); box-shadow: 0 0 8px var(--purple-glow); }
.insight-mini-bar--away .insight-mini-bar__pct  { color: var(--purple); }

/* AI Insights section (form squares) */
.insight-ai-label {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #04110e;
  background: var(--cyan);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 8px;
}
.insight-form-row   { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.insight-form-label { font-size: 9px; color: var(--text-faint); }
.insight-form-sqs   { display: flex; gap: 4px; }
.insight-form-sq    { width: 16px; height: 16px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 800; }
.insight-form-sq--w { background: rgba(0,229,160,0.18); color: #00e5a0; border: 1px solid rgba(0,229,160,0.3); }
.insight-form-sq--d { background: rgba(255,145,0,0.14); color: var(--orange); border: 1px solid rgba(255,145,0,0.25); }
.insight-form-sq--l { background: rgba(248,113,113,0.12); color: var(--red); border: 1px solid rgba(248,113,113,0.22); }
.insight-form-sq--x { background: var(--panel-higher); color: var(--text-faint); border: 1px solid var(--border-soft); }

.insight-drivers        { margin-bottom: 10px; }
.insight-driver         { display: flex; align-items: flex-start; gap: 5px; margin-bottom: 3px; }
.insight-driver__bullet { color: var(--cyan); flex-shrink: 0; font-size: 9px; margin-top: 1px; }
.insight-driver__text   { font-size: 10px; color: var(--text-dim); line-height: 1.4; }

.insight-cta {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.2);
  color: var(--cyan);
  font-family: 'Manrope', sans-serif;
}
.insight-cta:hover { background: rgba(0,229,255,0.14); }

/* Top matches mini list */
.top-match-row       { display: flex; align-items: center; gap: 6px; padding: 6px 0; cursor: pointer; border-bottom: 1px solid var(--border-soft); }
.top-match-row:last-child { border-bottom: none; }
.top-match-row__logo { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.top-match-row__teams { font-size: 10px; font-weight: 600; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-match-row__pct  { font-size: 10px; font-weight: 700; color: var(--cyan); }

/* ============================================================
   SUBPAGE PANEL (standings, match, team — shared shell)
   ============================================================ */

.page-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin: 0 0 14px;
}

/* ============================================================
   AUTH — nav state + modal
   ============================================================ */

.auth-signin-btn {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  background: var(--cyan);
  border: none;
  color: #04110e;
  box-shadow: 0 0 12px rgba(0,229,255,0.3);
  transition: box-shadow 0.15s;
}
.auth-signin-btn:hover { box-shadow: 0 0 18px rgba(0,229,255,0.5); }

.auth-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  background: var(--panel-high);
  border: 1px solid var(--border);
}
.auth-user__avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--cyan), #00b87a);
  color: #04110e;
  font-size: 11px; font-weight: 800;
  font-family: 'Manrope', sans-serif;
  flex-shrink: 0;
}
.auth-user__name { font-size: 11px; font-weight: 600; color: var(--text); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-user__pro {
  font-size: 8px; font-weight: 800; letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--purple), #6a00b8);
  color: #fff;
  border-radius: 4px;
  padding: 2px 5px;
}
.auth-user__menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: var(--panel-high);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  z-index: 60;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.auth-user.open .auth-user__menu { display: block; }
.auth-user__menu-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  background: none; border: none; cursor: pointer;
  border-radius: 7px;
}
.auth-user__menu-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4,8,7,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-modal {
  position: relative;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,229,255,0.04);
}
.auth-modal__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--text-faint);
  border-radius: 8px;
}
.auth-modal__close:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.auth-modal__logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900;
  font-family: 'Manrope', sans-serif;
  background: linear-gradient(135deg, var(--cyan), #00b87a);
  color: #04110e;
  margin: 0 auto 12px;
  box-shadow: 0 0 20px rgba(0,229,255,0.25);
}
.auth-modal__title {
  font-size: 16px; font-weight: 800;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  text-align: center;
  margin-bottom: 18px;
}
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: block; }
.auth-field__label { display: block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 5px; }
/* input.<class> (0,1,1) beats the Tailwind forms-plugin reset on [type='password'] (0,1,0). */
input.auth-field__input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  background: var(--panel-high);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  transition: border-color 0.15s;
}
input.auth-field__input:focus { border-color: rgba(0,229,255,0.35); }
.auth-remember { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-dim); cursor: pointer; }
.auth-remember input { accent-color: var(--cyan); }
.auth-error {
  font-size: 11px;
  color: var(--red);
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: 8px;
  padding: 8px 10px;
}
.auth-submit {
  padding: 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: var(--cyan);
  border: none;
  color: #04110e;
  box-shadow: 0 0 14px rgba(0,229,255,0.25);
}
.auth-submit:disabled { opacity: 0.6; cursor: wait; }
.auth-switch { margin-top: 14px; text-align: center; font-size: 11px; color: var(--text-faint); }
.auth-switch button { background: none; border: none; color: var(--cyan); font-weight: 700; cursor: pointer; font-size: 11px; }

/* ============================================================
   LOCKED PREDICTION (free / anonymous users)
   ============================================================ */

.mr-locked {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(157,0,255,0.05);
  border: 1px dashed rgba(157,0,255,0.25);
  cursor: pointer;
}
.mr-locked__icon { font-size: 14px; color: var(--purple); }
.mr-locked__text { font-size: 10px; font-weight: 600; color: var(--text-dim); }
.mr-locked__pro  { font-size: 8px; font-weight: 800; letter-spacing: 0.08em; background: linear-gradient(135deg, var(--purple), #6a00b8); color: #fff; border-radius: 4px; padding: 2px 5px; }

/* ============================================================
   STANDINGS / TEAMS  (big-stats-site tables)
   ============================================================ */

.stand-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stand-table th {
  text-align: center;
  padding: 10px 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.stand-table th:nth-child(2) { text-align: left; }
.stand-table td { padding: 9px 7px; text-align: center; border-bottom: 1px solid var(--border-soft); color: var(--text-dim); }
.stand-table tbody tr { cursor: pointer; transition: background 0.1s; }
.stand-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.stand-pos {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--text-dim);
}
.stand-pos--cl  { background: rgba(0,229,255,0.12);  color: var(--cyan); }
.stand-pos--el  { background: rgba(255,145,0,0.12);  color: var(--orange); }
.stand-pos--rel { background: rgba(248,113,113,0.1); color: var(--red); }

.stand-team { display: flex; align-items: center; gap: 9px; text-align: left; }
.stand-team__logo { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.stand-team__name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stand-pts { font-weight: 800; color: var(--text); font-family: 'Manrope', sans-serif; }

.form-sq {
  width: 16px; height: 16px;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 800;
  margin-right: 2px;
}
.form-sq--w { background: rgba(0,229,160,0.18); color: #00e5a0; }
.form-sq--d { background: rgba(255,145,0,0.14); color: var(--orange); }
.form-sq--l { background: rgba(248,113,113,0.12); color: var(--red); }

.scorer-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.scorer-row:last-child { border-bottom: none; }
.scorer-row__rank { width: 16px; text-align: center; font-size: 10px; font-weight: 700; color: var(--text-faint); flex-shrink: 0; }
.scorer-row__avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--panel-higher); flex-shrink: 0; }
.scorer-row__info { flex: 1; min-width: 0; }
.scorer-row__name { font-size: 11px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scorer-row__team { font-size: 9px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scorer-row__val  { font-size: 13px; font-weight: 800; color: var(--cyan); font-family: 'Manrope', sans-serif; flex-shrink: 0; }

.panel-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 1100px) { .panel-grid--2col { grid-template-columns: 2fr 1fr; } }

.team-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--panel-high);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.team-card:hover { background: var(--panel-higher); border-color: var(--border); }
.team-card__logo { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.team-card__name { font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-card__sub  { font-size: 9.5px; color: var(--text-faint); }

.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }

/* Live match detail */
.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  color: var(--red);
  font-family: 'Manrope', sans-serif;
}

/* ============================================================
   LOADER
   ============================================================ */
.page-loader { display: flex; align-items: center; justify-content: center; height: 100px; }
.page-loader__icon { font-size: 2.25rem; color: rgba(0,229,255,0.35); animation: spin 1s linear infinite; }

/* ============================================================
   MATCH DETAIL — LINEUP PITCH
   ============================================================ */
.pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  border-radius: 12px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 10%, transparent 10% 20%),
    linear-gradient(90deg, #07140f 0%, #0a1c14 50%, #07140f 100%);
  border: 1px solid var(--border);
}
.pitch__half-line {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: rgba(255,255,255,0.1);
}
.pitch__circle {
  position: absolute; left: 50%; top: 50%;
  width: 17%; aspect-ratio: 1;
  transform: translate(-50%,-50%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
}
.pitch__box {
  position: absolute; top: 24%; bottom: 24%;
  width: 12%;
  border: 1px solid rgba(255,255,255,0.1);
}
.pitch__box--left  { left: 0;  border-left: none; }
.pitch__box--right { right: 0; border-right: none; }

.pitch-player {
  position: absolute;
  transform: translate(-50%,-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 64px;
  z-index: 2;
}
.pitch-player__img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cyan);
  background: var(--panel-higher);
}
.pitch-player__img--ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--text-dim);
}
.pitch-player__name {
  font-size: 9px; font-weight: 700;
  color: var(--text);
  max-width: 64px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.pitch-player__rating {
  font-size: 8px; font-weight: 800;
  font-family: 'Manrope', sans-serif;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(0,229,255,0.15);
  color: var(--cyan);
}

/* ============================================================
   MATCH DETAIL — xG SCORE MATRIX
   ============================================================ */
.xg-mx { width: 100%; border-collapse: collapse; table-layout: fixed; }
.xg-mx__corner {
  font-size: 9px; font-weight: 700;
  color: var(--text-faint);
  text-align: left;
  padding: 4px;
  white-space: nowrap;
}
.xg-mx__head {
  font-size: 10px; font-weight: 800;
  color: var(--text-dim);
  padding: 4px;
  text-align: center;
  font-family: 'Manrope', sans-serif;
}
.xg-mx__cell {
  font-size: 10px;
  text-align: center;
  padding: 7px 2px;
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.xg-mx__cell--top {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
  font-weight: 800;
}
