:root{
  --bg: #f6f8fc;
  --bg-2: #eef2f8;

  --surface: rgba(255,255,255,.78);
  --surface-2: rgba(255,255,255,.92);
  --stroke: rgba(15, 23, 42, .10);

  --text: rgba(15, 23, 42, .92);
  --muted: rgba(15, 23, 42, .68);

  --brand: #0a2c54;
  --accent: #e30613;

  --shadow: 0 18px 45px rgba(2,6,23,.12);
  --shadow-soft: 0 10px 25px rgba(2,6,23,.10);

  --max: 1180px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 10% 0%, rgba(227,6,19,.10), transparent 60%),
    radial-gradient(900px 520px at 90% 0%, rgba(10,44,84,.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  display:flex;
  flex-direction:column;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

.container{
  width:min(95%, var(--max));
  margin:0 auto;
}

/* ===== Header ===== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 12px 0;
}

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand-logo{ height:48px; width:auto; }
.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-title{ font-weight:900; letter-spacing:.2px; }
.brand-tagline{ color:var(--muted); font-size:12px; font-weight:650; margin-top:4px; color:var(--muted); opacity:.9; }

/* Nav */
.nav-toggle{
  display:none;
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.10);
  color: rgba(15,23,42,.92);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 18px;
  cursor:pointer;
}

.main-nav{ display:flex; align-items:center; }
.main-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap: 8px;
}

.main-nav a{
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.95);
  font-weight: 900;
  font-size: 13px;
  transition: all .18s ease;
}

.main-nav a:hover{
  background: rgba(10,44,84,.08);
  border-color: rgba(10,44,84,.20);
  transform: translateY(-1px);
}

.main-nav a.active{
  background: rgba(10,44,84,.14);
  border-color: rgba(10,44,84,.28);
}

/* Dropdown (click-to-open only) */
.dropdown{ position:relative; }
.dropbtn{
  appearance:none;
  border: 0;
  background: transparent;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color: rgba(15,23,42,.92);
  font-weight: 800;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background .15s ease, transform .15s ease;
}
.dropbtn:hover{
  background: rgba(15,23,42,.06);
  transform: translateY(-1px);
}
.caret{ font-size:12px; opacity:.75; }

.dropdown-menu{
  display:none;
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: var(--shadow);
  z-index: 3000;
}
.dropdown-menu a{
  display:block;
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.dropdown-menu a:hover{ background: rgba(15,23,42,.06); }

#mainNav li.dropdown > ul.dropdown-menu{ display:none !important; }
#mainNav li.dropdown.open > ul.dropdown-menu{ display:block !important; }

/* Mobile nav */
@media (max-width: 900px){
  .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; }

  .main-nav{
    position:absolute;
    left:0;
    top:100%;
    width:100%;
    display:none;
    padding: 10px 0;
    background: rgba(255,255,255,.95);
    border-bottom: 1px solid rgba(15,23,42,.10);
  }
  .main-nav.nav-open{ display:block; }

  .main-nav ul{
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 10px 10px 10px;
  }

  .main-nav li{
    border-top: 1px solid rgba(15,23,42,.08);
    padding-top: 6px;
    margin-top: 6px;
  }

  .dropdown-menu{
    position: static;
    min-width: unset;
    box-shadow: none;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,.08);
    background: rgba(15,23,42,.03);
    margin: 8px 0 6px 0;
  }
}

/* Disable hover open everywhere (safety) */
@media (min-width: 901px){
  .dropdown:hover > .dropdown-menu,
  #mainNav li.dropdown:hover > ul.dropdown-menu{
    display:none !important;
  }
}

/* ===== Page title/subtitle (big + centered) ===== */
.pagehead{
  padding: 18px 0 20px 0;
  text-align:center;
}
.pagehead-title{
  font-size: 26px;
  font-weight: 950;
  letter-spacing: .3px;
  margin: 0;
}
.pagehead-subtitle{
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 650;
}

/* ===== Content ===== */
.content{
  flex:1;
  padding: 14px 0 46px 0;
}

/* ===== Surfaces ===== */
.hero{
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  padding: 28px 22px;
  background: rgba(255,255,255,.75);
  box-shadow: var(--shadow-soft);
}

.card{
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
}
.card-pad{ padding: 14px; }

.narrow{
  width: min(100%, 980px);
  margin-left:auto;
  margin-right:auto;
}

/* ===== Controls ===== */
.input{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.88);
  font-weight: 650;
  outline: none;
}
.input:focus{
  box-shadow: 0 0 0 4px rgba(10,44,84,.10);
}

.btn,
.btn-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.72);
  font-weight:900;
  cursor:pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover,
.btn-link:hover{
  background: rgba(15,23,42,.06);
  transform: translateY(-1px);
}

/* ===== Badges / chips ===== */
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.82);
  font-weight: 950;
  font-size: 12px;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.78);
  font-weight: 900;
  font-size: 12px;
  color: rgba(15,23,42,.82);
  white-space: nowrap;
  cursor:pointer;
}

/* Optional helper: label + chips inline */
.filters-row{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap:wrap;
  margin: 0 0 12px 0;
}
.filters-label{
  color: var(--muted);
  font-weight: 950;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .2px;
}

/* ===== Tables / Lists ===== */
.list-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom: 12px;
}

.table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.94);
}

.table thead th{
  text-align:left;
  padding: 3px 4px;     /* tighter header */
  font-size: 12px;
  letter-spacing:.2px;
  text-transform: uppercase;
  color: rgba(15,23,42,.75);
  background: rgba(15,23,42,.04);
  border-bottom: 1px solid rgba(15,23,42,.10);
  position: sticky;
  top: 0;
  z-index: 2;
}

.table tbody td{
  padding: 3px 4px;     /* tighter rows */
  border-bottom: 1px solid rgba(15,23,42,.08);
  vertical-align: middle;
}

.table tbody tr:nth-child(odd){
  background: rgba(15,23,42,.045);
}
.table tbody tr:nth-child(even){
  background: rgba(255,255,255,.98);
}
.table tbody tr:hover{
  background: rgba(227,6,19,.12);
}
.table tbody tr:last-child td{ border-bottom: 0; }

/* Icon link (📄) */
.sheet-link{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.75);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.sheet-link:hover{
  background: rgba(15,23,42,.06);
  transform: translateY(-1px);
}

/* ===== Footer ===== */
.site-footer{
  border-top: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.60);
  padding: 18px 0;
}

.footer-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.footer-grid > div{ grid-column: span 4; }

.site-footer h4{
  margin: 0 0 8px 0;
  font-size: 12px;
  letter-spacing:.3px;
  text-transform: uppercase;
  color: rgba(15,23,42,.82);
}

.site-footer p{
  margin:0;
  color: rgba(15,23,42,.68);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 900px){
  .footer-grid > div{ grid-column: span 12; }
}

/* ===== Score badge + result dot (W/D/L) ===== */
.score-badge{
  position: relative;
  padding-left: 22px;
}

.score-badge::before{
  content:'';
  position:absolute;
  left:8px;
  top:50%;
  transform:translateY(-50%);
  width:8px;
  height:8px;
  border-radius:50%;
  background: rgba(15,23,42,.18); /* default/unknown */
}

/* Result colors */
.result-win::before{ background:#1f9d55; }   /* green */
.result-draw::before{ background:#d4a017; }  /* yellow */
.result-loss::before{ background: var(--accent); } /* red */

/* ===== Compact header (no submenus) ===== */
.site-header-compact{ padding-bottom: 6px; }
.header-inner-compact{ padding: 10px 0; }

.brand-compact{ gap:10px; }
.brand-logo-compact{ height:38px; }
.brand-title-compact{ font-size:14px; font-weight:950; }

.pagehead-compact{ padding: 0 0 10px 0; }

.pagehead-title-compact{
  font-size: 15px;
  font-weight: 850;
  letter-spacing: .2px;
}

.pagehead-subtitle-compact{
  font-size: 12px;
  color: rgba(15,23,42,.60);
}

.chip-compact{ padding: 7px 10px; }

.main-nav a.active{
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.10);
}

/* ===== Team stats: filterbar + KPIs ===== */
.filterbar{
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  padding: 12px;
  box-shadow: var(--shadow-soft);
}
.filterbar-row{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}
.filterbar-group{
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.filterbar-label{
  font-size: 11px;
  font-weight: 950;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .2px;
}
.filterbar-actions{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.filterbar-hint{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}

.kpi-grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px){
  .kpi-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kpi{
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}
.kpi-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .2px;
  color: var(--muted);
  font-weight: 900;
}
.kpi-value{
  margin-top:6px;
  font-size:22px;
  font-weight:950;
  letter-spacing:.3px;
}

.section-head{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.section-title{
  font-size: 14px;
  font-weight: 950;
}
.section-subtitle{
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}

.highlights-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px){
  .highlights-grid{ grid-template-columns: 1fr; }
}
.highlight{
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  padding: 10px 12px;
}
.highlight-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .2px;
  color: var(--muted);
  font-weight: 900;
}
.highlight-value{
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
}

.two-col{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .two-col{ grid-template-columns: 1fr; }
}

.muted{ color: var(--muted); font-weight: 650; }

/* Team stats charts */
.chart-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .chart-grid{ grid-template-columns: 1fr; }
}
.chart-wrap{
  height: 320px;
}

/* ===== Team stats (clean final) ===== */

/* Filters row helper */
.filters-row-tight{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

/* KPI tiles */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px){
  .kpi-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kpi{
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}
.kpi-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .2px;
  color: var(--muted);
  font-weight: 900;
}
.kpi-value{
  margin-top: 4px;
  font-size: 20px;
  font-weight: 950;
}

/* Highlights */
.highlights-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px){
  .highlights-grid{ grid-template-columns: 1fr; }
}
.highlight{
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}
.highlight-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .2px;
  color: var(--muted);
  font-weight: 900;
}
.highlight-value{
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
}

/* Two-column layout blocks */
.two-col{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .two-col{ grid-template-columns: 1fr; }
}


.team-stats table.table thead th{
  position: static !important;
  top: auto !important;
}

/* ===== Modern analytics header ===== */

/* Glass header + subtle border */
/* Strong analytics header */

.site-header.site-header-compact{
  position: sticky;
  top: 0;
  z-index: 1000;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,.95) 0%,
    rgba(255,255,255,.85) 100%
  );

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border-bottom: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 20px 50px rgba(2,6,23,.12);
}

/* Brand */
.brand-analytics{ gap: 10px; }
.brand-logo-analytics{
  height: 36px;
  width: 36px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.9);
  padding: 4px;
}
.brand-title-analytics{
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .3px;
}
.brand-subtitle-analytics{
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

/* Nav: pill tabs */
.main-nav a{
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 900;
}
.main-nav a:hover{
  background: rgba(15,23,42,.06);
  transform: none; /* cleaner */
}
.main-nav a.active{
  background: rgba(10,44,84,.10);
  border: 1px solid rgba(10,44,84,.14);
}

/* Language chip looks like a control */
.nav-right .chip{
  border-radius: 999px;
  background: rgba(255,255,255,.88);
}

/* Compact page head: more “dashboard” */
.pagehead-compact{
  padding: 8px 0 12px 0;
}
.pagehead-title-compact{
  font-size: 16px;
  font-weight: 950;
}
.pagehead-subtitle-compact{
  font-size: 12px;
  color: var(--muted);
}

/* ===== Analytics header v2 (stronger visual change) ===== */

/* Make the header feel like a distinct bar */
.site-header.site-header-compact{
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 14px 40px rgba(2,6,23,.08);
}

/* Add a subtle top accent line */
.site-header.site-header-compact::before{
  content:"";
  display:block;
  height:3px;
  background: linear-gradient(90deg, rgba(10,44,84,.0), rgba(10,44,84,.55), rgba(227,6,19,.55), rgba(10,44,84,.0));
}

.site-header::after{
  content:'';
  display:block;
  height:2px;
  background: linear-gradient(
    90deg,
    rgba(10,44,84,.0),
    rgba(10,44,84,.5),
    rgba(227,6,19,.5),
    rgba(10,44,84,.0)
  );
}

/* Tighten inner spacing */
.header-inner-compact{
  padding: 12px 0;
}

/* Brand gets “app” feel */
.brand-logo-analytics{
  height: 38px;
  width: 38px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.95);
  padding: 5px;
  box-shadow: 0 10px 25px rgba(2,6,23,.10);
}
.brand-title-analytics{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .3px;
}
.brand-subtitle-analytics{
  font-size: 11px;
  font-weight: 750;
  color: rgba(15,23,42,.60);
}

/* Nav: real pill tabs */
.main-nav ul{
  gap: 10px;
}
.main-nav a{
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.55);
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(2,6,23,.06);
}
.main-nav a:hover{
  background: rgba(255,255,255,.85);
  transform: translateY(-1px);
}
.main-nav a.active{
  background: rgba(10,44,84,.10);
  border: 1px solid rgba(10,44,84,.18);
}

/* Language button looks like a control */
.nav-right .chip,
a.chip.chip-compact{
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.85);
  box-shadow: 0 10px 25px rgba(2,6,23,.06);
}

/* Page title area more dashboard-like */
.pagehead-compact{
  padding: 10px 0 14px 0;
}
.pagehead-title-compact{
  font-size: 16px;
  font-weight: 950;
}
.pagehead-subtitle-compact{
  font-size: 12px;
  color: rgba(15,23,42,.62);
  font-weight: 700;
}
/* ===== Analytics Header Redesign ===== */

.analytics-header{
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 16px 40px rgba(2,6,23,.10);
}

/* Accent line */
.analytics-header::before{
  content:"";
  display:block;
  height:2px;
  opacity:.6;
  background: linear-gradient(
    90deg,
    rgba(10,44,84,.0),
    rgba(10,44,84,.55),
    rgba(227,6,19,.50),
    rgba(10,44,84,.0)
  );
}

/* Top bar */
.analytics-topbar{
  padding: 8px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}

.analytics-brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 220px;
}

.analytics-logo{
  height: 40px;
  width: 40px;
  border-radius: 14px;
  padding: 5px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 10px 22px rgba(2,6,23,.10);
}

.analytics-brand-title{
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .25px;
  line-height: 1.05;
}

.analytics-brand-subtitle{
  margin-top: 2px;
  font-size: 11px;
  font-weight: 750;
  color: rgba(15,23,42,.60);
}

/* Nav pills */
.analytics-nav a{
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
  transition: all .18s ease;
}

.analytics-nav a:hover{
  background: rgba(10,44,84,.08);
  border-color: rgba(10,44,84,.18);
  transform: translateY(-1px);
}

.analytics-nav a.active{
  background: rgba(10,44,84,.14);
  border-color: rgba(10,44,84,.24);
}

/* Language toggle */
.analytics-lang{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.88);
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}

/* Title bar (dashboard style) */
.analytics-titlebar{
  border-top: 1px solid rgba(15,23,42,.06);
  background: rgba(255,255,255,.45);
}

.analytics-titlebar-inner{
  padding: 6px 0 8px 0;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 14px;
}

.analytics-page-title{
  font-size: 20px;
  font-weight: 950;
  letter-spacing: .2px;
  line-height: 1.15;
}

.analytics-page-subtitle{
  margin-top: 2px;
  font-size: 11px;
  font-weight: 750;
  color: rgba(15,23,42,.62);
}

/* Mobile adjustments */
@media (max-width: 900px){
  .analytics-titlebar-inner{
    padding: 8px 0 10px 0;
  }
  .analytics-page-title{
    font-size: 16px;
  }
  .analytics-brand-title{
    font-size: 18px;
  }
  .analytics-logo{
    height: 36px;
    width: 36px;
  }
}
/* ===== Header micro-polish (final) ===== */

/* Slightly more compact */
.analytics-topbar{ padding: 6px 0; }
.analytics-titlebar-inner{ padding: 5px 0 7px 0; }

/* Calm the accent line */
.analytics-header::before{
  height: 1px;
  opacity: .45;
}

/* Reduce title weight a touch (less “hero”) */
.analytics-page-title{
  font-size: 19px;
  font-weight: 950;
  letter-spacing: .2px;
}
.analytics-page-subtitle{
  font-size: 11px;
  opacity: .72;
}

/* Nav pills: a tiny bit smaller to match compact header */
.analytics-nav a{
  padding: 7px 14px;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(2,6,23,.05);
}

/* Brand: slightly tighter */
.analytics-logo{
  height: 36px;
  width: 36px;
  border-radius: 12px;
}
.analytics-brand-title{ font-size: 17px; }

/* ===== Filter bar redesign ===== */

.filterbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px;
}

.filterbar-row{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.filterbar-group{
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.filterbar-actions{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-left: auto;
}

/* Make selects look like dashboard controls */
.filterbar .input{
  height: 42px;
  padding: 8px 14px;
  border-radius: 14px;
  font-weight: 800;
  background: rgba(255,255,255,.95);
}

/* Buttons: primary / ghost / soft */
.btn{
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
  background: rgba(255,255,255,.92);
}

.btn:hover{
  transform: translateY(-1px);
}

.btn-ghost{
  background: rgba(255,255,255,.0);
  box-shadow: none;
}

.btn-ghost:hover{
  background: rgba(15,23,42,.06);
}

.btn-soft{
  background: rgba(10,44,84,.10);
  border-color: rgba(10,44,84,.18);
}

.btn-soft:hover{
  background: rgba(10,44,84,.14);
}

/* On mobile: stack actions under controls */
@media (max-width: 900px){
  .filterbar-actions{
    width: 100%;
    justify-content:flex-start;
    margin-left: 0;
  }
}
/* ===== FILTER BAR POLISH ===== */

.btn-primary{
  background: #0a2c54;
  color:#fff;
  border:none;
  font-weight:900;
  padding:10px 16px;
  border-radius:12px;
  box-shadow:0 6px 18px rgba(10,44,84,.25);
  transition: all .2s ease;
}

.btn-primary:hover{
  background:#0e3b6e;
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(10,44,84,.35);
}



.btn-soft{
  background: rgba(10,44,84,.08);
  border: 1px solid rgba(10,44,84,.12);
  color: var(--text);
  font-weight: 800;
}

.btn-soft:hover{
  background: rgba(10,44,84,.14);
}


.filter-clear{
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  padding: 10px 6px;
}

.filter-clear:hover{
  color: var(--text);
}

/* Slightly reduce filter block padding */
/* ===== Filter Panel Final ===== */

.filterbar{
  position: relative;
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  padding: 20px 22px;
  box-shadow: 0 20px 40px rgba(2,6,23,.12);
  border: 1px solid rgba(0,0,0,.06);
}

/* Subtle sports accent */
.filterbar::before{
  content:'';
  position:absolute;
  top:18px;
  left:22px;
  width:46px;
  height:4px;
  border-radius:4px;
  background: linear-gradient(90deg,#0a2c54,#e30613);
}

/* Space content away from accent */
.filterbar-row{
  margin-top: 14px;
}

/* ===== Compact context bar (Team stats) ===== */

.contextbar{
  padding: 8px 10px;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(2,6,23,.05);
}
.contextbar-row{
  display:flex;
  align-items:end;
  gap: 12px;
  flex-wrap: wrap;
}

.contextbar-group{
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.contextbar-label{
  font-size: 11px;
  font-weight: 950;
  color: rgba(15,23,42,.62);
  text-transform: uppercase;
  letter-spacing: .2px;
}

.input-sm{
  height: 36px;
  padding: 7px 11px;
}
.contextbar-actions{
  margin-left: auto;
  display:flex;
  align-items:center;
  gap: 10px;
}

/* Small icon button (Back) */
.iconbtn{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  font-weight: 850;
  box-shadow: none;
}
.iconbtn:hover{
  background: rgba(15,23,42,.06);
  transform: none;
}

/* Tiny clear link */
.contextbar-clear{
  line-height: 36px;
  padding: 0 6px;
}

.contextbar-clear:hover{
  color: rgba(15,23,42,.92);
  text-decoration: underline;
}

.contextbar::after{
  content: "Scope";
  display:none;
}

/* Hide text on small screens */
@media (max-width: 700px){
  .hide-sm{ display:none; }
}
.chip.active{
  background: rgba(10,44,84,.10);
  border: 1px solid rgba(10,44,84,.18);
}

/* Disable sticky header for some tables (prevents header masking rows while scrolling) */
.table-nosticky thead th{ position: static !important; }

.table-click tbody tr.row-link{ cursor:pointer; }
.table-click tbody tr.row-link:hover{ background: rgba(10,44,84,.08); }

/* Result pill (W/D/L) */
.result-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 28px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .3px;
  color: #fff;
  border: 1px solid rgba(0,0,0,.08);
}

/* Colors */
.result-pill.win{ background:#1f9d55; }
.result-pill.draw{ background:#d4a017; }
.result-pill.loss{ background: var(--accent); }
.result-pill.unknown{ background: rgba(15,23,42,.25); }

/* Player page: small chips + clear X */
.chip-x{
  margin-left: 8px;
  font-weight: 950;
  opacity: .85;
}
.chip-link{ cursor:pointer; }

/* Prevent date/score wrapping */
.td-date{ white-space: nowrap; }
.td-score{ white-space: nowrap; font-weight: 900; }

/* Clickable rows feel */
.table-click tbody tr.row-link{ cursor:pointer; }
.table-click tbody tr.row-link:hover{ background: rgba(10,44,84,.08); }

/* Result pill (W/D/L) */
.result-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 28px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .3px;
  color: #fff;
  border: 1px solid rgba(0,0,0,.08);
}
.result-pill.win{ background:#1f9d55; }
.result-pill.draw{ background:#d4a017; }
.result-pill.loss{ background: var(--accent); }
.result-pill.unknown{ background: rgba(15,23,42,.25); }

/* Match page header */
.match-head{ display:flex; flex-direction:column; gap:12px; }
.match-head-teams{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items:center;
}
.match-team{
  font-weight: 950;
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15,23,42,.04);
  border: 1px solid rgba(15,23,42,.08);
}
.match-team:hover{ background: rgba(10,44,84,.08); }

.match-score{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.88);
  white-space: nowrap;
}
.match-score-num{ font-size: 22px; font-weight: 950; }
.match-score-sep{ font-weight: 950; opacity: .5; }

.match-head-meta{ display:flex; flex-wrap:wrap; gap:8px; }

.match-details{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .match-details{ grid-template-columns: 1fr; }
  .match-head-teams{ grid-template-columns: 1fr; }
  .match-score{ justify-self:start; }
}

.detail-item{ padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(15,23,42,.08); background: rgba(255,255,255,.78); }
.detail-label{ font-size: 11px; text-transform: uppercase; letter-spacing:.2px; color: var(--muted); font-weight: 900; }
.detail-value{ margin-top: 6px; font-weight: 800; }

/* Lineups grid */
.lineup-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .lineup-grid{ grid-template-columns: 1fr; }
}
.lineup-table td{ padding: 6px 8px; }
/* Prevent horizontal overflow globally */
html, body {
  overflow-x: hidden;
}

/* Make all cards respect screen width */
.card,
.narrow,
.contextbar {
  max-width: 100%;
}

/* Tables responsive container */
.table {
  width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prevent flex overflow */
.filterbar-row,
.contextbar-row,
.filters-row {
  flex-wrap: wrap;
}

/* Prevent filter groups pushing width */
.filterbar-group {
  min-width: 0;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.filter-clear {
  text-decoration: underline;
  cursor: pointer;
}

.contextbar select.input {
  min-width: 160px;
}
