/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #080c18;
    --bg2: #0f1526;
    --bg3: #161e33;
    --card: #1a2240;
    --card-hover: #1f2a4d;
    --border: #2a3558;
    --border-bright: #3d4f7c;
    --text: #e8eef8;
    --text2: #8a9bbf;
    --text3: #5a6a8a;
    --blue: #3b82f6;
    --blue-dark: #1d4ed8;
    --gold: #f59e0b;
    --gold-bright: #fbbf24;
    --green: #10b981;
    --red: #ef4444;
    --live: #f43f5e;
    --purple: #8b5cf6;

    --r32: #3b82f6;
    --r16: #06b6d4;
    --qf: #8b5cf6;
    --sf: #ec4899;
    --final: #f59e0b;
    --bronze: #b45309;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 24px rgba(59,130,246,0.15);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

/* ===== HEADER ===== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(8,12,24,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}
.header-inner {
    max-width: 1600px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px;
}
.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-trophy { font-size: 28px; }
.brand-title { display: block; font-weight: 800; font-size: 18px; color: var(--text); }
.brand-sub { display: block; font-size: 11px; color: var(--gold); letter-spacing: 0.05em; }
.header-nav { display: flex; gap: 8px; }
.nav-link {
    padding: 6px 16px; border-radius: var(--radius-sm);
    text-decoration: none; color: var(--text2); font-weight: 500;
    transition: all 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.active { color: var(--blue); background: rgba(59,130,246,0.1); }
.admin-link { color: var(--gold); }
.admin-link:hover { background: rgba(245,158,11,0.1); }

/* ===== MAIN ===== */
.site-main { max-width: 1600px; margin: 0 auto; padding: 24px; }

/* ===== FOOTER ===== */
.site-footer {
    text-align: center; padding: 24px; color: var(--text3);
    border-top: 1px solid var(--border); margin-top: 48px; font-size: 12px;
}

/* ===== WINNER BANNER ===== */
.winner-banner {
    background: linear-gradient(135deg, #78350f, #92400e, #b45309, #d97706, #f59e0b);
    padding: 4px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    animation: shimmer 3s linear infinite;
    background-size: 200% 100%;
}
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.winner-inner {
    background: var(--bg2);
    border-radius: calc(var(--radius) - 4px);
    padding: 20px 32px;
    display: flex; align-items: center; justify-content: center; gap: 24px;
    text-align: center;
}
.winner-trophy { font-size: 48px; }
.winner-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); }
.winner-name { font-size: 32px; font-weight: 900; color: var(--text); }
.winner-person { font-size: 16px; color: var(--text2); margin-top: 4px; }
.winner-person strong { color: var(--gold-bright); }

/* ===== HERO ===== */
.dashboard-hero { margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.stat-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 999px; padding: 8px 16px;
    font-weight: 600; font-size: 13px;
}
.stat-pill.live { border-color: var(--live); background: rgba(244,63,94,0.1); color: var(--live); }

/* ===== LIVE TICKER ===== */
.live-matches-ticker {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.live-ticker-item {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--card); border: 1px solid rgba(244,63,94,0.3);
    border-radius: 999px; padding: 6px 14px;
    font-size: 13px; font-weight: 600;
}
.lt-score {
    font-variant-numeric: tabular-nums;
    color: var(--live); font-weight: 800; font-size: 14px; padding: 0 2px;
}
.lt-team { color: var(--text); }

/* ===== LIVE DOT ===== */
.live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--live);
    animation: pulse 1.4s ease-in-out infinite;
    display: inline-block;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* ===== NEXT UP ===== */
.next-up-bar {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    background: var(--card); border: 1px solid var(--border-bright);
    border-radius: var(--radius); padding: 14px 24px;
    margin-bottom: 16px;
}
.next-up-label {
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--blue);
    background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3);
    padding: 3px 10px; border-radius: 99px; white-space: nowrap;
}
.next-up-match {
    display: flex; align-items: center; gap: 12px;
    font-size: 18px; font-weight: 700; flex: 1;
}
.next-up-team { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.next-up-team.home { text-align: right; align-items: flex-end; }
.next-up-team.away { text-align: left; align-items: flex-start; }
.next-up-team-name { font-size: 18px; font-weight: 700; color: var(--text); }
.next-up-participant { font-size: 12px; color: var(--blue); font-weight: 500; }
.next-up-vs {
    color: var(--text3); font-size: 13px; font-weight: 500;
    flex-shrink: 0;
}
.next-up-meta {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; color: var(--text2); flex-wrap: wrap;
}
.next-up-round {
    font-weight: 600; color: var(--text);
    background: var(--bg3); padding: 2px 8px; border-radius: 4px;
}
.next-up-time { color: var(--gold); font-weight: 600; }
.next-up-venue { color: var(--text3); }
.next-up-countdown {
    display: flex; align-items: baseline; gap: 5px;
    margin-left: auto; flex-shrink: 0;
}
.cd-val {
    font-size: 24px; font-weight: 800;
    font-variant-numeric: tabular-nums; color: var(--text);
}
.cd-label { font-size: 12px; color: var(--text3); font-weight: 500; }

/* ===== PRIZE POT ===== */
.prize-pot-bar {
    display: flex; align-items: center; gap: 0;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 24px;
    margin-bottom: 24px; flex-wrap: wrap; gap: 4px;
}
.prize-pot-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text3);
    margin-right: 16px; white-space: nowrap;
}
.prize-divider {
    width: 1px; background: var(--border); align-self: stretch;
    margin: 0 20px;
}
.prize-item { display: flex; flex-direction: column; gap: 3px; min-width: 100px; }
.prize-label { font-size: 11px; color: var(--text3); font-weight: 600; }
.prize-amount {
    font-size: 22px; font-weight: 800; color: var(--text);
    font-variant-numeric: tabular-nums;
}
.prize-amount.total { color: var(--gold); }
.prize-recipient { font-size: 12px; color: var(--text2); }
.prize-recipient.tbd { color: var(--text3); font-style: italic; }
.prize-recipient.winner-confirmed { color: var(--green); font-weight: 700; font-size: 13px; }
.prize-team { font-size: 11px; color: var(--text3); }
.winner-prize .prize-amount { color: var(--gold); }
.runner-prize .prize-amount { color: #9ca3af; }
.charity-prize .prize-amount { color: #f87171; }

/* ===== TABS ===== */
.tabs-container { }
.tabs-nav {
    display: flex; gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.tab-btn {
    background: none; border: none; cursor: pointer;
    padding: 10px 20px; font-size: 14px; font-weight: 500;
    color: var(--text2); border-bottom: 2px solid transparent;
    transition: all 0.2s; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== GROUPS GRID ===== */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.group-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}
.group-card:hover { box-shadow: var(--shadow), var(--shadow-glow); }

.group-header {
    padding: 12px 16px;
    font-weight: 800; font-size: 15px; letter-spacing: 0.05em;
    text-transform: uppercase;
}
.group-color-a { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.group-color-b { background: linear-gradient(90deg, #065f46, #10b981); }
.group-color-c { background: linear-gradient(90deg, #7c2d12, #ea580c); }
.group-color-d { background: linear-gradient(90deg, #4c1d95, #8b5cf6); }
.group-color-e { background: linear-gradient(90deg, #0c4a6e, #0ea5e9); }
.group-color-f { background: linear-gradient(90deg, #831843, #ec4899); }
.group-color-g { background: linear-gradient(90deg, #14532d, #22c55e); }
.group-color-h { background: linear-gradient(90deg, #713f12, #f59e0b); }
.group-color-i { background: linear-gradient(90deg, #1e1b4b, #6366f1); }
.group-color-j { background: linear-gradient(90deg, #134e4a, #14b8a6); }
.group-color-k { background: linear-gradient(90deg, #7f1d1d, #ef4444); }
.group-color-l { background: linear-gradient(90deg, #1a2e05, #84cc16); }

/* ===== STANDINGS TABLE ===== */
.standings-table {
    width: 100%; border-collapse: collapse;
    font-size: 12px;
}
.standings-table thead th {
    background: rgba(0,0,0,0.3); padding: 6px 8px;
    color: var(--text3); font-weight: 600; text-transform: uppercase;
    font-size: 10px; letter-spacing: 0.05em;
    text-align: center; border-bottom: 1px solid var(--border);
}
.standings-table thead th.team-col { text-align: left; }
.standings-table thead th.person-col { text-align: left; }
.standings-table tbody tr { border-bottom: 1px solid rgba(42,53,88,0.5); transition: background 0.15s; }
.standings-table tbody tr:hover { background: rgba(59,130,246,0.05); }
.standings-table tbody tr:last-child { border-bottom: none; }
.standings-table td { padding: 7px 8px; text-align: center; }
.pos-cell { font-weight: 700; color: var(--text2); }
.team-name-cell { text-align: left; display: flex; align-items: center; gap: 6px; }
.pts-cell { font-weight: 700; color: var(--text); }

.pos-1 .pos-cell { color: var(--gold); }
.pos-2 .pos-cell { color: var(--blue); }
.pos-1, .pos-2 { background: rgba(59,130,246,0.04); }

.person-col { min-width: 80px; }
.person-col-cell { text-align: left !important; }
.person-badge {
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
    color: var(--blue); border-radius: 4px;
    padding: 1px 6px; font-size: 10px; white-space: nowrap;
}

/* ===== FIXTURES ===== */
.group-fixtures { border-top: 1px solid var(--border); }
.fixture {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(42,53,88,0.4);
    transition: background 0.15s;
}
.fixture:last-child { border-bottom: none; }
.fixture:hover { background: rgba(59,130,246,0.04); }
.fixture.live { background: rgba(244,63,94,0.06); }
.fixture.completed { opacity: 0.8; }

.fixture-teams {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.team-a { display: flex; align-items: center; gap: 5px; font-weight: 600; flex: 1; }
.team-b { display: flex; align-items: center; gap: 5px; font-weight: 600; flex: 1; justify-content: flex-end; }
.fixture-score {
    font-weight: 800; font-size: 15px; min-width: 70px; text-align: center;
    color: var(--text); background: var(--bg2);
    border-radius: var(--radius-sm); padding: 3px 8px;
    display: flex; align-items: center; gap: 4px; justify-content: center;
}
.fixture-score.live { color: var(--live); background: rgba(244,63,94,0.1); }
.fixture-meta { font-size: 10px; color: var(--text3); margin-top: 3px; text-align: center; }
.live-badge {
    font-size: 9px; font-weight: 800; background: var(--live);
    color: white; padding: 1px 4px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.flag { font-size: 16px; }
.flag-sm { font-size: 14px; }

/* ===== BRACKET ===== */
.bracket-scroll-wrap { overflow-x: auto; padding-bottom: 16px; }

.bracket-container {
    display: flex; align-items: stretch;
    gap: 0; min-width: 1100px;
}
.bracket-side { display: flex; gap: 0; }
.bracket-left { flex-direction: row; }
.bracket-right { flex-direction: row; }

.bracket-round-col {
    display: flex; flex-direction: column;
    min-width: 160px;
}
.bracket-center-col {
    min-width: 180px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 16px; padding: 0 12px;
}

.round-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text3); padding: 8px 12px;
    text-align: center; border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.bronze-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    color: var(--bronze); text-align: center; padding: 4px 0;
}

.bracket-round {
    flex: 1; display: flex; flex-direction: column;
    justify-content: space-around; padding: 8px 6px;
    border-right: 1px solid var(--border);
}
.bracket-right .bracket-round { border-right: 1px solid var(--border); }
.bracket-center-col .bracket-round { border: none; }

/* ===== BRACKET MATCH CARD ===== */
.bracket-match {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 6px 0;
    transition: all 0.2s;
    cursor: default;
}
.bracket-match:hover { border-color: var(--border-bright); box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.bracket-match.bm-live { border-color: var(--live); box-shadow: 0 0 12px rgba(244,63,94,0.2); }
.bracket-match.bm-done { opacity: 0.9; }

.bm-num {
    font-size: 9px; font-weight: 700; color: var(--text3);
    padding: 3px 8px; background: rgba(0,0,0,0.2);
    letter-spacing: 0.05em;
}
.bm-team {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 8px; border-top: 1px solid rgba(42,53,88,0.5);
    font-size: 12px; font-weight: 500;
}
.bm-team.bm-winner { background: rgba(16,185,129,0.1); color: var(--green); font-weight: 700; }
.bm-flag { font-size: 14px; }
.bm-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-score {
    font-weight: 800; font-size: 14px; min-width: 20px; text-align: center;
}
.bm-live-indicator {
    display: flex; align-items: center; gap: 4px;
    font-size: 9px; font-weight: 800; color: var(--live);
    padding: 3px 8px; background: rgba(244,63,94,0.1);
}

/* Final match bigger */
.bracket-final-wrap .bracket-match {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(245,158,11,0.2);
    min-width: 170px;
}
.bracket-final-wrap .bm-num { background: var(--gold); color: #000; font-weight: 900; }
.bracket-final-wrap .bm-team { font-size: 13px; padding: 10px 12px; }

/* ===== DRAW / LEADERBOARD ===== */
.draw-pending {
    text-align: center; padding: 60px 20px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); max-width: 400px; margin: 0 auto;
}
.draw-icon { font-size: 64px; margin-bottom: 16px; }
.draw-pending h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.draw-pending p { color: var(--text2); margin-bottom: 20px; }

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.leaderboard-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px;
    transition: all 0.2s;
}
.leaderboard-card:hover { border-color: var(--border-bright); }
.winner-card { border-color: var(--gold); box-shadow: 0 0 24px rgba(245,158,11,0.2); }
.eliminated-card { opacity: 0.6; }
.lb-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lb-name { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.lb-remaining { font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 10px; }
.lb-remaining.active { background: rgba(16,185,129,0.15); color: var(--green); }
.lb-remaining.out { background: rgba(239,68,68,0.15); color: var(--red); }
.lb-teams { display: flex; flex-direction: column; gap: 6px; }
.lb-team {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; padding: 5px 8px;
    background: var(--bg2); border-radius: var(--radius-sm);
}
.team-group-badge {
    margin-left: auto; font-size: 10px; font-weight: 700;
    background: var(--bg3); padding: 1px 6px; border-radius: 4px;
    color: var(--text3);
}

/* ===== ADMIN ===== */
.admin-page { max-width: 1200px; margin: 0 auto; }
.admin-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}
.admin-header h1 { font-size: 24px; font-weight: 800; }
.admin-actions { display: flex; gap: 8px; align-items: center; }

.round-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-btn {
    background: var(--card); border: 1px solid var(--border);
    color: var(--text2); padding: 6px 14px; border-radius: 99px;
    cursor: pointer; font-size: 12px; font-weight: 600;
    transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--border-bright); color: var(--text); }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: white; }

.matches-admin-list { display: flex; flex-direction: column; gap: 8px; }
.match-admin-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 16px;
    transition: border-color 0.2s;
}
.match-admin-card.live { border-color: var(--live); }
.match-admin-card.completed { border-color: var(--green); opacity: 0.9; }

.mac-meta {
    display: flex; gap: 10px; align-items: center; margin-bottom: 8px;
    font-size: 11px; color: var(--text3);
}
.mac-num { font-weight: 700; color: var(--text); background: var(--bg2); padding: 1px 8px; border-radius: 4px; }
.mac-round { font-weight: 600; color: var(--text2); }
.mac-status { border-radius: 4px; padding: 1px 8px; font-weight: 600; }
.mac-status.scheduled { background: rgba(90,106,138,0.2); color: var(--text3); }
.mac-status.live { background: rgba(244,63,94,0.2); color: var(--live); }
.mac-status.completed { background: rgba(16,185,129,0.2); color: var(--green); }
.mac-date { margin-left: auto; }

.mac-teams {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; margin-bottom: 10px;
}
.mac-vs { color: var(--text3); flex-shrink: 0; }
.mac-team-name { flex: 1; }
.mac-team-name:first-child { text-align: right; }
.mac-teams .flag { font-size: 18px; }

.mac-score-form { }
.score-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.score-group { display: flex; flex-direction: column; gap: 4px; }
.score-group label { font-size: 10px; color: var(--text3); font-weight: 600; text-transform: uppercase; }
.score-input {
    background: var(--bg2); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm);
    padding: 6px 10px; font-size: 15px; font-weight: 700;
    width: 70px; text-align: center;
}
.score-input-sm { width: 55px; }
.score-input:focus { outline: none; border-color: var(--blue); }
.score-select {
    background: var(--bg2); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm);
    padding: 6px 10px; font-size: 13px; cursor: pointer;
}

/* ===== DRAW ADMIN ===== */
.draw-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; }
@media (max-width: 768px) { .draw-layout { grid-template-columns: 1fr; } }

.draw-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.panel-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; }
.add-person-form { display: flex; gap: 8px; margin-bottom: 16px; }
.persons-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.person-row {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg2); border-radius: var(--radius-sm);
    padding: 8px 12px;
}
.person-name { flex: 1; font-weight: 600; }
.person-teams-count { font-size: 11px; color: var(--text3); }

.draw-controls { border-top: 1px solid var(--border); padding-top: 16px; }
.draw-btn { font-size: 15px; font-weight: 700; padding: 12px; }

.draw-results-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.draw-empty { color: var(--text3); text-align: center; padding: 40px; }
.draw-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.draw-result-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.dr-name { font-weight: 700; font-size: 15px; margin-bottom: 10px; color: var(--gold); }
.dr-teams { display: flex; flex-direction: column; gap: 5px; }
.dr-team { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.dr-group { margin-left: auto; font-size: 10px; color: var(--text3); font-weight: 600; }

/* ===== AUTH ===== */
.auth-page {
    min-height: calc(100vh - 60px);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 40px; width: 100%; max-width: 380px;
    box-shadow: var(--shadow);
    text-align: center;
}
.auth-logo { font-size: 56px; margin-bottom: 16px; }
.auth-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-sub { color: var(--text3); font-size: 13px; margin-bottom: 28px; }
.alert-error {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
    color: var(--red); border-radius: var(--radius-sm);
    padding: 10px 14px; margin-bottom: 16px; font-size: 13px;
}

/* ===== FORMS / BUTTONS ===== */
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-input {
    background: var(--bg2); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm);
    padding: 9px 12px; font-size: 14px; width: 100%;
    font-family: inherit; transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--blue); }
.form-input::placeholder { color: var(--text3); }

.btn-primary {
    background: var(--blue); color: white;
    border: none; border-radius: var(--radius-sm);
    padding: 9px 18px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.15s; font-family: inherit;
    text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-full { width: 100%; text-align: center; }

.btn-secondary {
    background: var(--bg3); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 8px 16px; font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none; display: inline-block;
    transition: border-color 0.15s; font-family: inherit;
}
.btn-secondary:hover { border-color: var(--border-bright); }

.btn-ghost {
    background: none; color: var(--text2);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 8px 16px; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-bright); }

.btn-update {
    background: var(--blue); color: white;
    border: none; border-radius: var(--radius-sm);
    padding: 7px 16px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background 0.15s; white-space: nowrap;
    font-family: inherit; align-self: flex-end;
}
.btn-update:hover { background: var(--blue-dark); }
.btn-update:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-update.saved { background: var(--green); }

.btn-danger-sm {
    background: none; color: var(--red);
    border: 1px solid rgba(239,68,68,0.3); border-radius: 4px;
    padding: 2px 7px; font-size: 12px; cursor: pointer;
    transition: all 0.15s; font-family: inherit;
}
.btn-danger-sm:hover { background: rgba(239,68,68,0.1); }

/* ===== SCORE UPDATE FLASH ===== */
@keyframes scoreFlash {
    0% { background: rgba(59,130,246,0.3); }
    100% { background: transparent; }
}
.score-flash { animation: scoreFlash 1.5s ease-out; }

/* ===== TEAM ASSIGNMENTS ===== */
.panel-hint { font-size: 12px; color: var(--text3); margin-bottom: 16px; }
.team-assign-group { margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.team-assign-group-label {
    padding: 6px 12px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.team-assign-rows { display: flex; flex-direction: column; }
.team-assign-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 12px; border-top: 1px solid var(--border);
    background: var(--bg2);
}
.team-assign-row:first-child { border-top: none; }
.team-assign-name { flex: 1; font-size: 13px; font-weight: 500; }
.team-assign-select {
    background: var(--bg3); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm);
    padding: 4px 8px; font-size: 12px; cursor: pointer; min-width: 130px;
    font-family: inherit;
}
.team-assign-select:focus { outline: none; border-color: var(--blue); }
.team-assign-status { font-size: 12px; color: var(--green); width: 16px; text-align: center; }

/* ===== SYNC STATUS ===== */
.sync-status-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 16px; margin-bottom: 20px; font-size: 13px;
}
.sync-status-bar.sync-on { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.05); }
.sync-status-bar.sync-off { border-color: var(--border); background: var(--bg2); }
.sync-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sync-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--text3); flex-shrink: 0;
}
.sync-dot.active { background: var(--green); animation: pulse 1.4s ease-in-out infinite; }
.sync-time { color: var(--text2); }
.sync-msg { color: var(--text3); font-size: 11px; }
.sync-actions { display: flex; gap: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .site-main { padding: 16px; }
    .groups-grid { grid-template-columns: 1fr; }
    .bracket-container { min-width: 900px; }
    .mac-teams .mac-team-name { font-size: 12px; }
}
@media (max-width: 600px) {
    .header-inner { padding: 0; }
    .brand-sub { display: none; }
    .score-row { gap: 6px; }
}
