/* ==========================================================================
   GameDay Analytics — MLB
   Gridiron theme — cool light greys, white panels, dark navbar, blue accent.
   Byte-for-byte port of nfl/public_html/assets/css/style.css (2026-09-23,
   branch feat/nfl-game-props == NFL prod) plus the "MLB overrides" section
   at the end. Keep the two in sync.
   ========================================================================== */
/* ─── CSS Custom Properties ──────────────────────────────────────────────── */

:root {
    /* Surfaces */
    --bg: #F0F1F3;              /* page background */
    --surface: #FFFFFF;         /* cards, panels, tables */
    --surface-2: #F6F7F9;       /* card headers, table heads, chips */
    --surface-3: #E9EBEF;       /* hover / striped rows / tracks */

    /* Text */
    --text-primary: #16191D;
    --text-secondary: #5B6470;
    --text-muted: #8A929D;

    /* Lines */
    --border: #E1E4E8;
    --border-strong: #C9CED5;

    /* Accent + semantic */
    --accent: #1F5EFF;
    --accent-hover: #164BD1;
    --accent-soft: #E8EFFF;
    --green: #00A34A;
    --green-soft: #E3F5EA;
    --red: #D93025;
    --red-soft: #FCE8E6;
    --amber: #C77700;
    --amber-soft: #FFF4DC;

    /* Chrome */
    --nav-bg: #14171C;
    --nav-bg-2: #1E2229;
    --nav-text: #FFFFFF;
    --nav-muted: rgba(255, 255, 255, 0.72);
    --nav-pill: rgba(255, 255, 255, 0.10);

    /* Shape */
    --radius: 4px;
    --radius-lg: 6px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);
    --shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.12);

    /* Type — one family; numbers tabular via body */
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Legacy aliases (older pages/CSS reference these) */
    --bg-primary: var(--bg);
    --bg-secondary: var(--surface-3);
    --bg-tertiary: var(--surface);
    --border-light: var(--border-strong);
    --font-mono: var(--mono);
    --display: var(--font-display);
    --body: var(--font);
}


/* ─── Reset & Base ───────────────────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-primary);
    background-color: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

p {
    color: var(--text-secondary);
}

strong {
    font-weight: 600;
}

small {
    font-size: 0.85em;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

::selection {
    background: rgba(31, 94, 255, 0.18);
    color: var(--text-primary);
}

code, kbd, pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
}


/* ─── Layout ─────────────────────────────────────────────────────────────── */

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
}

main.container {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.flex { display: flex; gap: 0.75rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.flex-center { display: flex; justify-content: center; align-items: center; gap: 0.75rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }


/* ─── Scoreboard strip ───────────────────────────────────────────────────── */

.sb {
    display: flex;
    align-items: stretch;
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.sb-lead {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 0 16px;
    border-right: 1px solid var(--border);
    flex: 0 0 auto;
    min-width: 96px;
}

.sb-league {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

.sb-week {
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    white-space: nowrap;
}

.sb-track {
    display: flex;
    flex: 1 1 auto;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.sb-track::-webkit-scrollbar { display: none; }

.sb-game {
    flex: 0 0 auto;
    cursor: pointer;
    width: 172px;
    padding: 6px 12px 5px;
    border-right: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    transition: background-color 0.12s;
}

.sb-game:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.sb-game-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    height: 16px;
    margin-bottom: 2px;
}

.sb-when {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sb-game.is-live .sb-when { color: var(--red); }
.sb-game.is-final .sb-when { color: var(--text-secondary); }

.sb-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    animation: badge-pulse 1.4s ease-in-out infinite;
}

.sb-picks {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 3px;
    padding: 0 6px;
    line-height: 15px;
    white-space: nowrap;
    background: var(--surface);
    text-decoration: none;
    transition: background-color 0.12s, color 0.12s;
}

.sb-picks:hover {
    background: var(--accent);
    color: #fff;
}

.sb-row {
    display: grid;
    grid-template-columns: 18px 34px 1fr auto;
    align-items: center;
    gap: 6px;
    height: 18px;
    font-size: 0.78rem;
}

.sb-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.sb-abbr {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sb-line {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sb-rec {
    font-size: 0.74rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: right;
}

.sb-score {
    font-weight: 700;
    font-size: 0.82rem;
    text-align: right;
}

.sb-row.is-loser .sb-abbr,
.sb-row.is-loser .sb-score {
    color: var(--text-muted);
    font-weight: 600;
}

.sb-arrows {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 6px;
    border-left: 1px solid var(--border);
    background: var(--surface);
    flex: 0 0 auto;
}

.sb-arrow {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.12s, color 0.12s;
}

.sb-arrow:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .sb-lead { min-width: 72px; padding: 0 10px; }
    .sb-arrows { display: none; }
    .sb-game { width: 150px; }
}


/* ─── Navigation ─────────────────────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--nav-bg);
    height: 56px;
    color: var(--nav-text);
}

.nav-inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
    gap: 0.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--nav-text);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 0.75rem;
}

.nav-brand:hover { color: var(--nav-text); }

.nav-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 14px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    font-style: italic;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.nav-title {
    display: inline;
}

.nav-menu {
    display: none;
    list-style: none;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
}

.nav-menu.nav-open { display: flex; }

.nav-item { list-style: none; }

.nav-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--nav-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--nav-text);
    background-color: var(--nav-pill);
}

.nav-link.active { color: var(--nav-text); }

/* Hamburger toggle */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    margin-left: auto;
}

.nav-toggle:hover { background-color: var(--nav-pill); }

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--nav-text);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.active .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdowns */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1.25rem;
    color: var(--nav-muted);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
    width: 100%;
    text-align: left;
}

.nav-dropdown-toggle:hover {
    color: var(--nav-text);
    background-color: var(--nav-pill);
}

.nav-dropdown-toggle.active { color: var(--nav-text); }

.nav-caret {
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown-link {
    display: block;
    padding: 0.6rem 1.25rem 0.6rem 2.25rem;
    color: var(--nav-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
}

.nav-dropdown-link:hover {
    color: var(--nav-text);
    background-color: var(--nav-pill);
}

.nav-dropdown-link.active {
    color: var(--nav-text);
    font-weight: 600;
}

.nav-right {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.nav-switch {
    color: var(--nav-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}

.nav-switch:hover {
    color: var(--nav-text);
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-admin-gear {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--nav-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, border-color 0.15s, background-color 0.15s;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-admin-gear:hover {
    color: var(--nav-text);
    border-color: rgba(255, 255, 255, 0.5);
    background: var(--nav-pill);
}

/* Context sub-bar */
.subbar {
    background: var(--nav-bg-2);
    color: var(--nav-text);
    height: 40px;
}

.subbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.subbar-back {
    color: var(--nav-muted);
    font-size: 1.05rem;
    line-height: 1;
    text-decoration: none;
}

.subbar-back:hover { color: var(--nav-text); }
.subbar-section { color: var(--nav-muted); font-weight: 500; }
.subbar-sep { color: rgba(255, 255, 255, 0.28); }
.subbar-page { color: var(--nav-text); }


/* ─── Cards ──────────────────────────────────────────────────────────────── */

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
}

.card-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.9rem;
    margin-bottom: 1rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2,
.card-header h3 {
    font-size: 1.05rem;
    margin: 0;
}

.card-body { color: var(--text-secondary); }

.card-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
}

.card-stat {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.card-stat .stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.card-stat .stat-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}


/* ─── Data Tables ────────────────────────────────────────────────────────── */

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    white-space: nowrap;
    background: var(--surface);
}

.data-table thead { background-color: var(--surface); }

.data-table th {
    padding: 0.65rem 1rem;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background-color: var(--surface);
}

.data-table th[data-sortable] {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.data-table th[data-sortable]:hover { color: var(--accent); }

.data-table th[data-sortable]::after {
    content: ' \2195';
    font-size: 0.7em;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.data-table th[data-sortable].sort-asc::after { content: ' \2191'; color: var(--accent); }
.data-table th[data-sortable].sort-desc::after { content: ' \2193'; color: var(--accent); }

.data-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.data-table tbody tr { transition: background-color 0.15s ease; }
.data-table tbody tr:nth-child(even) { background-color: var(--surface-2); }
.data-table tbody tr:hover { background-color: var(--surface-3); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table.table-compact th,
.data-table.table-compact td {
    padding: 0.45rem 0.75rem;
}

.data-table .col-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table .row-link {
    color: var(--text-primary);
    font-weight: 600;
}

.data-table .row-link:hover {
    color: var(--accent);
    text-decoration: underline;
}


/* ─── Badges & Pills ────────────────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-family: var(--font);
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-over,
.badge-win {
    background-color: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(0, 163, 74, 0.25);
}

.badge-under,
.badge-loss {
    background-color: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(217, 48, 37, 0.25);
}

.badge-push {
    background-color: var(--amber-soft);
    color: var(--amber);
    border: 1px solid rgba(199, 119, 0, 0.25);
}

.badge-live {
    background-color: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(217, 48, 37, 0.25);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.badge-final {
    background-color: var(--surface-3);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.badge-scheduled {
    background-color: var(--surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}


/* ─── Stats Display ──────────────────────────────────────────────────────── */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.stat-change { font-size: 0.8rem; font-weight: 500; margin-top: 0.25rem; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }


/* ─── Prop Analysis ──────────────────────────────────────────────────────── */

.prop-line {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.prop-line .line-value { color: var(--accent); }

.prop-line .odds {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.hit-rate-bar {
    position: relative;
    height: 8px;
    background-color: var(--surface-3);
    border-radius: 2px;
    overflow: hidden;
    width: 100%;
}

.hit-rate-bar .bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.hit-rate-bar .bar-fill.green { background-color: var(--green); }
.hit-rate-bar .bar-fill.red { background-color: var(--red); }
.hit-rate-bar .bar-fill.amber { background-color: var(--amber); }
.hit-rate-bar .bar-fill.neutral { background-color: var(--text-muted); }

.trend-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.trend-row .trend-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 60px;
    flex-shrink: 0;
}

.trend-row .trend-value {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
}

.trend-row .hit-rate-bar { flex: 1; }

.prop-card {
    border-left: 3px solid var(--border-strong);
    padding-left: 1rem;
}

.prop-card.prop-hot { border-left-color: var(--green); }
.prop-card.prop-cold { border-left-color: var(--red); }


/* ─── Forms & Filters ────────────────────────────────────────────────────── */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-select,
.filter-input,
select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="email"],
input[type="password"],
textarea {
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.filter-select,
select {
    appearance: none;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%235B6470' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    cursor: pointer;
}

.filter-select:focus,
.filter-input:focus,
select:focus,
input:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.15);
}

.filter-select option,
select option {
    background-color: var(--surface);
    color: var(--text-primary);
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-wrapper::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A929D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.15);
}

.search-input::placeholder,
input::placeholder {
    color: var(--text-muted);
}

label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}


/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background-color: var(--surface-2);
    color: var(--text-primary);
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.btn-lg { padding: 0.75rem 1.6rem; font-size: 0.95rem; }

.btn-group {
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
}

.btn-group .btn {
    border-radius: 0;
    border-right-width: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    border-right-width: 1px;
}

.btn-group .btn.active {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}


/* ─── Loading Spinner ────────────────────────────────────────────────────── */

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(240, 241, 243, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-lg);
    z-index: 10;
}


/* ─── Charts ─────────────────────────────────────────────────────────────── */

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

.chart-container canvas { max-width: 100%; }
.chart-container-sm { height: 200px; }
.chart-container-lg { height: 400px; }


/* ─── Page Header ────────────────────────────────────────────────────────── */

.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-top: 0.25rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.page-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


/* ─── Game Cards ─────────────────────────────────────────────────────────── */

.game-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: border-color 0.15s ease;
}

.game-card:hover { border-color: var(--border-strong); }

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.game-teams { display: flex; flex-direction: column; gap: 0.75rem; }

.game-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.game-team-info { display: flex; align-items: center; gap: 0.75rem; }

.game-team-logo {
    width: 32px;
    height: 32px;
    border-radius: 2px;
    background-color: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.game-team-name { font-weight: 600; color: var(--text-primary); font-size: 0.95rem; }
.game-team-record { font-size: 0.8rem; color: var(--text-muted); margin-left: 0.5rem; }

.game-score {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    min-width: 30px;
    text-align: right;
}

.game-score.winner { color: var(--accent); }

.game-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.game-card-footer a { font-size: 0.8rem; }
.game-divider { height: 1px; background-color: var(--border); }


/* ─── Pagination ─────────────────────────────────────────────────────────── */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s;
}

.pagination a {
    color: var(--text-secondary);
    background-color: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
}

.pagination a:hover {
    background-color: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.pagination .active {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.pagination .disabled {
    color: var(--text-muted);
    opacity: 0.4;
    pointer-events: none;
}


/* ─── Tabs ───────────────────────────────────────────────────────────────── */

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    gap: 0.25rem;
    overflow-x: auto;
}

.tab {
    padding: 0.7rem 1rem;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab:hover { color: var(--text-primary); }

.tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }


/* ─── Alerts / Notices ───────────────────────────────────────────────────── */

.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-info { background-color: var(--accent-soft); border-color: rgba(31, 94, 255, 0.25); color: var(--accent-hover); }
.alert-success { background-color: var(--green-soft); border-color: rgba(0, 163, 74, 0.25); color: var(--green); }
.alert-warning { background-color: var(--amber-soft); border-color: rgba(199, 119, 0, 0.25); color: var(--amber); }
.alert-error { background-color: var(--red-soft); border-color: rgba(217, 48, 37, 0.25); color: var(--red); }


/* ─── Empty State ────────────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state-title { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state-text { font-size: 0.9rem; max-width: 400px; margin: 0 auto; }


/* ─── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.site-footer p { font-size: 0.8rem; color: var(--text-muted); }

.sf2 { margin-top: 2.5rem; }
.sf2-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}
.sf2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 1.75rem 1.75rem 1.25rem; }
.sf2-col h4 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-primary); margin: 0 0 0.85rem; }
.sf2-col a.sf2-link { display: block; font-size: 0.84rem; color: var(--text-secondary); text-decoration: none; margin-bottom: 0.5rem; }
.sf2-col a.sf2-link:hover { color: var(--accent); }
.sf2-stat { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.sf2-stat .sf2-num { color: var(--text-primary); font-weight: 700; }
.sf2-dev p { font-size: 0.82rem; color: var(--text-secondary); margin: 0 0 0.5rem; }
.sf2-dev a { color: var(--accent); text-decoration: none; font-weight: 600; }
.sf2-dev a:hover { text-decoration: underline; }
.sf2-by-name { font-weight: 700; }
.sf2-disclaimer { border-top: 1px solid var(--border); padding: 1.25rem 1.75rem 1.5rem; text-align: center; }
.sf2-disclaimer p { max-width: 860px; margin: 0 auto 0.5rem; font-size: 0.76rem; line-height: 1.6; color: var(--text-muted); }
.sf2-disclaimer p strong { color: var(--text-secondary); }
.sf2-statusbar { background: var(--nav-bg); padding: 0.65rem 1rem; text-align: center; font-size: 0.74rem; color: var(--nav-muted); letter-spacing: 0.02em; }
.sf2-statusbar b { color: #fff; padding: 0 0.3rem; border-radius: 3px; }
.sf2-statusbar b.ok { background: var(--green); }
.sf2-statusbar b.warn { background: var(--amber); }
.sf2-statusbar .sf2-sep { color: rgba(255, 255, 255, 0.25); margin: 0 0.5rem; }
@media (max-width: 900px) { .sf2-grid { grid-template-columns: 1fr; gap: 1.5rem; } }


/* ─── Tooltips ───────────────────────────────────────────────────────────── */

[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--nav-bg);
    color: #fff;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

[data-tooltip]:hover::after { opacity: 1; }


/* ─── Responsive Breakpoints ─────────────────────────────────────────────── */

@media (min-width: 768px) {
    .container { padding: 0 1.5rem; }

    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(3, 1fr); }

    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .nav-toggle { display: none; }
    .nav-right { display: flex; }

    .nav-menu {
        display: flex;
        flex-direction: row;
        position: static;
        background: none;
        border-bottom: none;
        padding: 0;
        gap: 0.15rem;
        box-shadow: none;
    }

    .nav-link {
        padding: 0.5rem 0.85rem;
        border-radius: 999px;
        white-space: nowrap;
    }

    .nav-link.active { background-color: var(--nav-pill); }

    .nav-dropdown-toggle {
        padding: 0.5rem 0.85rem;
        border-radius: 999px;
        width: auto;
        white-space: nowrap;
    }

    .nav-dropdown-toggle.active { background-color: var(--nav-pill); }

    .nav-dropdown-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        min-width: 200px;
        background-color: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        padding: 0.4rem 0;
        z-index: 1001;
    }

    .nav-dropdown::after {
        /* hover bridge so the menu doesn't close crossing the 6px gap */
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 8px;
    }

    .nav-dropdown:hover .nav-dropdown-menu { display: block; }

    .nav-dropdown-link {
        padding: 0.55rem 1rem;
        white-space: nowrap;
        color: var(--text-secondary);
    }

    .nav-dropdown-link:hover {
        color: var(--text-primary);
        background-color: var(--surface-2);
    }

    .nav-dropdown-link.active {
        color: var(--accent);
        background-color: var(--accent-soft);
    }

    .filter-bar { flex-wrap: nowrap; }
}

@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
    .nav-inner, .subbar-inner { padding: 0 2rem; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .chart-container { height: 350px; }
}

@media (max-width: 480px) {
    body { font-size: 13.5px; }
    .card { padding: 1rem; }
    .card-stat { padding: 1rem; }
    .card-stat .stat-value { font-size: 1.5rem; }
    .page-title { font-size: 1.25rem; }
    .data-table th,
    .data-table td { padding: 0.5rem 0.65rem; }
}


/* ─── Utility Classes ────────────────────────────────────────────────────── */

.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }
.text-amber { color: var(--amber) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.font-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

.show-mobile { display: block; }
.hide-mobile { display: none; }

@media (min-width: 768px) {
    .show-mobile { display: none; }
    .hide-mobile { display: block; }
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }

.w-full { width: 100%; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.cursor-pointer { cursor: pointer; }
.tabular-nums { font-variant-numeric: tabular-nums; }


/* ─── Player Photos ─────────────────────────────────────────────── */
.player-photo {
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--surface-3);
    vertical-align: middle;
}

.player-header-photo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ─── Team Logos ─────────────────────────────────────────────────── */
.team-logo {
    vertical-align: middle;
    object-fit: contain;
}

.team-abbr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--surface-3);
    border-radius: 3px;
    padding: 2px 6px;
    vertical-align: middle;
}

.player-name-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* ─── Scrollbar ──────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Focus States ───────────────────────────────────────────────── */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ─── Reduced Motion ─────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ==========================================================================
   Dashboard — Prop Cards
   ========================================================================== */

/* ─── Toolbar ───────────────────────────────────────────────────────────── */

.props-toolbar {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.props-toolbar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.props-toolbar-left {
    flex: 1;
    min-width: 160px;
}

.props-toolbar-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.props-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Search */
.props-search-wrapper {
    position: relative;
}

.props-search-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.props-search {
    width: 100%;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.45rem 0.75rem 0.45rem 2rem;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s;
}

.props-search:focus {
    border-color: var(--accent);
}

.props-search::placeholder {
    color: var(--text-muted);
}

/* Select dropdowns */
.props-select {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    outline: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2378716c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    transition: border-color 0.15s;
}

.props-select:focus {
    border-color: var(--accent);
}

.props-select-market {
    font-weight: 600;
    min-width: 120px;
}

/* Min games filter */
.props-min-games-wrapper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.props-min-games-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.props-min-games-input {
    width: 52px;
    padding: 0.4rem 0.4rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-primary);
    text-align: center;
}
.props-odds-input {
    width: 72px;
}
.props-min-games-input:focus {
    border-color: var(--accent);
    outline: none;
}

/* Over/Under toggle buttons */
.props-toggle-btn {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 0.45rem 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.props-toggle-btn:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: none;
}

.props-toggle-btn:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.props-toggle-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.props-toggle-btn:hover:not(.active) {
    background-color: var(--bg-secondary);
}

/* ─── Date Bar ──────────────────────────────────────────────────────────── */

.props-date-bar {
    margin-bottom: 0.75rem;
}

.props-date-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.props-date-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.15s;
}

.props-date-arrow:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.props-date-input {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 0.65rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-primary);
    outline: none;
}

.props-date-input:focus {
    border-color: var(--accent);
}

.props-date-label {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ─── Game Tabs ─────────────────────────────────────────────────────────── */

.props-game-tabs {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    margin-bottom: 1.25rem;
    scrollbar-width: thin;
}

.props-game-tab {
    flex-shrink: 0;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.props-game-tab:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.props-game-tab.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.props-tabs-arrow {
    display: inline-flex;
    align-items: center;
    padding: 0 0.5rem;
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ─── Props Grid ────────────────────────────────────────────────────────── */

.props-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .props-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .props-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.props-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.props-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

/* ─── Prop Card ─────────────────────────────────────────────────────────── */

.prop-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
    transition: border-color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: inherit;
}

.prop-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Card Header */
.prop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.prop-card-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.prop-card-photo {
    width: 56px;
    height: 56px;
    border-radius: 2px;
    object-fit: contain;
    object-position: top center;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.prop-card-info {
    min-width: 0;
}

.prop-card-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prop-card-matchup {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.prop-card-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Score indicator */
.prop-card-score-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.prop-card-score-bar {
    width: 60px;
    height: 6px;
    background-color: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.prop-card-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.prop-card-score-num {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

/* Score color classes */
.score-hot { background-color: var(--green); color: var(--green); }
.score-warm { background-color: #16A34A; color: #16A34A; }
.score-neutral { background-color: var(--amber); color: var(--amber); }
.score-cool { background-color: #E8590C; color: #E8590C; }
.score-cold { background-color: var(--red); color: var(--red); }

.prop-card-score-fill.score-hot { background-color: var(--green); }
.prop-card-score-fill.score-warm { background-color: #16A34A; }
.prop-card-score-fill.score-neutral { background-color: var(--amber); }
.prop-card-score-fill.score-cool { background-color: #E8590C; }
.prop-card-score-fill.score-cold { background-color: var(--red); }

/* Card Body */
.prop-card-body {
    margin-bottom: 0.75rem;
}

.prop-card-prop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.prop-card-prop-label {
    background-color: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.prop-card-prop-line {
    font-family: var(--mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.prop-card-accuracy {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 0.35rem 0;
}

.prop-card-odds {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.prop-card-odds-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem;
}

.odds-direction {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.odds-value {
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.odds-negative .odds-value {
    color: var(--green);
}

/* Sportsbook label */
.prop-card-sportsbook {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    text-transform: capitalize;
    margin-top: 0.35rem;
    letter-spacing: 0.02em;
}

/* Result badge */
.prop-result-badge {
    display: inline-block;
    text-align: center;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.prop-result-badge.badge-over {
    background-color: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(0, 163, 74, 0.25);
}

.prop-result-badge.badge-under {
    background-color: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(217, 48, 37, 0.25);
}

.prop-result-badge.badge-push {
    background-color: var(--amber-soft);
    color: var(--amber);
    border: 1px solid rgba(199, 119, 0, 0.25);
}

/* Card Footer — Trend Stats */
.prop-card-footer {
    display: flex;
    gap: 0.25rem;
    border-top: 1px solid var(--border);
    padding-top: 0.65rem;
}

.prop-card-trend {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.25rem 0.35rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius);
}

.trend-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.trend-value {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
}

.trend-green { color: var(--green); }
.trend-red { color: var(--red); }
.trend-neutral { color: var(--amber); }
.trend-na { color: var(--text-muted); }

/* ─── Responsive adjustments for props dashboard ────────────────────────── */

@media (max-width: 640px) {
    .props-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .props-toolbar-center {
        flex-wrap: wrap;
    }

    .props-toolbar-right {
        justify-content: flex-end;
    }

    .prop-card-photo {
        width: 44px;
        height: 44px;
        object-fit: contain;
        object-position: top center;
    }

    .prop-card-name {
        font-size: 0.85rem;
    }
}

/* ─── Prop Analyzer ─────────────────────────────────────────────────────── */

#analyzer-form {
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.filter-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.analyzer-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.analyzer-summary-left {
    font-family: var(--font-display);
    font-size: 1rem;
}

.analyzer-summary-right {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.analyzer-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.hit-rate-display {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hit-rate-bar-container {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.hit-rate-secondary {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.8rem;
}

.hit-rate-label {
    font-size: 0.75rem;
}

.odds-pill {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    white-space: nowrap;
}

.badge-pos {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius);
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: middle;
}

.badge-games {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    white-space: nowrap;
}

.analyzer-game-cell {
    white-space: nowrap;
}

.analyzer-game-matchup {
    font-weight: 600;
    font-size: 0.85rem;
}

.analyzer-game-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Hide Game column on small screens to keep table usable */
@media (max-width: 640px) {
    .analyzer-table th:nth-child(3),
    .analyzer-table td:nth-child(3) {
        display: none;
    }
}

.analyzer-sortable {
    cursor: pointer;
    user-select: none;
}

.analyzer-sortable:hover {
    color: var(--accent);
}

.analyzer-sortable.sort-asc::after {
    content: ' \25B2';
    font-size: 0.7em;
}

.analyzer-sortable.sort-desc::after {
    content: ' \25BC';
    font-size: 0.7em;
}


/* ==========================================================================
   Pitching Matchups
   ========================================================================== */

/* ─── Grid Layout ─────────────────────────────────────────────────────────── */

.matchup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .matchup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .matchup-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ─── Game Card ───────────────────────────────────────────────────────────── */

.matchup-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.matchup-card-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.matchup-teams {
    display: flex;
    gap: 0.5rem;
    font-weight: 600;
    font-family: var(--font-display);
}

.matchup-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

/* ─── Pitcher Sections ────────────────────────────────────────────────────── */

.matchup-pitchers {
    display: flex;
    flex-direction: column;
}

.matchup-pitcher-section {
    border-bottom: 1px solid var(--border);
}

.matchup-pitcher-section:last-child {
    border-bottom: none;
}

.matchup-pitcher {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.matchup-pitcher:hover {
    background-color: var(--bg-tertiary);
}

.matchup-pitcher:active {
    background-color: var(--bg-secondary);
}

.matchup-pitcher-tbd {
    cursor: default;
    opacity: 0.6;
}

.matchup-pitcher-tbd:hover {
    background-color: transparent;
}

.matchup-pitcher-info {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.matchup-pitcher-name {
    font-weight: 600;
    font-family: var(--font-display);
    font-size: 0.95rem;
}

.matchup-pitcher-team {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.matchup-pitcher-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ─── Stat Pills ──────────────────────────────────────────────────────────── */

.stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 0.25rem 0.5rem;
    min-width: 50px;
}

.stat-pill .stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.stat-pill .stat-value {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ─── Expansion ───────────────────────────────────────────────────────────── */

.matchup-expand-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
}

.matchup-expansion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.matchup-expansion.expanded {
    max-height: 2000px;
    overflow: visible;
}

.matchup-panel {
    padding: 0.75rem 1rem;
    border-top: 2px solid var(--accent);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.matchup-panel:hover {
    background-color: var(--bg-tertiary);
}

/* ─── Toggle Pills ────────────────────────────────────────────────────────── */

.matchup-toggle-pills {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.matchup-pill {
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 500;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.matchup-pill:hover {
    border-color: var(--accent);
}

.matchup-pill.active {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ─── Table ───────────────────────────────────────────────────────────────── */

.matchup-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
    font-weight: 600;
}

.matchup-data-table {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.matchup-data-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.matchup-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ─── Bench Toggle ────────────────────────────────────────────────────────── */

.matchup-bench-toggle {
    display: block;
    width: 100%;
    padding: 0.4rem;
    background: none;
    border: none;
    border-top: 1px dashed var(--accent);
    color: var(--accent);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 500;
    text-align: center;
}

.matchup-bench-toggle:hover {
    text-decoration: underline;
}

.matchup-bench-container {
    border-top: 1px solid var(--border);
}

/* ─── Aggregate & States ──────────────────────────────────────────────────── */

.matchup-team-agg {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    text-align: center;
}

.matchup-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.matchup-error {
    padding: 1rem;
    text-align: center;
    color: var(--red);
    font-size: 0.85rem;
}

/* ─── Date Nav ────────────────────────────────────────────────────────────── */

.date-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.date-input {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 0.85rem;
    background: var(--surface);
}

/* ==========================================================================
   Collapsible Sections
   ========================================================================== */

.collapse-chevron {
    transition: transform 0.2s ease;
}
.card.collapsed .collapse-chevron {
    transform: rotate(-90deg);
}
.card.collapsed .collapsible-body {
    display: none;
}

/* ==========================================================================
   Schedule Date Navigation
   ========================================================================== */

.schedule-date-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.schedule-date-input {
    font-family: var(--mono);
    font-size: 0.875rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ==========================================================================
   Game Breakdown — Player Cards
   ========================================================================== */

.gb-team-group {
    margin-bottom: 2rem;
}

.gb-team-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.gb-player-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--bg-tertiary);
    margin-bottom: 0.5rem;
    transition: border-color 0.15s ease;
}

.gb-player-card:hover {
    border-color: var(--border-light);
}

.gb-player-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
}

.gb-player-photo {
    width: 40px;
    height: 40px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
}

.gb-player-info {
    flex: 1;
    min-width: 0;
}

.gb-player-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.gb-player-pos {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gb-player-markets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.gb-market-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--bg-secondary);
    font-size: 0.75rem;
    font-family: var(--mono);
    white-space: nowrap;
}

.gb-market-label {
    font-family: var(--body);
    font-weight: 500;
    color: var(--text-secondary);
}

.gb-market-line {
    font-weight: 600;
    color: var(--text-primary);
}

.gb-market-rate {
    font-weight: 600;
}

.gb-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gb-badge-tp {
    background-color: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(0, 163, 74, 0.25);
}

.gb-badge-tu {
    background-color: var(--red-soft);
    color: var(--accent);
    border: 1px solid rgba(217, 48, 37, 0.25);
}

.gb-expand-icon {
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.gb-player-card.expanded .gb-expand-icon {
    transform: rotate(90deg);
}

/* Expanded detail panel */
.gb-player-detail {
    display: none;
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border);
}

.gb-player-card.expanded .gb-player-detail {
    display: block;
}

.gb-detail-market {
    margin-bottom: 1.25rem;
}

.gb-detail-market:last-child {
    margin-bottom: 0;
}

.gb-detail-market-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin: 0.75rem 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gb-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.gb-summary-stat {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.gb-summary-label {
    color: var(--text-muted);
}

.gb-summary-value {
    font-family: var(--mono);
    font-weight: 600;
}

.gb-history-toggle {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.gb-history-toggle button {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
}

.gb-history-toggle button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.gb-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.gb-history-table th {
    text-align: left;
    padding: 0.35rem 0.5rem;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.gb-history-table th.col-num {
    text-align: right;
}

.gb-history-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--mono);
    white-space: nowrap;
}

.gb-history-table td.col-num {
    text-align: right;
}

/* Collapsible secondary sections */
.gb-collapsible {
    margin-bottom: 0.75rem;
}

.gb-collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--bg-tertiary);
}

.gb-collapsible-header:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

.gb-collapsible-body {
    display: none;
    padding: 1rem;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background-color: var(--bg-tertiary);
}

.gb-collapsible.open .gb-collapsible-body {
    display: block;
}

.gb-collapsible.open .gb-collapsible-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.gb-collapsible .gb-chevron {
    transition: transform 0.2s ease;
}

.gb-collapsible.open .gb-chevron {
    transform: rotate(90deg);
}

/* Market filter bar */
.gb-market-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}

.gb-market-filter .btn.active {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ==========================================================================
   Game Breakdown — Help Modal
   ========================================================================== */

.gb-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--text-muted);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: border-color 0.15s, color 0.15s;
}

.gb-help-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.gb-help-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.gb-help-overlay.open {
    display: flex;
}

.gb-help-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.gb-help-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.gb-help-title {
    font-family: var(--display);
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.gb-help-section {
    margin-bottom: 1rem;
}

.gb-help-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.gb-help-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* ─── Game Breakdown Mobile ──────────────────────────────────────────────── */

@media (max-width: 768px) {
    .gb-player-header {
        flex-wrap: wrap;
    }

    .gb-player-markets {
        width: 100%;
        margin-top: 0.5rem;
    }

    .gb-market-chip {
        font-size: 0.7rem;
    }

    .gb-summary-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .gb-history-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .gb-collapsible-header {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }
}

/* ─── Admin Bets (ab-) ─────────────────────────────────────────────────── */
.ab-filter-bar { margin: 1rem 0; }
.ab-filter-form select { padding: .4rem .6rem; font-family: var(--font-display); }
.ab-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin: 1rem 0 1.5rem; }
.ab-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 2px; padding: .75rem 1rem; }
.ab-stat-label { font-size: .75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.ab-stat-value { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; margin-top: .25rem; }
.ab-pos { color: var(--green); }
.ab-neg { color: var(--red); }
.ab-muted { color: var(--text-muted); }
.ab-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.ab-three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.ab-card { background: var(--surface); border: 1px solid var(--border); border-radius: 2px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.ab-card h2 { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 .5rem; }
.ab-card h3 { font-size: .9rem; margin: 0 0 .5rem; }
.ab-subtle { font-weight: normal; color: var(--text-muted); font-size: .75rem; }
.ab-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .85rem; }
.ab-table th, .ab-table td { text-align: left; padding: .3rem .5rem; border-bottom: 1px solid var(--border); }
.ab-table th { font-family: var(--font-display); font-weight: 600; color: var(--text-secondary); font-size: .75rem; text-transform: uppercase; }
.ab-streaks { list-style: none; padding: 0; margin: 0; font-family: var(--mono); }
.ab-streaks li { padding: .3rem 0; border-bottom: 1px dashed var(--border); }
.ab-parlay-table .ab-expand { background: transparent; border: 0; cursor: pointer; font-size: .9rem; }
.ab-legs { list-style: none; padding: .25rem 0 .5rem; margin: 0; font-family: var(--mono); font-size: .8rem; }
.ab-legs li { padding: .15rem 0; }
.ab-leg-icon { display: inline-block; width: 1.25rem; font-weight: 700; }
.upload-card { background: var(--surface); border: 1px solid var(--border); padding: 1rem; margin: 1rem 0; }
.upload-card label { font-weight: 600; margin-right: .5rem; }
.upload-card input[type=file] { margin-right: .5rem; }
.upload-card button { padding: .4rem 1rem; background: var(--accent); color: #fff; border: 0; cursor: pointer; font-family: var(--font-display); }
.flash { padding: .75rem 1rem; border-radius: 2px; margin: 1rem 0; }
.flash-success { background: var(--green-soft); border: 1px solid var(--green); color: var(--green); }
.flash-error { background: var(--red-soft); border: 1px solid var(--red); color: var(--red); }
.ab-help-btn { background: var(--accent); color: #fff; border: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: .85rem; cursor: pointer; vertical-align: middle; margin-left: .5rem; }
.ab-help-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; align-items: center; justify-content: center; }
.ab-help-overlay.open { display: flex; }
.ab-help-modal { background: var(--surface); max-width: 600px; max-height: 80vh; overflow-y: auto; padding: 2rem; position: relative; border-radius: 2px; }
.ab-help-close { position: absolute; top: .5rem; right: .75rem; background: transparent; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--text-secondary); }
.ab-help-title { font-family: var(--font-display); margin: 0 0 1rem; }
.ab-help-section { margin-bottom: 1rem; }
.ab-help-section h3 { font-size: .95rem; margin: 0 0 .25rem; }
.ab-help-section p { margin: 0; font-size: .9rem; line-height: 1.5; }
.empty-state { text-align: center; color: var(--text-muted); padding: 3rem; font-style: italic; }

/* ─── Pitcher Matchup Modal ───────────────────────────────────────────────── */

.matchup-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(20, 23, 28, 0.55);
    z-index: 1001;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 3vh 1rem;
    overflow-y: auto;
}

.matchup-modal-overlay.open {
    display: flex;
}

.matchup-modal {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    border-radius: var(--radius);
    width: 100%;
    max-width: 1100px;
    position: relative;
    padding: 1.5rem 1.5rem 1.25rem;
}

.matchup-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.matchup-modal-close:hover {
    color: var(--accent);
}

.matchup-modal-header {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.matchup-modal-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.matchup-modal-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.matchup-modal-title a {
    color: inherit;
    text-decoration: none;
}

.matchup-modal-title a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.matchup-modal-sub {
    font-size: 0.85rem;
}

.matchup-modal-opponent {
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

.matchup-modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

body.matchup-modal-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .matchup-modal {
        padding: 1rem;
    }
    .matchup-modal-title {
        font-size: 1.15rem;
    }
    .matchup-modal-body {
        max-height: 78vh;
    }
}

/* ─── Pitching Matchups Help Modal (pm-) ──────────────────────────────────── */

.pm-help-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong);
    background: transparent; font-family: var(--font-display);
    font-size: 0.8rem; font-weight: 700; color: var(--text-muted); cursor: pointer;
    vertical-align: middle; margin-left: 0.35rem; transition: all 0.15s;
    line-height: 1; padding: 0;
}
.pm-help-btn:hover { border-color: var(--text-primary); color: var(--text-primary); }

.pm-help-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    z-index: 1000; align-items: center; justify-content: center;
}
.pm-help-overlay.open { display: flex; }

.pm-help-modal {
    background: var(--surface); border-radius: 3px; max-width: 600px; width: 90%;
    max-height: 85vh; overflow-y: auto; padding: 2rem; position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.pm-help-close {
    position: absolute; top: 0.75rem; right: 1rem; background: none;
    border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer;
    line-height: 1; padding: 0;
}
.pm-help-close:hover { color: var(--text-primary); }

.pm-help-title {
    font-family: var(--font-display); font-size: 1.2rem;
    font-weight: 700; margin: 0 0 1.25rem 0; color: var(--text-primary);
}

.pm-help-section { margin-bottom: 1.25rem; }
.pm-help-section h3 {
    font-family: var(--font-display); font-size: 0.85rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--accent); margin: 0 0 0.4rem 0;
}
.pm-help-section p, .pm-help-section li {
    font-size: 0.85rem; line-height: 1.6; color: var(--text-secondary); margin: 0 0 0.4rem 0;
}
.pm-help-section ul { margin: 0; padding-left: 1.25rem; }

@media (max-width: 768px) {
    .pm-help-modal { padding: 1.25rem; }
}


/* ─── MLB overrides ──────────────────────────────────────────────────────── */

/* Four footer columns (Quick Links / Models / Database Stats / Developer). */
.sf2-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .sf2-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .sf2-grid { grid-template-columns: 1fr; } }
.sf2-deploy { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.75rem; color: var(--text-secondary); }

/* Scoreboard strip: local MLB logos are square PNGs, not ESPN 500px art. */
.sb-logo { width: 22px; height: 22px; object-fit: contain; }

/* Text badge fallback used by teamLogo() when a logo file is missing. */
.team-abbr-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: var(--radius); background: var(--surface-3); color: var(--text-secondary); font-size: 0.7rem; font-weight: 700; }
