/* ==========================================================================
   NBA Live Betting Tool — Light Grey + Purple (Discord-inspired)
   ========================================================================== */

:root {
    /* Core purple palette */
    --purple-100: #f3f0ff;
    --purple-200: #e5deff;
    --purple-300: #c4b5fd;
    --purple-400: #a78bfa;
    --purple-500: #7c5cfc;
    --purple-600: #5b46e0;
    --purple-700: #4338ca;

    /* Grey palette (light theme) */
    --grey-50:  #fafafa;
    --grey-100: #f4f4f5;
    --grey-150: #ededef;
    --grey-200: #e4e4e7;
    --grey-300: #d4d4d8;
    --grey-400: #a1a1aa;
    --grey-500: #71717a;
    --grey-600: #52525b;
    --grey-700: #3f3f46;
    --grey-800: #27272a;
    --grey-900: #18181b;

    /* Semantic */
    --bg-primary:   #f2f3f5;
    --bg-secondary: #ffffff;
    --bg-tertiary:  #e3e5e8;
    --bg-sidebar:   #f2f3f5;
    --bg-card:      #ffffff;
    --bg-hover:     #ebedef;

    --text-primary:   #2e3338;
    --text-secondary: #6d6f78;
    --text-muted:     #96989d;

    --border-color: #e3e5e8;
    --border-subtle: #ebedef;

    --accent:       var(--purple-500);
    --accent-hover: var(--purple-600);
    --accent-soft:  var(--purple-100);
    --accent-text:  var(--purple-700);

    --success: #23a559;
    --warning: #f0b232;
    --danger:  #da373c;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --sidebar-width: 240px;
    --topbar-height: 56px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

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

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input {
    font-family: inherit;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    z-index: 100;
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.brand-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 0.928rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.nav-item.active svg {
    stroke: var(--accent);
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.857rem;
    color: var(--text-secondary);
}

.toggle-label input {
    display: none;
}

.toggle-switch {
    width: 36px;
    height: 20px;
    background: var(--grey-300);
    border-radius: 10px;
    position: relative;
    transition: background 0.2s ease;
}

.toggle-switch::after {
    content: '';
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.toggle-label input:checked + .toggle-switch {
    background: var(--accent);
}

.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(16px);
}

.refresh-timer {
    font-size: 0.786rem;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    display: none;
    color: var(--text-secondary);
    padding: 4px;
}

.page-title {
    font-size: 1.071rem;
    font-weight: 700;
    color: var(--text-primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.786rem;
    font-weight: 700;
    color: var(--danger);
    letter-spacing: 0.04em;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.last-updated {
    font-size: 0.786rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Views
   ========================================================================== */

.view {
    display: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
}

.view.active {
    display: block;
}

/* ==========================================================================
   Games Grid (Scoreboard)
   ========================================================================== */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    border-color: var(--purple-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.game-card.is-halftime {
    border-left: 4px solid var(--accent);
}

.game-card-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.game-status-badge {
    font-size: 0.714rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-live {
    background: #fde8e8;
    color: var(--danger);
}

.badge-halftime {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.badge-final {
    background: var(--grey-150);
    color: var(--text-muted);
}

.badge-upcoming {
    background: #e8f5e9;
    color: #2e7d32;
}

.game-clock {
    font-size: 0.786rem;
    color: var(--text-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.game-teams {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: var(--grey-100);
}

.team-name {
    font-weight: 600;
    font-size: 0.928rem;
}

.team-abbr {
    color: var(--text-muted);
    font-size: 0.786rem;
    font-weight: 500;
    margin-left: 4px;
}

.team-score {
    font-size: 1.286rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.game-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.card-action-btn {
    flex: 1;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.786rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--grey-100);
    color: var(--text-secondary);
    transition: all 0.15s ease;
    text-align: center;
}

.card-action-btn:hover {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.game-card-context {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.game-card-context-loading {
    font-size: 0.786rem;
    color: var(--text-muted);
}

.game-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.game-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.714rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 3px 8px;
    background: var(--grey-100);
    color: var(--text-secondary);
}

.game-chip.pace-fast {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.game-chip.pace-neutral {
    background: var(--grey-100);
    color: var(--text-secondary);
}

.game-chip.pace-slow {
    background: var(--bg-primary);
    color: var(--text-muted);
}

.game-chip.move-up {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.game-chip.move-down {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.game-chip.move-flat {
    background: var(--grey-100);
    color: var(--text-muted);
}

.game-card-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    word-break: break-word;
}

.game-card-pace-tracker {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dotted var(--border-subtle);
}

.pace-tracker-header {
    font-size: 0.714rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.pace-tracker-empty {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pace-tracker-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pace-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pace-row-main {
    font-size: 0.714rem;
    color: var(--text-secondary);
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
}

.pace-pill {
    font-size: 0.643rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9999px;
}

.pace-pill.pace-over {
    background: var(--success);
    color: var(--bg-secondary);
}

.pace-pill.pace-under {
    background: var(--danger);
    color: var(--bg-secondary);
}

.pace-pill.pace-push {
    background: var(--warning);
    color: var(--text-primary);
}

.model-badge {
    font-weight: 700;
    color: var(--accent-text);
}

.model-badge.locked {
    color: var(--text-muted);
}

.model-badge.muted {
    color: var(--text-muted);
}

/* ==========================================================================
   Box Score Tables
   ========================================================================== */

.boxscore-header {
    margin-bottom: 16px;
}

.boxscore-game-title {
    font-size: 1.143rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.boxscore-game-meta {
    font-size: 0.857rem;
    color: var(--text-muted);
}

.boxscore-team-section {
    margin-bottom: 24px;
}

.boxscore-team-heading {
    font-size: 0.928rem;
    font-weight: 700;
    color: var(--accent-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.boxscore-team-heading .team-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.stats-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.857rem;
    white-space: nowrap;
}

.stats-table th {
    background: var(--grey-100);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.714rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.stats-table th:first-child {
    text-align: left;
    min-width: 140px;
}

.stats-table td {
    padding: 8px 12px;
    text-align: right;
    border-bottom: 1px solid var(--border-subtle);
    font-variant-numeric: tabular-nums;
}

.stats-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-table tr:hover {
    background: var(--bg-hover);
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stat-highlight {
    color: var(--accent);
    font-weight: 700;
}

.stat-leader {
    background: var(--accent-soft);
    color: var(--accent-text);
    font-weight: 700;
}

/* ==========================================================================
   Player Props
   ========================================================================== */

.player-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap svg {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input-wrap input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.928rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s ease;
}

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

.search-input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--purple-100);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.928rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary:active {
    transform: scale(0.97);
}

/* Player Card */
.player-profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 20px;
}

.player-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--purple-100), var(--grey-100));
    border-bottom: 1px solid var(--border-color);
}

.player-headshot {
    width: 72px;
    height: 52px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--grey-200);
}

.player-profile-info h2 {
    font-size: 1.286rem;
    font-weight: 800;
    color: var(--text-primary);
}

.player-profile-info p {
    font-size: 0.857rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.player-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px 24px;
}

.stat-block {
    background: var(--grey-50);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
}

.stat-block-title {
    font-size: 0.714rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.stat-label {
    font-size: 0.857rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 0.928rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

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

/* Splits insight card */
.splits-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}

.splits-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.splits-insight {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent);
}

.splits-insight-number {
    font-size: 1.714rem;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.splits-insight-text {
    font-size: 0.857rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.splits-insight-text strong {
    color: var(--text-primary);
}

/* ==========================================================================
   Foul Trouble
   ========================================================================== */

.fouls-team-section {
    margin-bottom: 20px;
}

.fouls-team-heading {
    font-size: 0.928rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.foul-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.786rem;
    font-weight: 700;
}

.foul-badge.safe {
    background: #e8f5e9;
    color: #2e7d32;
}

.foul-badge.warning {
    background: #fff8e1;
    color: #f57f17;
}

.foul-badge.danger {
    background: #fde8e8;
    color: var(--danger);
}

.foul-trouble-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.714rem;
    font-weight: 700;
    background: #fde8e8;
    color: var(--danger);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state.compact {
    padding: 24px 16px;
}

.empty-icon {
    color: var(--grey-300);
    margin-bottom: 16px;
}

.empty-title {
    font-size: 1.071rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.empty-sub {
    font-size: 0.857rem;
    color: var(--text-muted);
    max-width: 320px;
}

.select-game-hint {
    font-size: 0.928rem;
    color: var(--text-muted);
    text-align: center;
    padding: 60px 0;
}

/* Spinner */
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--grey-200);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-top: 16px;
}

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

/* ==========================================================================
   Toast
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    font-size: 0.857rem;
    color: var(--text-primary);
    min-width: 260px;
    max-width: 380px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.25s ease;
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.info {
    border-left: 4px solid var(--accent);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   Scrollbar
   ========================================================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--grey-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--grey-400);
}

/* ==========================================================================
   No Games State
   ========================================================================== */

.no-games-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.no-games-state .empty-icon {
    color: var(--grey-300);
    margin-bottom: 16px;
}

/* ==========================================================================
   Schedule View
   ========================================================================== */

.schedule-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.schedule-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-toggle {
    background: var(--grey-100);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.857rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.btn-toggle:hover {
    background: var(--grey-200);
    color: var(--text-primary);
}

.btn-toggle.active {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.live-nav-dot {
    width: 8px;
    height: 8px;
    background: #e53e3e;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.schedule-heading {
    font-size: 1.071rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-secondary {
    background: var(--grey-100);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.857rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

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

.schedule-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 12px;
    align-items: center;
    transition: all 0.15s ease;
}

.schedule-row:hover {
    border-color: var(--purple-300);
    box-shadow: var(--shadow-sm);
}

.sched-status {
    font-size: 0.786rem;
    font-weight: 700;
    text-align: center;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.sched-live {
    background: #fde8e8;
    color: var(--danger);
}

.sched-final {
    background: var(--grey-150);
    color: var(--text-muted);
}

.sched-upcoming {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.714rem;
}

.sched-matchup {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sched-team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.sched-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.sched-team-name {
    font-weight: 600;
    font-size: 0.857rem;
    color: var(--text-primary);
}

.sched-record {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.sched-score {
    font-size: 1.143rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    margin-left: auto;
    padding-left: 8px;
}

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

.sched-vs {
    color: var(--text-muted);
    font-size: 0.786rem;
    font-weight: 600;
    flex-shrink: 0;
}

.sched-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
}

.sched-arena {
    font-size: 0.786rem;
    color: var(--text-muted);
}

.sched-broadcast {
    font-size: 0.714rem;
    color: var(--accent);
    font-weight: 600;
}

.sched-actions {
    display: flex;
    gap: 6px;
}

/* ==========================================================================
   Onboarding Panel
   ========================================================================== */

.onboarding-host {
    position: fixed;
    right: 16px;
    bottom: 72px;
    width: min(360px, calc(100vw - 32px));
    z-index: 1200;
}

.onboarding-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-lg);
}

.onboard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.onboard-kicker {
    font-size: 0.714rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.onboard-progress {
    font-size: 0.714rem;
    color: var(--text-muted);
    font-weight: 700;
}

.onboard-title {
    font-size: 0.929rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.onboard-copy {
    font-size: 0.786rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 10px;
}

.onboard-field {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.onboard-input {
    width: 100%;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    margin-bottom: 8px;
    font-size: 0.857rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.onboard-pill-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.onboard-pill {
    min-height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0 11px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    font-weight: 600;
}

.onboard-pill.active {
    background: var(--accent-soft);
    border-color: var(--purple-300);
    color: var(--accent-text);
}

.onboard-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.onboard-actions,
.onboard-cta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.onboard-cta,
.onboard-ghost {
    min-height: 36px;
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-size: 0.786rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.onboard-cta {
    background: var(--accent);
    color: #fff;
}

.onboard-ghost {
    background: var(--grey-100);
    color: var(--text-secondary);
}

.onboarding-resume {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 1199;
    min-height: 36px;
    border-radius: 999px;
    padding: 0 12px;
    background: var(--accent);
    color: #fff;
    font-size: 0.786rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Live Box Score View
   ========================================================================== */

.livebox-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.livebox-refresh-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.livebox-update-label {
    font-size: 0.786rem;
    color: var(--text-muted);
}

.livebox-game-status {
    text-align: center;
    margin-bottom: 16px;
}

.livebox-status-text {
    font-size: 1.071rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--grey-100);
    padding: 6px 16px;
    border-radius: 9999px;
    display: inline-block;
}

.livebox-teams-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.livebox-team-block {
    min-width: 0;
}

.livebox-team-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: var(--grey-100);
    border-radius: var(--radius-md);
}

.livebox-team-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    flex: 1;
}

.livebox-team-score {
    font-size: 1.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
}

.livebox-table td, .livebox-table th {
    padding: 6px 8px;
    font-size: 0.8rem;
}

.livebox-player-name {
    display: flex !important;
    align-items: center;
    gap: 6px;
    text-align: left !important;
}

tr.on-court {
    background: rgba(124, 92, 252, 0.05);
}

tr.starter-row td {
    border-top: 1px solid var(--border-color);
}

.oncourt-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
}

.starter-tag {
    font-size: 0.643rem;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent-text);
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.pm-pos {
    color: var(--success);
    font-weight: 700;
}

.pm-neg {
    color: var(--danger);
    font-weight: 700;
}

/* ==========================================================================
   Player Props — Tabs
   ========================================================================== */

.props-tabs {
    display: flex;
    gap: 2px;
    padding: 10px 16px 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.props-tab {
    padding: 8px 16px;
    font-size: 0.857rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.props-tab:hover {
    color: var(--text-primary);
    background: var(--grey-100);
}

.props-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--bg-card);
}

.props-pane {
    display: none;
    padding: 0 0 4px;
}

.props-pane.active {
    display: block;
}

/* vs Team search input */
.vs-team-wrap {
    max-width: 200px;
}

/* ==========================================================================
   Shot Chart
   ========================================================================== */

.shotchart-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px 8px;
    flex-wrap: wrap;
}

.shotchart-mode-label {
    font-size: 0.786rem;
    font-weight: 600;
    color: var(--text-muted);
}

.shotchart-mode-btns {
    display: flex;
    gap: 4px;
}

.shotchart-mode-btn {
    padding: 5px 12px;
    font-size: 0.786rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--grey-100);
    color: var(--text-secondary);
    transition: all 0.15s ease;
    cursor: pointer;
}

.shotchart-mode-btn:hover:not(:disabled) {
    background: var(--grey-200);
    color: var(--text-primary);
}

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

.shotchart-mode-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.shotchart-wrap {
    padding: 0 20px;
}

.shotchart-header-info {
    display: flex;
    gap: 16px;
    padding: 8px 0 6px;
    align-items: center;
}

.shotchart-stat {
    font-size: 0.857rem;
    font-weight: 700;
    color: var(--text-primary);
}

.shotchart-stat.accent {
    color: var(--accent);
}

.shotchart-stat.muted {
    color: var(--text-muted);
    font-weight: 400;
}

.shotchart-svg {
    width: 100%;
    max-width: 540px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: block;
}

.shotchart-legend {
    display: flex;
    gap: 16px;
    padding: 8px 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.786rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.make {
    background: #23a559;
}

.legend-dot.miss {
    background: transparent;
    border: 1.5px solid #da373c;
}

/* Zone summary */
.shotchart-zone-summary {
    padding: 8px 20px 16px;
}

.zone-summary-title {
    font-size: 0.714rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.zone-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
}

.zone-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--grey-50);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.zone-name {
    flex: 1;
    font-size: 0.786rem;
    color: var(--text-secondary);
}

.zone-fga {
    font-size: 0.786rem;
    color: var(--text-muted);
}

.zone-pct {
    font-size: 0.786rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   vs Team Pane
   ========================================================================== */

.vsteam-content {
    padding: 16px 20px;
}

.vsteam-header {
    margin-bottom: 12px;
}

.vsteam-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.vsteam-meta {
    font-size: 0.786rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-toggle {
        display: block;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        padding: 0 16px;
    }

    .view {
        padding: 16px;
    }

    .player-stats-grid {
        grid-template-columns: 1fr;
    }

    .schedule-row {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto auto;
    }

    .sched-meta {
        display: none;
    }

    .sched-actions {
        grid-column: 1 / -1;
    }

    .livebox-teams-grid {
        grid-template-columns: 1fr;
    }

    .player-search-bar {
        flex-wrap: wrap;
    }

    .vs-team-wrap {
        max-width: 100%;
        flex: 1;
    }

    .shotchart-toolbar {
        gap: 6px;
    }

    .zone-rows {
        grid-template-columns: 1fr;
    }

    .sched-matchup {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .sched-vs {
        display: none;
    }
}

@media (max-width: 640px) {
    .game-card {
        padding: 14px;
    }
    .team-logo {
        width: 28px;
        height: 28px;
    }
    .team-score {
        font-size: 1.143rem;
    }
    .pace-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
    .pace-pill {
        align-self: flex-start;
    }
    .livebox-table td,
    .livebox-table th {
        padding: 8px 7px;
        font-size: 0.786rem;
    }
    .stats-table th:first-child {
        min-width: 124px;
    }
    .bb-history-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
    .onboarding-host {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 64px;
    }
    .onboarding-resume {
        right: 12px;
        bottom: 12px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 0 12px;
    }
    .top-bar-right {
        gap: 8px;
    }
    .last-updated {
        display: none;
    }
    .view {
        padding: 12px;
    }
    .game-card-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .game-card-actions {
        flex-direction: column;
    }
    .card-action-btn {
        width: 100%;
    }
    .livebox-team-header {
        padding: 7px 10px;
    }
    .livebox-team-score {
        font-size: 1.286rem;
    }
    .stats-table th,
    .stats-table td {
        padding: 7px 8px;
        font-size: 0.786rem;
    }
    .onboard-actions,
    .onboard-cta-row {
        flex-direction: column;
        align-items: stretch;
    }
    .onboard-cta,
    .onboard-ghost {
        width: 100%;
    }
}

/* ==========================================================================
   bettingByte — Tier / Gating / Upgrade Modal
   ========================================================================== */

/* Plan badge in top-bar */
.bb-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 0.786rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--purple-200);
    transition: background 0.15s;
    white-space: nowrap;
}
.bb-plan-badge:hover { background: var(--purple-200); }
.bb-plan-badge[data-tier="pro"]   { background: var(--purple-200); }
.bb-plan-badge[data-tier="elite"] { background: var(--purple-300); color: var(--purple-700); }

/* Gated container */
.bb-gated {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}
.bb-gated > *:not(.bb-gate-overlay) {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

/* Lock overlay */
.bb-gate-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.82);
    border-radius: var(--radius-md);
    z-index: 10;
}
.bb-gate-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
}
.bb-gate-inner svg { color: var(--accent); }
.bb-gate-msg {
    font-size: 0.857rem;
    color: var(--text-secondary);
    max-width: 220px;
    line-height: 1.4;
}
.bb-gate-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 18px;
    font-size: 0.857rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.15s;
}
.bb-gate-btn:hover { background: var(--accent-hover); }

/* Upgrade modal overlay */
#bb-upgrade-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    transition: opacity 0.2s ease;
}
#bb-upgrade-overlay.bb-overlay-visible { opacity: 1; }

.bb-modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 36px 32px 28px;
    max-width: 420px;
    width: calc(100% - 40px);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: bb-modal-in 0.2s ease;
}
@keyframes bb-modal-in {
    from { transform: translateY(10px) scale(0.98); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.bb-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}
.bb-modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.bb-modal-tier-badge {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent-text);
    border: 1px solid var(--purple-200);
    border-radius: var(--radius-sm);
    font-size: 0.714rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px;
    width: fit-content;
}
.bb-modal-headline {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}
.bb-modal-context {
    font-size: 0.857rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.bb-modal-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bb-modal-bullets li {
    font-size: 0.857rem;
    color: var(--text-secondary);
    padding-left: 18px;
    position: relative;
    line-height: 1.4;
}
.bb-modal-bullets li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}
.bb-modal-price {
    font-size: 0.857rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
}
.bb-modal-cta {
    display: block;
    background: var(--accent);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.929rem;
    padding: 10px 0;
    border-radius: var(--radius-md);
    transition: background 0.15s;
}
.bb-modal-cta:hover { background: var(--accent-hover); }
.bb-modal-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Analytics Page */
.analytics-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 641px) { .analytics-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1025px) { .analytics-grid { grid-template-columns: repeat(3, 1fr); } }

/* Section blocks (match existing .section-block pattern) */
.analytics-section { margin-bottom: 32px; }
.analytics-section-title { font-size: 0.857rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-bottom: 12px; }

/* Movement table */
.movement-table { width: 100%; border-collapse: collapse; }
.movement-table th { background: var(--grey-100); font-size: 0.786rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 12px; text-align: left; }
.movement-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-color); font-size: 0.857rem; }
.movement-table tr:hover td { background: var(--bg-hover); }

/* Market tabs */
.market-tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; }
.market-tab { padding: 6px 14px; border-radius: var(--radius-sm); font-size: 0.857rem; font-weight: 500; cursor: pointer; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-secondary); }
.market-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Direction badges */
.badge-steam-up { background: var(--accent-soft); color: var(--success); padding: 2px 8px; border-radius: 999px; font-size: 0.786rem; font-weight: 600; }
.badge-steam-down { background: var(--accent-soft); color: var(--danger); padding: 2px 8px; border-radius: 999px; font-size: 0.786rem; font-weight: 600; }
.badge-flat { background: var(--grey-100); color: var(--text-muted); padding: 2px 8px; border-radius: 999px; font-size: 0.786rem; }
.badge-sharp { background: var(--bg-tertiary); color: var(--text-secondary); padding: 2px 8px; border-radius: 999px; font-size: 0.786rem; font-weight: 600; }

/* Referee cards */
.referee-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.referee-card { flex: 1; min-width: 180px; padding: 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.referee-name { font-weight: 600; font-size: 0.929rem; margin-bottom: 6px; }
.referee-stat { font-size: 0.857rem; color: var(--text-secondary); margin-bottom: 4px; }
.badge-whistle-heavy { background: var(--accent-soft); color: var(--danger); padding: 2px 8px; border-radius: 999px; font-size: 0.786rem; font-weight: 600; }
.badge-let-play { background: var(--accent-soft); color: var(--success); padding: 2px 8px; border-radius: 999px; font-size: 0.786rem; font-weight: 600; }
.badge-avg-ref { background: var(--grey-100); color: var(--text-secondary); padding: 2px 8px; border-radius: 999px; font-size: 0.786rem; }

/* Fatigue cards */
.fatigue-cards { display: flex; gap: 16px; flex-wrap: wrap; }
.fatigue-card { flex: 1; min-width: 200px; padding: 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.fatigue-index-value { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.fatigue-index-low { color: var(--success); }
.fatigue-index-mid { color: var(--warning); }
.fatigue-index-high { color: var(--danger); }
.fatigue-components { font-size: 0.786rem; color: var(--text-muted); margin-top: 8px; }
.fatigue-advantage { font-size: 0.857rem; font-weight: 600; margin-top: 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--grey-50); }

/* Model gap display */
.model-gap-display { padding: 20px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.model-gap-string { font-size: 1.143rem; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.model-edge-positive { color: var(--success); }
.model-edge-negative { color: var(--danger); }
.model-confidence-label { font-size: 0.857rem; color: var(--text-secondary); margin-bottom: 6px; }
.model-feature-inputs { margin-top: 16px; border-top: 1px solid var(--border-color); padding-top: 12px; }
.feature-inputs-toggle { font-size: 0.857rem; color: var(--accent); cursor: pointer; }
.feature-inputs-table { margin-top: 8px; font-size: 0.786rem; display: none; width: 100%; }
.feature-inputs-table td { padding: 4px 0; border-bottom: 1px solid var(--border-subtle); }
.feature-inputs-table.open { display: table; }

/* Fatigue badge (pregame inline) */
.fatigue-badge-row { font-size: 0.786rem; margin-top: 6px; color: var(--text-secondary); }
.fatigue-dot-green::before { content: "●"; color: var(--success); margin-right: 4px; }
.fatigue-dot-yellow::before { content: "●"; color: var(--warning); margin-right: 4px; }
.fatigue-dot-red::before { content: "●"; color: var(--danger); margin-right: 4px; }

/* Livebox model gap */
#livebox-model-gap { margin-top: 20px; border-top: 1px solid var(--border-color); padding-top: 20px; }

.referee-empty { padding: 20px 16px; color: var(--text-muted); font-size: 0.857rem; }
@media (max-width: 640px) {
  .fatigue-components { word-break: break-word; line-height: 1.6; }
}
.bb-gate-overlay { padding-top: 24px; }

/* Phase 8 nudges */
.bb-phase8-nudge {
  margin: 12px 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--purple-200);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
}
.bb-phase8-nudge-alert {
  border-color: var(--border-color);
  background: var(--bg-secondary);
}
.bb-phase8-nudge-title {
  font-size: 0.857rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.bb-phase8-nudge-copy {
  font-size: 0.786rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.bb-phase8-nudge-cta {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.786rem;
  font-weight: 600;
}
.bb-phase8-nudge-cta:hover { background: var(--accent-hover); }

/* Phase 8 account sections */
.bb-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bb-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.786rem;
  color: var(--text-secondary);
  word-break: break-word;
}
.bb-history-row:last-child { border-bottom: none; }
.bb-rules-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 8px;
  font-size: 0.786rem;
  color: var(--text-secondary);
}
