:root {
    --background: #070b0a;
    --surface: #101614;
    --surface-light: #151d1a;
    --border: #27332e;
    --text: #f4f7f5;
    --muted: #8e9d96;
    --accent: #5cff7d;
    --accent-dark: #29c957;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(92, 255, 125, 0.08),
            transparent 30%
        ),
        var(--background);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.topbar {
    min-height: 82px;
    padding: 16px 5%;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(7, 11, 10, 0.92);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-icon {
    font-size: 32px;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
}

.brand-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.navigation {
    display: flex;
    gap: 25px;
}

.navigation a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

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

.mobile-navigation {
    display: none;
}

.page {
    width: min(1180px, 90%);
    margin: 0 auto;
}

.hero {
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.45fr 0.85fr;
    gap: 70px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.17em;
}

h1 {
    margin: 0;
    font-size: clamp(52px, 7vw, 90px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

h1 span {
    color: var(--accent);
}

.hero-description {
    max-width: 600px;
    margin: 28px 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
}

.primary-button,
.secondary-button {
    padding: 14px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.primary-button {
    background: var(--accent);
    color: #041008;
}

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

.secondary-button {
    border: 1px solid var(--border);
    color: var(--text);
}

.secondary-button:hover {
    border-color: var(--accent);
}

.signal-panel {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(92, 255, 125, 0.08),
            transparent 55%
        ),
        var(--surface);
}

.signal-label {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.14em;
}

.signal-value {
    margin-top: 35px;
    color: var(--accent);
    font-size: 29px;
    font-weight: 900;
}

.signal-score {
    margin-top: 6px;
    font-size: 54px;
    font-weight: 900;
}

.signal-description {
    margin-top: 24px;
    color: var(--muted);
    line-height: 1.7;
}

.section {
    padding: 55px 0;
    border-top: 1px solid var(--border);
}

.section-heading {
    margin-bottom: 28px;
    display: flex;
    align-items: end;
    justify-content: space-between;
}

h2 {
    margin: 0;
    font-size: 38px;
}

.status-badge {
    padding: 8px 11px;
    border: 1px solid rgba(92, 255, 125, 0.35);
    border-radius: 999px;
    color: var(--accent);
    font-size: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-card,
.feature-card {
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
}

.stat-card {
    padding: 24px;
}

.stat-icon {
    font-size: 21px;
}

.stat-value {
    margin-top: 25px;
    font-size: 31px;
    font-weight: 900;
}

.stat-title {
    margin-top: 7px;
    color: var(--muted);
}

.feature-grid {
    padding: 0 0 70px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.feature-card {
    padding: 27px;
}

.feature-number {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.feature-card h3 {
    margin: 24px 0 12px;
    font-size: 23px;
}

.feature-card p {
    min-height: 82px;
    color: var(--muted);
    line-height: 1.6;
}

.coming-soon {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

footer {
    padding: 25px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

@media (max-width: 850px) {
    body {
        overflow-x: hidden;
    }

    .topbar {
        position: relative;
    }

    .navigation {
        display: none;
    }

    .mobile-navigation {
        display: block;
        flex: 0 0 auto;
    }

    .mobile-navigation-button {
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 9px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--surface);
        color: var(--text);
        cursor: pointer;
        font: inherit;
        font-size: 24px;
        line-height: 1;
    }

    .mobile-navigation-button:hover {
        border-color: var(--accent-dark);
        color: var(--accent);
    }

    .mobile-navigation-menu {
        position: absolute;
        z-index: 1000;
        top: calc(100% + 8px);
        right: 12px;
        width: min(320px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 106px);
        max-height: calc(100dvh - 106px);
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: rgba(16, 22, 20, 0.98);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
    }

    .mobile-navigation-menu[hidden] {
        display: none;
    }

    .mobile-navigation-menu a {
        min-height: 44px;
        padding: 11px 14px;
        border-radius: 7px;
        display: flex;
        align-items: center;
        color: var(--muted);
        text-decoration: none;
        overflow-wrap: anywhere;
    }

    .mobile-navigation-menu a:hover {
        background: var(--surface-light);
        color: var(--accent);
    }

    .mobile-navigation-button:focus-visible,
    .mobile-navigation-menu a:focus-visible {
        outline: 3px solid var(--accent);
        outline-offset: 2px;
    }

    .hero {
        padding: 75px 0;
        grid-template-columns: 1fr;
        gap: 35px;
    }

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

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

@media (max-width: 500px) {
    .page {
        width: min(92%, 1180px);
    }

    .brand-subtitle {
        display: none;
    }

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

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }
}
.active-navigation {
    color: var(--accent) !important;
}

.pair-page {
    padding-bottom: 70px;
}

.pair-hero {
    padding: 75px 0 45px;
}

.pair-title {
    max-width: 900px;
    font-size: clamp(45px, 6vw, 78px);
}

.pair-search-panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.pair-form {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr)
        auto;
    gap: 18px;
    align-items: end;
}

.player-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.player-field label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.player-field select {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: var(--surface-light);
    color: var(--text);
    font-size: 15px;
}

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

.player-search-wrapper {
    position: relative;
}

.player-search-input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: var(--surface-light);
    color: var(--text);
}

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

.player-search-input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.player-search-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: min(360px, 55vh);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.player-search-result,
.player-search-empty {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.player-search-result {
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
}

.player-search-result:hover,
.player-search-result.active-result {
    background: var(--surface-light);
}

.player-result-name {
    font-weight: 800;
}

.player-result-league-name,
.player-search-empty,
.pair-selected-league {
    color: var(--muted);
    font-size: 12px;
}

.pair-selected-league {
    margin: 12px 0 0;
}

.pair-selected-league strong {
    color: var(--accent);
}

.versus-circle {
    width: 45px;
    height: 45px;
    margin-bottom: 4px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.analyse-button {
    min-height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 9px;
    background: var(--accent);
    color: #041008;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
}

.analyse-button:hover {
    background: var(--accent-dark);
}

.empty-analysis {
    margin-top: 25px;
    padding: 65px 25px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: rgba(16, 22, 20, 0.5);
    text-align: center;
}

.empty-analysis-icon {
    font-size: 38px;
}

.empty-analysis h2 {
    margin-top: 20px;
    font-size: 27px;
}

.empty-analysis p {
    max-width: 540px;
    margin: 14px auto 0;
    color: var(--muted);
    line-height: 1.7;
}

.pair-result {
    padding-top: 55px;
}

.pair-result-heading {
    margin-bottom: 28px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
}

.pair-result-heading h2 {
    font-size: clamp(28px, 4vw, 45px);
}

.versus {
    margin: 0 8px;
    color: var(--muted);
    font-size: 0.55em;
    font-weight: 500;
}

.analysis-signal {
    min-width: 230px;
    padding: 17px 19px;
    border: 1px solid;
    border-radius: 11px;
}

.analysis-signal-name {
    font-size: 17px;
    font-weight: 900;
}

.analysis-signal-description {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
}

.signal-strong {
    border-color: rgba(92, 255, 125, 0.45);
    background: rgba(92, 255, 125, 0.08);
    color: var(--accent);
}

.signal-watch {
    border-color: rgba(255, 205, 86, 0.45);
    background: rgba(255, 205, 86, 0.08);
    color: #ffcd56;
}

.signal-no-bet {
    border-color: rgba(255, 96, 96, 0.45);
    background: rgba(255, 96, 96, 0.08);
    color: #ff7070;
}

.signal-low {
    border-color: rgba(125, 171, 255, 0.45);
    background: rgba(125, 171, 255, 0.08);
    color: #8bb6ff;
}

.score-overview {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 14px;
}

.main-score-card,
.analysis-metric-card,
.analysis-panel {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.main-score-card,
.analysis-metric-card {
    min-height: 170px;
    padding: 24px;
}

.main-score-card {
    background:
        linear-gradient(
            145deg,
            rgba(92, 255, 125, 0.10),
            transparent 65%
        ),
        var(--surface);
}

.metric-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.main-score {
    margin-top: 27px;
    color: var(--accent);
    font-size: 55px;
    font-weight: 900;
    line-height: 1;
}

.score-scale {
    margin-top: 7px;
    color: var(--muted);
}

.analysis-metric-value {
    margin-top: 34px;
    font-size: 36px;
    font-weight: 900;
}

.pair-detail-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.analysis-panel {
    padding: 25px;
}

.panel-heading {
    margin-bottom: 24px;
}

.panel-heading h3 {
    margin: 0;
    font-size: 24px;
}

.distribution-row {
    margin-top: 21px;
}

.distribution-header {
    margin-bottom: 9px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 13px;
}

.distribution-header strong {
    margin-right: 9px;
    color: var(--text);
    font-size: 16px;
}

.distribution-track {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--surface-light);
}

.distribution-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.component-row {
    padding-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.component-row strong {
    color: var(--accent);
}

.component-weight {
    padding: 7px 0 15px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

.recent-panel {
    margin-top: 14px;
}

.table-wrapper {
    overflow-x: auto;
}

.matches-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.matches-table th,
.matches-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.matches-table th {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.score-badge {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 950px) {
    .pair-form {
        grid-template-columns: 1fr 1fr;
    }

    .versus-circle {
        display: none;
    }

    .analyse-button {
        grid-column: 1 / -1;
    }

    .score-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .pair-result-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .analysis-signal {
        width: 100%;
    }

    .pair-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .pair-form {
        grid-template-columns: 1fr;
    }

    .score-overview {
        grid-template-columns: 1fr;
    }
}(.venv) Users-MBP:LigaProEdge enricomolnar$

/* =========================================================
   DASHBOARD
   ========================================================= */

button,
input,
select {
    font: inherit;
}

.hero-panel {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(92, 255, 125, 0.08),
            transparent 58%
        ),
        var(--surface);
}

.hero-panel-label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.15em;
}

.hero-panel-title {
    margin-top: 15px;
    font-size: 29px;
    font-weight: 900;
}

.hero-panel-description {
    margin: 16px 0 24px;
    color: var(--muted);
    line-height: 1.65;
}

.hero-database-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.hero-database-grid div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(7, 11, 10, 0.35);
}

.hero-database-grid span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-database-grid strong {
    display: block;
    margin-top: 7px;
    font-size: 18px;
}

.hero-panel-status {
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px rgba(92, 255, 125, 0.75);
}

.text-link,
.feature-card a {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.text-link:hover,
.feature-card a:hover {
    text-decoration: underline;
}

.feature-icon {
    font-size: 24px;
}

.section-description {
    max-width: 650px;
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.scanner-heading {
    align-items: center;
}

.update-button {
    min-width: 220px;
    min-height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent);
    color: #041008;
    cursor: pointer;
    font-weight: 900;
}

.update-button:hover:not(:disabled) {
    background: var(--accent-dark);
}

.update-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.update-button.is-loading .update-button-icon {
    animation: dashboard-spin 0.8s linear infinite;
}

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

.scanner-status-grid {
    display: grid;
    grid-template-columns: 1.25fr repeat(4, 1fr);
    gap: 14px;
}

.scanner-status-card {
    min-height: 125px;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--surface);
}

.scanner-status-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scanner-status-value {
    font-size: 26px;
}

.update-message {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(16, 22, 20, 0.55);
    color: var(--muted);
    font-size: 13px;
}

.update-message.is-success {
    border-color: rgba(92, 255, 125, 0.35);
    color: var(--accent);
}

.update-message.is-error {
    border-color: rgba(255, 112, 112, 0.45);
    color: #ff7070;
}

.recommendation-summary {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
}

.recommendations-panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.recommendations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.recommendations-table th,
.recommendations-table td {
    padding: 15px 13px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.recommendations-table th {
    background: var(--surface-light);
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.recommendations-table tbody tr:last-child td {
    border-bottom: 0;
}

.recommendations-table tbody tr:hover {
    background: rgba(92, 255, 125, 0.035);
}

.recommendation-number {
    color: var(--muted);
}

.recommendation-time {
    color: var(--accent);
    font-weight: 900;
}

.recommendation-match {
    min-width: 260px;
    white-space: normal !important;
    font-weight: 800;
    line-height: 1.45;
}

.recommendation-market {
    max-width: 220px;
    white-space: normal !important;
    color: var(--muted);
    line-height: 1.5;
}

.recommendation-score,
.recommendation-rate {
    font-weight: 900;
}

.sweep-pair-badge,
.decision-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.sweep-pair-badge {
    border: 1px solid var(--border);
    color: var(--text);
}

.sweep-drought-risk-badge {
    display: block;
    width: fit-content;
    margin-top: 5px;
    padding: 3px 7px;
    border: 1px solid rgba(255, 112, 112, 0.55);
    border-radius: 999px;
    background: rgba(255, 112, 112, 0.1);
    color: #ff9b9b;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
}

.form-dominance-badge {
    display: block;
    width: fit-content;
    margin-top: 5px;
    padding: 3px 7px;
    border: 1px solid rgba(255, 193, 7, 0.55);
    border-radius: 999px;
    background: rgba(255, 193, 7, 0.1);
    color: #ffd76a;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
}

.sweep-drought-research-note {
    margin: 10px 0 0;
    color: #ffb0b0;
    font-size: 12px;
    font-weight: 800;
}

.sweep-drought-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.sweep-drought-summary div {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.sweep-drought-summary span,
.sweep-drought-summary strong {
    display: block;
}

.sweep-drought-summary span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.sweep-drought-summary strong {
    margin-top: 5px;
    font-size: 18px;
}

.sweep-performance-section + .sweep-performance-section {
    margin-top: 34px;
}

.sweep-performance-card {
    padding: 22px;
    border: 1px solid rgba(255, 205, 86, 0.3);
    border-radius: 16px;
    background: var(--surface);
}

.sweep-performance-coverage {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.historical-league-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.historical-league-selector a {
    padding: 8px 12px;
    border: 1px solid var(--muted);
    border-radius: 8px;
    color: inherit;
}

.historical-league-selector a[aria-current="page"] {
    border-color: rgba(255, 205, 86, 0.75);
    background: var(--surface);
    font-weight: 700;
}

#historical-sweep .sweep-performance-group-start > * {
    border-top-width: 5px;
}

.sweep-risk-performance-table .sweep-performance-group-start > * {
    border-top: 4px solid rgba(255, 205, 86, 0.75);
}

@media (max-width: 720px) {
    .sweep-performance-card {
        padding: 14px;
    }

    .sweep-risk-performance-table .sweep-performance-group-start > * {
        border-top-width: 4px;
    }
}

.h2h-sweep-data-quality {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.h2h-sweep-research-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.h2h-sweep-research-card {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.h2h-sweep-research-card span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
}

.h2h-sweep-research-card h3 {
    margin: 5px 0 8px;
    font-size: 13px;
}

.h2h-sweep-research-card p,
.h2h-sweep-research-card strong {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
}

.h2h-sweep-research-card p {
    color: var(--muted);
}

.performance-subheading {
    margin: 18px 0 10px;
    font-size: 14px;
}

@media (max-width: 720px) {
    .sweep-drought-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sweep-drought-risk-badge {
        font-size: 9px;
        white-space: normal;
    }

    .h2h-sweep-research-grid {
        grid-template-columns: 1fr;
    }
}

.decision-pill {
    border: 1px solid rgba(92, 255, 125, 0.35);
    background: rgba(92, 255, 125, 0.08);
    color: var(--accent);
}

.decision-pill.is-watch {
    border-color: rgba(255, 205, 86, 0.45);
    background: rgba(255, 205, 86, 0.08);
    color: #ffcd56;
}

.decision-pill.is-no-bet {
    border-color: rgba(255, 112, 112, 0.45);
    background: rgba(255, 112, 112, 0.08);
    color: #ff7070;
}

.empty-recommendations-row td {
    height: 150px;
    color: var(--muted);
    text-align: center;
    white-space: normal;
}

.watchlist-section {
    border-left: 3px solid rgba(255, 205, 86, 0.55);
}

.watchlist-eyebrow,
.watchlist-h2h-status {
    color: #ffcd56;
}

.watchlist-summary,
.watchlist-panel {
    border-color: rgba(255, 205, 86, 0.28);
}

.watchlist-table th,
.watchlist-table tbody tr:hover {
    background: rgba(255, 205, 86, 0.045);
}

.watchlist-table th,
.watchlist-table td {
    padding-top: 11px;
    padding-bottom: 11px;
}

.watchlist-empty-row td {
    height: 72px;
}

@media (max-width: 1050px) {
    .scanner-status-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 760px) {
    .scanner-heading {
        align-items: flex-start;
    }

    .update-button {
        width: 100%;
    }

    .scanner-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .hero-database-grid,
    .scanner-status-grid {
        grid-template-columns: 1fr;
    }

    .scanner-status-card {
        min-height: 105px;
    }
}


.recommendation-heading-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.day-switch {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}

.day-switch-button {
    min-height: 38px;
    padding: 8px 15px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.day-switch-button:hover {
    color: var(--text);
}

.day-switch-button.is-active {
    background: var(--accent);
    color: #041008;
}

@media (max-width: 760px) {
    .recommendation-heading-actions {
        width: 100%;
        align-items: stretch;
    }

    .day-switch {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .day-switch-button {
        width: 100%;
    }
}


/* Separate today and tomorrow recommendation panels */

.tomorrow-section {
    border-top: 1px solid var(--border);
}

.recommendation-section-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.secondary-update-button {
    min-width: 230px;
}

.tomorrow-program-notice {
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 193, 7, 0.35);
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.08);
    color: #ffd45c;
    font-size: 14px;
    font-weight: 700;
}

.tomorrow-program-notice[hidden] {
    display: none;
}

@media (max-width: 760px) {
    .recommendation-section-actions {
        width: 100%;
        align-items: stretch;
    }

    .secondary-update-button {
        width: 100%;
        min-width: 0;
    }
}


/* Recommendation history page */

.history-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    padding: 64px 0 30px;
}

.history-hero h1 {
    margin: 8px 0 14px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1;
}

.history-total-card {
    min-width: 210px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.history-total-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.history-total-card strong {
    font-size: 34px;
}

.no-bet-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.no-bet-summary-grid article {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.no-bet-summary-grid span,
.no-bet-summary-grid strong {
    display: block;
}

.no-bet-summary-grid span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.no-bet-summary-grid strong {
    margin-top: 0.35rem;
    font-size: 1.35rem;
}

.no-bet-history-table small {
    display: block;
    color: var(--muted);
    margin-top: 0.25rem;
}

.no-bet-result-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-width: 250px;
    margin-top: 0.4rem;
}

.no-bet-result-button,
.no-bet-unset-button {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.38rem 0.5rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
}

.result-set_2_win.is-selected,
.result-set_3_win.is-selected,
.status-set_2_win,
.status-set_3_win {
    color: #42d392;
}

.result-loss.is-selected,
.status-loss {
    color: #ff6b6b;
}

.no-bet-status {
    font-size: 0.78rem;
    font-weight: 800;
}

.history-filter-section {
    padding-top: 0;
}

.history-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
}

.history-filter-form label {
    width: 100%;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.history-filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-filter-field label {
    width: auto;
}

.history-filter-form select,
.history-filter-form input[type="date"] {
    min-width: 220px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--background);
    color: var(--text);
    font: inherit;
}

.history-date-input-wrap {
    position: relative;
    min-width: 220px;
}

.history-date-input-wrap input[type="date"] {
    width: 100%;
    min-width: 0;
    padding-right: 48px;
    color-scheme: dark;
}

.history-date-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 12px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    opacity: 0;
}

.history-date-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 23px;
    height: 23px;
    color: #e8f2ec;
    pointer-events: none;
    transform: translateY(-50%);
}

.history-date-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.history-filter-button,
.history-all-button {
    min-height: 46px;
    padding-top: 0;
    padding-bottom: 0;
}

.history-result {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.history-result-pending {
    color: #ffd45c;
}

.history-result-direct_win,
.history-result-recovery_win {
    color: #66e3a4;
}

.history-result-sweep_loss,
.history-result-lost {
    color: #ff7b7b;
}

.history-profit {
    font-weight: 800;
    white-space: nowrap;
}

.history-table th,
.history-table td {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .history-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .history-total-card {
        width: 100%;
    }

    .history-filter-field,
    .history-filter-form select,
    .history-filter-form input[type="date"],
    .history-filter-button,
    .history-all-button {
        width: 100%;
    }
}


/* Manual recommendation results */

.manual-result-form select,
.profit-input {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--background);
    color: var(--text);
    font: inherit;
}

.manual-result-form select {
    min-width: 135px;
    padding: 0 10px;
}

.profit-input {
    width: 92px;
    padding: 0 10px;
    text-align: right;
    font-weight: 700;
}

.history-save-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(102, 227, 164, 0.4);
    border-radius: 9px;
    background: rgba(102, 227, 164, 0.12);
    color: #66e3a4;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.history-save-button:hover {
    background: rgba(102, 227, 164, 0.2);
}


/* ===== Compact editable history table ===== */

.history-hero {
    padding-top: 34px;
    padding-bottom: 20px;
}

.history-hero h1 {
    margin-top: 5px;
    margin-bottom: 8px;
    font-size: clamp(34px, 4.5vw, 54px);
}

.history-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
}

.history-table th,
.history-table td {
    padding: 12px 10px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.history-table th {
    font-size: 11px;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.history-table th:nth-child(1),
.history-table td:nth-child(1) {
    width: 12%;
}

.history-table th:nth-child(2),
.history-table td:nth-child(2) {
    width: 7%;
}

.history-table th:nth-child(3),
.history-table td:nth-child(3) {
    width: 13%;
}

.history-table th:nth-child(4),
.history-table td:nth-child(4) {
    width: 26%;
}

.history-table th:nth-child(5),
.history-table td:nth-child(5) {
    width: 14%;
}

.history-table td:nth-child(5) {
    white-space: normal;
}

.history-table th:nth-child(6),
.history-table td:nth-child(6) {
    width: 10%;
}

.history-table th:nth-child(7),
.history-table td:nth-child(7) {
    width: 9%;
}

.history-table th:nth-child(8),
.history-table td:nth-child(8) {
    width: 9%;
}

.history-date,
.recommendation-time,
.recommendation-score {
    white-space: nowrap;
}

.history-table .recommendation-match {
    white-space: normal;
}

.history-table .recommendation-match a {
    display: inline;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.history-table .versus {
    margin: 0 6px;
    font-size: 11px;
}

.history-table .decision-pill {
    min-height: 26px;
    padding: 3px 7px;
    font-size: 10px;
}

.manual-result-form {
    margin: 0;
}

.manual-result-form select,
.profit-input {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--background);
    color: var(--text);
    font: inherit;
    font-size: 11px;
}

.manual-result-form select {
    min-height: 38px;
    padding: 0 8px;
    font-size: 12px;
}

.profit-input {
    padding: 0 5px;
    text-align: right;
    font-weight: 700;
}

.history-save-button {
    width: 100%;
    min-height: 38px;
    padding: 0 5px;
    border: 1px solid rgba(102, 227, 164, 0.4);
    border-radius: 7px;
    background: rgba(102, 227, 164, 0.12);
    color: #66e3a4;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.history-save-button:hover {
    background: rgba(102, 227, 164, 0.22);
}

.history-table .empty-recommendations-row td {
    padding: 28px 12px;
}

/* A new day starts with a heavier line and breathing room, including on phones. */
.history-table tbody tr.history-day-start > td {
    border-top: 3px solid rgba(102, 227, 164, 0.5);
    padding-top: 20px;
}

@media (max-width: 1100px) {
    .history-table {
        /* Reserve enough room for full YYYY-MM-DD and HH:MM values. */
        min-width: 1100px;
    }

    .table-wrapper {
        overflow-x: auto;
    }
}


.history-odds-cell {
    white-space: normal;
}

.history-table .odds-input {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    font-size: 12px;
}

.history-odds-pending {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

/* Daily profit summary */

.history-daily-profit {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
}

.history-daily-profit span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.history-daily-profit strong {
    color: #66e3a4;
    font-size: 22px;
    white-space: nowrap;
}

.history-daily-profit-top {
    margin-top: 0;
    margin-bottom: 16px;
}


/* White player names in recommendations and history */

.recommendation-match,
.recommendation-match a,
.recommendations-table .recommendation-match,
.recommendations-table .recommendation-match a,
.history-table .recommendation-match,
.history-table .recommendation-match a {
    color: #ffffff !important;
    text-decoration-color: rgba(255, 255, 255, 0.55);
}

.recommendation-match a:hover,
.recommendations-table .recommendation-match a:hover,
.history-table .recommendation-match a:hover {
    color: #ffffff !important;
    text-decoration-color: #ffffff;
}

.recommendation-match .versus,
.recommendations-table .versus,
.history-table .versus {
    color: rgba(255, 255, 255, 0.55) !important;
}

/* Strategy Lab */

.strategy-page {
    padding-bottom: 72px;
}

.strategy-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    padding: 58px 0 30px;
}

.strategy-hero h1 {
    margin: 8px 0 14px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
}

.strategy-hero-card {
    min-width: 260px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.strategy-hero-card span,
.strategy-hero-card small {
    display: block;
    color: var(--muted);
}

.strategy-hero-card strong {
    display: block;
    margin: 8px 0;
    color: #66e3a4;
    font-size: 30px;
}

.strategy-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.strategy-profile-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
}

.strategy-profile-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.strategy-profile-card.is-active {
    border-color: rgba(102, 227, 164, 0.55);
    box-shadow:
        0 0 0 1px rgba(102, 227, 164, 0.1);
}

.strategy-profile-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.strategy-profile-card h3 {
    margin: 0;
    font-size: 24px;
}

.strategy-profile-badges {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.strategy-active-badge,
.strategy-builtin-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.strategy-active-badge {
    background: rgba(102, 227, 164, 0.13);
    color: #66e3a4;
}

.strategy-builtin-badge {
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted);
}

.strategy-profile-values {
    display: grid;
    gap: 10px;
    margin: 0;
}

.strategy-profile-values div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--border);
}

.strategy-profile-values dt {
    color: var(--muted);
}

.strategy-profile-values dd {
    margin: 0;
    font-weight: 800;
}

.strategy-placeholder-section {
    opacity: 0.78;
}

.h2h-performance-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #66e3a4;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.h2h-detail-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.h2h-detail-modal[hidden] {
    display: none;
}

.h2h-detail-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(3, 8, 18, 0.82);
}

.h2h-detail-dialog {
    position: relative;
    width: min(1400px, 96vw);
    max-height: 88vh;
    overflow: auto;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--background);
}

.h2h-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.h2h-detail-header h2 {
    margin: 0;
}

.h2h-detail-close {
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 32px;
    cursor: pointer;
}

.h2h-detail-status {
    color: var(--muted);
}

.h2h-detail-table th,
.h2h-detail-table td {
    white-space: nowrap;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .strategy-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .strategy-hero-card {
        width: 100%;
        min-width: 0;
    }

    .strategy-status-grid {
        grid-template-columns: 1fr;
    }
}


/* Automatic profit from odds */

.odds-input {
    width: 76px;
    min-height: 32px;
    padding: 0 7px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--background);
    color: var(--text);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

.history-profit {
    font-weight: 800;
    white-space: nowrap;
}

.history-profit-positive {
    color: #66e3a4;
}

.history-profit-negative {
    color: #ff7b7b;
}

.history-profit-zero {
    color: var(--muted);
}

/* Visible on desktop and mobile; logout is a real POST (not a GET link). */
.auth-logout-form { margin: 0 8px 0 auto; flex: 0 0 auto; }
.auth-logout-button { background: transparent; border: 1px solid #536a7a;
  border-radius: 8px; color: #e3ecf2; padding: 8px 12px; cursor: pointer;
  font: 600 12px system-ui, sans-serif; }
.auth-logout-button:hover, .auth-logout-button:focus-visible {
  border-color: #74e5b0; color: #74e5b0; }

@media (max-width: 850px) {
  .topbar:has(.auth-logout-form) { flex-wrap: wrap; gap: 10px; }
  .topbar .auth-logout-form { order: 5; flex: 0 0 100%; display: flex;
    justify-content: flex-end; margin: 0; }
}
