/* ===== Global ===== */
body {
    background-color: #f0f2f5;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ===== Auth pages ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a3a2a 0%, #2d6a4f 50%, #1a3a2a 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-logo {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-title {
    text-align: center;
    font-weight: 700;
    color: #1a3a2a;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* ===== Navbar ===== */
.main-navbar {
    background: linear-gradient(90deg, #1a3a2a, #2d6a4f) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 0.5rem 1rem;
}

.navbar-brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff !important;
}

/* ===== Header stats bar ===== */
.stats-bar {
    background: linear-gradient(90deg, #2d6a4f, #40916c);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(45,106,79,0.3);
}

.stats-bar .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stats-bar .stat-label {
    font-size: 0.75rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Prediction table ===== */
.match-table {
    font-size: 0.875rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.match-table thead th {
    background: #1a3a2a;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 0.6rem 0.5rem;
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-table td {
    vertical-align: middle;
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.match-table .pred-input {
    width: 52px;
    text-align: center;
    padding: 0.2rem 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid #dee2e6;
}

.match-table .pred-input:focus {
    border-color: #2d6a4f;
    box-shadow: 0 0 0 0.2rem rgba(45,106,79,0.25);
}

.match-table .pred-input:disabled {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.country-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.flag-img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.result-cell {
    font-weight: 700;
    text-align: center;
    font-size: 0.95rem;
    white-space: nowrap;
}

.points-badge {
    display: inline-block;
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 4px;
    padding: 2px 6px;
}

.points-5 { background:#d4edda; color:#155724; }
.points-4 { background:#cce5ff; color:#004085; }
.points-3 { background:#fff3cd; color:#856404; }
.points-2 { background:#d1ecf1; color:#0c5460; }
.points-1 { background:#f8d7da; color:#721c24; }
.points-0 { background:#f8f9fa; color:#6c757d; }
.points-none { background:#f8f9fa; color:#adb5bd; }

/* ===== Group section headers ===== */
.group-header {
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    color: #fff;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

/* ===== Group row colors ===== */
.group-A  { background-color: #fffde7 !important; }
.group-B  { background-color: #e8f5e9 !important; }
.group-C  { background-color: #e3f2fd !important; }
.group-D  { background-color: #fce4ec !important; }
.group-E  { background-color: #f3e5f5 !important; }
.group-F  { background-color: #e0f7fa !important; }
.group-G  { background-color: #fff3e0 !important; }
.group-H  { background-color: #e8eaf6 !important; }
.group-I  { background-color: #f9fbe7 !important; }
.group-J  { background-color: #fbe9e7 !important; }
.group-K  { background-color: #e0f2f1 !important; }
.group-L  { background-color: #ede7f6 !important; }
.group-ko { background-color: #eceff1 !important; }

/* ===== Group header colors ===== */
.gh-A { background:#f9a825; }
.gh-B { background:#388e3c; }
.gh-C { background:#1565c0; }
.gh-D { background:#c62828; }
.gh-E { background:#6a1b9a; }
.gh-F { background:#00838f; }
.gh-G { background:#e65100; }
.gh-H { background:#283593; }
.gh-I { background:#558b2f; }
.gh-J { background:#bf360c; }
.gh-K { background:#00695c; }
.gh-L { background:#4527a0; }

/* ===== Admin area ===== */
.admin-nav .nav-link {
    color: #495057;
    font-weight: 500;
}

.admin-nav .nav-link.active {
    color: #2d6a4f;
    border-bottom: 3px solid #2d6a4f;
    background: transparent;
}

.result-input-sm {
    width: 56px;
    text-align: center;
    padding: 0.2rem;
    font-weight: 600;
}

/* ===== Toggle switch ===== */
.toggle-card {
    border: 2px solid #2d6a4f;
    border-radius: 12px;
}

/* ===== Leaderboard ===== */
.leaderboard-rank-1 { background: linear-gradient(90deg, #fff8e1, #fffde7) !important; }
.leaderboard-rank-2 { background: linear-gradient(90deg, #f5f5f5, #fafafa) !important; }
.leaderboard-rank-3 { background: linear-gradient(90deg, #fbe9e7, #fff8f7) !important; }

.medal-1 { color: #f9a825; font-size: 1.1rem; }
.medal-2 { color: #9e9e9e; font-size: 1.1rem; }
.medal-3 { color: #bf360c; font-size: 1.1rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .match-table { font-size: 0.75rem; }
    .match-table .pred-input { width: 44px; }
    .flag-img { width: 18px; height: 14px; }
    .stats-bar .stat-value { font-size: 1.25rem; }
    .country-cell { flex-direction: column; align-items: flex-start; gap: 2px; }
}
