/* ================================================================
   World Cup 2026 Quiz — Design System
   Theme: USA/Canada/Mexico 2026 — Red, Blue, Gold
   ================================================================ */

/* ── CSS Custom Properties ─────────────────────────────────────── */
:root {
    --color-primary: #C8102E;       /* Red (USA/Canada) */
    --color-primary-dark: #9B0D23;
    --color-secondary: #002868;     /* Navy Blue */
    --color-secondary-light: #1a3a6b;
    --color-accent: #FFD700;        /* Gold */
    --color-accent-dark: #DAA520;
    --color-green: #006847;         /* Mexico Green */
    --color-white: #FFFFFF;
    --color-bg: #f0f2f5;
    --color-bg-alt: #e8eaed;
    --color-text: #1a1a2e;
    --color-text-light: #5a5a7a;
    --color-text-muted: #8888a0;
    --color-border: #d0d0d8;
    --color-success: #2ecc71;
    --color-error: #e74c3c;
    --color-warning: #f39c12;
    --color-info: #3498db;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);

    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --font-heading: 'Segoe UI', 'Arial Black', Impact, sans-serif;
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Cascadia Code', 'Consolas', monospace;

    --max-width: 1100px;
}

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--color-secondary); text-decoration: none; }
a:hover { color: var(--color-primary); text-decoration: underline; }

ul, ol { padding-left: 1.5rem; }

img { max-width: 100%; height: auto; }

/* ── Container ─────────────────────────────────────────────────── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ── Header / Navigation ───────────────────────────────────────── */
.site-header {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
    color: var(--color-white);
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.25rem;
}
.logo:hover { color: var(--color-accent); text-decoration: none; }
.logo-icon { font-size: 1.5rem; }

.main-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
}
.main-nav a {
    color: rgba(255,255,255,0.85);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.main-nav a:hover {
    background: rgba(255,255,255,0.15);
    color: var(--color-white);
    text-decoration: none;
}

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
    margin-top: auto;
    background: var(--color-secondary);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
}
.footer-small { font-size: 0.75rem; margin-top: 0.25rem; opacity: 0.6; }

/* ── Flash Messages ────────────────────────────────────────────── */
.flash-container { margin-top: 1rem; }
.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.flash-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* ── Main Content ──────────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    transition: all 0.2s;
    font-family: var(--font-body);
    line-height: 1.5;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-dark); color: var(--color-white); }

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-white);
    border-color: var(--color-secondary);
}
.btn-secondary:hover { background: var(--color-secondary-light); color: var(--color-white); }

.btn-outline {
    background: transparent;
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}
.btn-outline:hover { background: var(--color-secondary); color: var(--color-white); }

.btn-danger {
    background: var(--color-error);
    color: var(--color-white);
    border-color: var(--color-error);
}
.btn-danger:hover { background: #c0392b; color: var(--color-white); }

.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* ── Forms ─────────────────────────────────────────────────────── */
.email-input-group {
    display: flex;
    align-items: center;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}
.email-input-group:focus-within {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(0,40,104,0.1);
}
.email-input-group input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
}
.email-suffix {
    padding: 0.6rem 0.75rem;
    background: var(--color-bg-alt);
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
    border-left: 2px solid var(--color-border);
}
.draw-option .team-name {
    font-style: italic;
    color: var(--color-text-light);
}
.draw-option:has(input:checked) .team-name {
    color: var(--color-secondary);
    font-weight: 700;
}

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--color-text);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="datetime-local"],
.form-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.2s;
    background: var(--color-white);
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(0,40,104,0.1);
}
.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 150px; }
.form-group-btn { flex: 0 0 auto; }

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.inline-form { display: inline; }
.inline-edit-form { display: flex; gap: 0.35rem; align-items: center; }
.inline-input { padding: 0.3rem 0.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 0.9rem; width: 150px; }
.inline-input-short { padding: 0.3rem 0.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 0.9rem; width: 70px; }

/* ── Tables ────────────────────────────────────────────────────── */
.table-container { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table th {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
}
.table tbody tr:hover { background: rgba(0,40,104,0.03); }
.table tfoot td {
    font-weight: 700;
    border-top: 2px solid var(--color-secondary);
    background: rgba(0,40,104,0.04);
}

.total-col { font-weight: 700; color: var(--color-primary); font-size: 1.05rem; }

/* ── Leaderboard ───────────────────────────────────────────────── */
.leaderboard-table .row-current {
    background: rgba(255,215,0,0.12) !important;
    font-weight: 600;
}
.you-tag {
    font-size: 0.75rem;
    background: var(--color-accent);
    color: var(--color-text);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    margin-left: 0.25rem;
}

.row-correct { background: rgba(46,204,113,0.08); }
.row-wrong { background: rgba(231,76,60,0.06); }
.row-complete { background: rgba(46,204,113,0.04); }
.inactive-row td { color: var(--color-text-muted); }
.inactive-row td:last-child,
.inactive-row td:nth-child(2) input { color: var(--color-text); }

/* ── Badges ────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-complete { background: #d4edda; color: #155724; }
.badge-open { background: #d1ecf1; color: #0c5460; }
.badge-pending { background: #e2e3e5; color: #383d41; }

/* ── Hero Section ──────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 50%, var(--color-green) 100%);
    color: var(--color-white);
    padding: 3.5rem 1.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.03) 10px,
        rgba(255,255,255,0.03) 20px
    );
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero h2 {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto 2rem;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-cta .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}
.hero-cta .btn-primary {
    background: var(--color-accent);
    color: var(--color-text);
    border-color: var(--color-accent);
}
.hero-cta .btn-primary:hover { background: var(--color-accent-dark); }
.hero-cta .btn-secondary {
    background: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
}
.hero-cta .btn-secondary:hover { background: rgba(255,255,255,0.15); }

/* ── Sections ──────────────────────────────────────────────────── */
.section { margin-bottom: 2.5rem; }
.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-secondary);
    text-align: center;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.text-center { text-align: center; }

/* ── Auth Pages ────────────────────────────────────────────────── */
.auth-page {
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem 0;
}
.auth-card { padding: 2rem; }
.auth-card h2 { text-align: center; margin-bottom: 0.25rem; }
.auth-subtitle { text-align: center; color: var(--color-text-light); margin-bottom: 1.5rem; }
.auth-form { margin-top: 1rem; }
.auth-alt { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--color-text-light); }

/* ── Dashboard ─────────────────────────────────────────────────── */
.dashboard h2 { margin-bottom: 1.5rem; }

.score-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.score-card { text-align: center; }
.score-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--color-primary);
}
.score-value small { font-size: 0.8rem; color: var(--color-text-light); }
.score-label { font-size: 0.85rem; color: var(--color-text-light); margin-top: 0.25rem; }

.round-status { margin-bottom: 1.5rem; }
.round-status h3 { margin-bottom: 0.75rem; }

.deadline-info { margin-bottom: 1rem; font-size: 0.9rem; }

.prediction-progress { margin-bottom: 1.5rem; }
.progress-item { margin-bottom: 0.75rem; }
.progress-text { font-size: 0.85rem; color: var(--color-text-light); }
.progress-bar {
    height: 8px;
    background: var(--color-bg-alt);
    border-radius: 99px;
    margin-top: 0.3rem;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-green), var(--color-success));
    border-radius: 99px;
    transition: width 0.3s;
}

.dashboard-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── Countdown ─────────────────────────────────────────────────── */
.countdown-banner {
    text-align: center;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.countdown-active .countdown-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
}
.countdown {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 700;
}
.countdown-closed {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-error);
}

/* ── Predictions Page ──────────────────────────────────────────── */
.predict-page h2 { margin-bottom: 1rem; }

.predict-section { margin-bottom: 1.5rem; }
.predict-section h3 { margin-bottom: 0.5rem; }
.section-desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.match-list { display: flex; flex-direction: column; gap: 0.5rem; }
.match-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    background: var(--color-bg);
    flex-wrap: wrap;
}
.match-num {
    font-weight: 700;
    color: var(--color-text-light);
    font-size: 0.85rem;
    min-width: 28px;
}
.match-teams {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    flex-wrap: wrap;
}
.team-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
    border: 2px solid transparent;
}
.team-option:hover { background: rgba(0,40,104,0.05); }
.team-option:has(input:checked) {
    background: rgba(0,40,104,0.08);
    border-color: var(--color-secondary);
}
.team-option input[type="radio"] { accent-color: var(--color-secondary); }
.team-name { font-size: 0.9rem; }
.vs {
    font-weight: 700;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    padding: 0 0.25rem;
}
.match-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-left: auto;
}

/* Per-match deadline info */
.match-deadline-info {
    text-align: right;
    min-width: 160px;
    font-size: 0.8rem;
}
.match-kickoff {
    color: var(--color-text-light);
}
.deadline-countdown {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-secondary);
    font-weight: 600;
}
.deadline-closed {
    font-size: 0.8rem;
    color: var(--color-error);
    font-weight: 700;
}
.match-closed {
    background: rgba(231,76,60,0.04);
}
.match-closed .team-option {
    opacity: 0.5;
    cursor: not-allowed;
}

.s2-counter {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius);
    display: inline-block;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.team-checkbox {
    cursor: pointer;
    user-select: none;
}
.team-checkbox input[type="checkbox"] {
    display: none;
}
.team-checkbox .team-chip {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.team-checkbox:hover .team-chip {
    border-color: var(--color-secondary);
    background: rgba(0,40,104,0.03);
}
.team-checkbox.checked .team-chip,
.team-checkbox input:checked + .team-chip {
    border-color: var(--color-secondary);
    background: var(--color-secondary);
    color: var(--color-white);
}

/* ── Prediction History ────────────────────────────────────────── */
.history-round { margin-bottom: 1.5rem; }
.history-round h3 { margin-bottom: 0.5rem; }
.history-scores {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.team-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.team-chip-small {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 99px;
    font-size: 0.8rem;
    background: var(--color-bg);
}
.chip-correct { background: #d4edda; border-color: var(--color-success); }
.chip-wrong { background: #f8d7da; border-color: var(--color-error); }

/* ── Rules Page ────────────────────────────────────────────────── */
.rules-page h2 { margin-bottom: 1.5rem; }
.rules-section { margin-bottom: 1.5rem; }
.rules-section h3 { margin-bottom: 0.75rem; color: var(--color-secondary); }
.rules-section h4 { margin: 1rem 0 0.5rem; }

.score-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.summary-card {
    text-align: center;
    padding: 1rem 1.5rem;
    background: var(--color-bg);
    border-radius: var(--radius);
}
.summary-total {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: var(--color-text);
}
.summary-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
}
.summary-label { font-size: 0.8rem; color: var(--color-text-light); }
.summary-plus, .summary-equals {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

/* ── Leaderboard Page ──────────────────────────────────────────── */
.current-user-card { margin-bottom: 1.5rem; }
.current-user-score {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* ── Empty State ───────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 2rem; }
.empty-state p { margin-bottom: 1rem; color: var(--color-text-light); }

/* ── First-Run Setup Notice ──────────────────────────────────── */
.setup-notice {
    border: 3px solid var(--color-accent);
    background: #fffdf0;
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
}
.setup-notice h2 { color: var(--color-primary); margin-bottom: 1rem; }
.setup-content { max-width: 500px; margin: 0 auto; }
.setup-content p { margin-bottom: 0.75rem; }
.setup-credentials {
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1rem 0;
    text-align: left;
    display: inline-block;
}
.credential-row {
    display: flex;
    gap: 1rem;
    padding: 0.35rem 0;
    font-size: 0.95rem;
}
.cred-label {
    font-weight: 600;
    min-width: 140px;
    color: var(--color-text);
}
.initial-password {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--color-accent);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}
.setup-warning {
    color: var(--color-error);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Admin Nav Divider ────────────────────────────────────────── */
.nav-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.35rem 0.5rem;
}

/* ── Admin Layout ──────────────────────────────────────────────── */
.admin-layout {
    display: flex;
    gap: 1.5rem;
    min-height: 60vh;
}
.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.25rem;
    align-self: flex-start;
    position: sticky;
    top: 80px;
}
.admin-sidebar h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}
.admin-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.admin-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.9rem;
    transition: background 0.15s;
}
.admin-nav a:hover {
    background: rgba(0,40,104,0.06);
    color: var(--color-secondary);
    text-decoration: none;
}
.admin-back {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
}
.admin-main { flex: 1; min-width: 0; }

/* ── Admin Stats ───────────────────────────────────────────────── */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card { text-align: center; }
.stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--color-primary);
}
.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Match Result Page ─────────────────────────────────────────── */
.match-result-card { max-width: 600px; margin: 0 auto; }
.match-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--color-bg);
    border-radius: var(--radius);
}
.match-team { text-align: center; flex: 1; }
.match-team-flag { font-size: 2.5rem; display: block; }
.match-team-name { font-size: 1rem; font-weight: 600; }
.match-vs {
    text-align: center;
    flex: 0 0 auto;
}
.vs-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
}
.match-info {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}
.match-round-badge {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.1rem 0.5rem;
    background: var(--color-secondary);
    color: var(--color-white);
    border-radius: 99px;
    font-size: 0.75rem;
}
.winner { background: rgba(255,215,0,0.15); border-radius: var(--radius); padding: 0.5rem; }
.winner-badge {
    display: block;
    font-size: 0.8rem;
    color: var(--color-accent-dark);
    font-weight: 700;
    margin-top: 0.25rem;
}

.result-form { text-align: center; }
.result-form h4 { margin-bottom: 0.75rem; }
.winner-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.winner-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.winner-option:hover { border-color: var(--color-secondary); background: rgba(0,40,104,0.03); }
.winner-option:has(input:checked) {
    border-color: var(--color-secondary);
    background: rgba(0,40,104,0.06);
    font-weight: 600;
}

.result-saved {
    text-align: center;
    padding: 1rem;
    background: #d4edda;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

/* ── Bracket Round ─────────────────────────────────────────────── */
.bracket-round h3 { margin-bottom: 0.5rem; }

/* ── Team Select ───────────────────────────────────────────────── */
.team-select {
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: var(--font-body);
    width: 100%;
    max-width: 220px;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.75rem; }
    .hero h2 { font-size: 1rem; }

    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        position: static;
    }
    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .match-display {
        flex-direction: column;
        gap: 0.5rem;
    }
    .match-row { flex-direction: column; align-items: flex-start; }
    .match-date { margin-left: 0; }

    .header-inner { flex-direction: column; text-align: center; }

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

/* ── Print ─────────────────────────────────────────────────────── */
@media print {
    .site-header, .site-footer, .admin-sidebar, .btn { display: none; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}
