/* ═══════════════════════════════════════════════════════════════════
   FIFA 2026 TRACKER — Global Stylesheet
   Dark Navy + Gold + Green theme with glassmorphism
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ──────────────────────────────────────────────── */
:root {
    --bg-base:       #070b17;
    --bg-surface:    #0e1528;
    --bg-card:       #141d35;
    --bg-card-hover: #192242;
    --bg-sidebar:    #0a1020;
    --border:        rgba(255,255,255,0.07);
    --border-accent: rgba(245,166,35,0.3);

    --gold:          #f5a623;
    --gold-light:    #ffd166;
    --gold-dark:     #c4831a;
    --green:         #00d084;
    --green-dark:    #00a066;
    --blue-accent:   #4a90d9;
    --red-accent:    #e74c3c;

    --text-primary:  #f0f4ff;
    --text-secondary:#8b9cbf;
    --text-muted:    #4d607f;

    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  18px;
    --radius-xl:  24px;

    --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px rgba(245,166,35,0.15);

    --sidebar-width: 220px;
    --mobile-nav-h:  64px;

    --transition: 0.2s ease;
}

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

html {
    font-size: 15px;
    scrollbar-color: var(--bg-card) var(--bg-base);
    scrollbar-width: thin;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ── App Layout ──────────────────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    padding: 0;
}

.app-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: var(--bg-base);
}

.app-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--mobile-nav-h);
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border);
    z-index: 200;
    flex-direction: row;
    align-items: stretch;
}

/* ── Sidebar Brand ───────────────────────────────────────────────── */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
}

.brand-icon { font-size: 2rem; }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid var(--border);
}
.sidebar-footer-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    display: block;
}

/* ── Sidebar Nav ─────────────────────────────────────────────────── */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.nav-active {
    background: linear-gradient(135deg, rgba(245,166,35,0.15), rgba(245,166,35,0.05));
    color: var(--gold) !important;
    border: 1px solid rgba(245,166,35,0.2);
}

.nav-icon { font-size: 1.15rem; }
.nav-label { font-weight: 600; }

/* Mobile Nav Items */
.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--transition);
    cursor: pointer;
}

.mobile-nav-item:hover { color: var(--text-secondary); }

.mobile-nav-active {
    color: var(--gold) !important;
}

.mobile-nav-icon { font-size: 1.3rem; }
.mobile-nav-label { font-size: 0.6rem; }

/* ── Page Header ─────────────────────────────────────────────────── */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ── Dashboard Hero ──────────────────────────────────────────────── */
.dashboard-hero {
    background: linear-gradient(135deg, #0d1f40 0%, #1a2e5a 50%, #0d1f40 100%);
    border: 1px solid rgba(245,166,35,0.2);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at center, rgba(245,166,35,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 0.3em 1em;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 30%, var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.hero-stat-num {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--gold-light);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Dashboard Grid ──────────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dashboard-results {
    grid-column: 1 / -1;
}

/* ── Section ─────────────────────────────────────────────────────── */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-link {
    font-size: 0.82rem;
    color: var(--gold);
    font-weight: 600;
}

/* ── Match Card ──────────────────────────────────────────────────── */
.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    cursor: default;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
    border-color: rgba(255,255,255,0.12);
}

.match-card.match-completed {
    border-left: 3px solid var(--green);
}

.match-card.match-live {
    border-left: 3px solid var(--red-accent);
    animation: pulse-border 1.5s ease infinite;
}

.match-card.match-upcoming {
    border-left: 3px solid var(--border);
}

.match-card.match-card-compact {
    padding: 0.75rem 1rem;
}

@keyframes pulse-border {
    0%, 100% { border-left-color: var(--red-accent); }
    50% { border-left-color: #ff8080; }
}

.match-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.match-round-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2em 0.6em;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-group  { background: rgba(74,144,217,0.15); color: var(--blue-accent); border: 1px solid rgba(74,144,217,0.3); }
.badge-r32    { background: rgba(155,89,182,0.15); color: #9b59b6; border: 1px solid rgba(155,89,182,0.3); }
.badge-r16    { background: rgba(230,126,34,0.15); color: #e67e22; border: 1px solid rgba(230,126,34,0.3); }
.badge-qf     { background: rgba(231,76,60,0.15);  color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); }
.badge-sf     { background: rgba(245,166,35,0.15); color: var(--gold); border: 1px solid rgba(245,166,35,0.3); }
.badge-final  { background: linear-gradient(135deg,rgba(245,166,35,0.2),rgba(0,208,132,0.1)); color: var(--gold-light); border: 1px solid rgba(245,166,35,0.5); }
.badge-third  { background: rgba(127,140,141,0.15); color: #95a5a6; border: 1px solid rgba(127,140,141,0.3); }

.match-venue {
    font-size: 0.72rem;
    color: var(--text-secondary);
    flex: 1;
}

.match-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.match-card-body {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.match-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.home-team { justify-content: flex-start; }
.away-team { justify-content: flex-end; flex-direction: row-reverse; }

.team-flag { font-size: 1.4rem; flex-shrink: 0; }

.team-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-winner {
    color: var(--gold-light);
}

.match-score-block {
    text-align: center;
    min-width: 80px;
    flex-shrink: 0;
}

.match-final-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.score-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.score-winner { color: var(--gold-light); }

.score-sep {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.score-et, .score-pen {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.vs-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.kickoff-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--red-accent);
}

.live-dot {
    width: 8px; height: 8px;
    background: var(--red-accent);
    border-radius: 50%;
    animation: pulse-dot 1s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

.match-card-footer {
    margin-top: 0.85rem;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 0.65rem;
}

.btn-edit-score {
    background: none;
    border: 1px solid var(--border-accent);
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35em 0.9em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    font-family: inherit;
}

.btn-edit-score:hover {
    background: rgba(245,166,35,0.1);
    transform: translateY(-1px);
}

/* ── Groups Mini (Dashboard) ──────────────────────────────────────── */
.groups-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.group-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition);
}

.group-mini-card:hover {
    border-color: rgba(245,166,35,0.25);
}

.group-mini-header {
    background: linear-gradient(135deg, rgba(245,166,35,0.12), rgba(245,166,35,0.05));
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
    border-bottom: 1px solid var(--border);
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.mini-table th {
    padding: 0.35rem 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.68rem;
    text-align: center;
    background: rgba(255,255,255,0.02);
}

.mini-table th:first-child { text-align: left; }

.mini-table td {
    padding: 0.4rem 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.04);
    text-align: center;
    color: var(--text-secondary);
}

.team-cell {
    text-align: left !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mini-flag { font-size: 1rem; }

.mini-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    color: var(--text-primary);
}

.qualify-row { background: rgba(0,208,132,0.04); }
.qualify-row .pts-cell { color: var(--green); font-weight: 700; }

.pts-cell { font-weight: 700; color: var(--text-primary); }

/* ── Full Standings ───────────────────────────────────────────────── */
.standings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

.standings-group-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.standings-group-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.standings-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: linear-gradient(135deg, rgba(245,166,35,0.12), rgba(10,16,32,0));
    border-bottom: 1px solid var(--border);
}

.standings-group-letter {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    font-weight: 900;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.standings-group-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    flex: 1;
}

.standings-group-played {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.standings-table th {
    padding: 0.4rem 0.6rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.025);
    cursor: help;
}

.standings-table th.col-team { text-align: left; }

.standings-table td {
    padding: 0.55rem 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.04);
    text-align: center;
    color: var(--text-secondary);
}

.standings-table .col-team { text-align: left; }

.standings-row { transition: background var(--transition); }
.standings-row:hover { background: rgba(255,255,255,0.03); }

.row-qualify {
    background: rgba(0,208,132,0.04);
}

.row-qualify td { color: var(--text-primary); }

.row-maybe {
    background: rgba(245,166,35,0.03);
}

.col-pos { width: 36px; }
.col-team { min-width: 140px; }
.col-pts { width: 44px; }
.pts-bold { font-weight: 800 !important; color: var(--text-primary) !important; }

.pos-badge {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.pos-first  { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #000; }
.pos-second { background: rgba(192,192,192,0.2); color: #c0c0c0; border: 1px solid rgba(192,192,192,0.4); }

.standings-flag { font-size: 1.1rem; margin-right: 0.4rem; }
.standings-team-name { font-weight: 600; color: var(--text-primary); }

.gd-pos { color: var(--green) !important; font-weight: 600; }
.gd-neg { color: var(--red-accent) !important; font-weight: 600; }

.standings-legend {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.legend-qualify::before { content: '■'; color: var(--green); margin-right: 4px; }
.legend-maybe::before   { content: '■'; color: var(--gold);  margin-right: 4px; }

/* ── Schedule Page ───────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 120px;
}

.filter-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select, .filter-input {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
    min-width: 150px;
}

.filter-select:focus, .filter-input:focus {
    border-color: var(--gold);
}

.filter-select option { background: var(--bg-card); }

.btn-filter-clear {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-family: inherit;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    align-self: flex-end;
}

.btn-filter-clear:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.schedule-stats {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.schedule-stats strong { color: var(--text-primary); }

.schedule-date-group {
    margin-bottom: 1.75rem;
}

.date-group-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.date-group-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.date-group-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 0.15em 0.6em;
    border-radius: 999px;
}

.schedule-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* ── Bracket ─────────────────────────────────────────────────────── */
.bracket-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    align-items: flex-start;
}

.bracket-round {
    flex-shrink: 0;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bracket-round-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    padding: 0.4em 0.8em;
    background: rgba(245,166,35,0.08);
    border: 1px solid rgba(245,166,35,0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
}

.bracket-matches {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bracket-match-cell { position: relative; }

.bracket-cell {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    width: 200px;
    transition: border-color var(--transition), transform var(--transition);
}

.bracket-cell:hover {
    border-color: rgba(245,166,35,0.3);
    transform: translateY(-1px);
}

.bracket-cell.bracket-done {
    border-left: 2px solid var(--green);
}

.bracket-cell.bracket-live {
    border-left: 2px solid var(--red-accent);
}

.bracket-team {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.bracket-team.bracket-winner {
    background: rgba(0,208,132,0.08);
    color: var(--text-primary);
}

.bracket-flag { font-size: 0.9rem; }
.bracket-team-name { flex: 1; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bracket-score {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
}

.bracket-score-win { color: var(--green) !important; }

.bracket-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

.bracket-cell-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.65rem;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border);
}

.bracket-date {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.bracket-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.1em 0.3em;
    border-radius: 4px;
    transition: background var(--transition);
}

.bracket-edit-btn:hover { background: rgba(245,166,35,0.1); }

.bracket-third-label, .bracket-final-trophy {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.bracket-final-trophy { font-size: 1.5rem; color: var(--gold); }

.bracket-round-final .bracket-cell {
    border: 2px solid rgba(245,166,35,0.4);
    box-shadow: var(--shadow-glow);
}

/* ── Score Edit Modal ─────────────────────────────────────────────── */
.score-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.score-modal {
    background: var(--bg-card);
    border: 1px solid rgba(245,166,35,0.3);
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), var(--shadow-glow);
    animation: slideUp 0.25s ease;
    position: relative;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.score-modal-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.score-modal-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold-light);
    flex: 1;
}

.score-modal-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.modal-close-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}

.modal-close-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }

.score-modal-teams {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
}

.modal-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-team.away { flex-direction: row-reverse; justify-content: flex-start; }

.modal-flag { font-size: 1.5rem; }

.modal-team-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-vs {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

.score-inputs-section {
    margin-bottom: 1rem;
}

.score-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.score-inputs-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.score-input {
    width: 80px;
    padding: 0.7rem;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
    appearance: textfield;
    -moz-appearance: textfield;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.score-input:focus { border-color: var(--gold); }

.score-dash {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 300;
}

.extra-time-section {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toggle-et-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.4em 1em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.toggle-et-btn.active {
    background: rgba(245,166,35,0.08);
    border-color: rgba(245,166,35,0.3);
    color: var(--gold);
}

.score-error {
    background: rgba(231,76,60,0.1);
    border: 1px solid rgba(231,76,60,0.3);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    color: var(--red-accent);
    margin-bottom: 1rem;
}

.score-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-save {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    border: none;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0.55em 1.4em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition);
}

.btn-save:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-save:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-cancel {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-family: inherit;
    padding: 0.55em 1.2em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}

.btn-cancel:hover { background: rgba(255,255,255,0.1); }

.btn-clear {
    background: rgba(231,76,60,0.1);
    border: 1px solid rgba(231,76,60,0.3);
    color: var(--red-accent);
    font-size: 0.82rem;
    font-family: inherit;
    padding: 0.5em 1em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-right: auto;
    transition: background var(--transition);
}

.btn-clear:hover { background: rgba(231,76,60,0.2); }

/* ── Loading Shimmer ─────────────────────────────────────────────── */
.loading-shimmer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shimmer-card {
    height: 100px;
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.04) 50%, var(--bg-card) 75%);
    background-size: 400% 100%;
    border-radius: var(--radius-lg);
    animation: shimmer 1.5s infinite;
}

.shimmer-card.shimmer-tall { height: 200px; }
.shimmer-card.shimmer-wide { height: 400px; width: 100%; }

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* ── Empty State ─────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-icon { font-size: 3rem; display: block; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.95rem; }

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .app-sidebar  { display: none; }
    .app-main     { margin-left: 0; }
    .mobile-nav   { display: flex; }
    .app-content  { padding: 1.25rem; padding-bottom: calc(var(--mobile-nav-h) + 1.25rem); }

    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-results { grid-column: 1; }
    .hero-title { font-size: 1.8rem; }
    .hero-stats { gap: 1.5rem; }
    .standings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .dashboard-hero { padding: 1.5rem; }
    .hero-stats { gap: 1rem; }
    .hero-stat-num { font-size: 1.6rem; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-select, .filter-input { min-width: 0; }
    .bracket-container { flex-direction: column; }
    .bracket-cell { width: 100%; }
    .groups-mini-grid { grid-template-columns: 1fr; }
    .schedule-matches-grid { grid-template-columns: 1fr; }
}

/* ── Error UI ─────────────────────────────────────────────────────── */
#blazor-error-ui {
    background: var(--red-accent);
    bottom: 0; left: 0; right: 0;
    padding: 0.75rem 1rem;
    display: none;
    position: fixed;
    z-index: 2000;
    color: #fff;
    font-size: 0.85rem;
}

#blazor-error-ui .reload { color: #fff; text-decoration: underline; margin: 0 0.5rem; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }
