:root {
  --ink: #10231d;
  --muted: #738079;
  --green: #08764f;
  --green-dark: #0a3428;
  --lime: #d8ff4f;
  --line: #e5ebe7;
  --paper: #ffffff;
  --canvas: #f3f6f3;
  --radius: 18px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "DM Sans", sans-serif; }
button { font: inherit; cursor: pointer; }
.app-hidden { display: none !important; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: radial-gradient(circle at 15% 15%, #176b50, var(--green-dark) 48%); position: relative; }
.auth-screen.hidden { display: none; }
.auth-brand { position: absolute; left: 35px; top: 30px; color: white; display: flex; align-items: center; gap: 12px; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font: 800 15px Manrope; letter-spacing: .08em; }
.auth-brand small { color: #adc4b9; font-size: 10px; margin-top: 2px; }
.auth-card { width: min(410px, 100%); padding: 32px; background: white; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.auth-card h1 { font-size: 31px; margin-top: 8px; }
.auth-card > p { color: var(--muted); font-size: 12px; }
.auth-card form { display: grid; gap: 13px; margin-top: 24px; }
.auth-card label { display: grid; gap: 6px; font-size: 10px; font-weight: 700; color: var(--muted); }
.auth-card input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; outline: none; font: inherit; font-size: 12px; }
.auth-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #e4f5ed; }
.auth-card .primary-button { justify-content: space-between; margin-top: 4px; }
.auth-toggle { width: 100%; margin-top: 18px; border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 700; }
.form-error { min-height: 14px; color: #b93636; font-size: 10px; text-align: center; }
.form-error.success { color: var(--green); }
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; padding: 28px 20px 20px; background: var(--green-dark); color: white; display: flex; flex-direction: column; overflow-y: auto; z-index: 10; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border: 2px solid var(--lime); border-radius: 11px; color: var(--lime); font: 800 13px Manrope; transform: rotate(-4deg); }
.brand-mark.has-logo { padding: 0; overflow: hidden; border: 0; transform: none; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand strong { font: 800 15px Manrope; letter-spacing: .07em; display: block; }
.brand small, .league-title small, .user-card small { display: block; color: #a5b9b0; font-size: 11px; margin-top: 2px; }
.nav { display: grid; gap: 6px; margin-top: 52px; }
.nav-item { border: 0; background: transparent; color: #a9beb5; padding: 12px 13px; border-radius: 10px; text-align: left; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.nav-item span { width: 19px; font-size: 18px; text-align: center; }
.nav-item b { margin-left: auto; color: var(--green-dark); background: var(--lime); padding: 2px 7px; border-radius: 20px; font-size: 10px; }
.nav-item.active, .nav-item:hover { color: white; background: rgba(255,255,255,.09); }
.league-card { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.05); }
.eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .14em; color: #9eb5aa; }
.eyebrow.green { color: var(--green); }
.league-title { display: flex; align-items: center; gap: 10px; margin: 13px 0; }
.league-title > span { background: var(--lime); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; }
.league-title strong { font-size: 13px; }
.ghost-button { width: 100%; border: 1px solid rgba(255,255,255,.18); background: transparent; color: white; border-radius: 8px; padding: 8px; font-size: 11px; font-weight: 700; }
.user-card { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; margin-top: 17px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.1); }
.user-card strong { font-size: 11px; }
.user-card button { border: 0; background: transparent; color: white; }
.user-menu { display: flex; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; background: #dce7e1; color: var(--green-dark); }
.avatar.has-photo { overflow: hidden; padding: 0; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.avatar-user { background: var(--lime); }
main { grid-column: 2; padding: 44px 5vw 70px; max-width: 1500px; width: 100%; }
.mobile-header { display: none; }
.page { display: none; animation: fade .25s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.page-heading.compact { align-items: center; }
h1, h2 { font-family: Manrope, sans-serif; margin: 0; }
h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.05em; margin-top: 7px; }
h1 span { font-size: .68em; }
.page-heading p { color: var(--muted); margin: 7px 0 0; font-size: 13px; }
.primary-button { border: 0; background: var(--green-dark); color: white; border-radius: 10px; padding: 12px 16px; font-size: 11px; font-weight: 700; display: flex; gap: 22px; align-items: center; box-shadow: 0 7px 20px rgba(10,52,40,.15); }
.primary-button:hover { background: var(--green); transform: translateY(-1px); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-card { min-height: 112px; padding: 20px; display: grid; grid-template-columns: auto 1fr; gap: 15px; align-items: center; position: relative; }
.stat-icon { width: 37px; height: 37px; display: grid; place-items: center; background: #e7f7ef; color: var(--green); border-radius: 10px; font-weight: 800; }
.stat-card span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.stat-card strong { display: block; font: 800 28px Manrope; margin-top: 2px; letter-spacing: -.06em; }
.stat-card strong small { font: 600 10px "DM Sans"; letter-spacing: 0; color: var(--muted); }
.stat-card em { position: absolute; bottom: 15px; right: 17px; font-style: normal; font-size: 9px; color: var(--muted); }
.position-card em { color: var(--green); background: #e8f8ef; padding: 3px 7px; border-radius: 20px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr); gap: 18px; }
.panel { padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-heading h2 { font-size: 18px; margin-top: 3px; letter-spacing: -.04em; }
.text-button, .icon-button { border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 700; }
.icon-button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; }
.games-list { display: grid; gap: 8px; }
.game-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: 95px 1fr auto; gap: 14px; align-items: center; }
.game-time { border-right: 1px solid var(--line); }
.game-time strong, .game-time small { display: block; }
.game-time strong { font-size: 11px; }
.game-time small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.teams { display: grid; gap: 7px; }
.team { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; }
.team-code { width: 28px; height: 20px; border-radius: 5px; display: grid; place-items: center; color: white; font-size: 7px; font-weight: 800; background: var(--green); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.team-code img { width: 100%; height: 100%; object-fit: cover; }
.team-code.yellow { background: #efc82d; color: #25321d; }
.team-code.blue { background: #225fba; }
.team-code.red { background: #be3434; }
.team-code.black { background: #27302c; }
.team-code.orange { background: #e57d22; }
.quick-pick { display: flex; align-items: center; gap: 5px; }
.quick-pick input, .score-input { width: 35px; height: 33px; border: 1px solid var(--line); border-radius: 8px; text-align: center; font: 800 13px Manrope; color: var(--ink); outline: none; }
.quick-pick input:focus, .score-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #e4f5ed; }
.quick-pick span { color: var(--muted); }
.final-score { font: 800 15px Manrope; white-space: nowrap; }
.scorers-summary { grid-column: 2 / -1; display: grid; gap: 4px; padding: 8px 10px; border-radius: 8px; background: #f2f7f4; color: var(--muted); font-size: 8px; }
.scorers-summary span::before { content: "⚽"; margin-right: 5px; }
.scorers-summary b { color: var(--ink); margin-right: 4px; }
.ranking-person { display: grid; grid-template-columns: 25px 34px 1fr auto; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ranking-person:last-child { border: 0; }
.ranking-person .place { font: 800 11px Manrope; color: var(--muted); }
.ranking-person strong { display: block; font-size: 11px; }
.ranking-person small { display: block; color: var(--muted); font-size: 8px; margin-top: 2px; }
.ranking-person > b { font: 800 12px Manrope; }
.is-user { background: #f2f9f5; margin: 2px -10px; padding: 10px; border-radius: 9px; border: 0; }
.save-status { font-size: 10px; color: var(--green); font-weight: 700; display: flex; align-items: center; gap: 7px; }
.save-status span { width: 7px; height: 7px; background: #2cc27d; border-radius: 50%; }
.round-tabs { display: flex; gap: 6px; margin-bottom: 13px; overflow-x: auto; }
.round-tab { border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 9px; padding: 9px 14px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.round-tab.active { background: var(--green-dark); color: white; border-color: var(--green-dark); }
.round-tab.locked { opacity: .55; }
.round-tab.open-round::after { content: " ABERTA"; color: var(--green); font-size: 7px; margin-left: 5px; }
.round-tab.active.open-round::after { color: var(--lime); }
.game-countdown { display: block; margin-top: 4px; color: var(--green); font-size: 8px; font-weight: 800; white-space: nowrap; }
.game-countdown.closed { color: #a33; }
.prediction-summary { display: flex; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid var(--line); font-size: 11px; }
.prediction-summary span { color: var(--muted); }
.prediction-list { display: grid; }
.prediction-game { display: grid; grid-template-columns: 150px 1fr 80px 1fr 150px; gap: 15px; align-items: center; padding: 22px 4px; border-bottom: 1px solid var(--line); }
.prediction-game:last-child { border: 0; }
.match-meta strong, .match-meta small { display: block; }
.match-meta strong { font-size: 11px; }
.match-meta small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.prediction-team { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; }
.prediction-team.away { justify-content: flex-end; text-align: right; }
.score-box { display: flex; align-items: center; justify-content: center; gap: 5px; }
.score-input { width: 32px; }
.match-state { font-size: 8px; color: var(--green); text-align: right; font-weight: 700; }
.match-state::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #2cc27d; margin-right: 4px; }
.match-state.closed { color: #a33; }
.match-state.closed::before { background: #c44; }
.score-input:disabled, .quick-pick input:disabled { background: #f0f2f0; color: #9ca59f; cursor: not-allowed; }
.public-prediction-filters { display: flex; gap: 8px; margin-bottom: 14px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.public-filter { position: relative; flex: 0 0 82px; min-height: 86px; display: grid; place-items: center; gap: 1px; border: 1px solid var(--line); border-radius: 18px; background: white; color: var(--muted); padding: 9px 6px; }
.public-filter small { font-size: 8px; font-weight: 800; }
.public-filter strong { color: var(--ink); font: 800 22px Manrope; line-height: 1; }
.public-filter span { font-size: 8px; font-weight: 800; }
.public-filter em { margin-top: 3px; border-radius: 20px; padding: 2px 6px; background: var(--canvas); color: var(--muted); font-size: 7px; font-style: normal; font-weight: 700; }
.public-filter.active { border: 2px solid var(--green); background: #edf8f2; color: var(--green); box-shadow: 0 5px 16px rgba(8,118,79,.12); }
.public-filter.active strong { color: var(--green-dark); }
.public-filter.extra-filter { border-color: #ead99b; background: #fffaf0; color: #94721b; }
.public-filter.extra-filter.active { border-color: #c39a2a; background: #fff4c9; }
.public-predictions-list { display: grid; gap: 14px; }
.public-game-card { padding: 0; overflow: hidden; }
.public-game-heading { width: 100%; display: grid; grid-template-columns: 170px 1fr 150px; align-items: center; gap: 15px; padding: 17px 20px; border-bottom: 1px solid var(--line); background: #f8fbf9; color: inherit; cursor: pointer; outline: none; }
.public-game-heading:hover { background: #f1f8f4; }
.public-game-heading:focus-visible { box-shadow: inset 0 0 0 2px var(--green); }
.public-matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.public-matchup span { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; }
.public-matchup span:last-child { justify-content: flex-end; text-align: right; }
.public-matchup > strong { font: 800 15px Manrope; }
.revealed-badge { justify-self: end; border-radius: 20px; padding: 5px 8px; background: #e5f6ed; color: var(--green); font-size: 7px; font-weight: 800; }
.public-game-actions { display: grid; justify-items: end; gap: 4px; }
.expand-indicator { justify-self: end; color: var(--green); font-size: 8px; font-weight: 800; white-space: nowrap; }
.public-game-card:not(.expanded) .public-result-legend, .public-game-card:not(.expanded) .public-picks { display: none; }
.public-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); padding: 7px 20px 16px; column-gap: 22px; }
.public-pick-row { display: grid; grid-template-columns: 1fr auto 42px; align-items: center; gap: 10px; min-height: 56px; border-bottom: 1px solid var(--line); }
.public-pick-row .avatar { width: 30px; height: 30px; }
.public-score { min-width: 52px; font: 800 13px Manrope; text-align: center; }
.pick-points { color: var(--green); font-size: 8px; font-weight: 800; text-align: right; }
.public-result-legend { display: flex; justify-content: flex-end; gap: 7px; padding: 10px 20px 0; }
.public-result-legend span { border-radius: 20px; padding: 4px 8px; font-size: 7px; font-weight: 800; }
.public-result-legend .exact-hit, .public-pick-row.exact-hit { background: #dcf6e8; color: #08764f; }
.public-result-legend .winner-goals-hit, .public-pick-row.winner-goals-hit { background: #e7ecff; color: #315ba8; }
.public-result-legend .outcome-hit, .public-pick-row.outcome-hit { background: #fff3c7; color: #8a6710; }
.public-pick-row.exact-hit, .public-pick-row.winner-goals-hit, .public-pick-row.outcome-hit { margin-inline: -7px; padding-inline: 7px; border-bottom-color: transparent; border-radius: 9px; }
.public-pick-row.exact-hit .pick-points { color: #08764f; }
.public-pick-row.winner-goals-hit .pick-points { color: #315ba8; }
.public-pick-row.outcome-hit .pick-points { color: #8a6710; }
.missing-pick { opacity: .55; }
.missing-pick .public-score { color: var(--muted); font: 600 9px "DM Sans"; }
.public-picks-empty { padding: 50px 20px; text-align: center; }
.public-picks-empty strong { font: 800 17px Manrope; }
.public-picks-empty p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.public-special-card { margin-bottom: 14px; padding-block: 14px; }
.public-special-card.hidden-public-special { display: none; }
.public-special-card .panel-heading { margin-bottom: 8px; }
.public-special-header, .public-special-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; align-items: center; gap: 12px; }
.public-special-header { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.public-special-row { min-height: 58px; border-bottom: 1px solid var(--line); font-size: 10px; }
.public-special-row:last-child { border-bottom: 0; }
.public-special-row > span { font-weight: 700; }
.admin-card { display: none; align-items: center; justify-content: space-between; gap: 20px; margin-top: 15px; background: #e9f7ef; }
.admin-card.visible { display: flex; }
.admin-card h2 { font-size: 16px; margin-top: 4px; }
.admin-card p { color: var(--muted); font-size: 11px; margin-bottom: 0; }
.admin-only, .supervisor-only { display: none; }
.admin-only.visible, .supervisor-only.visible { display: flex; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.manual-results-panel { margin-bottom: 16px; border-color: #dceadf; }
.manual-results-panel .panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.manual-results-panel select, .manual-results-panel textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; outline: none; background: white; color: var(--ink); font: inherit; font-size: 11px; }
.manual-score-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; padding: 14px; border-radius: 12px; background: var(--canvas); }
.manual-score-grid label { color: var(--ink); }
.manual-score-grid input { text-align: center; font: 800 18px Manrope !important; }
.manual-score-grid > span { padding-bottom: 11px; font-weight: 800; }
.manual-scorers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.manual-scorers-grid textarea { resize: vertical; min-height: 76px; }
.lock-settings-card { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: center; margin-bottom: 16px; border-color: #cce6d8; background: linear-gradient(135deg, #fff, #edf8f2); }
.lock-settings-card h2 { margin-top: 5px; font-size: 19px; }
.lock-settings-card p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.lock-settings-control { display: grid; gap: 11px; }
.lock-mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.lock-mode-options label { display: flex; align-items: flex-start; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.lock-mode-options label:has(input:checked) { border-color: var(--green); background: #edf8f2; }
.lock-mode-options b, .lock-mode-options small { display: block; }
.lock-mode-options b { color: var(--ink); font-size: 10px; }
.lock-mode-options small { margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 500; }
.quick-minutes { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-minutes button { border: 1px solid var(--line); border-radius: 20px; background: white; color: var(--muted); padding: 6px 10px; font-size: 9px; font-weight: 700; }
.quick-minutes button.active { border-color: var(--green); background: var(--green); color: white; }
.lock-settings-control label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.lock-settings-control label div { display: flex; gap: 7px; }
.lock-settings-control input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; outline: none; font: inherit; }
.lock-settings-control small { color: var(--green); font-size: 9px; font-weight: 700; }
.settings-form { display: grid; gap: 13px; }
.settings-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.settings-form input:not([type="color"]):not([type="checkbox"]) { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; outline: none; font: inherit; font-size: 11px; }
.settings-form input:focus { border-color: var(--green); }
.settings-form label small { font-size: 8px; font-weight: 500; }
.color-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.color-grid input { width: 100%; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.check-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 7px !important; }
.logo-preview { min-height: 62px; padding: 10px; background: var(--canvas); border-radius: 10px; display: flex; align-items: center; gap: 12px; }
.profile-preview { min-height: 62px; padding: 10px; background: var(--canvas); border-radius: 10px; display: flex; align-items: center; gap: 12px; }
.profile-preview .avatar { width: 48px; height: 48px; }
.profile-preview button { border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 7px; padding: 7px 9px; font-size: 9px; font-weight: 700; }
.dialog-form { margin-top: 20px; }
.logo-preview button, .user-actions button { border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 7px; padding: 7px 9px; font-size: 9px; font-weight: 700; }
.users-panel { padding-block: 10px; }
.users-panel .panel-heading { padding: 10px 0 4px; }
.users-panel #usersCount { color: var(--muted); font-size: 10px; }
.users-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 82px; padding: 7px 10px; border-radius: 20px; background: #e7f7ef; color: var(--green) !important; font-size: 9px !important; font-weight: 800; }
.users-header, .admin-user-row { display: grid; grid-template-columns: 1.1fr 1.3fr 110px 170px; gap: 12px; align-items: center; }
.users-header { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.admin-user-row { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.admin-user-row:last-child { border: 0; }
.admin-user-row strong { display: block; }
.admin-user-row small { color: var(--muted); }
.role-badge { justify-self: start; border-radius: 20px; padding: 4px 8px; background: #edf3ef; color: var(--muted); font-size: 8px; font-weight: 800; }
.role-badge.admin { background: #e4f5ed; color: var(--green); }
.role-badge.supervisor { background: #e8efff; color: #315ba8; }
.role-badge.pending { background: #fff2c9; color: #8c6910; }
.admin-user-row.pending-user { margin-inline: -8px; padding-inline: 8px; border-radius: 8px; background: #fffbef; }
.user-actions .approve { border-color: var(--green); background: var(--green); color: white; }
.user-actions { display: flex; gap: 5px; justify-content: flex-end; }
.user-actions .danger { color: #a33; }
.ranking-panel { padding: 8px 22px; }
.ranking-header, .full-ranking-row { display: grid; grid-template-columns: 80px 1fr 90px 90px; align-items: center; }
.ranking-header { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; padding: 13px 0; border-bottom: 1px solid var(--line); }
.full-ranking-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.full-ranking-row:last-child { border: 0; }
.full-ranking-row.user-row { background: #eff8f3; border-radius: 10px; padding-inline: 10px; margin-inline: -10px; border: 0; }
.full-ranking-row .rank { font: 800 14px Manrope; }
.person-cell { display: flex; gap: 10px; align-items: center; }
.person-cell strong { font-size: 11px; display: block; }
.person-cell small { font-size: 8px; color: var(--muted); }
.full-ranking-row > span { font-size: 11px; color: var(--muted); }
.full-ranking-row > b { font: 800 14px Manrope; }
.admin-prediction-panel { max-width: 850px; margin-bottom: 15px; }
.admin-user-select { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.admin-user-select select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px; background: white; color: var(--ink); font: inherit; font-size: 11px; outline: none; }
.admin-prediction-form { display: grid; gap: 16px; }
.admin-prediction-form > label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.admin-prediction-form select, .admin-prediction-form input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px; background: white; color: var(--ink); font: inherit; font-size: 11px; outline: none; }
.admin-score-fields { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; padding: 16px; border-radius: 12px; background: var(--canvas); }
.admin-score-fields label { display: grid; gap: 6px; color: var(--ink); font-size: 11px; font-weight: 700; }
.admin-score-fields input { text-align: center; font: 800 18px Manrope; }
.admin-score-fields > span { padding-bottom: 11px; font-weight: 800; }
.admin-prediction-actions { display: flex; gap: 8px; }
.danger-button { border: 1px solid #efd1d1; border-radius: 10px; padding: 11px 15px; background: #fff5f5; color: #a33; font-size: 10px; font-weight: 700; }
.danger-button:disabled { opacity: .45; cursor: not-allowed; }
.admin-prediction-form > small { color: var(--green); font-size: 9px; font-weight: 700; }
.admin-special-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.admin-special-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.rule-card span { display: inline-block; border-radius: 7px; padding: 6px 9px; background: #e8f7ef; color: var(--green); font-size: 10px; font-weight: 800; }
.rule-card h2 { font-size: 18px; margin-top: 13px; }
.rule-card p { font-size: 11px; color: var(--muted); }
.rule-card b { display: block; background: var(--canvas); border-radius: 8px; padding: 10px; font-size: 9px; }
.rule-card.featured { background: var(--green-dark); color: white; border-color: var(--green-dark); }
.rule-card.featured span { background: var(--lime); color: var(--green-dark); }
.rule-card.featured p { color: #b0c4bb; }
.rule-card.featured b { background: rgba(255,255,255,.08); }
.deadline-card { display: flex; gap: 15px; align-items: center; margin-top: 15px; }
.deadline-card h2 { font-size: 16px; }
.deadline-card p { color: var(--muted); font-size: 11px; margin-bottom: 0; }
.special-deadline { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; padding: 13px 17px; border-radius: 12px; background: var(--green-dark); color: white; font-size: 10px; }
.special-deadline strong { color: var(--lime); }
.special-deadline.closed { background: #65312f; }
.special-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.special-card { display: block; }
.special-card > span { display: inline-block; border-radius: 7px; padding: 5px 8px; background: var(--lime); color: var(--green-dark); font-size: 9px; font-weight: 800; }
.special-card h2 { margin-top: 12px; font-size: 18px; }
.special-card p { min-height: 28px; color: var(--muted); font-size: 10px; }
.special-card input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px; outline: none; font: inherit; font-size: 11px; }
.special-card input:focus { border-color: var(--green); }
.special-card input:disabled { background: var(--canvas); color: var(--muted); }
.special-submit { grid-column: 1 / -1; justify-self: end; }
.official-results { display: grid; gap: 10px; margin-top: 5px; padding: 14px; border-radius: 10px; background: var(--canvas); }
.groups-legend { display: flex; gap: 14px; color: var(--muted); font-size: 9px; }
.groups-legend span { display: flex; align-items: center; gap: 5px; }
.groups-legend i { width: 7px; height: 7px; border-radius: 50%; }
.groups-legend .direct { background: var(--green); }
.groups-legend .third { background: #d2a92d; }
.groups-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.scorers-panel { margin-bottom: 15px; padding-block: 13px; }
.scorers-panel .panel-heading { margin-bottom: 8px; }
.scorers-panel #scorersCount { color: var(--muted); font-size: 9px; font-weight: 700; }
.scorers-header, .scorer-row { display: grid; grid-template-columns: 35px 1.4fr 1fr 55px; align-items: center; gap: 8px; }
.scorers-header { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.scorer-row { min-height: 44px; border-bottom: 1px solid var(--line); font-size: 10px; }
.scorer-row:last-child { border: 0; }
.scorer-row .scorer-place { font: 800 11px Manrope; color: var(--muted); }
.scorer-team { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.scorer-row > b { justify-self: center; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-dark); color: var(--lime); font: 800 11px Manrope; }
.scorers-empty { padding: 22px 0; color: var(--muted); font-size: 10px; text-align: center; }
.group-table { padding: 14px 17px; }
.group-table h2 { margin: 3px 0 12px; font-size: 17px; }
.group-table-header, .group-team-row { display: grid; grid-template-columns: 25px minmax(120px, 1fr) repeat(7, 28px); gap: 3px; align-items: center; text-align: center; }
.group-table-header { padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 7px; font-weight: 800; }
.group-table-header span:nth-child(2) { text-align: left; }
.group-team-row { min-height: 42px; border-bottom: 1px solid var(--line); font-size: 9px; }
.group-team-row:last-child { border: 0; }
.group-team-row .group-position { align-self: stretch; display: grid; place-items: center; border-left: 3px solid transparent; color: var(--muted); font-weight: 800; }
.group-team-row.direct .group-position { border-color: var(--green); color: var(--green); }
.group-team-row.third .group-position { border-color: #d2a92d; color: #9a781b; }
.group-team-name { display: flex; align-items: center; gap: 7px; min-width: 0; text-align: left; font-weight: 700; }
.group-team-name .team-code { flex: 0 0 auto; }
.group-team-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-team-row b { font: 800 11px Manrope; }
.groups-note { margin: 15px 3px 0; color: var(--muted); font-size: 9px; }
.toast { position: fixed; right: 25px; bottom: 25px; background: var(--green-dark); color: white; border-radius: 9px; padding: 11px 16px; font-size: 11px; font-weight: 700; opacity: 0; transform: translateY(15px); transition: .25s; pointer-events: none; z-index: 20; }
.toast.show { opacity: 1; transform: translateY(0); }
dialog { border: 0; border-radius: 18px; padding: 30px; width: min(420px, calc(100% - 30px)); color: var(--ink); box-shadow: 0 25px 80px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(5,25,18,.55); backdrop-filter: blur(3px); }
dialog h2 { margin-top: 8px; font-size: 23px; }
dialog p { color: var(--muted); font-size: 12px; }
.dialog-close { position: absolute; right: 13px; top: 11px; border: 0; background: transparent; font-size: 22px; color: var(--muted); }
.invite-code { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding: 8px 8px 8px 14px; background: var(--canvas); border-radius: 10px; }
.invite-code strong { flex: 1; letter-spacing: .14em; font: 800 14px Manrope; }
.invite-code button { border: 0; border-radius: 7px; padding: 8px 11px; background: var(--green-dark); color: white; font-size: 10px; font-weight: 700; }
.site-footer { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 45px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.site-footer strong { color: var(--ink); }
.site-footer a { color: var(--green); font-weight: 700; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 950px) {
  .shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: .25s; box-shadow: 20px 0 60px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  main { padding: 20px 18px 60px; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; color: var(--green-dark); margin-bottom: 32px; }
  .mobile-header button { border: 0; background: white; border-radius: 8px; padding: 8px 11px; color: var(--green-dark); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .manual-scorers-grid { grid-template-columns: 1fr; }
  .lock-settings-card { grid-template-columns: 1fr; }
  .groups-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .auth-brand { position: static; margin-bottom: 25px; }
  .auth-screen { display: flex; flex-direction: column; justify-content: center; }
  .page-heading { align-items: flex-start; gap: 18px; flex-direction: column; }
  .stats-grid, .rules-grid { grid-template-columns: 1fr; }
  .special-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 92px; }
  .game-row { grid-template-columns: 75px 1fr auto; padding: 10px; gap: 8px; }
  .game-row { grid-template-columns: 1fr auto; }
  .game-row .game-time { grid-column: 1 / -1; padding: 8px 9px; border: 0; border-radius: 8px; background: var(--canvas); }
  .game-row .game-time small { display: flex; align-items: center; gap: 4px; white-space: normal; }
  .game-row .game-time small::before { content: "⌖"; color: var(--green); font-size: 11px; }
  .game-row .teams { grid-column: 1; }
  .game-row .quick-pick { grid-column: 2; }
  .game-row .scorers-summary { grid-column: 1 / -1; }
  .prediction-panel { padding: 8px 14px; }
  .prediction-game { grid-template-columns: 1fr auto 1fr; padding: 18px 0; gap: 8px; }
  .prediction-game .match-meta { grid-column: 1 / -1; display: grid; gap: 5px; margin-bottom: 4px; padding: 9px 11px; border-radius: 9px; background: var(--canvas); }
  .prediction-game .match-meta strong { font-size: 10px; }
  .prediction-game .match-meta small { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 9px; white-space: normal; }
  .prediction-game .match-meta small::before { content: "⌖"; color: var(--green); font-size: 12px; font-weight: 800; }
  .prediction-game .match-state { display: block; grid-column: 1 / -1; padding: 8px 10px; border-radius: 8px; background: #edf8f2; text-align: center; }
  .prediction-game .match-state.closed { background: #f8eeee; }
  .prediction-game .game-countdown { display: inline; margin: 0 0 0 7px; font-size: 9px; }
  .prediction-game .scorers-summary { grid-column: 1 / -1; }
  .prediction-team { font-size: 10px; flex-direction: column; }
  .prediction-team.away { flex-direction: column-reverse; }
  .public-game-heading { grid-template-columns: 1fr; padding: 14px; }
  .public-prediction-filters { margin-inline: -18px; padding-inline: 18px; }
  .public-filter { flex-basis: 74px; min-height: 82px; border-radius: 16px; }
  .public-game-heading .match-meta { padding: 8px 9px; border-radius: 8px; background: var(--canvas); }
  .public-matchup { gap: 7px; }
  .public-matchup span { flex-direction: column; text-align: center; font-size: 9px; }
  .public-matchup span:last-child { flex-direction: column-reverse; text-align: center; }
  .revealed-badge { justify-self: center; }
  .public-game-actions { justify-items: center; }
  .expand-indicator { justify-self: center; }
  .public-picks { grid-template-columns: 1fr; padding: 5px 14px 12px; }
  .public-result-legend { justify-content: center; padding-inline: 10px; }
  .public-special-header { display: none; }
  .public-special-row { grid-template-columns: 1fr; gap: 7px; padding: 14px 0; }
  .public-special-row > span { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
  .public-special-row > span::before { content: attr(data-label); color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
  .ranking-header, .full-ranking-row { grid-template-columns: 45px 1fr 50px; }
  .ranking-header span:nth-child(3), .full-ranking-row > span { display: none; }
  .full-ranking-row > b { text-align: right; }
  .users-header { display: none; }
  .admin-user-row { grid-template-columns: 1fr auto; }
  .admin-user-row > span:nth-child(2) { grid-column: 1; }
  .user-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .color-grid { grid-template-columns: 1fr; }
  .lock-mode-options { grid-template-columns: 1fr; }
  .admin-score-fields { grid-template-columns: 1fr auto 1fr; padding: 11px; gap: 7px; }
  .admin-special-fields { grid-template-columns: 1fr; }
  .admin-prediction-actions { flex-direction: column; }
  .groups-legend { flex-direction: column; gap: 5px; }
  .group-table { padding: 12px 8px; overflow-x: auto; }
  .group-table-header, .group-team-row { min-width: 500px; }
  .scorers-header, .scorer-row { grid-template-columns: 25px 1fr 44px; }
  .scorers-header span:nth-child(3), .scorer-team span:last-child { display: none; }
  .site-footer { flex-direction: column; }
}
