/* ============================================================
   DASHBOARD CARDS - Match Card Grid Layout
   ============================================================ */

/* Dashboard Shell Override */
body.dashboard-style-page .rb-page-shell {
    max-width: 1260px;
    margin: 40px auto;
    padding: 0 20px 60px;
}

/* ============================================================
   CONTROLS ROW: Date Picker + Filter Tabs
   ============================================================ */
/* ============================================================
   TERMINAL HEADER — above controls
   ============================================================ */
.dashboard-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--rb-border);
    background: transparent;
    border-radius: 0;
}

.match-filter-tabs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: var(--rb-text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: var(--rb-brand);
    border-bottom-color: var(--rb-brand);
    background: transparent;
}

.filter-tab.active {
    color: var(--rb-brand);
    border-bottom-color: var(--rb-brand);
    background: transparent;
    font-weight: 500;
}

.filter-tab .tab-count {
    display: inline-block;
    margin-left: 5px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--rb-text-tertiary);
    min-width: 16px;
    text-align: center;
}

.filter-tab.active .tab-count {
    color: var(--rb-brand);
}

/* ============================================================
   LEAGUE SECTION HEADER
   ============================================================ */
.league-section {
    margin-bottom: 1px;
    background: var(--rb-border);
}

.league-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    margin-bottom: 1px;
    background: var(--rb-bg-surface);
    border: none;
    border-radius: 0;
    border-left: 2px solid var(--rb-accent-magenta);
}

.league-section-header .league-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.8;
}

.league-section-header .league-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--rb-text-primary);
    flex: 1;
    text-transform: uppercase;
}

.league-section-header .league-country {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--rb-text-tertiary);
    margin-left: -4px;
    text-transform: uppercase;
}

.league-section-header .match-count-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    background: transparent;
    color: var(--rb-text-tertiary);
    padding: 0;
    border-radius: 0;
    min-width: 24px;
    text-align: center;
}

.league-section-header .league-rank {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    background: transparent;
    color: #ffd700;
    padding: 0;
}

.league-section-header .league-accuracy {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    background: transparent;
    color: var(--rb-accent-green);
    padding: 0;
}

/* ============================================================
   MATCH CARDS GRID — Quantum data rows
   ============================================================ */
.match-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--rb-border);
}

/* ============================================================
   INDIVIDUAL MATCH CARD — Clean quant-row style
   ============================================================ */
.match-card {
    position: relative;
    background: var(--rb-bg-surface);
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: background 0.2s ease;
    cursor: pointer;
}

.match-card:hover {
    background: var(--rb-bg-elevated);
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.match-card.live {
    border-left: 2px solid var(--rb-accent-magenta);
}

.match-card.live:hover {
    border-color: var(--rb-accent-magenta);
    box-shadow: none;
}

.match-card.finished {
    opacity: 0.75;
}

.match-card.finished:hover {
    opacity: 1;
}

/* ============================================================
   NEW CARD LAYOUT - Claude Design Style (wide row cards)
   ============================================================ */

/* Team crest */
.fc-team-crest {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--rb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.fc-team-crest img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.fc-team-crest-fb {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--rb-brand);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card top section - teams row */
.fc-card-top {
    padding: 16px 24px;
}

.fc-card-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fc-card-team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.fc-card-team.away {
    flex-direction: row-reverse;
    text-align: right;
}

.fc-card-team-info {
    min-width: 0;
}

.fc-card-team-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--rb-text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Center column (time / score) */
.fc-card-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 80px;
    /* The venue was allowed to grow to 140px inside an 80px column with nowrap, so a
       long ground name ("Nordic Wellness Arena", "Vare Areena") overflowed the column
       and ran across the status badge and score. Cap the column and clip inside it. */
    max-width: 150px;
    overflow: hidden;
}

.fc-card-time {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--rb-text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.fc-card-score {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rb-text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.fc-card-venue {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--rb-text-tertiary);
    text-align: center;
    /* Shrink to the column instead of dictating its width. */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Card bottom section - odds + prediction */
.fc-card-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px 14px;
    border-top: 1px solid var(--rb-border);
}

.fc-card-odds {
    flex-shrink: 0;
}

.fc-card-odds .odds-row {
    display: flex;
    gap: 6px;
    grid-template-columns: none;
}

.fc-card-odds .odds-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: 1px solid var(--rb-border);
    border-radius: 0;
    padding: 6px 12px;
    min-width: 56px;
    transition: all 0.2s ease;
}

.fc-card-odds .odds-item.selected,
.fc-card-odds .odds-item.highlighted {
    border-color: var(--rb-brand);
    color: var(--rb-brand);
    background: rgba(0, 240, 255, 0.03);
}

.fc-card-odds .odds-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--rb-text-tertiary);
    font-weight: 400;
}

.fc-card-odds .odds-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--rb-text-primary);
    font-variant-numeric: tabular-nums;
}

.fc-card-odds .odds-item.selected .odds-value,
.fc-card-odds .odds-item.highlighted .odds-value {
    color: var(--rb-brand);
}

.fc-card-prediction {
    flex: 1;
    min-width: 0;
}

/* Override old match-card-prediction/match-card-odds styles when inside new layout */
.fc-card-bottom .match-card-prediction {
    padding: 0;
    border-top: none;
    min-height: auto;
    background: none;
}

.fc-card-bottom .match-card-odds {
    padding: 0;
    border-top: none;
    background: none;
}

.fc-card-bottom .match-card-prediction .prediction-result {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.fc-card-bottom .match-card-prediction .prediction-label {
    font-size: 9px;
    display: none;
}

.fc-card-bottom .match-card-prediction .prediction-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.fc-card-prediction .prediction-result {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fc-card-prediction .prediction-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rb-text-tertiary);
    font-weight: 400;
}

.fc-card-prediction .prediction-outcome {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--rb-text-primary);
}

.fc-card-prediction .confidence-bar-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fc-card-prediction .confidence-bar-track {
    flex: 1;
    height: 2px;
    background: var(--rb-border);
    border-radius: 0;
    overflow: hidden;
}

.fc-card-prediction .confidence-bar-fill {
    height: 100%;
    border-radius: 0;
    transition: width 0.6s ease;
}

.fc-card-prediction .confidence-bar-fill.high {
    background: var(--rb-accent-green, #00ff66);
}

.fc-card-prediction .confidence-bar-fill.medium {
    background: var(--rb-warning, #f59e0b);
}

.fc-card-prediction .confidence-bar-fill.low {
    background: var(--rb-accent-magenta, #ff007a);
}

.fc-card-prediction .confidence-text {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: right;
}

/* Legacy card header hidden - replaced by fc-card-top */
.match-card-header {
    display: none;
}

.match-time-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--rb-text-secondary);
    font-variant-numeric: tabular-nums;
}

.match-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 0;
    border: 1px solid var(--rb-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-status-badge.status-ns {
    background: transparent;
    border-color: var(--rb-border);
    color: var(--rb-text-tertiary);
}

.match-status-badge.status-live {
    background: transparent;
    border-color: var(--rb-accent-magenta);
    color: var(--rb-accent-magenta);
}

.match-status-badge.status-ht {
    background: transparent;
    border-color: #f59e0b;
    color: #f59e0b;
}

.match-status-badge.status-ft {
    background: transparent;
    border-color: var(--rb-accent-green);
    color: var(--rb-accent-green);
}

.match-status-badge.status-pst {
    background: transparent;
    border-color: #f59e0b;
    color: #f59e0b;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 0;
    background: var(--rb-accent-magenta);
    animation: livePulse 1.5s ease-in-out infinite;
}

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

/* ============================================================
   CARD BODY - Legacy (hidden, new cards use fc-card-top)
   ============================================================ */
.match-card-body {
    display: none;
}

/* But if fc-card-top exists, card body stays hidden */
.fc-card-top ~ .match-card-body {
    display: none;
}

.team-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.team-row .team-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 0;
    flex-shrink: 0;
}

.team-row .team-logo-fallback {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.06);
    border-radius: 0;
    border: 1px solid var(--rb-border);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--rb-brand);
    flex-shrink: 0;
}

.team-row .team-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-row .team-score {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    min-width: 24px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.team-row .team-score:empty {
    display: none;
}

.match-vs-divider {
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    padding: 2px 0;
    letter-spacing: 1px;
}

/* ============================================================
   CARD PREDICTION SECTION
   ============================================================ */
.match-card-prediction {
    flex: 1;
    min-width: 0;
}

.match-card-prediction .prediction-result {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.match-card-prediction .prediction-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rb-text-secondary);
    font-weight: 500;
}

.match-card-prediction .prediction-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.match-card-prediction .prediction-outcome {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.match-card-prediction .confidence-bar-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-card-prediction .confidence-bar-track {
    flex: 1;
    height: 2px;
    background: var(--rb-border);
    border-radius: 0;
    overflow: hidden;
}

.match-card-prediction .confidence-bar-fill {
    height: 100%;
    border-radius: 0;
    transition: width 0.6s ease;
}

.match-card-prediction .confidence-bar-fill.high {
    background: var(--rb-accent-green, #00ff66);
}

.match-card-prediction .confidence-bar-fill.medium {
    background: var(--rb-warning, #f59e0b);
}

.match-card-prediction .confidence-bar-fill.low {
    background: var(--rb-accent-magenta, #ff007a);
}

.match-card-prediction .confidence-text {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: right;
}

.match-card-prediction .confidence-text.high { color: #10b981; }
.match-card-prediction .confidence-text.medium { color: #f59e0b; }
.match-card-prediction .confidence-text.low { color: #ef4444; }

.match-card-prediction .prediction-placeholder {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-card-prediction .prediction-loading {
    font-size: 12px;
    color: var(--rb-text-secondary);
}

.match-card-prediction .no-prediction {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.match-card-prediction .prediction-text {
    font-size: 12px;
}

/* Locked prediction card styling */
.match-card-prediction .prediction-result.locked-preview {
    opacity: 0.7;
}

.match-card-prediction .prediction-lock-shell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-card-prediction .prediction-lock-bars {
    display: flex;
    gap: 3px;
}

.match-card-prediction .prediction-lock-bars .bar {
    display: block;
    height: 2px;
    border-radius: 0;
    background: var(--rb-border);
}

.match-card-prediction .prediction-lock-bars .bar-short { width: 24px; }
.match-card-prediction .prediction-lock-bars .bar-medium { width: 40px; }

.match-card-prediction .prediction-lock-copy {
    display: flex;
    align-items: center;
    gap: 6px;
}

.match-card-prediction .prediction-lock-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    background: transparent;
    color: #f59e0b;
    padding: 2px 6px;
    border-radius: 0;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.match-card-prediction .prediction-lock-text {
    font-size: 11px;
    color: var(--rb-text-secondary);
}

/* ============================================================
   CARD FOOTER (Odds)
   ============================================================ */
.match-card-odds {
    padding: 10px 16px 12px;
    border-top: 1px solid var(--rb-border);
    background: transparent;
}

.odds-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.odds-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: transparent;
    border-radius: 0;
    border: 1px solid var(--rb-border);
    transition: all 0.2s ease;
}

.odds-item:hover {
    background: transparent;
    border-color: var(--rb-brand);
}

.odds-item .odds-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 400;
    color: var(--rb-text-tertiary);
    text-transform: uppercase;
}

.odds-item .odds-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rb-text-primary);
    font-variant-numeric: tabular-nums;
}

.match-card-odds .no-odds {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    padding: 4px;
}

.match-card-odds .odds-placeholder {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    padding: 4px;
}

/* ============================================================
   MARKETS DROPDOWN (inside card)
   ============================================================ */
.match-card .match-markets-dropdown {
    border-top: 1px solid var(--rb-border);
    padding: 12px 16px;
    background: var(--rb-bg-elevated);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.no-matches-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    background: var(--rb-bg-surface);
    border: 1px solid var(--rb-border);
    border-radius: 0;
}

.no-matches-card h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--rb-text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.no-matches-card p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--rb-text-tertiary);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 768px) {
    .match-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .match-filter-tabs {
        justify-content: center;
    }

    .league-section-header {
        padding: 12px 14px;
    }

    .match-card-body {
        padding: 14px 14px;
    }

    .team-row .team-name {
        font-size: 13px;
    }

    .team-row .team-score {
        font-size: 18px;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .match-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1101px) {
    .match-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   LIVE MATCH PULSE EFFECT ON CARD
   ============================================================ */
.match-card.live::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--rb-accent-magenta, #ff007a);
    animation: liveBarPulse 2s ease-in-out infinite;
}

@keyframes liveBarPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Card expand/click state */
.match-card.expanded {
    border-color: rgba(0, 240, 255, 0.4);
}

/* ============================================================
   UPGRADE PROMPT (card style)
   ============================================================ */
body.dashboard-style-page .upgrade-prompt {
    background: var(--rb-bg-surface);
    border: 1px solid var(--rb-border);
    border-left: 2px solid #f59e0b;
    border-radius: 0;
    padding: 20px 24px;
    margin-bottom: 0;
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.match-card-skeleton {
    background: var(--rb-bg-surface);
    border: 1px solid var(--rb-border);
    border-radius: 0;
    overflow: hidden;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.match-card-skeleton .skeleton-line {
    height: 2px;
    background: rgba(0, 240, 255, 0.06);
    border-radius: 0;
    margin: 12px 16px;
}

.match-card-skeleton .skeleton-line.short { width: 40%; }
.match-card-skeleton .skeleton-line.medium { width: 70%; }
.match-card-skeleton .skeleton-line.long { width: 90%; }

@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================================
   FORMCAST 3-PANEL DASHBOARD LAYOUT
   ============================================================ */

/* Override shell when new layout is active */
body.fc-layout-active .rb-page-shell {
    max-width: none;
    margin: 0;
    padding: 0;
}

body.fc-layout-active #Content {
    margin-top: 80px;
    padding: 0;
}

/* ---- Main Layout Grid ---- */
/* ============================================================
   QUANTUM GRID FRAME — Sharp minimalist layout
   ============================================================ */
.fc-dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr 480px;
    min-height: calc(100vh - 60px);
    width: 100%;
    border: 1px solid var(--rb-border);
    /* transparent so the site-wide .futuristic-bg shows behind the grid; the columns
     * and cards inside keep their own surface background. */
    background: transparent;
}

/* ============================================================
   LEFT SIDEBAR — Terminal aesthetic
   ============================================================ */
.fc-sidebar {
    background: var(--rb-bg-surface);
    border-right: 1px solid var(--rb-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 10;
}

.fc-sidebar-nav {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
}

.fc-nav-section {
    margin-bottom: 24px;
}

.fc-nav-label {
    display: block;
    padding: 0 24px;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rb-text-tertiary);
}

.fc-sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fc-sidebar-nav li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--rb-text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.fc-sidebar-nav li a:hover {
    color: var(--rb-text-primary);
    border-bottom-color: var(--rb-brand);
}

.fc-sidebar-nav li.active a {
    color: var(--rb-text-primary);
    border-bottom-color: var(--rb-brand);
    font-weight: 500;
}

.fc-nav-icon {
    font-size: 8px;
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    color: var(--rb-accent-magenta);
    display: inline-block;
}

.fc-sidebar-nav li.active .fc-nav-icon {
    color: var(--rb-brand);
}

.fc-nav-badge {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--rb-brand);
    min-width: 18px;
    text-align: right;
}

.fc-nav-badge:empty {
    display: none;
}

/* Sidebar league items */
.fc-sidebar-nav .fc-league-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fc-sidebar-nav .fc-league-dot {
    width: 6px;
    height: 6px;
    background: var(--rb-accent-green);
    flex-shrink: 0;
}

.fc-sidebar-nav .fc-league-logo-sm {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Sidebar footer */
.fc-sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--rb-border);
    margin-top: auto;
}

.fc-model-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--rb-text-tertiary);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.fc-model-badge small {
    font-weight: 400;
    color: var(--rb-text-tertiary);
    font-size: 0.7rem;
}

.fc-model-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--rb-accent-green);
    margin-right: 6px;
    vertical-align: middle;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.fc-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.fc-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

.fc-layout-active .fc-content .rb-page-shell {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* ============================================================
   RIGHT DETAIL PANEL — Telemetry drawer
   ============================================================ */
.fc-detail-panel {
    background: var(--rb-bg-surface);
    border-left: 1px solid var(--rb-border-strong);
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 24px 0 0 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.2) transparent;
}

.fc-detail-panel::-webkit-scrollbar {
    width: 4px;
}
.fc-detail-panel::-webkit-scrollbar-track {
    background: transparent;
}
.fc-detail-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.25);
    border-radius: 0;
}
.fc-detail-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.4);
}

.fc-detail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 24px;
    text-align: center;
}

.fc-detail-placeholder p {
    font-family: var(--font-mono);
    color: var(--rb-text-tertiary);
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Detail panel content */
.fc-detail-content {
    padding: 0;
}

.fc-detail-header {
    padding: 20px 20px;
    border-bottom: 1px solid var(--rb-border);
    text-align: center;
    position: relative;
}

.fc-detail-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: 1px solid var(--rb-border);
    color: var(--rb-text-tertiary);
    font-size: 18px;
    width: 28px;
    height: 28px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 5;
    font-family: var(--font-mono);
}
.fc-detail-close:hover {
    background: var(--rb-bg-elevated);
    border-color: var(--rb-brand);
    color: var(--rb-brand);
}

.fc-detail-league {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rb-text-tertiary);
    margin-bottom: 12px;
}

.fc-detail-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.fc-detail-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.fc-detail-team-logo {
    width: 52px;
    height: 52px;
    border-radius: 0;
    background: var(--rb-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--rb-brand);
    overflow: hidden;
    border: 1px solid var(--rb-border);
}

.fc-detail-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.fc-detail-team-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--rb-text-primary);
}

.fc-detail-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.fc-detail-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--rb-text-tertiary);
}

.fc-detail-time {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rb-text-primary);
    font-variant-numeric: tabular-nums;
}

.fc-detail-venue {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--rb-text-tertiary);
    text-transform: uppercase;
}

/* Model Pick Section */
.fc-detail-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--rb-border);
}

.fc-detail-section-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rb-text-tertiary);
    margin-bottom: 10px;
}

.fc-model-pick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: transparent;
    border: 1px solid var(--rb-border);
    border-radius: 0;
    padding: 14px 16px;
}

.fc-model-pick-ring {
    width: 72px;
    height: 72px;
    border-radius: 0;
    border: 1px solid var(--rb-brand);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-model-pick-pct {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rb-brand);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.fc-model-pick-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--rb-text-tertiary);
    text-transform: uppercase;
    margin-top: 2px;
}

.fc-model-pick-info {
    flex: 0 1 auto;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.fc-model-pick-team {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--rb-text-primary);
}

.fc-model-pick-score {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--rb-text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Win Probability Bar */
.fc-win-prob {
    display: flex;
    border-radius: 0;
    overflow: hidden;
    height: 24px;
    margin-bottom: 6px;
    border: 1px solid var(--rb-border);
}

.fc-win-prob-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--rb-bg-base);
    min-width: 30px;
    transition: width 0.4s ease;
    font-variant-numeric: tabular-nums;
}

.fc-win-prob-segment.home { background: var(--rb-brand); }
.fc-win-prob-segment.draw { background: var(--rb-text-tertiary); }
.fc-win-prob-segment.away { background: var(--rb-accent-magenta); }

.fc-win-prob-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.fc-win-prob-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--rb-text-secondary);
}

.fc-win-prob-legend .dot {
    width: 8px;
    height: 8px;
    border-radius: 0;
}

.fc-win-prob-legend .dot.home { background: var(--rb-brand); }
.fc-win-prob-legend .dot.draw { background: var(--rb-text-tertiary); }
.fc-win-prob-legend .dot.away { background: var(--rb-accent-magenta); }

/* Odds row in detail */
.fc-detail-odds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.fc-detail-odd {
    background: transparent;
    border: 1px solid var(--rb-border);
    border-radius: 0;
    padding: 10px 8px;
    text-align: center;
}

.fc-detail-odd-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--rb-text-tertiary);
    font-weight: 400;
    text-transform: uppercase;
}

.fc-detail-odd-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rb-text-primary);
    font-variant-numeric: tabular-nums;
}

/* Prediction correctness badges */
.fc-pred-result {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

.fc-pred-correct {
    background: transparent;
    color: var(--rb-accent-green);
    border: 1px solid var(--rb-accent-green);
}

.fc-pred-wrong {
    background: transparent;
    color: var(--rb-accent-magenta);
    border: 1px solid var(--rb-accent-magenta);
}

.fc-model-pick-ring.ring-correct {
    border-color: #10b981;
}

.fc-model-pick-ring.ring-wrong {
    border-color: #ef4444;
}

/* Shown only when a completed-match stat block was not included in the initial
   dashboard payload and has to be read in the background. */
.fc-stats-loading {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--rb-text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.fc-stats-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(45, 212, 191, 0.2);
    border-top-color: var(--rb-brand);
    border-radius: 50%;
    animation: fc-stats-spin 0.75s linear infinite;
}

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

/* Finished match card correctness */
.match-card.finished.pred-correct {
    border-left: 3px solid #10b981;
}

.match-card.finished.pred-wrong {
    border-left: 3px solid #ef4444;
}

.match-card .fc-card-pred-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 0;
    text-transform: uppercase;
}

.fc-card-pred-badge.correct {
    background: transparent;
    color: var(--rb-accent-green);
    border: 1px solid var(--rb-accent-green);
}

.fc-card-pred-badge.wrong {
    background: transparent;
    color: var(--rb-accent-magenta);
    border: 1px solid var(--rb-accent-magenta);
}

/* Match Stats Grid */
.fc-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fc-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fc-stat-home-val,
.fc-stat-away-val {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rb-text-primary);
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.fc-stat-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fc-stat-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--rb-text-tertiary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-stat-bar {
    display: flex;
    height: 4px;
    border-radius: 0;
    overflow: hidden;
    background: var(--rb-border);
}

.fc-stat-bar-home {
    background: var(--rb-brand);
    height: 100%;
    min-height: 4px;
    transition: width 0.4s ease;
}

.fc-stat-bar-away {
    background: var(--rb-accent-magenta);
    height: 100%;
    min-height: 4px;
    transition: width 0.4s ease;
}

/* Form badges */
.fc-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.fc-form-team-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--rb-text-secondary);
    min-width: 70px;
}

.fc-form-badges {
    display: flex;
    gap: 4px;
}

.fc-form-badge {
    width: 28px;
    height: 28px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--rb-bg-base);
}

.fc-form-badge.W, .fc-form-badge.fc-form-w { background: var(--rb-accent-green); }
.fc-form-badge.D, .fc-form-badge.fc-form-d { background: var(--rb-text-tertiary); }
.fc-form-badge.L, .fc-form-badge.fc-form-l { background: var(--rb-accent-magenta); }

.fc-form-team {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--rb-text-secondary);
    min-width: 90px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Key stats */
.fc-key-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--rb-border);
}

.fc-key-stat:last-child {
    border-bottom: none;
}

.fc-key-stat-home {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rb-text-primary);
    min-width: 36px;
    font-variant-numeric: tabular-nums;
}

.fc-key-stat-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--rb-text-tertiary);
    text-align: center;
    flex: 1;
    letter-spacing: 0.5px;
}

.fc-key-stat-away {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rb-text-primary);
    min-width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.fc-key-stat-bar {
    flex: 1;
    display: flex;
    gap: 3px;
    align-items: center;
}

.fc-key-stat-bar-home,
.fc-key-stat-bar-away {
    height: 3px;
    border-radius: 0;
    transition: width 0.4s ease;
}

.fc-key-stat-bar-home { background: var(--rb-brand); }
.fc-key-stat-bar-away { background: var(--rb-accent-magenta); }

/* ============================================================
   MOBILE SIDEBAR TOGGLE
   ============================================================ */
.fc-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: var(--rb-brand);
    color: var(--rb-bg-base);
    border: none;
    font-family: var(--font-mono);
    font-size: 16px;
    cursor: pointer;
    box-shadow: none;
}

/* ============================================================
   RESPONSIVE - FORMCAST LAYOUT
   ============================================================ */

/* Tablet: detail panel as slide-over overlay */
@media (max-width: 1200px) {
    .fc-dashboard-layout {
        grid-template-columns: 220px 1fr;
    }
    .fc-detail-panel {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 520px;
        max-width: 95vw;
        height: 100vh;
        z-index: 100;
        box-shadow: none;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        padding-top: 0;
    }
    .fc-detail-panel.fc-panel-open {
        display: block;
        transform: translateX(0);
    }
    .fc-detail-panel-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
    }
    .fc-detail-panel-overlay.active {
        display: block;
    }
}

/* Mobile: collapse sidebar */
@media (max-width: 768px) {
    .fc-dashboard-layout {
        grid-template-columns: 1fr;
    }

    .fc-sidebar {
        position: fixed;
        left: -260px;
        top: 60px;
        width: 220px;
        max-width: 60vw;
        height: calc(100vh - 60px);
        transition: left 0.3s ease;
        z-index: 50;
        box-shadow: none;
    }

    .fc-sidebar.open {
        left: 0;
    }

    .fc-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .fc-detail-panel {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        z-index: 100;
        box-shadow: none;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        padding-top: 0;
        background: rgba(8, 9, 13, 0.98);
    }
    .fc-detail-panel.fc-panel-open {
        display: block;
        transform: translateX(0);
    }

    .fc-subheader {
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 8px;
    }

    .fc-subheader-center {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .fc-content {
        padding: 10px;
    }

    .fc-content .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fc-content .dashboard-charts-row {
        grid-template-columns: 1fr;
    }

    /* Compact cards on mobile */
    .fc-card-top {
        padding: 12px 14px;
    }
    .fc-card-teams {
        gap: 6px;
    }
    .fc-card-center {
        min-width: 60px;
    }
    .fc-card-time {
        font-size: 16px;
    }
    .fc-card-team-name {
        font-size: 12px;
    }
    .fc-team-crest {
        width: 32px;
        height: 32px;
    }
    .fc-team-crest img {
        width: 22px;
        height: 22px;
    }
    .fc-card-bottom {
        padding: 8px 14px;
    }
}

/* Extra small phones */
@media (max-width: 400px) {
    .fc-content {
        padding: 6px;
    }
    .fc-card-top {
        padding: 10px;
    }
    .fc-card-center {
        min-width: 50px;
    }
    .fc-card-team-name {
        font-size: 11px;
    }
    .fc-team-crest {
        width: 28px;
        height: 28px;
    }
    .fc-content .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* H2H rows */
.fc-h2h-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--rb-border);
    font-size: 0.8rem;
}
.fc-h2h-row:last-child { border-bottom: none; }
.fc-h2h-date {
    font-family: var(--font-mono);
    color: var(--rb-text-tertiary);
    font-size: 0.7rem;
    min-width: 45px;
    font-variant-numeric: tabular-nums;
}
.fc-h2h-teams {
    font-family: var(--font-mono);
    color: var(--rb-text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
}

/* Picks popup (chart click) */
.fc-picks-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}
.fc-picks-popup-card {
    width: 420px;
    max-width: 95vw;
    max-height: 80vh;
    background: var(--rb-bg-surface);
    border: 1px solid var(--rb-border-strong);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.fc-picks-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--rb-border);
}
.fc-picks-popup-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rb-text-primary);
    text-transform: uppercase;
}
.fc-picks-popup-summary {
    font-size: 12px;
    color: rgba(0, 240, 255, 0.8);
    margin-top: 2px;
}
.fc-picks-popup-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.fc-picks-popup-close:hover { color: #fff; }
.fc-picks-popup-body {
    overflow-y: auto;
    padding: 8px 0;
    flex: 1;
}
.fc-picks-loading, .fc-picks-empty {
    text-align: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}
.fc-pick-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
}
.fc-pick-row:hover { background: rgba(255, 255, 255, 0.03); }
.fc-pick-row.correct { border-left: 2px solid var(--rb-accent-green); }
.fc-pick-row.wrong { border-left: 2px solid var(--rb-accent-magenta); }
.fc-pick-result { font-family: var(--font-mono); font-size: 14px; min-width: 20px; text-align: center; }
.fc-pick-ok { color: var(--rb-accent-green); }
.fc-pick-fail { color: var(--rb-accent-magenta); }
.fc-pick-pending { color: rgba(255, 255, 255, 0.3); }
.fc-pick-info { flex: 1; min-width: 0; }
.fc-pick-match {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-pick-score {
    color: rgba(0, 240, 255, 0.8);
    font-weight: 700;
    margin-left: 6px;
}
.fc-pick-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 1px;
}
.fc-pick-pred { text-align: right; min-width: 80px; }
.fc-pick-prediction {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}
.fc-pick-conf {
    font-size: 10px;
    color: rgba(0, 240, 255, 0.6);
}


/* Each element in the card centre keeps its own line; nothing may ride over the
   status badge or the score when a name is long or the viewport is narrow. */
.fc-card-center > * {
    flex-shrink: 0;
    max-width: 100%;
}
.fc-card-center .match-status-badge {
    white-space: nowrap;
}
.fc-card-score,
.fc-card-time {
    padding: 1px 0;
}

/* Secondary market chips (BTTS / over-under) shown under the headline pick.
   Deliberately quieter than .prediction-outcome: the canonical pick is still the
   recommendation, these are additional markets for the same fixture. */
.mkt-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mkt-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    /* Square frames to match the 1X2 odds boxes - the rounded pill looked out of
       place next to the rest of the card's square styling. */
    border-radius: 4px;
    border: 1px solid rgba(45, 212, 191, 0.2);
    background: rgba(15, 23, 42, 0.4);
    font-size: 0.72rem;
    line-height: 1.4;
    white-space: nowrap;
}

.mkt-chip-odds {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.mkt-chip-pick { font-weight: 600; }

.mkt-chip-conf {
    color: rgba(255, 255, 255, 0.55);
    font-variant-numeric: tabular-nums;
}

.mkt-chip-mark { font-weight: 700; }
.mkt-chip-mark.hit { color: #2dd4bf; }
.mkt-chip-mark.miss { color: #ef4444; }

@media (max-width: 640px) {
    .mkt-chip { font-size: 0.68rem; padding: 2px 7px; }
}

/* Slide-over match panel (<=1200px). #Wrapper (position:relative; z-index:1) is a
   stacking context, so the panel's z-index could never beat the body-level backdrop
   (z-index:99) and the open panel was dimmed with the page showing through. While the
   panel is open the wrapper stops being a stacking context; the floating sidebar and
   tour buttons are hidden so they do not sit on top of the lineups. */
@media (max-width: 1200px) {
    body.fc-detail-open #Wrapper { z-index: auto; }
    body.fc-detail-open .fc-detail-panel { z-index: 1001; background: #08090d; }
    body.fc-detail-open .fc-detail-panel-overlay { z-index: 1000; }
    body.fc-detail-open .fc-sidebar-toggle,
    body.fc-detail-open .rb-tour-launcher { display: none !important; }
    body.fc-detail-open { overflow: hidden; }
}

/* ============================================================
   Match panel stats - one palette, same look as the rest of the panel
   ============================================================
   Form, averages, post-match stats and the probability bars each had their own colours
   (neon green/magenta blocks, cyan/magenta bars, blue/orange/red segments). One pair is
   used throughout: home = the site teal, away = a muted indigo, draw = slate. */
.fc-detail-panel {
    --fc-home: #2dd4bf;
    --fc-away: #818cf8;
    --fc-draw: #64748b;
}

.fc-detail-panel .fc-win-prob-segment.home { color: #04201c; }
.fc-detail-panel .fc-win-prob-segment.draw,
.fc-detail-panel .fc-win-prob-segment.away { color: #fff; }

/* Form: outlined squares like the market chips, Polish letters (set in JS) */
.fc-detail-panel .fc-form-badges { gap: 5px; }
.fc-detail-panel .fc-form-badge {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid;
    font-size: 0.7rem;
    font-weight: 700;
    background: transparent;
}
.fc-detail-panel .fc-form-badge.fc-form-w {
    color: var(--fc-home);
    border-color: rgba(45, 212, 191, 0.55);
    background: rgba(45, 212, 191, 0.12);
}
.fc-detail-panel .fc-form-badge.fc-form-d {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(148, 163, 184, 0.10);
}
.fc-detail-panel .fc-form-badge.fc-form-l {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.10);
}
.fc-detail-panel .fc-form-row {
    padding: 6px 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.fc-detail-panel .fc-form-row:last-child { border-bottom: 0; }
.fc-detail-panel .fc-form-team { color: rgba(255, 255, 255, 0.82); max-width: 60%; }

/* Comparison rows */
.fc-detail-panel .fc-stats-grid { gap: 12px; }
.fc-detail-panel .fc-stat-home-val,
.fc-detail-panel .fc-stat-away-val {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    min-width: 44px;
}
.fc-detail-panel .fc-stat-home-val.lead { color: var(--fc-home); }
.fc-detail-panel .fc-stat-away-val.lead { color: var(--fc-away); }
.fc-detail-panel .fc-stat-label { color: rgba(255, 255, 255, 0.45); letter-spacing: 1px; }
.fc-detail-panel .fc-stat-bar {
    height: 6px;
    gap: 2px;
    background: transparent;
}
.fc-detail-panel .fc-stat-bar-home {
    background: var(--fc-home);
    border-radius: 2px 0 0 2px;
    min-height: 6px;
}
.fc-detail-panel .fc-stat-bar-away {
    background: var(--fc-away);
    border-radius: 0 2px 2px 0;
    min-height: 6px;
}

/* Card picks as tiles - the same box as the 1X2 odds items beside them (border, square
   corners, padding, mono type). The probability is a hairline on the bottom edge so a
   tile is exactly an odds box tall. Headline pick = teal; other markets neutral. */
.fc-pick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: stretch;
}
.fc-pick-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rb-border);
    border-radius: 0;
    padding: 6px 12px;
    min-width: 56px;
    overflow: hidden;
    background: transparent;
}
.fc-pick-tile.is-main {
    border-color: #2dd4bf;
    background: rgba(45, 212, 191, 0.06);
}
.fc-pick-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--rb-text-tertiary);
    white-space: nowrap;
}
.fc-pick-tile.is-main .fc-pick-label { color: #2dd4bf; }
.fc-pick-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--rb-text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.fc-pick-tile.is-main .fc-pick-value { color: #2dd4bf; font-weight: 700; }
.fc-pick-odds {
    margin-left: 6px;
    color: var(--rb-text-tertiary);
    font-weight: 400;
}
.fc-pick-tile.is-main .fc-pick-odds { color: rgba(45, 212, 191, 0.7); }
.fc-pick-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
}
.fc-pick-bar i {
    display: block;
    height: 100%;
    background: #64748b;
}
.fc-pick-tile.is-main .fc-pick-bar i { background: #2dd4bf; }
.fc-pick-mark { margin-left: 5px; font-weight: 700; }
.fc-pick-mark.hit { color: #2dd4bf; }
.fc-pick-mark.miss { color: #f87171; }
.fc-card-prediction .fc-pick-row { border: 0; padding: 0; margin: 0; }
/* The headline label keeps .prediction-outcome (read by the detail panel), which a
   generic rule sizes at .85rem - pin it to the odds-label size like the other tiles. */
.fc-card-prediction .fc-pick-tile .fc-pick-label.prediction-outcome {
    display: inline;
    font-size: 0.65rem;
    font-weight: 400;
    color: #2dd4bf;
}
.fc-card-odds .odds-item,
.fc-pick-tile { box-sizing: border-box; min-height: 54px; }

@media (max-width: 640px) {
    /* Phones: the picks form the same 3-column grid as the 1X2 boxes above them. */
    .fc-card-bottom .match-card-prediction .fc-pick-row {
        flex: 1 1 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .fc-card-bottom .fc-pick-tile { min-width: 0; padding: 6px 4px; }
    .fc-card-bottom .fc-pick-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Probability as a real gauge: a square-cornered framed track with a square fill under
   the value (the bottom-edge hairline was too small to read). Odds boxes get the same
   height so the row stays even. */
.fc-pick-tile .fc-pick-bar {
    position: static;
    display: block;
    width: 100%;
    height: 7px;
    margin-top: 5px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0;
    background: rgba(15, 23, 42, 0.6);
    box-sizing: border-box;
}
.fc-pick-tile .fc-pick-bar i {
    height: 100%;
    border-radius: 0;
    background: #64748b;
}
.fc-pick-tile.is-main .fc-pick-bar { border-color: rgba(45, 212, 191, 0.6); }
.fc-pick-tile.is-main .fc-pick-bar i { background: #2dd4bf; }
.fc-pick-tile { padding-bottom: 8px; }
.fc-card-odds .odds-item,
.fc-pick-tile { min-height: 66px; justify-content: center; }

/* The headline pick is WIDE again, like the old confidence bar, but boxed: the tile takes
   the rest of the row, label left / "54% 1.61" right, and a long square-framed gauge
   under them. Secondary markets keep the compact tile with the same framed gauge. */
.fc-pick-head { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 100%; }
.fc-pick-tile.is-main {
    flex: 1 1 280px;
    align-items: stretch;
    padding: 8px 14px 10px;
}
.fc-pick-tile.is-main .fc-pick-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.fc-card-prediction .fc-pick-tile.is-main .fc-pick-label.prediction-outcome {
    font-size: 0.85rem;
    font-weight: 600;
}
.fc-pick-tile.is-main .fc-pick-value { font-size: 0.95rem; }
.fc-pick-tile.is-main .fc-pick-bar { height: 10px; margin-top: 7px; }
.fc-card-prediction { flex: 1 1 auto; min-width: 0; }
.fc-card-prediction .fc-pick-row { width: 100%; }
@media (max-width: 640px) {
    .fc-card-bottom .match-card-prediction .fc-pick-row .fc-pick-tile.is-main { grid-column: 1 / -1; }
    .fc-card-bottom .match-card-prediction .fc-pick-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Pick colour follows the prediction (--pc set per tile in fcPickTile), as the old
   card did; the uniform teal hid what the pick actually was. */
.fc-pick-tile .fc-pick-label { color: var(--pc, #94a3b8); }
.fc-pick-tile .fc-pick-bar i { background: var(--pc, #64748b); }
/* Frames stay neutral like the rest of the page (owner, 11.10): colour lives only in
   the label, the value, the odds and the bar fill. */
.fc-pick-tile.is-main {
    border-color: var(--rb-border);
    background: transparent;
}
.fc-pick-tile.is-main .fc-pick-label,
.fc-card-prediction .fc-pick-tile.is-main .fc-pick-label.prediction-outcome,
.fc-pick-tile.is-main .fc-pick-value { color: var(--pc, #2dd4bf); }
.fc-pick-tile.is-main .fc-pick-odds { color: color-mix(in srgb, var(--pc, #2dd4bf) 70%, #ffffff 0%); opacity: .75; }
.fc-pick-tile.is-main .fc-pick-bar { border-color: var(--rb-border); }
.fc-pick-tile.is-main .fc-pick-bar i { background: var(--pc, #2dd4bf); }

/* Superbet price label (services/superbet_odds, 17.10.2026) */
.fc-pick-src { display: block; font-size: 9px; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: #e30613; opacity: .9; margin-top: 2px; }
.odds-src { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .55); text-align: center; margin-top: 4px; }


/* "Darmowe typy dnia" section (FREE accounts, 25.10): mirrored free picks above the leagues */
.league-section.rb-free-section .league-section-header {
    border-left-color: #2dd4bf;
}
.league-section.rb-free-section .league-section-header .league-name {
    color: #2dd4bf;
}
.league-section.rb-free-section .rb-free-star {
    color: #2dd4bf;
    opacity: 1;
}
