:root {
    --navy: #112d58;
    --blue: #2356a8;
    --blue-soft: #edf4ff;
    --green: #07875d;
    --green-soft: #e8f8f1;
    --orange: #f59e0b;
    --red: #c83f4d;
    --ink: #172033;
    --muted: #687386;
    --line: #dfe5ee;
    --paper: #ffffff;
    --canvas: #f3f6fa;
    --shadow: 0 14px 38px rgba(17, 45, 88, .09);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { width: 100%; overflow-x: hidden; }
body { width: 100%; min-width: 0; margin: 0; overflow-x: hidden; background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }

.site-header { min-height: 92px; padding: 18px max(24px, calc((100vw - 1240px) / 2)); background: linear-gradient(120deg, #0f274d, #244f8e); color: white; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.site-header h1 { margin: 3px 0 0; font-size: clamp(25px, 3vw, 36px); }
.eyebrow { color: #6f8ab7; font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.site-header .eyebrow { color: #a9c5f4; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.user-chip { padding: 9px 13px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.09); font-weight: 700; }

.page-shell { width: min(1240px, calc(100% - 32px)); margin: 28px auto 60px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card, .panel, .match-card, .empty-state { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card { padding: 20px; display: grid; gap: 4px; }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card strong { color: var(--navy); font-size: 25px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr); gap: 22px; align-items: start; }
.main-column, .side-column { min-width: 0; }
.side-column { display: grid; gap: 20px; position: sticky; top: 20px; }
.panel { padding: 22px; }
.section-heading { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 3px 0 0; font-size: 25px; color: var(--navy); }
.section-heading.small h2 { font-size: 21px; }

.button { max-width: 100%; min-width: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; padding: 11px 17px; text-decoration: none; font-weight: 800; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--blue); color: white; box-shadow: 0 7px 18px rgba(35,86,168,.24); }
.button-accent { background: var(--green); color: white; }
.button-ghost { color: white; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); }
.install-app-button { color: white; background: var(--green); box-shadow: 0 5px 14px rgba(16,185,129,.25); white-space: nowrap; }
.install-app-button[hidden] { display: none !important; }
.button-wide { width: 100%; }

.match-card { overflow: hidden; margin-bottom: 14px; }
.match-card.is-locked { background: #fbfcfe; }
.match-meta { padding: 11px 15px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.fixture-code { padding: 4px 8px; background: var(--navy); color: white; border-radius: 7px; font-weight: 850; letter-spacing: .05em; }
.status-pill { margin-left: auto; border-radius: 999px; padding: 5px 9px; font-weight: 750; }
.status-pill.open { color: var(--green); background: var(--green-soft); }
.status-pill.locked { color: #7b5410; background: #fff3d6; }
.match-line { min-height: 88px; padding: 17px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; }
.match-line strong:first-child { text-align: right; }
.match-line strong:last-child { text-align: left; }
.score-inputs { display: flex; align-items: center; gap: 7px; font-size: 20px; font-weight: 900; }
.score-inputs input { width: 52px; height: 48px; border: 2px solid #cfd8e6; border-radius: 10px; background: white; text-align: center; font-size: 20px; font-weight: 850; color: var(--navy); }
.score-inputs input:focus { outline: 3px solid rgba(35,86,168,.14); border-color: var(--blue); }
.score-inputs input:disabled { color: #687386; background: #edf0f5; }

.revealed-list { border-top: 1px solid var(--line); }
.revealed-list summary { padding: 12px 16px; color: var(--blue); font-size: 13px; font-weight: 800; cursor: pointer; }
.prediction-grid { padding: 0 16px 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.prediction-grid div { padding: 9px 11px; background: #f0f3f8; border-radius: 8px; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.prediction-grid span { overflow: hidden; text-overflow: ellipsis; }

.empty-state { padding: 48px 28px; text-align: center; color: var(--muted); }
.empty-state > span { display: block; margin-bottom: 12px; font-size: 35px; }
.empty-state h3 { color: var(--navy); }
.empty-state p { max-width: 520px; margin: 0 auto; line-height: 1.6; }

.bonus-panel { background: linear-gradient(155deg, #112d58, #1f4c87); color: white; border: 0; }
.bonus-panel .eyebrow { color: #99baf0; }
.bonus-panel h2 { margin: 5px 0 10px; font-size: 26px; }
.bonus-panel p { color: #d5e1f4; line-height: 1.5; }
.deadline { padding: 9px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 750; }
.champion-choice { padding: 13px; border-radius: 10px; background: rgba(255,255,255,.12); }

.stack-form { display: grid; gap: 15px; }
.stack-form.compact { gap: 10px; }
.stack-form label { display: grid; gap: 7px; color: var(--navy); font-size: 13px; font-weight: 800; }
.stack-form input, .stack-form select, select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #ccd5e2; border-radius: 9px; background: white; color: var(--ink); }
.password-field { position: relative; display: block; width: 100%; }
.password-field input { padding-right: 50px; }
.password-toggle { position: absolute; top: 50%; right: 7px; width: 36px; height: 36px; padding: 0; transform: translateY(-50%); border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 18px; line-height: 1; }
.password-toggle:hover { background: var(--blue-soft); }
.password-toggle:focus-visible { outline: 3px solid rgba(35,86,168,.22); }
.form-link-row { margin-top: -7px; text-align: right; }
.form-link-row a, .back-link { color: var(--blue); font-size: 13px; font-weight: 800; text-decoration: none; }
.form-link-row a:hover, .back-link:hover { text-decoration: underline; }
.auth-page-shell { min-height: 100vh; width: min(460px, calc(100% - 32px)); margin: auto; display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: 100%; }
.auth-card h1 { margin: 10px 0 8px; color: var(--navy); font-size: 30px; }
.auth-card .back-link { display: inline-block; margin-bottom: 22px; }

/* Dashboard : esprit compact de l'application d'origine */
.dashboard-page { padding: 15px; background: #f0f2f5; }
.dashboard-page .dashboard-header { width: 100%; max-width: 1180px; min-height: 0; margin: 0 auto 15px; padding: 12px 20px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.10); }
.dashboard-header h1 { margin-top: 1px; font-size: 20px; }
.dashboard-header p { margin: 2px 0 0; color: rgba(255,255,255,.88); font-size: 13px; }
.dashboard-page .page-shell { width: 100%; max-width: 1180px; margin: 0 auto 45px; }
.dashboard-page .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px; }
.dashboard-page .stat-card { min-height: 0; padding: 11px 14px; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.04); }
.dashboard-page .stat-card span, .dashboard-page .stat-card small { font-size: 11px; }
.dashboard-page .stat-card strong { font-size: 18px; }
.dashboard-page .content-grid { grid-template-columns: 2fr 1fr; gap: 18px; }
.dashboard-page .main-column > form, .dashboard-page .side-column .panel { width: 100%; min-width: 0; padding: 15px; border-radius: 12px; background: white; border: 0; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.dashboard-page .side-column { gap: 15px; }
.dashboard-page .section-heading { margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #f0f2f5; }
.dashboard-page .section-heading h2 { font-size: 17px; }
.dashboard-day-header { margin: 14px 0 7px; padding: 7px 11px; border-left: 4px solid var(--blue); border-radius: 7px; background: #eef2f7; color: #334155; font-size: 13px; font-weight: 900; }
.compact-match { margin-bottom: 8px; overflow: hidden; border: 1px solid #e4eaf2; border-radius: 12px; background: rgba(255,255,255,.92); box-shadow: 0 8px 22px rgba(15, 23, 42, .05); }
.compact-match:last-child { margin-bottom: 0; }
.compact-match.is-locked { background: #f9fbfe; }
.compact-match.is-current { position: relative; border: 1px solid #f2b94c; border-radius: 12px; background: #fff8e8; box-shadow: 0 10px 26px rgba(245, 158, 11, .18); }
.compact-match.is-current + .compact-match { border-top: 0; }
.compact-match-main { min-height: 62px; padding: 9px 10px; display: grid; grid-template-columns: 66px minmax(0, 1fr) 104px; align-items: center; gap: 12px; }
.compact-match-time { display: grid; color: var(--muted); font-size: 11px; }
.compact-match-time strong { color: #334155; font-size: 15px; }
.compact-match-time span { color: var(--blue); font-size: 10px; font-weight: 900; }
.compact-match-time em { width: max-content; max-width: 100%; margin-top: 2px; padding: 1px 4px; border-radius: 999px; background: var(--orange); color: white; font-size: 8px; font-style: normal; font-weight: 850; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }
.compact-match-teams { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 5px; }
.compact-match-teams strong { min-width: 0; overflow: hidden; color: #061b3f; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.compact-match-teams strong span { color: #aab4c1; }
.compact-match-teams small { font-size: 9px; font-weight: 700; }
.flag-icon { width: 18px; height: 13px; margin-right: 5px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); vertical-align: -2px; object-fit: cover; }
.match-lock { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 999px; }
.match-lock svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.match-lock.is-locked { background: #ffe8e8; color: #c72136; }
.match-lock.is-open { background: #dcf8ea; color: #087a55; }
.result-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green) !important; line-height: 1; }
.result-badge strong { font-size: 13px; font-weight: 950; letter-spacing: 0; }
.penalty-score-note { font-size: .85em; font-weight: 750; opacity: .82; white-space: nowrap; }
.result-badge.is-live-score { border-radius: 999px; background: #fff0c2; color: #9a6500 !important; }
.compact-score-inputs { width: 104px; height: 44px; margin-left: auto; padding: 4px; justify-content: center; gap: 5px; border: 1px solid #d8e1ee; border-radius: 12px; background: #f8fafc; }
.compact-score-inputs input { width: 40px; height: 34px; padding: 0; border-width: 1px; border-radius: 9px; font-size: 16px; }
.compact-score-inputs input::-webkit-outer-spin-button, .compact-score-inputs input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.compact-score-inputs span { color: #aab1bc; font-size: 13px; }
.compact-match .revealed-list { border-top: 1px solid #e8edf5; background: rgba(248,250,252,.7); }
.compact-match .revealed-list summary { padding: 10px 76px; font-size: 12px; }
.compact-match .prediction-grid { padding: 4px 76px 12px; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.compact-match .prediction-grid div { padding: 5px 7px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; font-size: 11px; }
.prediction-points { padding: 1px 5px; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 900; white-space: nowrap; }
.prediction-points.points-0 { color: #b4233a; background: #ffe4e8; }
.prediction-points.points-1 { color: #8a5a00; background: #fff0c2; }
.prediction-points.points-2 { color: #087a55; background: #dcf8ea; }
.prediction-points.points-3 { color: white; background: #087a55; }
.dashboard-page .bonus-panel { padding: 16px; border: 2px solid var(--orange); background: #fff9e6; color: var(--ink); }
.dashboard-page .bonus-panel .eyebrow { color: #a46600; }
.dashboard-page .bonus-panel h2 { font-size: 20px; }
.dashboard-page .bonus-panel p { color: #5f4a20; font-size: 13px; }
.dashboard-page .bonus-panel .deadline { border-color: #f2cf87; background: #fff3cd; color: #785613; }
.qualified-teams-box { margin: 12px 0; padding-top: 11px; border-top: 1px solid #efd69b; }
.qualified-teams-box > strong { display: block; margin-bottom: 8px; color: #4a3510; font-size: 13px; }
.qualified-teams-box p { margin: 0; }
.qualified-teams-list { max-height: 220px; overflow: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.qualified-teams-list span { max-width: 100%; padding: 5px 7px; border: 1px solid #ecd08a; border-radius: 7px; background: #fffdf4; color: #3d2c0c; font-size: 12px; font-weight: 750; white-space: nowrap; }
.champion-picker-title { display: block; margin-bottom: 8px; color: #4a3510; font-size: 13px; }
.champion-picker { max-height: 230px; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.champion-picker label { min-width: 0; display: block; cursor: pointer; }
.champion-picker input { position: absolute; opacity: 0; pointer-events: none; }
.champion-picker span { min-height: 34px; padding: 7px 8px; display: flex; align-items: center; border: 1px solid #e7ca80; border-radius: 8px; background: #fffdf4; color: #3d2c0c; font-size: 12px; font-weight: 800; }
.champion-picker input:checked + span { border-color: var(--green); background: var(--green-soft); color: #075f43; }
.champion-picker input:focus-visible + span { outline: 3px solid rgba(35,86,168,.2); }
.dashboard-page .ranking-list li { padding: 6px 8px; }
.rules-panel { display: grid; gap: 10px; }
.rules-panel summary.section-heading { margin-bottom: 0; cursor: pointer; list-style: none; }
.rules-panel summary.section-heading::-webkit-details-marker { display: none; }
.rules-panel summary.section-heading::after { content: "Ouvrir"; padding: 4px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.rules-panel[open] summary.section-heading { margin-bottom: 10px; }
.rules-panel[open] summary.section-heading::after { content: "Fermer"; background: #e8edf4; color: var(--muted); }
.rules-panel-body { display: grid; gap: 10px; }
.rules-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.rules-list li { padding: 8px 9px; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; border-radius: 8px; background: #f5f8fc; font-size: 12px; }
.rules-list strong { color: var(--navy); }
.rules-list span { color: var(--muted); line-height: 1.3; }
.payout-box { padding: 10px; display: grid; gap: 7px; border: 1px solid #d9e3f2; border-radius: 9px; background: var(--blue-soft); }
.payout-box > strong { color: var(--navy); font-size: 13px; }
.payout-box div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.payout-box b { color: var(--green); white-space: nowrap; }

/* Vue publique des pronostics : uniquement les matchs verrouillés */
.predictions-overview { display: grid; gap: 13px; }
.locked-overview-panel { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.locked-overview-panel h2 { margin: 3px 0 0; color: var(--navy); }
.locked-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 8px; }
.locked-overview-grid div { padding: 9px 11px; display: grid; gap: 2px; border-radius: 8px; background: #f5f8fc; }
.locked-overview-grid span, .locked-overview-grid small { color: var(--muted); font-size: 11px; }
.locked-overview-grid strong { color: var(--navy); }
.predictions-empty { padding: 45px 20px; text-align: center; }
.predictions-empty > span { font-size: 34px; }
.predictions-empty h2 { margin: 10px 0 5px; color: var(--navy); }
.predictions-empty p { margin: 0; color: var(--muted); }
.public-predictions-card { padding: 0; overflow: hidden; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.public-predictions-card.is-current { border-color: #f2b94c; box-shadow: 0 8px 24px rgba(245, 158, 11, .18); }
.public-predictions-card:not([open]) .public-match-header { border-bottom: 0; }
.public-match-header { padding: 12px 15px; display: grid; grid-template-columns: minmax(0, 1fr) 240px auto; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.public-match-header::-webkit-details-marker { display: none; }
.public-match-header { cursor: pointer; list-style: none; }
.public-match-header::after { content: "Ouvrir"; justify-self: end; padding: 4px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.public-predictions-card[open] .public-match-header::after { content: "Fermer"; background: #e8edf4; color: var(--muted); }
.public-predictions-card.is-current .public-match-header { background: #fff8e8; }
.public-match-header > div { min-width: 0; }
.public-match-header > .payment-badge { justify-self: center; }
.public-match-header h2 { display: inline; margin: 0 0 0 8px; color: var(--navy); font-size: 15px; }
.public-match-header small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.live-badge { display: inline-block; margin-left: 6px; padding: 4px 7px; border-radius: 999px; background: var(--orange); color: white; font-size: 10px; font-weight: 850; text-transform: uppercase; vertical-align: middle; }
.public-result { justify-self: center; min-width: 70px; padding: 7px 10px; border-radius: 8px; background: var(--green); color: white; text-align: center; font-size: 18px; }
.public-prediction-list { padding: 9px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.public-player-row { min-width: 0; padding: 8px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto 38px; align-items: center; gap: 7px; border: 1px solid #e6eaf0; border-radius: 8px; background: white; font-size: 12px; }
.public-player-row.is-me { border-color: #8bd8b8; background: var(--green-soft); }
.public-player-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.public-player-row > strong { color: var(--navy); }
.public-player-row > small { color: var(--green); text-align: right; font-weight: 800; }
.missing-prediction { color: #9aa2ae !important; font-size: 10px; font-weight: 600; }

.admin-header { background: linear-gradient(120deg, #35134d, #6b2b83); }
.admin-shell { display: grid; gap: 20px; }
.admin-nav { position: sticky; top: 0; z-index: 10; padding: 10px; display: flex; flex-wrap: wrap; gap: 7px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.admin-nav a { padding: 8px 12px; border-radius: 8px; color: var(--navy); background: var(--blue-soft); font-size: 13px; font-weight: 800; text-decoration: none; }
.admin-section { scroll-margin-top: 78px; }
.api-sync-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-left: 5px solid var(--blue); }
.api-sync-panel h2 { margin: 4px 0 7px; color: var(--navy); }
.api-sync-panel p { margin-bottom: 7px; color: var(--muted); }
.api-sync-panel small { color: var(--green); font-weight: 750; }
.admin-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; align-items: end; }
.admin-form-grid label { display: grid; gap: 6px; color: var(--navy); font-size: 12px; font-weight: 800; }
.admin-form-grid input, .admin-form-grid select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #ccd5e2; border-radius: 8px; background: white; }
.admin-form-action { display: flex; align-items: end; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.admin-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.payment-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #fff0f2; color: var(--red); font-size: 11px; font-weight: 850; }
.payment-badge.paid { color: var(--green); background: var(--green-soft); }
.tracking-match-picker { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.tracking-match-picker label { color: var(--navy); font-size: 12px; font-weight: 800; }
.tracking-match-picker select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #ccd5e2; border-radius: 8px; background: white; }
.tracking-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.admin-champion-stats { margin-bottom: 16px; }
.user-create-form { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.player-prediction-summary { margin: 12px 0; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid #d9e3f2; border-radius: 9px; background: var(--blue-soft); }
.player-prediction-summary span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.player-prediction-summary strong { color: var(--navy); }
.tracking-missing { border-color: #f0c9ce; background: #fff8f9; }
.tracking-missing strong { color: var(--red); }
.tracking-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 850; white-space: nowrap; }
.tracking-badge.is-done { color: var(--green); background: var(--green-soft); }
.tracking-badge.is-missing { color: var(--red); background: #fff0f2; }
.tracking-badge.is-champion { color: #76520b; background: #fff3d6; }
.tracking-row-missing { background: #fffafb; }
.tracking-table a { color: var(--blue); }
.prediction-edit-form, .champion-edit-form { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.prediction-edit-form input { width: 48px; min-height: 32px; padding: 5px; border: 1px solid #ccd5e2; border-radius: 7px; text-align: center; }
.champion-edit-form select { min-width: 170px; min-height: 32px; padding: 5px 8px; border: 1px solid #ccd5e2; border-radius: 7px; background: white; }
.prediction-edit-form span { color: var(--muted); font-weight: 850; }
.button-small { padding: 7px 10px; font-size: 12px; }
.button-muted { color: var(--navy); background: #e8edf4; }
.button-danger { color: white; background: var(--red); }
.payment-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.payment-actions form { margin: 0; }
.admin-details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 13px; }
.admin-details summary, .match-admin-card summary { color: var(--blue); font-size: 13px; font-weight: 850; cursor: pointer; }
.team-edit-grid { margin-top: 12px; display: grid; gap: 7px; }
.mini-edit-form { display: grid; grid-template-columns: minmax(180px, 1fr) 100px 120px auto; gap: 7px; }
.mini-edit-form input { min-width: 0; padding: 8px; border: 1px solid #ccd5e2; border-radius: 7px; }
.match-admin-card { margin-bottom: 13px; padding: 18px; }
.new-match-card { border: 2px dashed #b8c8df; box-shadow: none; }
.new-match-card h3 { color: var(--navy); }
.match-admin-title { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.match-admin-title > div { display: flex; align-items: center; gap: 10px; }
.match-admin-title strong { line-height: 1.35; }
.match-admin-title > span { color: var(--muted); font-size: 12px; }
.match-admin-card details { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.match-admin-card details .admin-form-grid { margin-top: 13px; }
.admin-checkbox { min-height: 42px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; border: 1px solid #ccd5e2; border-radius: 8px; background: #fff8e8; color: var(--navy); font-size: 13px; font-weight: 800; }
.admin-checkbox input { width: 16px; height: 16px; accent-color: var(--blue); }
.match-reopen-option, .match-reopen-note { grid-column: 1 / -1; }
.result-form { grid-template-columns: repeat(3, 1fr) auto; }
.result-form fieldset { margin: 0; padding: 8px 10px 10px; display: flex; align-items: center; gap: 6px; border: 1px solid #ccd5e2; border-radius: 9px; }
.result-form legend { padding: 0 4px; color: var(--navy); font-size: 11px; font-weight: 800; }
.result-form fieldset input { width: 70px; text-align: center; }
.penalty-fieldset { background: #fff8e8; }
.form-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; }

.ranking-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.ranking-list li { padding: 9px 10px; border-radius: 9px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; }
.ranking-list li:nth-child(-n+3) { background: #f5f8fc; }
.ranking-list li.is-me { background: var(--green-soft); outline: 1px solid #b9ead6; }
.rank { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--navy); background: #e6edf7; font-weight: 850; }
.player-name { display: grid; font-weight: 750; }
.player-name small { color: var(--muted); font-size: 10px; font-weight: 600; }
.ranking-breakdown { margin-top: 2px; display: flex; flex-wrap: wrap; gap: 5px; color: var(--muted); line-height: 1.25; background: transparent; }
.ranking-breakdown b { color: var(--muted); font-weight: 900; }

.alert { margin-bottom: 14px; padding: 12px 15px; border-radius: 10px; border-left: 4px solid; background: white; }
.alert-success { color: #076b4b; border-color: var(--green); background: var(--green-soft); }
.alert-error { color: #9a2634; border-color: var(--red); background: #fff0f2; }
.alert-warning { color: #875c0a; border-color: var(--orange); background: #fff7e5; }
.alert-info { color: #24539a; border-color: var(--blue); background: var(--blue-soft); }
.muted { color: var(--muted); }

.login-page { min-height: 100vh; background: radial-gradient(circle at 20% 20%, #315f9f 0, #142e56 45%, #0d1e39 100%); }
.login-shell { min-height: 100vh; width: min(1080px, calc(100% - 36px)); margin: auto; display: grid; grid-template-columns: 1.1fr .75fr; align-items: center; gap: clamp(30px, 8vw, 100px); }
.login-brand { color: white; }
.login-brand .eyebrow { color: #9ebdf0; }
.login-brand h1 { max-width: 620px; margin: 10px 0 18px; font-size: clamp(42px, 7vw, 76px); line-height: .98; letter-spacing: -.045em; }
.login-brand p { max-width: 560px; color: #d5e1f4; font-size: 18px; line-height: 1.6; }
.rule-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.rule-pills span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 750; }
.login-card { padding: clamp(25px, 4vw, 38px); border-radius: 22px; background: rgba(255,255,255,.98); box-shadow: 0 30px 80px rgba(0,0,0,.26); }
.login-card h2 { margin: 8px 0 4px; color: var(--navy); font-size: 30px; }
.ball-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--blue-soft); font-size: 26px; }

@media (max-width: 900px) {
    .site-header { flex-wrap: wrap; }
    .header-actions { flex-wrap: wrap; justify-content: flex-end; }
    .content-grid { grid-template-columns: 1fr; }
    .side-column { position: static; }
    .login-shell { grid-template-columns: 1fr; padding: 45px 0; }
    .login-brand h1 { font-size: 48px; }
    .admin-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .result-form { grid-template-columns: 1fr 1fr; }
    .api-sync-panel { align-items: flex-start; flex-direction: column; }
    .dashboard-page .content-grid { grid-template-columns: 1fr; gap: 14px; }
    .dashboard-page .side-column { position: static; }
    .public-prediction-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .site-header { min-height: 0; padding: 14px 12px; align-items: flex-start; flex-direction: column; }
    .site-header h1 { font-size: 24px; }
    .header-actions { width: 100%; gap: 7px; }
    .header-actions .button { flex: 1 1 calc(50% - 4px); min-width: 0; padding: 8px 9px; font-size: 12px; text-align: center; }
    .user-chip { display: none; }
    .page-shell { width: min(100% - 20px, 1240px); margin-top: 16px; }
    .stats-grid { grid-template-columns: 1fr; gap: 9px; }
    .stat-card { padding: 15px; }
    .match-line { grid-template-columns: 1fr; }
    .match-line strong:first-child, .match-line strong:last-child { text-align: center; }
    .status-pill { width: 100%; margin-left: 0; text-align: center; }
    .prediction-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .section-heading h2 { font-size: 20px; }
    .panel { padding: 15px; border-radius: 12px; }
    .admin-header { width: 100%; padding: 10px; gap: 10px; border-radius: 0; }
    .admin-header h1 { font-size: 28px; line-height: 1.05; }
    .admin-header .header-actions { gap: 6px; }
    .admin-header .header-actions .button { min-height: 38px; padding: 8px 10px; font-size: 12px; line-height: 1.15; white-space: normal; }
    .admin-shell { width: 100%; gap: 10px; margin-top: 10px; }
    .admin-nav { top: 0; margin-inline: -10px; padding: 7px 10px; flex-wrap: nowrap; overflow-x: auto; border-radius: 0; border-right: 0; border-left: 0; box-shadow: none; scrollbar-width: thin; }
    .admin-nav a { flex: 0 0 auto; padding: 7px 9px; font-size: 11px; white-space: nowrap; }
    .api-sync-panel { padding: 12px; gap: 10px; overflow: hidden; border-left-width: 4px; }
    .api-sync-panel h2 { font-size: 24px; line-height: 1.1; }
    .api-sync-panel p { display: none; }
    .api-sync-panel form, .api-sync-panel .button { width: 100%; min-width: 0; }
    .api-sync-panel .button { padding-inline: 10px; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
    .admin-form-grid, .result-form { grid-template-columns: 1fr; }
    .admin-form-action, .admin-form-action .button { width: 100%; }
    .admin-section { scroll-margin-top: 52px; }
    .admin-table-wrap { width: 100%; max-width: 100%; margin-inline: 0; padding-inline: 0; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .admin-table { width: 100%; min-width: 0; display: table; table-layout: fixed; }
    .admin-table thead { display: table-header-group; }
    .admin-table tbody { display: table-row-group; }
    .admin-table tr { display: table-row; background: white; }
    .admin-table th, .admin-table td { padding: 6px 5px; border-bottom: 1px solid var(--line); font-size: 10px; line-height: 1.25; }
    .admin-table td { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
    #match-predictions .admin-table th:nth-child(2), #match-predictions .admin-table td:nth-child(2),
    #champion .admin-table th:nth-child(2), #champion .admin-table td:nth-child(2),
    #champion .admin-table th:nth-child(5), #champion .admin-table td:nth-child(5),
    #payments .admin-table th:nth-child(2), #payments .admin-table td:nth-child(2),
    #payments .admin-table th:nth-child(3), #payments .admin-table td:nth-child(3) { display: none; }
    #match-predictions .admin-table th:nth-child(1), #match-predictions .admin-table td:nth-child(1) { width: 42%; }
    #match-predictions .admin-table th:nth-child(3), #match-predictions .admin-table td:nth-child(3),
    #match-predictions .admin-table th:nth-child(4), #match-predictions .admin-table td:nth-child(4) { width: 21%; }
    #match-predictions .admin-table th:nth-child(5), #match-predictions .admin-table td:nth-child(5) { width: 16%; }
    #champion .admin-table th:nth-child(1), #champion .admin-table td:nth-child(1) { width: 32%; }
    #champion .admin-table th:nth-child(3), #champion .admin-table td:nth-child(3) { width: 23%; }
    #champion .admin-table th:nth-child(4), #champion .admin-table td:nth-child(4) { width: 45%; }
    #payments .admin-table th:nth-child(1), #payments .admin-table td:nth-child(1) { width: 35%; }
    #payments .admin-table th:nth-child(4), #payments .admin-table td:nth-child(4) { width: 25%; }
    #payments .admin-table th:nth-child(5), #payments .admin-table td:nth-child(5) { width: 40%; }
    #payments .payment-actions { flex-direction: column; }
    #by-player .admin-table th:nth-child(2), #by-player .admin-table td:nth-child(2),
    #by-player .admin-table th:nth-child(5), #by-player .admin-table td:nth-child(5) { display: none; }
    #by-player .admin-table th:nth-child(1), #by-player .admin-table td:nth-child(1) { width: 50%; }
    #by-player .admin-table th:nth-child(3), #by-player .admin-table td:nth-child(3) { width: 25%; }
    #by-player .admin-table th:nth-child(4), #by-player .admin-table td:nth-child(4) { width: 25%; }
    .tracking-table .fixture-code, .admin-table .fixture-code { padding: 3px 5px; font-size: 10px; }
    .tracking-badge, .payment-badge { max-width: 100%; padding: 3px 5px; border-radius: 7px; font-size: 10px; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
    .admin-table .button-small { width: 100%; padding: 5px 4px; font-size: 10px; line-height: 1.1; }
    .tracking-match-picker, .tracking-stats { grid-template-columns: 1fr; }
    .player-prediction-summary { align-items: flex-start; flex-direction: column; gap: 5px; }
    .mini-edit-form { grid-template-columns: 1fr; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
    .mini-edit-form .button { width: 100%; }
    .result-form fieldset { justify-content: space-between; }
    .result-form fieldset input { width: min(42%, 120px); }
    .match-admin-card { padding: 12px; }
    .match-admin-title, .match-admin-title > div { align-items: flex-start; flex-direction: column; }
    .match-admin-title { gap: 8px; }
    .match-admin-title .fixture-code { width: max-content; }
    .dashboard-page { padding: 8px 8px 86px; }
    .dashboard-page .dashboard-header { margin-bottom: 8px; padding: 10px 12px; align-items: flex-start; flex-direction: column; gap: 8px; }
    .dashboard-header h1 { font-size: 17px; }
    .dashboard-header .header-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .dashboard-header .header-actions .button { width: 100%; min-width: 0; }
    .dashboard-header .header-actions .button { min-height: 34px; padding: 7px 8px; font-size: 11px; }
    .dashboard-page .page-shell { width: 100%; margin-bottom: 0; }
    .dashboard-page .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-bottom: 8px; }
    .dashboard-page .stat-card { padding: 8px 7px; text-align: center; }
    .dashboard-page .stat-card span { font-size: 9px; }
    .dashboard-page .stat-card strong { font-size: 14px; }
    .dashboard-page .stat-card small { display: none; }
    .dashboard-page .main-column > form, .dashboard-page .side-column .panel { padding: 10px; }
    .predictions-heading { min-height: 34px; }
    .predictions-heading .save-predictions-button {
        position: fixed;
        z-index: 1200;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
        min-width: 0;
        min-height: 48px;
        box-shadow: 0 5px 22px rgba(35,86,168,.34);
    }
    .dashboard-day-header { margin-top: 8px; font-size: 11px; }
    .compact-match-main { min-height: 58px; padding: 7px 6px; grid-template-columns: 50px minmax(0, 1fr) 86px; gap: 7px; }
    .compact-match-time strong { font-size: 11px; }
    .compact-match-time span { font-size: 8px; }
    .compact-match-teams { display: flex; gap: 4px; }
    .compact-match-teams strong { font-size: 12px; white-space: normal; line-height: 1.2; }
    .compact-match-teams small { font-size: 8px; line-height: 1.2; }
    .match-lock { width: 22px; height: 22px; }
    .match-lock svg { width: 13px; height: 13px; }
    .result-badge { padding: 4px 6px; font-size: 8px; }
    .result-badge strong { font-size: 11px; }
    .compact-score-inputs { width: 84px; height: 34px; padding: 2px; border-radius: 9px; }
    .compact-score-inputs input { width: 31px; height: 28px; border-radius: 7px; font-size: 13px; }
    .compact-match .revealed-list summary { padding: 7px 40px; }
    .compact-match .prediction-grid { padding: 2px 4px 8px 40px; grid-template-columns: repeat(2, 1fr); }
    .dashboard-page .side-column { gap: 8px; }
    .rules-list { gap: 5px; }
    .rules-list li { padding: 7px 8px; grid-template-columns: 62px minmax(0, 1fr); font-size: 11px; }
    .payout-box { padding: 8px; }
    .payout-box div { font-size: 11px; }
    .all-predictions-page { padding-bottom: 12px; }
    .all-predictions-page .dashboard-header .header-actions { display: flex; }
    .locked-overview-panel { align-items: stretch; flex-direction: column; gap: 10px; }
    .locked-overview-grid { grid-template-columns: 1fr 1fr; width: 100%; }
    .locked-overview-grid div { padding: 8px; }
    .public-match-header { grid-template-columns: minmax(0, 1fr) auto; align-items: flex-start; padding: 10px; }
    .public-match-header > .payment-badge,
    .public-result { grid-column: 1 / -1; justify-self: center; }
    .public-match-header::after { grid-column: 2; grid-row: 1; }
    .public-match-header h2 { display: block; margin: 7px 0 0; font-size: 13px; line-height: 1.25; }
    .public-match-header small { margin-top: 3px; }
    .public-result { min-width: 58px; padding: 6px 8px; font-size: 15px; }
    .public-prediction-list { padding: 6px; grid-template-columns: 1fr; gap: 4px; }
    .public-player-row { padding: 7px 9px; grid-template-columns: minmax(0, 1fr) auto 36px; }
}

@media (max-width: 420px) {
    .admin-header h1 { font-size: 24px; }
    .admin-header .header-actions .button { flex-basis: 100%; min-height: 34px; padding-block: 7px; }
    .admin-shell { width: 100%; }
    .admin-shell .panel { padding: 10px; }
    .admin-nav { margin-inline: -10px; }
    .api-sync-panel h2 { font-size: 21px; }
    .admin-table th, .admin-table td { padding: 5px 3px; font-size: 9px; }
    .tracking-badge, .payment-badge, .admin-table .button-small { font-size: 9px; }
    .tracking-table .fixture-code, .admin-table .fixture-code { font-size: 9px; }
    .match-admin-card { padding: 10px; }
    .dashboard-page { padding-inline: 6px; }
    .dashboard-page .dashboard-header { padding-inline: 10px; }
    .dashboard-header .header-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-header .header-actions .button { width: 100%; flex-basis: auto; }
    .dashboard-page .stats-grid { gap: 4px; }
    .dashboard-page .stat-card { padding: 7px 5px; }
    .dashboard-page .stat-card span { overflow-wrap: anywhere; }
    .dashboard-page .main-column > form, .dashboard-page .side-column .panel { padding: 8px; }
    .compact-match-main { grid-template-columns: 48px minmax(0, 1fr) 76px; gap: 5px; }
    .compact-match-teams strong { font-size: 11px; }
    .compact-score-inputs { width: 76px; }
    .compact-score-inputs input { width: 28px; }
    .flag-icon { width: 16px; height: 12px; margin-right: 3px; }
}
