/* ====================================================
   SPORTS PROGNOSTICS v94.0 — PREMIUM DELUXE CSS
   Mobile-first, full responsive, all breakpoints
   ==================================================== */

/* ── Variables ── */
:root {
  --bg:      #07111f;
  --bg-soft: #0b1529;
  --panel:   #0d1830;
  --panel-2: #101f3a;
  --line:    rgba(255,255,255,.08);
  --line-s:  rgba(84,233,180,.18);
  --txt:     #edf4ff;
  --muted:   #98add3;
  --green:   #54e9b4;
  --green-2: #22c58a;
  --cyan:    #59a8ff;
  --violet:  #7d5cff;
  --amber:   #f5c66b;
  --red:     #ff758b;
  --gold:    #ffd700;
  --shadow:  0 24px 70px rgba(0,0,0,.35);
  --shadow-s:0 8px 24px rgba(0,0,0,.28);
  --r:       20px;
  --r-sm:    14px;
  --sidebar-w: 280px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 10% 5%,  rgba(20,57,107,.55), transparent 34%),
    radial-gradient(circle at 90% 5%,  rgba(18,133,99,.18), transparent 25%),
    linear-gradient(180deg, #07111f 0%, #050b14 100%);
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
}
a  { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }

/* ── Layout shell ── */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8,14,28,.98), rgba(6,11,20,.98));
  backdrop-filter: blur(20px);
  overflow: hidden;
  z-index: 50;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  flex-shrink: 0;
}
.brand-mark-sidebar { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; }
.brand-copy { min-width: 0; }
.brand-title { font-size: 15px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subtitle { color: var(--muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }
.sidebar-nav-wrap { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; margin-right: -4px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-nav a span { font-size: 16px; flex-shrink: 0; }
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--txt);
  background: linear-gradient(90deg, rgba(89,168,255,.12), rgba(84,233,180,.10));
  border-color: rgba(84,233,180,.18);
}
.sidebar-footer { margin-top: 16px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.side-logout-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,117,139,.2);
  background: rgba(255,117,139,.08);
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s ease;
}
.side-logout-btn:hover { background: rgba(255,117,139,.14); }
.premium-status-card {
  padding: 14px;
  border-radius: var(--r-sm);
  background: rgba(8,15,29,.9);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  font-size: 12px;
}
.premium-status-card div { color: var(--muted); }
.premium-status-card strong { text-align: right; font-size: 12px; }

/* ── Mobile topbar ── */
.topbar-mobile {
  display: none;
  position: sticky;
  top: 0;
  z-index: 60;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 12px;
  background: rgba(6,11,20,.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.topbar-brand img { width: 28px; height: 28px; border-radius: 8px; }
.menu-toggle {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--txt);
  font-size: 18px;
  cursor: pointer;
}
.install-btn {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ── Main content ── */
.content {
  padding: 24px;
  overflow-x: hidden;
  min-width: 0;
}

/* ── Buttons ── */
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.05);
  color: var(--txt);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--violet)); border-color: transparent; color: #fff; box-shadow: 0 10px 28px rgba(89,168,255,.25); }
.btn-secondary { background: rgba(255,255,255,.06); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.action-btn { padding: 11px 18px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); color: var(--txt); transition: .2s ease; display: inline-flex; align-items: center; gap: 8px; }
.action-btn.primary { background: linear-gradient(135deg, var(--cyan), var(--violet)); border-color: transparent; color: #fff; }
.action-btn:hover { transform: translateY(-1px); }

/* ── Hero ── */
.page-hero {
  padding: 22px 24px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(10,19,39,.96), rgba(8,16,31,.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(89,168,255,.12), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(84,233,180,.14), transparent 28%);
  pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-hero-left { min-width: 0; }
.page-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.8rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.06; margin: 8px 0 10px; }
.page-hero p { color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.7; max-width: 680px; margin-bottom: 14px; }
.page-hero-art {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
}
.hero-stat-chip {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  text-align: center;
  min-width: 80px;
}
.hero-stat-chip span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.hero-stat-chip strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: #8fc6ff; margin-bottom: 4px; }
.user-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.user-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  font-size: 12px; white-space: nowrap;
}
.user-chip.subtle { color: var(--muted); }
.role-chip { background: rgba(84,233,180,.12); border-color: rgba(84,233,180,.22); }
.user-link { padding: 7px 11px; border-radius: 999px; background: rgba(89,168,255,.1); border: 1px solid rgba(89,168,255,.2); font-size: 12px; }
.badge-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.status-pill {
  padding: 7px 12px; border-radius: 999px;
  background: rgba(84,233,180,.10); border: 1px solid rgba(84,233,180,.16);
  font-size: 12px; white-space: nowrap;
}
.legal-notice {
  padding: 12px 14px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.6); font-size: 12px; line-height: 1.6;
  margin-top: 10px;
}

/* ── KPI grids ── */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  padding: 16px 18px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(12,22,43,.98), rgba(8,15,29,.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.kpi-card.green::before { background: linear-gradient(90deg, var(--green), transparent); }
.kpi-card.gold::before  { background: linear-gradient(90deg, var(--gold), transparent); }
.kpi-card.violet::before{ background: linear-gradient(90deg, var(--violet), transparent); }
.kpi-card.red::before   { background: linear-gradient(90deg, var(--red), transparent); }
.kpi-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.kpi-card strong { display: block; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.kpi-card .kpi-sub { font-size: 11px; color: var(--muted); margin-top: 5px; }
/* Legacy compat */
.card { padding: 16px 18px 18px; border-radius: 20px; background: linear-gradient(180deg, rgba(12,22,43,.98), rgba(8,15,29,.96)); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.card span { display: block; color: #9ec2f9; font-size: 13px; margin-bottom: 10px; }
.card strong { display: block; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.04em; }
.kpis-primary { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.compact-kpi { padding: 14px 16px 16px; }
.compact-kpi strong { font-size: clamp(1.4rem, 2.5vw, 2rem); }

/* ── Panel / card containers ── */
.panel, .glass-card, .premium-panel {
  background: linear-gradient(180deg, rgba(12,22,43,.98), rgba(8,15,29,.96));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-s);
  padding: 20px;
}
.panel-tall { min-height: 460px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.panel-head h3 { margin: 0; font-size: clamp(1.1rem, 1.8vw, 1.6rem); font-weight: 700; letter-spacing: -.03em; }
.panel-head span { color: var(--muted); font-size: 13px; }
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }

/* ── DataTables — full rewrite ── */
/* Wrapper */
.table-wrap {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
  background: rgba(255,255,255,.01);
}
.dataTables_wrapper {
  padding: 0;
  color: var(--txt) !important;
}
/* Top controls */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  padding: 14px 16px 10px;
  color: var(--muted) !important;
  font-size: 13px;
}
.dataTables_wrapper .dataTables_length { float: left; }
.dataTables_wrapper .dataTables_filter { float: right; }
.dataTables_wrapper::after { content: ""; display: table; clear: both; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 12px !important;
  color: var(--txt) !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  outline: none !important;
  min-height: 38px;
  margin-left: 6px;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: rgba(89,168,255,.4) !important;
  box-shadow: 0 0 0 3px rgba(89,168,255,.12) !important;
}
/* Table itself */
.premium-table {
  width: 100% !important;
  border-collapse: collapse;
  color: var(--txt) !important;
  font-size: 13px;
}
.premium-table thead tr {
  background: rgba(255,255,255,.035) !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}
.premium-table thead th {
  padding: 12px 14px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  color: var(--muted) !important;
  white-space: nowrap;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}
.premium-table thead th.sorting::after,
.premium-table thead th.sorting_asc::after,
.premium-table thead th.sorting_desc::after { opacity: .5; }
.premium-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,.04) !important;
  transition: background .15s ease;
}
.premium-table tbody tr:last-child { border-bottom: none !important; }
.premium-table tbody tr:hover { background: rgba(89,168,255,.05) !important; }
.premium-table tbody td {
  padding: 12px 14px !important;
  vertical-align: middle;
  border: none !important;
}
/* Info and pagination */
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding: 12px 16px 14px;
  color: var(--muted) !important;
  font-size: 12px;
}
.dataTables_wrapper .dataTables_info { float: left; }
.dataTables_wrapper .dataTables_paginate { float: right; }
.dataTables_wrapper .paginate_button {
  padding: 6px 12px !important;
  margin: 2px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  background: rgba(255,255,255,.04) !important;
  color: var(--txt) !important;
  font-size: 12px !important;
  cursor: pointer;
  transition: .15s ease !important;
}
.dataTables_wrapper .paginate_button:hover:not(.disabled) {
  background: rgba(89,168,255,.14) !important;
  border-color: rgba(89,168,255,.28) !important;
  color: var(--txt) !important;
}
.dataTables_wrapper .paginate_button.current {
  background: linear-gradient(135deg, var(--cyan), var(--violet)) !important;
  border-color: transparent !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.dataTables_wrapper .paginate_button.disabled {
  opacity: .35 !important;
  cursor: not-allowed !important;
}
/* Responsive overflow */
.dataTables_scrollBody { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
.dataTables_wrapper .dataTables_scroll { overflow: hidden; }
.table-scroll-hint {
  display: none;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 6px;
}

/* ── Tier badges ── */
.tier, .pill, .legend-chip, .legend-badge, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tier.elite {
  background: linear-gradient(135deg, rgba(255,215,0,.18), rgba(255,165,0,.12));
  color: var(--gold);
  border: 1px solid rgba(255,215,0,.3);
}
.tier.strong {
  background: rgba(84,233,180,.13);
  color: var(--green);
  border: 1px solid rgba(84,233,180,.25);
}
.tier.watch {
  background: rgba(89,168,255,.12);
  color: var(--cyan);
  border: 1px solid rgba(89,168,255,.22);
}
.tier.pass { background: rgba(255,255,255,.07); color: var(--muted); border: 1px solid rgba(255,255,255,.1); }
.legend-chip, .badge { background: rgba(255,255,255,.07); color: var(--muted); border: 1px solid rgba(255,255,255,.1); }
.legend-chip.good, .legend-badge.win, .pill.win, .badge.completed, .badge.ok { background: rgba(84,233,180,.12); color: #8ef5d0; border-color: rgba(84,233,180,.22); }
.legend-chip.warn, .legend-badge.warn, .badge.warning                         { background: rgba(245,198,107,.12); color: #ffd88c; border-color: rgba(245,198,107,.22); }
.legend-chip.risk, .legend-badge.loss, .pill.loss, .badge.failed, .badge.error { background: rgba(255,117,139,.12); color: #ffb5c0; border-color: rgba(255,117,139,.22); }

/* ── Value badge ── */
.value-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.value-badge.very-high { background: rgba(255,215,0,.16); color: var(--gold); border: 1px solid rgba(255,215,0,.28); }
.value-badge.high   { background: rgba(84,233,180,.12); color: var(--green); border: 1px solid rgba(84,233,180,.22); }
.value-badge.medium { background: rgba(89,168,255,.10); color: var(--cyan);  border: 1px solid rgba(89,168,255,.2); }
.value-badge.low    { background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid rgba(255,255,255,.1); }

/* Kelly badge */
.kelly-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(125,92,255,.13); color: #b8a5ff; border: 1px solid rgba(125,92,255,.22); white-space: nowrap; }

/* ── Charts ── */
.chart-wrap { position: relative; min-height: 280px; }
.chart-wrap canvas { max-height: 340px; }
.chart-empty { display: flex; align-items: center; justify-content: center; min-height: 280px; border: 1px dashed rgba(255,255,255,.08); border-radius: 18px; color: var(--muted); font-size: 14px; }

/* ── Legend boxes ── */
.legend-box { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.legend-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.legend-item small { display: block; color: var(--muted); line-height: 1.5; font-size: 12px; margin-top: 4px; }
.legend-dot { width: 10px; height: 10px; border-radius: 999px; margin-top: 3px; flex-shrink: 0; }
.legend-dot.watch { background: var(--amber); }
.legend-dot.strong { background: var(--cyan); }
.legend-dot.elite { background: var(--green); }
.legend-dot.neutral { background: var(--muted); }

/* ── Filters ── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters select, .filters input[type=number] {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  color: var(--txt);
  font-size: 13px;
  min-height: 40px;
  flex-shrink: 0;
}
.filters button { padding: 9px 16px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.05); color: var(--txt); transition: .2s ease; min-height: 40px; }
.filters button.primary-filter { background: linear-gradient(135deg, var(--cyan), var(--violet)); border-color: transparent; color: #fff; }
.filters button:hover { transform: translateY(-1px); }
.table-help { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.muted { color: var(--muted); }

/* ── Table cell helpers ── */
.click-row { cursor: pointer; }
.col-game b { display: block; font-size: 13px; font-weight: 600; }
.col-number { text-align: right; font-variant-numeric: tabular-nums; }
.col-center { text-align: center; }
.metric-note { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.empty-cell { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 13px; }
.game-cell b { font-weight: 600; }
.game-cell span { font-size: 12px; color: var(--muted); }

/* Favorite button */
.favorite-toggle { width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: rgba(245,198,107,.5); font-size: 16px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: .2s ease; flex-shrink: 0; }
.favorite-toggle.active, .favorite-toggle:hover { color: var(--amber); border-color: rgba(245,198,107,.28); background: rgba(245,198,107,.08); }

/* ── KPI strips (backtest) ── */
.backtest-kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.mini-kpi { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.mini-kpi span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.mini-kpi b { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.mini-kpi.positive b { color: var(--green); }
.mini-kpi.negative b { color: var(--red); }

/* Equity KPIs */
.equity-kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.equity-kpi { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); text-align: center; }
.equity-kpi span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.equity-kpi strong { font-size: 1.15rem; font-weight: 700; }
.equity-kpi.positive strong { color: var(--green); }
.equity-kpi.negative strong { color: var(--red); }
.equity-kpi.neutral strong { color: var(--cyan); }

/* Month breakdown */
.month-breakdown { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.month-card { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.month-card .month-name { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.month-card .month-roi { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.month-card.positive .month-roi { color: var(--green); }
.month-card.negative .month-roi { color: var(--red); }
.month-card .month-acc { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ── Strategy tabs ── */
.strategy-tabs { display: flex; gap: 6px; margin-bottom: 14px; padding: 4px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; width: fit-content; flex-wrap: wrap; }
.strategy-tab { padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; background: transparent; color: var(--muted); transition: .18s ease; }
.strategy-tab.active, .strategy-tab:hover { background: linear-gradient(135deg, rgba(89,168,255,.15), rgba(84,233,180,.1)); border-color: rgba(89,168,255,.2); color: var(--txt); }

/* ── Grade badges ── */
.grade-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; font-size: 12px; font-weight: 800; }
.grade-A { background: rgba(84,233,180,.16); color: var(--green); border: 1px solid rgba(84,233,180,.26); }
.grade-B { background: rgba(89,168,255,.12); color: var(--cyan); border: 1px solid rgba(89,168,255,.22); }
.grade-C { background: rgba(255,117,139,.10); color: var(--red); border: 1px solid rgba(255,117,139,.2); }

/* ── Reviewer panel ── */
.reviewer-status-card { padding: 16px 18px; border-radius: 18px; background: linear-gradient(180deg, rgba(10,20,42,.98), rgba(8,15,30,.96)); border: 1px solid rgba(84,233,180,.14); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.reviewer-backend-name { font-size: 1.4rem; font-weight: 800; background: linear-gradient(90deg, var(--green), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.reviewer-health-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; flex-shrink: 0; }
.reviewer-health-dot.healthy { background: var(--green); box-shadow: 0 0 8px var(--green); }
.reviewer-health-dot.unhealthy { background: var(--red); box-shadow: 0 0 8px var(--red); }
.reviewer-latency { padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); font-size: 12px; color: var(--muted); }

/* Reasoning chain */
.reasoning-chain { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(8,18,36,.9); border: 1px solid rgba(89,168,255,.12); }
.reasoning-chain h4 { margin: 0 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #8fc6ff; }
.reasoning-step { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 12px; line-height: 1.5; }
.reasoning-step:last-child { border-bottom: none; }
.reasoning-step-num { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; background: rgba(89,168,255,.16); color: var(--cyan); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }

/* ── Status / console ── */
.console { padding: 16px; border-radius: 16px; background: #020913; border: 1px solid rgba(84,233,180,.14); color: #c8fff0; font-family: ui-monospace, monospace; font-size: 12px; min-height: 60px; line-height: 1.65; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.status-grid div { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.status-grid small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.status-grid b { font-size: 1.5rem; letter-spacing: -.03em; }
.system-note { color: var(--muted); font-size: 12px; margin-top: 12px; line-height: 1.6; }
.viewer-notice { padding: 12px 14px; border-radius: 14px; background: rgba(245,198,107,.08); border: 1px solid rgba(245,198,107,.16); color: #ffe2aa; font-size: 13px; line-height: 1.55; }

/* Spotlight / health ring */
.activity-top-grid { display: grid; grid-template-columns: auto 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.health-ring-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); min-width: 120px; }
.health-ring { width: 72px; height: 72px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--score, 0) * 3.6deg), rgba(255,255,255,.08) 0); display: flex; align-items: center; justify-content: center; }
.health-ring span { font-size: 1.2rem; font-weight: 800; }
.health-ring-copy small { color: var(--muted); font-size: 11px; }
.health-ring-copy b { display: block; font-size: 1rem; margin: 3px 0; }
.health-ring-copy p { color: var(--muted); font-size: 11px; line-height: 1.5; max-width: 200px; }
.spotlight-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.spotlight-card { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.spotlight-card span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.spotlight-card strong { display: block; font-size: 1rem; font-weight: 700; }
.spotlight-card small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }

/* Pipeline */
.pipeline-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.pipeline-step { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.pipeline-step-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.pipeline-step-top span { font-size: 13px; font-weight: 600; }
.pipeline-step-top b { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.07); }
.pipeline-step small { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.pipeline-step em { display: block; font-size: 11px; color: rgba(255,255,255,.35); margin-top: 5px; font-style: normal; }
.pipeline-step.good { border-color: rgba(84,233,180,.2); }
.pipeline-step.bad  { border-color: rgba(255,117,139,.2); }
.pipeline-step.warn { border-color: rgba(245,198,107,.2); }

/* Ops buttons */
.ops { display: flex; gap: 10px; flex-wrap: wrap; }
.ops button { padding: 10px 16px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.05); color: var(--txt); transition: .2s ease; }
.ops button.primary { background: linear-gradient(135deg, var(--cyan), var(--violet)); border-color: transparent; color: #fff; }
.ops button:hover { transform: translateY(-1px); }

/* Live strip */
.saas-live-strip { position: sticky; top: 0; z-index: 40; padding: 12px 20px; background: rgba(7,14,28,.94); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin: -24px -24px 20px; }
.live-metrics { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.live-metric { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.live-metric strong { color: var(--txt); font-weight: 600; }
.live-strip-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.live-badge.live { background: rgba(84,233,180,.12); border: 1px solid rgba(84,233,180,.2); color: var(--green); }
.live-badge.paused { background: rgba(245,198,107,.1); border: 1px solid rgba(245,198,107,.18); color: var(--amber); }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.4); } }
.btn-live { padding: 8px 14px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.05); color: var(--txt); transition: .2s ease; white-space: nowrap; }

/* Section banner */
.section-banner { padding: 14px 16px; border-radius: 16px; background: rgba(89,168,255,.06); border: 1px solid rgba(89,168,255,.14); margin-bottom: 16px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.section-banner p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }
.section-banner-chip { padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(89,168,255,.12); border: 1px solid rgba(89,168,255,.2); color: var(--cyan); white-space: nowrap; flex-shrink: 0; }
.section-banner-chip.alt { background: rgba(84,233,180,.1); border-color: rgba(84,233,180,.18); color: var(--green); }

/* Activity feed */
.activity-feed { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; padding-right: 4px; }
.activity-feed::-webkit-scrollbar { width: 4px; }
.activity-feed::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }
.feed-item { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.feed-item .feed-name { font-size: 13px; font-weight: 600; }
.feed-item .feed-msg { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .feed-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ── Modal ── */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 80; padding: 16px; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; }
.modal.hidden { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.68); backdrop-filter: blur(12px); }
.modal-card {
  position: relative;
  width: min(100%, 920px);
  margin: 20px auto;
  background: linear-gradient(180deg, #0b1529, #08111f);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  flex-shrink: 0;
}
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--txt); border: 1px solid rgba(255,255,255,.08); font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; transition: .2s; }
.modal-close:hover { background: rgba(255,255,255,.12); }
.modal-body { padding: 22px; overflow: auto; max-height: calc(90vh - 40px); }
.modal-loading { min-height: 200px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
/* Detail modal */
.detail-hero.premium { display: grid; grid-template-columns: 1fr 320px; gap: 16px; margin-bottom: 16px; padding: 18px; border-radius: 20px; background: linear-gradient(180deg, rgba(10,19,39,.92), rgba(6,12,22,.94)); border: 1px solid rgba(255,255,255,.06); }
.detail-heading h2 { margin: 6px 0 8px; font-size: clamp(1.4rem, 2.5vw, 2rem); letter-spacing: -.04em; line-height: 1.1; }
.detail-heading h2 span { color: #8fc6ff; font-weight: 500; }
.detail-meta-line { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.detail-meta-line span { padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.detail-score-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.team-side small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.team-side b { display: block; font-size: 14px; line-height: 1.4; }
.team-side.align-right { text-align: right; }
.detail-score.premium { display: flex; align-items: center; justify-content: center; gap: 10px; }
.detail-score.premium strong { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800; letter-spacing: -.05em; }
.detail-grid { display: grid; gap: 14px; }
.detail-grid.two-up { grid-template-columns: 1.1fr 1.2fr; }
.detail-grid.three-up { grid-template-columns: repeat(3, 1fr); }
.detail-subpanel { padding: 16px; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.detail-subpanel h4 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.detail-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.detail-stats-grid.compact { grid-template-columns: repeat(3, minmax(0,1fr)); }
.detail-stat { padding: 12px 14px; border-radius: 14px; background: rgba(8,17,31,.9); border: 1px solid rgba(255,255,255,.06); }
.detail-stat span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.detail-stat b { font-size: .95rem; line-height: 1.3; }
.detail-stat.positive { border-color: rgba(84,233,180,.2); }
.probability-group { display: grid; gap: 8px; margin: 14px 0; }
.prob-row { display: grid; grid-template-columns: 80px minmax(0,1fr) 72px; align-items: center; gap: 10px; }
.prob-row span, .prob-row b { font-size: 12px; }
.prob-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.prob-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--green)); }
.detail-copy-block { margin-top: 12px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); }
.detail-copy-block h4 { margin: 0 0 8px; font-size: 13px; }
.detail-text { margin: 0; color: rgba(255,255,255,.85); line-height: 1.7; font-size: 13px; }
.detail-pick-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.detail-pick-head h3 { margin: 3px 0 0; font-size: 1.3rem; }
.confidence-bar-wrap { margin-bottom: 14px; }
.confidence-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.confidence-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--green)); transition: width .5s ease; }
.pick-metrics { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.circular-odds-warning { padding: 10px 12px; border-radius: 12px; background: rgba(245,198,107,.08); border: 1px solid rgba(245,198,107,.16); color: #ffe2aa; font-size: 12px; line-height: 1.5; display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; }
.recent-list { display: grid; gap: 8px; }
.recent-match { width: 100%; text-align: left; padding: 12px; border-radius: 14px; background: rgba(8,17,31,.92); border: 1px solid rgba(255,255,255,.06); color: var(--txt); cursor: pointer; transition: .2s ease; }
.recent-match:hover { border-color: rgba(84,233,180,.22); }
.recent-date { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.recent-line { display: block; font-size: 13px; line-height: 1.5; }
.metric-card { padding: 12px; border-radius: 14px; background: rgba(8,17,31,.9); border: 1px solid rgba(255,255,255,.06); }

/* ── Auth / Login ── */
.auth-body { min-height: 100vh; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; align-items: stretch; background: radial-gradient(circle at top right, rgba(84,233,180,.1), transparent 22%), linear-gradient(180deg, #07111f, #050b14); }
.auth-visual { padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 24px; background: linear-gradient(180deg, rgba(8,14,27,.86), rgba(7,12,22,.7)), url('/static/img/hero-soccer.png') center/cover no-repeat; border-right: 1px solid rgba(255,255,255,.06); }
.auth-brand-lockup { display: grid; gap: 14px; max-width: 680px; }
.brand-logo-img { width: 240px; }
.brand-row { display: flex; align-items: center; gap: 14px; }
.brand-mark-img { width: 60px; height: 60px; border-radius: 16px; border: 1px solid rgba(84,233,180,.18); background: #07111f; padding: 6px; }
.auth-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.feature-card { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.feature-card strong { display: block; margin-bottom: 5px; font-size: 14px; }
.feature-card span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-card { max-width: 460px; margin: auto; padding: 32px; border-radius: 24px; }
.auth-card-premium { width: min(92%, 460px); }
.form-stack { display: grid; gap: 10px; }
.form-stack label { font-weight: 600; font-size: 14px; }
.form-stack input, .form-stack select, .form-stack textarea { width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); color: var(--txt); font-size: 14px; outline: none; transition: .2s; }
.form-stack input:focus, .form-stack select:focus { border-color: rgba(89,168,255,.4); box-shadow: 0 0 0 3px rgba(89,168,255,.1); }
.auth-alert { padding: 12px 14px; border-radius: 14px; margin-bottom: 12px; font-size: 13px; }
.auth-alert.error   { background: rgba(255,117,139,.1); border: 1px solid rgba(255,117,139,.2); color: #ffc0ca; }
.auth-alert.success { background: rgba(84,233,180,.1); border: 1px solid rgba(84,233,180,.18); color: #bffae6; }
.auth-links-row { display: flex; justify-content: space-between; gap: 14px; margin: 12px 0; font-size: 13px; color: var(--cyan); }
.legal-mini { color: var(--muted); font-size: 12px; line-height: 1.6; }
.center { text-align: center; }
.premium-brand-row { margin-bottom: 20px; }

/* ── Misc ── */
.list { display: grid; gap: 10px; max-height: 320px; overflow: auto; }
.list-item { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); }
.list-item .top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.list-item small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 95; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 28px)); }
.toast-item { padding: 12px 16px; border-radius: 16px; background: rgba(10,20,40,.96); border: 1px solid rgba(84,233,180,.18); backdrop-filter: blur(20px); box-shadow: 0 16px 48px rgba(0,0,0,.4); display: flex; align-items: center; gap: 10px; font-size: 13px; animation: toastIn .25s ease; }
.toast-item.success { border-color: rgba(84,233,180,.28); }
.toast-item.error   { border-color: rgba(255,117,139,.28); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pwa-hint { position: fixed; right: 16px; bottom: 16px; max-width: 300px; padding: 14px 16px; border-radius: 18px; background: rgba(8,17,31,.96); border: 1px solid rgba(84,233,180,.2); box-shadow: var(--shadow); z-index: 80; font-size: 13px; }
/* Sidebar portal brand */
.portal-brand { flex-direction: row; align-items: center; }
.portal-brand-mark img { width: 36px; height: 36px; border-radius: 10px; }
/* Mini floating cards */
.hero-floating-cards { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.mini-floating-card { padding: 10px 14px; border-radius: 14px; background: rgba(6,11,20,.72); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.08); min-width: 110px; }
.mini-floating-card span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.mini-floating-card strong { font-size: 13px; font-weight: 700; }
/* Hero art */
.hero-art-card { position: relative; min-height: 220px; border-radius: 22px; overflow: hidden; border: 1px solid rgba(84,233,180,.14); background: linear-gradient(180deg, #091424, #08111d); }
.hero-art-overlay { position: absolute; inset: auto 10px 10px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-stat { padding: 10px 12px; border-radius: 12px; background: rgba(6,11,20,.78); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.07); }
.mini-stat span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 3px; }
.mini-stat strong { font-size: 13px; font-weight: 700; }
.saas-grid-lines { position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(255,255,255,.025) 31px), repeating-linear-gradient(90deg, transparent, transparent 30px, rgba(255,255,255,.025) 31px); }
.saas-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.saas-orb-a { width: 120px; height: 120px; top: -20px; right: -20px; background: radial-gradient(circle, rgba(84,233,180,.22), transparent 70%); }
.saas-orb-b { width: 80px; height: 80px; bottom: 10px; left: 10px; background: radial-gradient(circle, rgba(89,168,255,.18), transparent 70%); }
/* Hero summary strip */
.hero-summary-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.summary-pill { padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); min-width: 80px; }
.summary-pill span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.summary-pill strong { font-size: 1.1rem; font-weight: 700; }
/* Hero deluxe compat */
.deluxe-hero .hero-main { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 16px; padding: 20px; border-radius: 26px; background: linear-gradient(180deg, rgba(10,19,39,.95), rgba(8,16,31,.92)); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.deluxe-hero .hero-main::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 12% 20%, rgba(89,168,255,.12), transparent 25%), radial-gradient(circle at 82% 18%, rgba(84,233,180,.16), transparent 28%); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.hero-copy.compact { max-width: 760px; }
.hero h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.04; letter-spacing: -.04em; }
.hero-description { margin: 0; font-size: 14px; line-height: 1.75; color: rgba(255,255,255,.8); max-width: 800px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-legal { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.7); line-height: 1.6; font-size: 12px; }
.hero-legal.compact { margin-top: 2px; }
.top-userbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Navigation CTA */
.navigation-cta-panel { display: flex; flex-direction: column; gap: 12px; }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
/* Picks legend */
.top-picks-legend { grid-template-columns: repeat(4, minmax(0,1fr)); }
.top-picks-legend .legend-item { padding: 10px 12px; }
.top-picks-legend .metrics { grid-column: span 1; }
/* Table wide */
.table-wrap-deluxe { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.premium-table-deluxe { min-width: 900px; }
/* Backtest table */
.backtest-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Security page */
.security-shell { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 24px; }
/* Fresh update animation */
.fresh-update { animation: freshFlash .8s ease-out; }
@keyframes freshFlash { 0% { background: rgba(84,233,180,.15); } 100% { background: transparent; } }
/* Profit badge */
.pill { padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill.win   { background: rgba(84,233,180,.12); color: var(--green); border: 1px solid rgba(84,233,180,.2); }
.pill.loss  { background: rgba(255,117,139,.1); color: var(--red);  border: 1px solid rgba(255,117,139,.2); }
/* PWA */
#installAppBtn, #installBtn { display: none; }
/* Users admin */
.admin-permissions { display: grid; gap: 10px; }
/* Sidebar compact status card */
.compact-status-card { font-size: 11px; }
/* Deluxe hero compact */
.compact-page-hero .hero-main { grid-template-columns: 1fr; }
.single-column-hero .hero-art-card { display: none; }
/* Misc helpers */
.muted-inline { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

/* =====================================================
   RESPONSIVE — Mobile First
   ===================================================== */

/* ── ≥1400px: extra wide ── */
@media (min-width: 1400px) {
  :root { --sidebar-w: 300px; }
  .kpis { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* ── ≤1280px ── */
@media (max-width: 1280px) {
  :root { --sidebar-w: 260px; }
  .deluxe-hero .hero-main { grid-template-columns: 1fr; }
  .hero-art-card { display: none; }
  .hero-floating-cards { display: none; }
  .top-picks-legend { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .equity-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .detail-stats-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* ── ≤1024px: sidebar overlay ── */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .topbar-mobile { display: flex; }
  .sidebar {
    position: fixed;
    left: 0; top: 57px; bottom: 0;
    z-index: 70;
    transform: translateX(-108%);
    transition: transform .28s cubic-bezier(.25,.46,.45,.94);
    width: min(300px, 90vw);
    height: auto;
    max-height: calc(100vh - 57px);
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,.5); }
  .content { padding: 16px; }
  .saas-live-strip { margin: -16px -16px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .backtest-kpis { grid-template-columns: repeat(3, 1fr); }
  .detail-stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-grid.two-up, .detail-grid.three-up { grid-template-columns: 1fr; }
  .detail-hero.premium { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}

/* ── ≤768px ── */
@media (max-width: 768px) {
  .content { padding: 12px; }
  .saas-live-strip { margin: -12px -12px 14px; padding: 10px 14px; }
  .live-metrics { gap: 10px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpis-primary { grid-template-columns: repeat(2, 1fr); }
  .equity-kpis { grid-template-columns: repeat(2, 1fr); }
  .backtest-kpis { grid-template-columns: repeat(2, 1fr); }
  .legend-box { grid-template-columns: 1fr; }
  .top-picks-legend { grid-template-columns: 1fr; }
  .activity-top-grid { grid-template-columns: 1fr; }
  .spotlight-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { flex-direction: column; }
  .filters select, .filters input, .filters button { width: 100%; min-width: 0; }
  .strategy-tabs { width: 100%; }
  .strategy-tab { flex: 1; text-align: center; }
  .page-hero-top { flex-direction: column; }
  .page-hero-art { display: none; }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 1.8rem; }
  .card strong { font-size: 1.8rem; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { width: 100%; margin: 0; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .modal-body { padding: 16px; }
  .detail-stats-grid, .detail-stats-grid.compact { grid-template-columns: repeat(2, 1fr); }
  .detail-score-card { grid-template-columns: 1fr; }
  .team-side.align-right { text-align: left; }
  .detail-score.premium { order: -1; }
  .detail-meta-line { flex-direction: column; gap: 6px; }
  .prob-row { grid-template-columns: 64px minmax(0,1fr) 60px; }
  .pipeline-board { grid-template-columns: 1fr; }
  .hero-summary-strip { gap: 8px; }
  .summary-pill { flex: 1; min-width: 80px; }
  /* DataTables mobile */
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter { float: none; display: block; padding: 10px 12px 6px; }
  .dataTables_wrapper .dataTables_filter input { width: 100% !important; margin-left: 0; margin-top: 4px; }
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate { float: none; display: block; text-align: center; padding: 8px 12px 12px; }
  .dataTables_wrapper .paginate_button { padding: 7px 10px !important; font-size: 12px !important; }
}

/* ── ≤480px ── */
@media (max-width: 480px) {
  .kpis, .kpis-primary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .equity-kpis { grid-template-columns: 1fr 1fr; }
  .backtest-kpis { grid-template-columns: 1fr 1fr; }
  .month-breakdown { grid-template-columns: repeat(2, 1fr); }
  .status-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.55rem; }
  .panel, .premium-panel { padding: 14px; border-radius: 18px; }
  .kpi-card, .card { padding: 12px 14px 14px; border-radius: 16px; }
  .kpi-card strong, .card strong { font-size: 1.5rem; }
  .premium-table { font-size: 12px; }
  .premium-table thead th { padding: 10px 10px !important; font-size: 10px !important; }
  .premium-table tbody td { padding: 10px 10px !important; }
  .detail-stats-grid, .detail-stats-grid.compact { grid-template-columns: 1fr 1fr; }
  .prob-row { grid-template-columns: 60px minmax(0,1fr) 54px; }
  .hero-summary-strip { flex-direction: column; }
  .badge-strip .status-pill { font-size: 11px; padding: 6px 10px; }
  .user-bar .user-chip.subtle { display: none; }
}

/* ── Print ── */
@media print {
  .sidebar, .topbar-mobile, .saas-live-strip,
  .toast-stack, .pwa-hint, .modal,
  .ops, .filters button { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  .content { padding: 0; }
  body { background: white; color: black; }
  .panel, .card, .kpi-card { border: 1px solid #ddd; background: white; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── High contrast ── */
@media (prefers-contrast: high) {
  :root { --line: rgba(255,255,255,.25); --muted: #c8d8f0; }
  .tier, .pill, .badge { border-width: 2px; }
}

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* DataTables specific overrides */
table.dataTable { border-collapse: collapse !important; }
table.dataTable thead .sorting { cursor: pointer; }
div.dataTables_wrapper div.dataTables_processing { background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 12px; }
