/* ═══════════════════════════════════════════════════════════════
   Bulitipps 2026 – Design System
   Uses FluentUI design tokens (CSS vars) so dark/light auto-adapts.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --buli-primary:       #6366f1;
    --buli-primary-light: #a5b4fc;
    --buli-primary-dim:   rgba(99, 102, 241, .14);
    --buli-primary-glow:  rgba(99, 102, 241, .30);
    --header-bg:          linear-gradient(135deg, #080b18 0%, #130f38 55%, #080b18 100%);
}

/* ── Base ─────────────────────────────────────────────────────── */
html, body {
    font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0; padding: 0; height: 100%;
    color: var(--neutral-foreground-rest, #242424);
    background-color: var(--neutral-layer-1, #f5f5f5);
}
*, *::before, *::after { box-sizing: border-box; }

fluent-body-content {
    color: var(--neutral-foreground-rest, #242424);
}

:focus:not(:focus-visible) { outline: none !important; box-shadow: none !important; }
h1, h2, h3, h4, h5, h6 { outline: none; }

/* ── Layout shell ─────────────────────────────────────────────── */
fluent-layout { height: 100vh; display: flex; flex-direction: column; }

.main-shell { display: flex; flex: 1; min-height: 0; overflow: hidden; position: relative; }

.main-content { flex: 1; overflow-y: auto; min-width: 0; }

.content { padding: 28px 32px; max-width: 1320px; margin: 0 auto; }
@media (max-width: 768px) { .content { padding: 16px; } }

/* ── Header (always dark – brand identity) ────────────────────── */
fluent-header {
    background: var(--header-bg) !important;
    border-bottom: 1px solid rgba(99, 102, 241, .22);
    box-shadow: 0 1px 0 rgba(99,102,241,.14), 0 4px 24px rgba(0,0,0,.45);
    padding: 0 16px 0 8px;
    flex-shrink: 0;
    z-index: 100;
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; gap: 8px;
}

.header-brand { display: flex; align-items: center; gap: 8px; }

/* Hamburger / menu toggle in header */
.sidebar-toggle-btn {
    background: none; border: none; cursor: pointer;
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s;
    flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: rgba(255,255,255,.1); }

.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--buli-primary) 0%, #4f46e5 100%);
    border-radius: 11px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 0 20px var(--buli-primary-glow);
    flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
    font-size: 1.1rem; font-weight: 800; letter-spacing: -.3px;
    background: linear-gradient(90deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-sub {
    font-size: .65rem; color: rgba(255,255,255,.38);
    text-transform: uppercase; letter-spacing: .08em; display: none;
}
@media (min-width: 600px) { .brand-sub { display: block; } }

.header-actions { display: flex; align-items: center; gap: 8px; }

/* Theme toggle pill */
.theme-pill {
    display: flex; align-items: center;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 99px; padding: 3px; gap: 2px;
}
.theme-pill-btn {
    background: none; border: none; cursor: pointer;
    width: 28px; height: 28px; border-radius: 99px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.45);
    transition: background .18s, color .18s;
}
.theme-pill-btn.active {
    background: rgba(255,255,255,.14);
    color: rgba(255,255,255,.9);
}
.theme-pill-btn:hover:not(.active) { color: rgba(255,255,255,.7); }

/* User chip */
.user-chip {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 99px; padding: 4px 12px 4px 4px;
}
.user-chip-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--buli-primary) 0%, #4f46e5 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.user-chip-name {
    font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.85);
    max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 520px) { .user-chip-name { display: none; } }

/* Sign-out icon button */
.signout-btn {
    background: none; border: none; cursor: pointer;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s;
}
.signout-btn:hover { background: rgba(255,255,255,.1); }

/* Sign-in button */
.signin-btn {
    display: flex; align-items: center; gap: 6px;
    background: var(--buli-primary); color: #fff;
    border: none; border-radius: 8px;
    padding: 7px 14px; font-size: .85rem; font-weight: 700;
    cursor: pointer; transition: background .18s, transform .15s;
}
.signin-btn:hover { background: var(--buli-primary-light); color: #1e1b4b; transform: translateY(-1px); }

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
    width: 220px;
    background: var(--header-bg);
    border-right: 1px solid rgba(99,102,241,.18);
    display: flex; flex-direction: column;
    flex-shrink: 0; overflow: hidden;
    transition: width .25s cubic-bezier(.4,0,.2,1);
    position: relative;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.03);
}
.sidebar.collapsed { width: 60px; }

/* Mobile: sidebar becomes a full-height drawer */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 56px; left: 0; bottom: 0;
        width: 260px !important;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.4,0,.2,1);
        box-shadow: 4px 0 32px rgba(0,0,0,.5);
    }
    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    /* Always show labels on mobile drawer */
    .sidebar .sidebar-label { opacity: 1 !important; max-width: 200px !important; }
    .sidebar .sidebar-divider-label { opacity: 1 !important; }
    .sidebar .sidebar-divider::after { display: block !important; }
}


.sidebar-nav {
    display: flex; flex-direction: column;
    padding: 12px 8px; gap: 2px; flex: 1; overflow-y: auto; overflow-x: hidden;
}

/* Nav items */
.sidebar-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 10px;
    color: rgba(255,255,255,.52);
    text-decoration: none; font-size: .875rem; font-weight: 500;
    transition: background .16s, color .16s, border-color .16s;
    border: 1px solid transparent;
    white-space: nowrap; overflow: hidden;
    position: relative;
}
.sidebar-nav-item:hover {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.85);
    border-color: rgba(255,255,255,.06);
}
.sidebar-nav-item.active {
    background: rgba(99,102,241,.2);
    color: #c7d2fe;
    border-color: rgba(99,102,241,.3);
}
/* Indigo left-bar accent on active */
.sidebar-nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 60%; background: var(--buli-primary);
    border-radius: 0 3px 3px 0;
}
.sidebar-nav-item.active .sidebar-icon { color: var(--buli-primary-light); }

.sidebar-icon {
    width: 20px; height: 20px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}

.sidebar-label {
    flex: 1; opacity: 1;
    transition: opacity .2s, max-width .25s;
    max-width: 160px; overflow: hidden;
}
.sidebar.collapsed .sidebar-label {
    opacity: 0; max-width: 0; pointer-events: none;
}

/* Divider / group label */
.sidebar-divider {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 10px 4px; overflow: hidden;
}
.sidebar-divider-label {
    font-size: .62rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: rgba(255,255,255,.28);
    white-space: nowrap; overflow: hidden;
    opacity: 1; transition: opacity .2s;
}
.sidebar.collapsed .sidebar-divider-label { opacity: 0; }
.sidebar-divider::after {
    content: ''; flex: 1; height: 1px;
    background: rgba(255,255,255,.07);
    min-width: 0;
}
.sidebar.collapsed .sidebar-divider::after { display: none; }

/* Collapse toggle button */
.sidebar-collapse-btn {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 44px;
    border-top: 1px solid rgba(255,255,255,.06);
    transition: background .16s;
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover { background: rgba(255,255,255,.05); }

/* Hide collapse button on mobile (drawer doesn't need it) */
@media (max-width: 768px) { .sidebar-collapse-btn { display: none; } }

/* ── Page headings ────────────────────────────────────────────── */
.page-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.75rem; font-weight: 800;
    margin: 0 0 4px; letter-spacing: -.5px; outline: none;
}
@media (max-width: 480px) { .page-title { font-size: 1.4rem; } }
.page-subtitle { font-size: .92rem; opacity: .55; margin: 0 0 24px; }
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.section-heading {
    font-size: 1rem; font-weight: 700; margin: 0 0 12px;
    opacity: .75; display: flex; align-items: center; gap: 8px;
}

/* ── Stat cards ───────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px; margin-bottom: 28px;
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.stat-card {
    border-radius: 16px;
    padding: 20px 18px;
    display: flex; flex-direction: column; gap: 6px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.1); }

.stat-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
}
.stat-icon.green  { background: var(--buli-primary-dim); }
.stat-icon.yellow { background: rgba(234,179,8,.14); }
.stat-icon.blue   { background: rgba(59,130,246,.12); }
.stat-icon.purple { background: rgba(168,85,247,.12); }

.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.stat-label { font-size: .75rem; opacity: .55; font-weight: 600;
              text-transform: uppercase; letter-spacing: .05em; }

/* ── Navigation quick-cards (Home) ───────────────────────────── */
.nav-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}
@media (max-width: 480px) {
    .nav-card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

.nav-card {
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    padding: 20px 16px;
    cursor: pointer;
    display: flex; flex-direction: column; gap: 6px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.nav-card:hover {
    border-color: rgba(99,102,241,.5);
    box-shadow: 0 4px 20px rgba(99,102,241,.18);
    transform: translateY(-3px);
}
.nav-card-title { font-size: .95rem; font-weight: 700; margin: 4px 0 2px; }
.nav-card-desc  { font-size: .82rem; opacity: .6; }

/* ── Matchday groups ──────────────────────────────────────────── */
.matchday-group { margin-bottom: 28px; }

.matchday-label {
    font-size: .75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .09em; opacity: .5; margin: 0 0 10px;
    display: flex; align-items: center; gap: 6px;
}

/* ── Match cards ──────────────────────────────────────────────── */
.match-card {
    border-radius: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform .16s, box-shadow .16s, border-color .16s;
    overflow: hidden;
}
.match-card:hover {
    border-color: rgba(99,102,241,.45);
    box-shadow: 0 0 0 1px rgba(99,102,241,.2), 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-1px);
}
.match-card.played { opacity: .75; }

.match-card-inner {
    display: flex; align-items: center;
    padding: 14px 18px; gap: 12px;
}

.match-team       { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.match-team.away  { justify-content: flex-end; flex-direction: row-reverse; }

.team-name { font-weight: 600; font-size: .88rem; white-space: nowrap;
             overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
    .team-name { font-size: .75rem; }
    .match-card-inner { padding: 10px 12px; gap: 8px; }
}

.match-center { display: flex; flex-direction: column; align-items: center;
                min-width: 88px; flex-shrink: 0; }

.score-display { font-size: 1.35rem; font-weight: 900; letter-spacing: -.4px; line-height: 1; }
.score-display .sep { opacity: .35; margin: 0 3px; }

.kickoff-time  { font-size: 1rem; font-weight: 700; }
.kickoff-label { font-size: .65rem; opacity: .5; text-transform: uppercase;
                 letter-spacing: .06em; margin-top: 2px; }

.badge-pill { font-size: .62rem; font-weight: 700; text-transform: uppercase;
              letter-spacing: .06em; padding: 2px 8px; border-radius: 99px;
              display: inline-block; margin-top: 3px; }
.badge-live { background: rgba(239,68,68,.15); color: #ef4444; }
.badge-done { background: var(--neutral-fill-rest); color: var(--neutral-foreground-rest); opacity: .7; }
.badge-soon { background: var(--buli-primary-dim); color: var(--buli-primary-light); }

/* ── Spielplan inline rows ────────────────────────────────────── */
.sp-match {
    border-radius: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color .16s;
}
.sp-match--live {
    border-color: rgba(239,68,68,.35);
    background: linear-gradient(135deg, rgba(239,68,68,.05), var(--neutral-layer-2));
}
.sp-match--played { opacity: .72; }

.sp-match-main {
    display: flex; align-items: center;
    padding: 12px 18px; gap: 10px;
    cursor: pointer;
    transition: background .14s;
}
.sp-match-main:hover { background: rgba(99,102,241,.06); }

.sp-team {
    display: flex; align-items: center; gap: 8px;
    flex: 1; min-width: 0;
}
.sp-team--away { justify-content: flex-end; flex-direction: row-reverse; }

.sp-team-name {
    font-weight: 600; font-size: .88rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sp-center {
    display: flex; flex-direction: column; align-items: center;
    min-width: 96px; flex-shrink: 0;
}
.sp-score {
    font-size: 1.35rem; font-weight: 900; letter-spacing: -.4px; line-height: 1;
}
.sp-sep { opacity: .35; margin: 0 3px; }
@keyframes sp-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}
.sp-score--live { animation: sp-live-pulse 1.8s ease-in-out infinite; }

.sp-countdown {
    font-size: .95rem; font-weight: 700;
    font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}
.sp-mytip {
    font-size: .68rem; opacity: .55; margin-top: 2px;
}
.sp-flag { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }

/* ── TeamAvatar shared component ──────────────────────────────── */
.team-avatar-img {
    object-fit: contain; flex-shrink: 0;
    border-radius: 4px;
}
.team-avatar-emoji { flex-shrink: 0; line-height: 1; }

/* Admin teams list */
.team-logo-img {
    width: 36px; height: 36px; object-fit: contain;
    border-radius: 4px; background: rgba(128,128,128,.08); padding: 2px;
}

.sp-badge-event {
    background: rgba(232,197,90,.15); color: #e8c55a;
    margin-top: 3px; font-size: .58rem;
}

.sp-tip-row {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 18px 10px;
    border-top: 1px solid rgba(99,102,241,.1);
    background: rgba(99,102,241,.03);
}
.sp-tip-label {
    font-size: .72rem; opacity: .5; margin-right: 4px; white-space: nowrap;
}

@media (max-width: 600px) {
    .sp-match-main { padding: 10px 12px; }
    .sp-team-name { font-size: .75rem; }
    .sp-center { min-width: 76px; }
    .sp-tip-row { padding: 6px 12px 10px; }
}

/* ── Match detail hero (always dark bg) ───────────────────────── */
.match-hero {
    border-radius: 24px;
    padding: 36px 24px;
    background: var(--header-bg);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    gap: 32px; flex-wrap: wrap;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    border: 1px solid rgba(99,102,241,.25);
    position: relative; overflow: hidden;
}
.match-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 110%, rgba(99,102,241,.22) 0%, transparent 65%);
    pointer-events: none;
}

.hero-team  { display: flex; flex-direction: column; align-items: center;
              gap: 10px; min-width: 130px; max-width: 200px; text-align: center; }
.hero-team-name { font-size: .95rem; font-weight: 700; color: rgba(255,255,255,.9); }
.hero-badge { font-size: .62rem; padding: 2px 10px; border-radius: 99px;
              background: rgba(255,255,255,.1); color: rgba(255,255,255,.55);
              font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }

.hero-center { display: flex; flex-direction: column; align-items: center;
               gap: 6px; min-width: 110px; }
.hero-score  { font-size: 3.2rem; font-weight: 900; color: #fff;
               letter-spacing: -2px; line-height: 1;
               text-shadow: 0 2px 16px rgba(99,102,241,.5); }
.hero-sep    { opacity: .35; margin: 0 5px; }
.hero-vs     { font-size: 1.3rem; font-weight: 800; color: rgba(255,255,255,.28); letter-spacing: 2px; }
.hero-date   { font-size: .78rem; color: rgba(255,255,255,.45); margin-top: 4px; }

/* ── Tip card (theme-aware) ───────────────────────────────────── */
.tip-card {
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    padding: 22px; margin-bottom: 14px;
}
.tip-card-title { font-size: .95rem; font-weight: 700; margin: 0 0 14px;
                  display: flex; align-items: center; gap: 8px; }
.tip-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tip-team-label { font-weight: 700; min-width: 110px;
                  display: flex; align-items: center; gap: 8px; }
.tip-sep  { font-size: 1.4rem; font-weight: 900; opacity: .3; }

/* ── Leaderboard ──────────────────────────────────────────────── */
/* Chart container */
.lb-chart-wrapper {
    border-radius: 20px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    padding: 24px 20px 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.lb-chart-title {
    font-size: .78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .09em; opacity: .5; margin-bottom: 14px;
    display: flex; align-items: center; gap: 6px;
}
.lb-chart-canvas-wrap { position: relative; width: 100%; }

.leaderboard-row {
    display: flex; align-items: center;
    padding: 14px 18px; border-radius: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    margin-bottom: 8px; gap: 14px;
    transition: box-shadow .15s;
}
.leaderboard-row.rank-1 {
    border-color: rgba(234,179,8,.4);
    background: var(--neutral-layer-2);
    box-shadow: 0 0 0 1px rgba(234,179,8,.2), inset 0 0 0 99px rgba(234,179,8,.04);
}

/* Mobile: stack leaderboard row */
@media (max-width: 540px) {
    .leaderboard-row { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
    .lb-stats-row { flex-wrap: wrap; gap: 12px !important; }
}

.rank-badge {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .9rem; flex-shrink: 0;
    background: var(--neutral-fill-rest);
}
.rank-badge.gold   { background: rgba(234,179,8,.2); color: #ca8a04; }
.rank-badge.silver { background: rgba(148,163,184,.2); color: #94a3b8; }
.rank-badge.bronze { background: rgba(180,120,80,.2); color: #b45309; }

.lb-name { font-weight: 600; flex: 1; min-width: 80px; }
.lb-pts  { font-weight: 800; font-size: 1.1rem; color: var(--buli-primary-light); }
.lb-meta { font-size: .74rem; opacity: .5; }

/* ── WM Banner (Home) ─────────────────────────────────────────── */
.wm-banner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding: 20px 24px; border-radius: 20px; margin-bottom: 28px;
    background: linear-gradient(135deg, #060a1a 0%, #1a1000 60%, #060a1a 100%);
    border: 1px solid rgba(232,197,90,.3);
    box-shadow: 0 0 0 1px rgba(232,197,90,.12), 0 8px 40px rgba(0,0,0,.35);
    cursor: pointer; position: relative; overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.wm-banner:hover {
    border-color: rgba(232,197,90,.55);
    box-shadow: 0 0 0 1px rgba(232,197,90,.3), 0 12px 48px rgba(0,0,0,.4);
    transform: translateY(-2px);
}
.wm-banner-glow {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(232,197,90,.12) 0%, transparent 60%);
    pointer-events: none;
}
.wm-banner-left { display: flex; align-items: center; gap: 16px; position: relative; }
.wm-banner-emoji { font-size: 2.5rem; line-height: 1; filter: drop-shadow(0 0 12px rgba(232,197,90,.5)); }
.wm-banner-title { font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 2px; }
.wm-banner-sub { font-size: .78rem; color: rgba(232,197,90,.7); }
.wm-banner-cta {
    font-size: .85rem; font-weight: 700; color: #e8c55a;
    background: rgba(232,197,90,.12); border: 1px solid rgba(232,197,90,.3);
    padding: 8px 16px; border-radius: 99px; white-space: nowrap; position: relative;
    transition: background .18s;
}
.wm-banner:hover .wm-banner-cta { background: rgba(232,197,90,.22); }
@media (max-width: 540px) { .wm-banner-cta { display: none; } }

/* ── Events overview ──────────────────────────────────────────── */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
@media (max-width: 480px) { .events-grid { grid-template-columns: 1fr; } }

.event-card {
    border-radius: 20px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    padding: 24px; cursor: pointer; position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 12px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.event-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--ev-accent, 232,197,90),.4);
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
.event-card--active {
    border-color: rgba(232,197,90,.4);
    background: linear-gradient(135deg, rgba(232,197,90,.06) 0%, var(--neutral-layer-2) 100%);
}
.event-card-glow {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 0% 0%, rgba(232,197,90,.1) 0%, transparent 50%);
    pointer-events: none;
}
.event-card-top { display: flex; align-items: center; justify-content: space-between; }
.event-emoji { font-size: 2.5rem; }
.event-live-pill {
    font-size: .62rem; font-weight: 800; letter-spacing: .1em;
    background: rgba(232,197,90,.2); color: #e8c55a;
    border: 1px solid rgba(232,197,90,.4);
    padding: 3px 10px; border-radius: 99px;
    animation: pulsePill 2s ease-in-out infinite;
}
@keyframes pulsePill { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

.event-card-body { display: flex; flex-direction: column; gap: 4px; }
.event-card-name { font-size: 1.4rem; font-weight: 900; line-height: 1; }
.event-card-fullname { font-size: .82rem; opacity: .55; }
.event-card-meta { font-size: .75rem; opacity: .5; display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.event-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--neutral-stroke-rest); }
.event-card-teams { font-size: .78rem; font-weight: 700; opacity: .6; }
.event-card-arrow { font-size: 1rem; opacity: .4; transition: opacity .2s, transform .2s; }
.event-card:hover .event-card-arrow { opacity: 1; transform: translateX(4px); }

/* ── Sidebar WM highlight ─────────────────────────────────────── */
.sidebar-nav-item--event {
    background: rgba(232,197,90,.08) !important;
    color: #e8c55a !important;
    border-color: rgba(232,197,90,.18) !important;
}
.sidebar-nav-item--event:hover {
    background: rgba(232,197,90,.15) !important;
    color: #fde68a !important;
}
.sidebar-nav-item--event.active {
    background: rgba(232,197,90,.22) !important;
    color: #fde68a !important;
    border-color: rgba(232,197,90,.35) !important;
}
.sidebar-nav-item--event .sidebar-icon { font-size: 1.1rem; }

/* ── Event detail hero ────────────────────────────────────────── */
.ev-hero {
    border-radius: 24px; margin-bottom: 28px;
    background: linear-gradient(135deg, var(--ev-from, #060a1a) 0%, var(--ev-to, #1a1000) 60%, var(--ev-from, #060a1a) 100%);
    border: 1px solid rgba(232,197,90,.25);
    box-shadow: 0 8px 40px rgba(0,0,0,.35);
    position: relative; overflow: hidden;
    padding: 36px 32px 28px;
}
.ev-hero-glow {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 80%, rgba(232,197,90,.18) 0%, transparent 55%),
                radial-gradient(ellipse at 80% 20%, rgba(99,102,241,.15) 0%, transparent 45%);
    pointer-events: none;
}
.ev-hero-content { display: flex; align-items: flex-start; gap: 24px; position: relative; flex-wrap: wrap; }
.ev-hero-emoji { font-size: 4rem; line-height: 1; filter: drop-shadow(0 0 20px rgba(232,197,90,.5)); flex-shrink: 0; }
.ev-hero-text { flex: 1; min-width: 0; }
.ev-hero-title {
    font-size: 2.5rem; font-weight: 900; color: #fff; line-height: 1;
    margin: 0 0 6px; letter-spacing: -1px;
    background: linear-gradient(90deg, #fff 0%, #e8c55a 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
@media (max-width: 540px) { .ev-hero-title { font-size: 1.8rem; } }
.ev-hero-sub { font-size: .95rem; color: rgba(255,255,255,.6); margin: 0 0 8px; }
.ev-hero-meta { font-size: .82rem; color: rgba(232,197,90,.75); margin: 0 0 8px; }
.ev-hero-desc { font-size: .82rem; color: rgba(255,255,255,.45); margin: 0; line-height: 1.5; }

.ev-hero-stats {
    display: flex; gap: 24px; position: relative;
    margin-top: 24px; padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.1);
    flex-wrap: wrap;
}
.ev-stat { text-align: center; }
.ev-stat-val { font-size: 1.8rem; font-weight: 900; color: #e8c55a; line-height: 1; }
.ev-stat-lbl { font-size: .65rem; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }

/* ── Event section heading ────────────────────────────────────── */
.ev-section-heading {
    font-size: .78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .09em; opacity: .5; margin-bottom: 16px;
    display: flex; align-items: center; gap: 6px;
}

/* ── Groups grid ──────────────────────────────────────────────── */
.ev-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
@media (max-width: 480px) { .ev-groups-grid { grid-template-columns: 1fr; } }

.ev-group-card {
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    overflow: hidden;
    transition: box-shadow .2s, border-color .2s;
}
.ev-group-card:hover {
    border-color: rgba(232,197,90,.3);
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.ev-group-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px 10px;
    background: linear-gradient(90deg, rgba(232,197,90,.12) 0%, transparent 100%);
    border-bottom: 1px solid var(--neutral-stroke-rest);
}
.ev-group-label { font-size: .88rem; font-weight: 800; color: #e8c55a; letter-spacing: .02em; }
.ev-group-played { font-size: .72rem; opacity: .5; }

/* Standings table */
.ev-standings { width: 100%; border-collapse: collapse; padding: 0 16px; }
.ev-standings thead th {
    font-size: .62rem; text-transform: uppercase; letter-spacing: .08em;
    opacity: .4; font-weight: 700; padding: 8px 6px 4px; text-align: left;
}
.ev-standings tbody tr { border-top: 1px solid var(--neutral-stroke-rest); }
.ev-standings tbody tr:first-child { border-top: none; }
.ev-std-rank { width: 24px; text-align: center; font-weight: 700; font-size: .8rem; opacity: .5; padding: 8px 6px; }
.ev-std-team { padding: 8px 6px; display: flex; align-items: center; gap: 6px; }
.ev-std-name { font-size: .82rem; font-weight: 600; }
.ev-std-num { width: 28px; text-align: center; font-size: .82rem; padding: 8px 4px; }
.ev-std-pts { font-weight: 800; }
.ev-std-goals { opacity: .55; font-size: .75rem; }
.ev-std-qualify td { color: var(--neutral-foreground-rest); }
.ev-std-qualify .ev-std-rank { color: #e8c55a; opacity: 1; }
.ev-flag { font-size: 1rem; line-height: 1; }

/* Group fixtures */
.ev-group-fixtures { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.ev-fixture {
    display: flex; flex-direction: column; gap: 6px; align-items: stretch;
    padding: 6px 8px; border-radius: 8px;
    font-size: .8rem;
    background: var(--neutral-layer-3, rgba(128,128,128,.05));
}
.ev-fixture--played { opacity: .7; }
.ev-fx-main { display: flex; align-items: center; gap: 8px; }
.ev-fx-team { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.ev-fx-home { justify-content: flex-end; text-align: right; }
.ev-fx-away { justify-content: flex-start; }
.ev-fx-score { flex-shrink: 0; min-width: 60px; text-align: center; font-weight: 700; }
.ev-fx-time { font-size: .72rem; opacity: .5; }

/* ── Inline tip inputs ─────────────────────────────── */
.ev-fx-tip-row {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 4px 0 2px;
    border-top: 1px solid rgba(128,128,128,.1);
}
.ev-tip-num {
    width: 40px; text-align: center; padding: 2px 4px;
    background: rgba(128,128,128,.1);
    border: 1px solid rgba(128,128,128,.2); border-radius: 6px;
    color: inherit; font-size: .8rem;
    -moz-appearance: textfield;
}
.ev-tip-num::-webkit-inner-spin-button,
.ev-tip-num::-webkit-outer-spin-button { -webkit-appearance: none; }
.ev-tip-num:focus { outline: none; border-color: var(--buli-primary); }
.ev-tip-colon { font-weight: 700; opacity: .5; }
.ev-tip-btn {
    padding: 3px 10px; border-radius: 6px; font-size: .72rem; cursor: pointer;
    border: 1px solid rgba(99,102,241,.4);
    background: rgba(99,102,241,.1);
    color: var(--buli-primary-light, #a5b4fc);
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.ev-tip-btn:hover:not(:disabled) { background: rgba(99,102,241,.22); }
.ev-tip-btn--saved { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); color: #4ade80; }
.ev-tip-btn:disabled { opacity: .45; cursor: not-allowed; }
.ev-fx-mytip-label { text-align: center; font-size: .72rem; opacity: .55; padding-top: 2px; }
.ev-tip-pts { font-weight: 700; color: var(--buli-primary-light, #a5b4fc); }

/* ── Admin Event Management ────────────────────────────────────── */
.admin-ev-back-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .78rem; color: var(--buli-primary-light, #a5b4fc);
    text-decoration: none; opacity: .7; transition: opacity .15s;
}
.admin-ev-back-link:hover { opacity: 1; }
.admin-ev-tabs {
    display: flex; gap: 4px; border-bottom: 1px solid rgba(128,128,128,.15);
    margin-bottom: 4px;
}
.admin-ev-tab {
    padding: 8px 20px; border: none; background: none; cursor: pointer;
    font-size: .88rem; color: inherit; opacity: .5; border-bottom: 2px solid transparent;
    transition: opacity .15s, border-color .15s;
}
.admin-ev-tab.active { opacity: 1; border-bottom-color: var(--buli-primary, #6366f1); }
.admin-ev-tab:hover { opacity: .8; }

/* Fixtures list inside admin group card */
.admin-ev-fixtures { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.admin-ev-fixture { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; border-radius: 8px; background: rgba(128,128,128,.05); }
.admin-ev-fx-teams { display: flex; align-items: center; gap: 4px; font-size: .8rem; flex-wrap: wrap; }
.admin-ev-fx-name { font-weight: 600; }
.admin-ev-fx-vs { opacity: .4; margin: 0 2px; }
.admin-ev-fx-score { display: flex; align-items: center; gap: 6px; }
.admin-score-input { width: 44px !important; font-size: .88rem !important; }
.admin-ev-clear-btn {
    padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(239,68,68,.3);
    background: rgba(239,68,68,.08); color: #f87171; font-size: .72rem;
    cursor: pointer; transition: background .15s;
}
.admin-ev-clear-btn:hover { background: rgba(239,68,68,.18); }

/* K.O. round grid */
.admin-ko-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 8px; }
.admin-ko-card {
    padding: 14px 16px; border-radius: 12px;
    background: var(--neutral-layer-2, rgba(128,128,128,.08));
    border: 1px solid rgba(128,128,128,.12);
}
.admin-ko-teams { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-ko-team { display: flex; align-items: center; gap: 6px; font-size: .85rem; flex: 1; }
.admin-ko-team:last-child { flex-direction: row-reverse; text-align: right; }
.admin-ko-team-name { font-weight: 700; }
.admin-ko-team-input {
    flex: 1; min-width: 0; background: rgba(128,128,128,.12); border: 1px solid rgba(128,128,128,.2);
    border-radius: 6px; padding: 3px 6px; color: inherit; font-size: .8rem;
}
.admin-ko-select {
    flex: 1; min-width: 0; max-width: 180px;
    background: rgba(128,128,128,.12); border: 1px solid rgba(128,128,128,.25);
    border-radius: 6px; padding: 4px 6px; color: inherit; font-size: .8rem;
    cursor: pointer; appearance: auto;
}

/* ── Admin Tips Management ─────────────────────────────────────── */
.tips-admin-stats {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.tips-stat {
    display: flex; flex-direction: column; align-items: center;
    padding: 12px 20px; border-radius: 12px;
    background: var(--neutral-layer-2, rgba(128,128,128,.08));
    border: 1px solid rgba(128,128,128,.1); min-width: 80px;
}
.tips-stat-val { font-size: 1.5rem; font-weight: 800; color: var(--buli-primary-light, #a5b4fc); }
.tips-stat-lbl { font-size: .72rem; opacity: .5; text-transform: uppercase; letter-spacing: .06em; }

.tips-filter-bar {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.tips-filter-input {
    flex: 1; min-width: 200px; padding: 8px 12px;
    background: var(--neutral-layer-2, rgba(128,128,128,.08));
    border: 1px solid rgba(128,128,128,.2); border-radius: 8px;
    color: inherit; font-size: .88rem;
}
.tips-filter-input:focus { outline: none; border-color: var(--buli-primary); }
.tips-filter-select { min-width: 160px; }

.tips-bulk-bar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    padding: 10px 14px; border-radius: 10px;
    background: rgba(128,128,128,.06); border: 1px solid rgba(128,128,128,.1);
    margin-bottom: 16px;
}
.tips-bulk-count { font-size: .82rem; opacity: .55; }

.tips-admin-list { display: flex; flex-direction: column; gap: 8px; }
.tips-admin-row {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 12px 16px; border-radius: 12px;
    background: var(--neutral-layer-2, rgba(128,128,128,.07));
    border: 1px solid rgba(128,128,128,.1);
    transition: background .15s;
}
.tips-admin-row--open { opacity: .75; }
.tips-admin-row:hover { background: var(--neutral-layer-3, rgba(128,128,128,.12)); }

.tips-admin-user { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.tips-admin-username { font-weight: 600; font-size: .85rem; }

.tips-admin-match { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.tips-admin-teams { font-size: .85rem; font-weight: 600; }
.tips-admin-date { font-size: .72rem; opacity: .45; margin-top: 2px; }
.tips-admin-event-tag {
    display: inline-block; margin-left: 6px; padding: 1px 6px;
    border-radius: 4px; font-size: .65rem; font-weight: 700;
    background: rgba(232,197,90,.15); color: #e8c55a;
    text-transform: uppercase; letter-spacing: .04em;
}

.tips-admin-scores { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.tips-score-block { display: flex; flex-direction: column; align-items: center; min-width: 48px; }
.tips-score-lbl { font-size: .65rem; opacity: .4; text-transform: uppercase; letter-spacing: .06em; }
.tips-score-val { font-size: .95rem; font-weight: 700; }

.tips-pts-badge {
    padding: 2px 8px; border-radius: 6px; font-size: .78rem; font-weight: 700;
}
.tips-pts-5 { background: rgba(34,197,94,.15); color: #4ade80; }
.tips-pts-3 { background: rgba(99,102,241,.15); color: #a5b4fc; }
.tips-pts-0 { background: rgba(239,68,68,.1); color: #f87171; }

.tips-admin-actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }

/* ── Logo / Flag picker grid ───────────────────────────────────── */
.logo-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(128,128,128,.15);
    background: rgba(128,128,128,.04);
}
.logo-picker-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; padding: 6px 4px; border-radius: 8px;
    cursor: pointer; border: 2px solid transparent;
    transition: background .12s, border-color .12s;
    min-width: 0;
}
.logo-picker-item:hover { background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.25); }
.logo-picker-item--selected { border-color: var(--buli-primary, #6366f1); background: rgba(99,102,241,.14); }
.logo-picker-img {
    width: 36px; height: 28px; object-fit: contain; flex-shrink: 0;
}
.logo-picker-label {
    font-size: .58rem; opacity: .55; text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    width: 100%;
}

/* ── Admin Teams Management ────────────────────────────────────── */
.teams-grid { display: flex; flex-direction: column; gap: 8px; }
.team-row {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 12px 18px; border-radius: 12px;
    background: var(--neutral-layer-2, rgba(128,128,128,.07));
    border: 1px solid rgba(128,128,128,.1);
    transition: background .15s;
}
.team-row:hover { background: var(--neutral-layer-3, rgba(128,128,128,.12)); }
.team-row-flag { font-size: 1.6rem; flex-shrink: 0; }
.team-row-info { display: flex; flex-direction: column; }
.team-row-name { font-weight: 700; font-size: .92rem; }
.team-row-type { font-size: .72rem; opacity: .45; margin-top: 1px; }
.team-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Footer ───────────────────────────────────────────────────── */
fluent-footer {
    padding: 8px 24px; font-size: .72rem; opacity: .45;
    border-top: 1px solid var(--neutral-stroke-rest);
}

/* ── Auth pages (Login selector, Razor Page forms) ────────────── */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 60vh; padding: 24px 0;
}

.login-card, .auth-card {
    width: 100%; max-width: 420px;
    background: var(--neutral-layer-2);
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 24px; padding: 36px 32px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
}
@media (max-width: 480px) {
    .login-card, .auth-card { padding: 28px 20px; border-radius: 20px; }
}

/* Shared logo block */
.auth-logo {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 28px;
}
.auth-logo .brand-icon {
    display: flex; align-items: center; justify-content: center;
}
.auth-logo .brand-name {
    font-size: 1.4rem; font-weight: 900;
    background: linear-gradient(90deg, var(--neutral-foreground-rest, #1a1a1a) 0%, #6366f1 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.login-subtitle {
    font-size: .88rem; opacity: .55; margin: 0 0 20px; text-align: center;
}

/* Login option buttons */
.login-option {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 12px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-3, rgba(128,128,128,.06));
    text-decoration: none; color: var(--neutral-foreground-rest);
    transition: border-color .18s, box-shadow .18s, transform .18s;
    margin-bottom: 10px; cursor: pointer;
}
.login-option:hover {
    border-color: rgba(99,102,241,.5);
    box-shadow: 0 0 0 1px rgba(99,102,241,.15), 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-1px);
}
.login-option--microsoft:hover { border-color: rgba(0,120,212,.5); box-shadow: 0 0 0 1px rgba(0,120,212,.15), 0 4px 16px rgba(0,0,0,.08); }
.login-option-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.login-option-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.login-option-text strong { font-size: .9rem; font-weight: 700; }
.login-option-text small { font-size: .72rem; opacity: .5; }
.login-option-arrow { opacity: .35; transition: opacity .18s, transform .18s; }
.login-option:hover .login-option-arrow { opacity: .8; transform: translateX(3px); }

.login-register-link {
    display: block; text-align: center; margin-top: 20px;
    font-size: .82rem; color: var(--buli-primary); text-decoration: none;
    opacity: .8; transition: opacity .15s;
}
.login-register-link:hover { opacity: 1; }

/* Auth form elements (Razor Pages) */
.auth-field { margin-bottom: 16px; }
.auth-label { display: block; font-size: .78rem; font-weight: 600; opacity: .65; margin-bottom: 6px; }
.auth-input {
    width: 100%; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--neutral-stroke-rest, #d1d5db);
    background: var(--neutral-layer-1, #fff);
    color: var(--neutral-foreground-rest, #111);
    font-size: .9rem; font-family: inherit;
    transition: border-color .18s, box-shadow .18s;
    box-sizing: border-box;
}
.auth-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.auth-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 11px 20px; border-radius: 10px;
    background: #6366f1; color: #fff; border: none;
    font-size: .92rem; font-weight: 700; font-family: inherit;
    cursor: pointer; text-decoration: none;
    transition: background .18s, transform .15s;
    margin-top: 8px;
}
.auth-btn:hover { background: #4f46e5; transform: translateY(-1px); }
.auth-btn--outline {
    background: transparent; color: var(--neutral-foreground-rest, #111);
    border: 1px solid var(--neutral-stroke-rest, #d1d5db);
}
.auth-btn--outline:hover { background: var(--neutral-layer-3, rgba(128,128,128,.06)); transform: translateY(-1px); }

.auth-error {
    background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3);
    color: #ef4444; border-radius: 10px; padding: 10px 14px;
    font-size: .85rem; margin-bottom: 16px;
}

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 16px 0; color: var(--neutral-foreground-rest);
    opacity: .35; font-size: .78rem;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: var(--neutral-stroke-rest, #d1d5db);
}

.auth-footer {
    text-align: center; font-size: .82rem; opacity: .6; margin-top: 20px;
}
.auth-footer a { color: var(--buli-primary); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Admin user management ────────────────────────────────────── */
.user-mgmt-grid { display: flex; flex-direction: column; gap: 8px; }

.user-mgmt-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border-radius: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    flex-wrap: wrap;
}

.user-mgmt-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .95rem;
    background: var(--buli-primary-dim);
    color: var(--buli-primary-light);
}
.user-mgmt-avatar--admin {
    background: rgba(234,179,8,.18);
    color: #ca8a04;
}

.user-mgmt-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-mgmt-name { font-weight: 700; font-size: .92rem; }
.user-mgmt-meta { font-size: .74rem; opacity: .5; }
.user-mgmt-provider { text-transform: uppercase; font-size: .65rem; letter-spacing: .06em; }

.user-mgmt-role-badge {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; padding: 3px 10px; border-radius: 99px;
    background: var(--neutral-fill-rest);
    color: var(--neutral-foreground-rest); opacity: .6;
}
.user-mgmt-role-badge--admin {
    background: rgba(234,179,8,.18); color: #ca8a04; opacity: 1;
}

/* ── Invite hint on register page ────────────────────────────── */
.invite-hint {
    display: flex; align-items: center; gap: 8px;
    background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.25);
    color: var(--buli-primary-light); border-radius: 10px;
    padding: 10px 14px; font-size: .85rem; margin-bottom: 16px;
}

/* ── Invite token rows (AdminInvites) ─────────────────────────── */
.invite-row {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 16px 20px; border-radius: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    margin-bottom: 8px; flex-wrap: wrap;
}
.invite-row--active { border-color: rgba(99,102,241,.3); }
.invite-row--used { opacity: .65; }

.invite-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.invite-label { font-weight: 700; font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.invite-meta { font-size: .74rem; opacity: .55; }
.invite-url {
    display: flex; align-items: center; gap: 6px; margin-top: 6px;
    background: var(--neutral-layer-3, rgba(128,128,128,.06));
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 8px; padding: 6px 10px;
}
.invite-url code {
    font-size: .72rem; font-family: 'Cascadia Code', 'Fira Code', monospace;
    word-break: break-all; flex: 1; opacity: .75;
}

.invite-badge {
    font-size: .62rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; padding: 2px 8px; border-radius: 99px;
}
.invite-badge--used    { background: rgba(34,197,94,.15); color: #16a34a; }
.invite-badge--expired { background: var(--neutral-fill-rest); opacity: .7; }

/* ── Extended user management ─────────────────────────────────── */
.user-mgmt-row--locked {
    opacity: .65;
    border-color: rgba(239,68,68,.25);
    background: rgba(239,68,68,.03);
}

.user-mgmt-avatar--locked {
    background: rgba(239,68,68,.15);
    color: #ef4444;
}

.user-mgmt-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.user-mgmt-self-badge {
    font-size: .62rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; padding: 2px 7px; border-radius: 99px;
    background: var(--buli-primary-dim); color: var(--buli-primary-light);
    vertical-align: middle;
}

.user-mgmt-locked-badge {
    font-size: .62rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; padding: 2px 7px; border-radius: 99px;
    background: rgba(239,68,68,.15); color: #ef4444;
    vertical-align: middle;
}

/* ── Blazor error UI ──────────────────────────────────────────── */
#blazor-error-ui {
    background: #1e0a0a; color: #fca5a5;
    border-top: 1px solid #7f1d1d;
    bottom: 0; left: 0; padding: 10px 20px;
    position: fixed; width: 100%; z-index: 9999; display: none;
    font-size: .85rem;
}
#blazor-error-ui .dismiss {
    cursor: pointer; position: absolute;
    right: 14px; top: 50%; transform: translateY(-50%); opacity: .7;
}

/* ── Match add/edit dialog ────────────────────────────────────── */
.match-dialog-section {
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(128,128,128,.05);
    border: 1px solid rgba(128,128,128,.1);
    margin-bottom: 12px;
}
.match-dialog-section:last-child { margin-bottom: 0; }

.match-dialog-section-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    opacity: .45;
    margin-bottom: 12px;
}

.match-dialog-teams-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: start;
}

.match-dialog-vs {
    font-size: .75rem;
    font-weight: 700;
    opacity: .4;
    padding-top: 28px;
    text-align: center;
}

.match-dialog-clear-btn {
    flex-shrink: 0;
    background: rgba(128,128,128,.12);
    border: 1px solid rgba(128,128,128,.2);
    border-radius: 6px;
    padding: 5px 9px;
    color: inherit;
    cursor: pointer;
    font-size: .8rem;
    opacity: .6;
    margin-top: 1px;
    transition: opacity .15s, background .15s;
}
.match-dialog-clear-btn:hover { opacity: 1; background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.4); }

@media (max-width: 480px) {
    .match-dialog-teams-grid { grid-template-columns: 1fr; }
    .match-dialog-vs { padding-top: 0; }
}

/* ── AdminMatches list ────────────────────────────────────────── */
.matches-admin-list { display: flex; flex-direction: column; gap: 8px; }

.matches-admin-row {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 12px 16px; border-radius: 12px;
    background: var(--buli-surface); border: 1px solid var(--buli-border);
}

.matches-admin-teams { display: flex; align-items: center; gap: 10px; flex: 2; min-width: 200px; }
.matches-admin-team  { display: flex; align-items: center; gap: 6px; }
.matches-admin-team-name { font-weight: 600; font-size: .9rem; }
.matches-admin-vs    { font-size: .75rem; opacity: .45; font-weight: 700; }

.matches-admin-date  { display: flex; align-items: center; gap: 5px; font-size: .8rem; opacity: .6; min-width: 130px; }
.matches-admin-result { display: flex; align-items: center; gap: 6px; min-width: 110px; }
.matches-admin-score { font-size: 1rem; font-weight: 700; }
.matches-admin-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ── Pagination ───────────────────────────────────────────────── */
.pagination-bar {
    display: flex; align-items: center; justify-content: center;
    gap: 14px; padding: 16px 0; margin-top: 4px;
}
.pagination-btn {
    padding: 6px 16px; border-radius: 8px; border: 1px solid var(--buli-border);
    background: var(--buli-surface); color: inherit; cursor: pointer;
    font-size: .85rem; transition: background .15s;
}
.pagination-btn:hover:not(:disabled) { background: var(--buli-surface-hover, rgba(255,255,255,.06)); }
.pagination-btn:disabled { opacity: .35; cursor: default; }
.pagination-info { font-size: .82rem; opacity: .55; }

/* ── TeamPickerInput ──────────────────────────────────────────── */
.team-picker-wrapper { position: relative; }

.team-picker-trigger {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 12px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--buli-border); background: var(--buli-surface);
    min-height: 38px; user-select: none;
}
.team-picker-trigger--open { border-color: var(--buli-primary-light, #60a5fa); }
.team-picker-trigger:focus { outline: 2px solid var(--buli-primary-light, #60a5fa); outline-offset: 2px; }

.team-picker-selected-name { flex: 1; font-size: .9rem; font-weight: 500; }
.team-picker-placeholder    { flex: 1; font-size: .9rem; opacity: .45; }
.team-picker-chevron        { font-size: .6rem; opacity: .5; }

.team-picker-panel {
    margin-top: 4px;
    background: var(--buli-surface); border: 1px solid var(--buli-border);
    border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.25);
    overflow: hidden;
}
.team-picker-search {
    width: 100%; padding: 8px 12px; border: none; border-bottom: 1px solid var(--buli-border);
    background: transparent; color: inherit; font-size: .88rem; outline: none;
    box-sizing: border-box;
}
.team-picker-list { max-height: 240px; overflow-y: auto; }
.team-picker-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 12px; cursor: pointer; transition: background .1s;
}
.team-picker-item:hover { background: rgba(255,255,255,.06); }
.team-picker-item--selected { background: rgba(96,165,250,.12); }
.team-picker-item-name { font-size: .88rem; }
.team-picker-empty { padding: 14px 12px; font-size: .82rem; opacity: .45; text-align: center; }

/* ── Profile page ─────────────────────────────────────────────── */
.profile-sections { display: flex; flex-direction: column; gap: 20px; max-width: 700px; }

.profile-card {
    background: var(--buli-surface); border: 1px solid var(--buli-border);
    border-radius: 14px; overflow: hidden;
}

.profile-card-title {
    display: flex; align-items: center; gap: 8px;
    font-size: .9rem; font-weight: 600; margin: 0;
    padding: 14px 20px; border-bottom: 1px solid var(--buli-border);
    opacity: .8;
}

.profile-card-body {
    padding: 20px;
    display: flex; flex-direction: column; gap: 12px;
}

.profile-hint { font-size: .85rem; opacity: .55; margin: 0; }

.profile-providers { display: flex; flex-direction: column; gap: 10px; }

.profile-provider {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 10px;
    border: 1px solid var(--buli-border);
}
.profile-provider--active  { background: rgba(99,102,241,.06); border-color: rgba(99,102,241,.25); }
.profile-provider--inactive { opacity: .55; }

.profile-provider-icon  { font-size: 1.2rem; }
.profile-provider-info  { flex: 1; }
.profile-provider-name  { font-weight: 600; font-size: .88rem; }
.profile-provider-detail { font-size: .78rem; opacity: .6; margin-top: 2px; }

.profile-dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.profile-dl dt { font-size: .8rem; opacity: .5; font-weight: 500; display: flex; align-items: center; }
.profile-dl dd { margin: 0; font-size: .88rem; display: flex; align-items: center; }

/* ── Auth helpers (info box) ──────────────────────────────────── */
.auth-info {
    padding: 12px 14px; border-radius: 10px; font-size: .85rem;
    border: 1px solid rgba(99,102,241,.3); background: rgba(99,102,241,.08);
    color: var(--accent-fill-rest, #818cf8); line-height: 1.5;
}

/* user-chip as link */
a.user-chip { text-decoration: none; color: inherit; }
a.user-chip:hover .user-chip-avatar { filter: brightness(1.15); }

/* ── Teams: hide body until theme + nav are fully settled ────── */
/*
 * The <head> inline script adds 'in-iframe' to <html> whenever the page is
 * embedded in a Teams tab (both first-ever load and cached loads).
 * teams-sso.js / Blazor's OnAfterRenderAsync call bulitippsReveal() once the
 * correct theme and nav-less layout are in place.  The fade-in transition
 * ensures the reveal feels intentional rather than abrupt.
 */
html.in-iframe body {
    opacity: 0;
    pointer-events: none;
}
/* Transition only in the revealed state so the initial hide is instant. */
html:not(.in-iframe) body {
    opacity: 1;
    transition: opacity .2s ease;
}

/* ── Microsoft Teams embedded mode ───────────────────────────── */
/*
 * 'html.in-teams' is set immediately in <head> from the localStorage cache,
 * before <body> exists.  This suppresses nav elements from the very first
 * paint so they are never rendered visibly.
 * 'body.in-teams' is the runtime alias set by teams-sso.js — kept as backup.
 */
html.in-teams fluent-header,
html.in-teams .sidebar,
html.in-teams fluent-footer,
body.in-teams fluent-header,
body.in-teams .sidebar,
body.in-teams fluent-footer {
    display: none !important;
}

/* Tighter content padding in the compact Teams tab viewport */
html.in-teams .content,
body.in-teams .content {
    padding: 14px 16px;
}

/* ── Back button (only visible inside Teams) ──────────────────── */
/*
 * Add <button class="teams-back-btn" onclick="history.back()"> to any
 * detail page that is navigated to by clicking a card.  The button is
 * invisible outside Teams so it doesn't affect the standalone web app.
 */
.teams-back-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    margin-bottom: 18px;
    background: transparent;
    border: 1px solid var(--neutral-stroke-rest, rgba(0,0,0,.15));
    border-radius: 8px;
    cursor: pointer;
    font-size: .875rem;
    font-family: inherit;
    color: var(--neutral-foreground-rest);
    transition: background .15s, border-color .15s;
}
.teams-back-btn:hover {
    background: var(--neutral-fill-hover, rgba(0,0,0,.05));
    border-color: var(--neutral-stroke-hover, rgba(0,0,0,.25));
}
html.in-teams .teams-back-btn,
body.in-teams .teams-back-btn {
    display: flex;
}

/* ── Spielplan – search toolbar ──────────────────────────────── */
.sp-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.sp-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    background: var(--neutral-layer-2, rgba(128,128,128,.07));
    border: 1px solid var(--neutral-stroke-rest, rgba(128,128,128,.2));
    border-radius: 8px;
    padding: 6px 10px;
    transition: border-color .15s;
}
.sp-search-wrap:focus-within {
    border-color: var(--buli-primary, #6366f1);
    box-shadow: 0 0 0 2px var(--buli-primary-dim, rgba(99,102,241,.14));
}

.sp-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: inherit;
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    min-width: 0;
}
.sp-search-input::placeholder { opacity: .5; }

.sp-search-clear {
    background: none;
    border: none;
    padding: 0 2px;
    cursor: pointer;
    color: inherit;
    opacity: .45;
    font-size: .85rem;
    line-height: 1;
    transition: opacity .15s;
}
.sp-search-clear:hover { opacity: .9; }

/* ── Spielplan – result count row ────────────────────────────── */
.sp-result-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    opacity: .6;
    margin-bottom: 12px;
}
.sp-result-sep { opacity: .5; }

/* ── Spielplan – pagination ──────────────────────────────────── */
.sp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.sp-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--neutral-layer-2, rgba(128,128,128,.07));
    border: 1px solid var(--neutral-stroke-rest, rgba(128,128,128,.18));
    border-radius: 7px;
    color: inherit;
    font-size: .85rem;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.sp-page-btn:hover:not(:disabled) {
    background: var(--neutral-fill-hover, rgba(128,128,128,.13));
    border-color: var(--neutral-stroke-hover, rgba(128,128,128,.35));
}
.sp-page-btn:disabled {
    opacity: .35;
    cursor: default;
}
.sp-page-btn--active {
    background: var(--buli-primary-dim, rgba(99,102,241,.18));
    border-color: var(--buli-primary, #6366f1);
    color: var(--buli-primary, #6366f1);
    font-weight: 600;
}

.sp-page-ellipsis {
    padding: 0 4px;
    opacity: .45;
    font-size: .85rem;
    line-height: 34px;
}

/* ── Event Timetable ────────────────────────────────────────────────────── */
.ev-tt-day-header {
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    opacity: .45;
    padding: 18px 4px 7px;
    border-bottom: 1px solid rgba(128,128,128,.15);
    margin-bottom: 6px;
}
.ev-tt-day-header:first-child {
    padding-top: 4px;
}
.ev-tt-stage-label {
    font-size: .68rem;
    opacity: .4;
    white-space: nowrap;
    min-width: 72px;
    text-align: right;
    margin-right: 6px;
    flex-shrink: 0;
}

/* ── SharePoint web part nav bar ────────────────────────────────────────── */
.sp-top-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--neutral-layer-2, rgba(255,255,255,.04));
    border-bottom: 1px solid var(--neutral-stroke-layer-rest, rgba(128,128,128,.12));
    position: sticky;
    top: 0;
    z-index: 10;
}

.sp-nav-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--neutral-foreground-rest, rgba(255,255,255,.8));
    font-size: .8rem;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}

.sp-nav-btn:hover:not(:disabled) {
    background: var(--neutral-fill-secondary-hover, rgba(128,128,128,.12));
}

.sp-nav-btn:disabled {
    opacity: .35;
    cursor: default;
}

.sp-nav-home--active {
    opacity: .35;
    cursor: default;
}

.sp-nav-back {
    margin-right: 4px;
}

/* ══════════════════════════════════════════════════════════════════
   Leaderboard Redesign 2026
   ══════════════════════════════════════════════════════════════════ */

/* ── Podium ───────────────────────────────────────────────────────── */
.lb-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    padding: 0 8px;
}

.lb-podium-step {
    flex: 1;
    max-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.lb-podium-medal {
    font-size: 1.4rem;
    line-height: 1;
}

.lb-podium-step.gold .lb-podium-medal { font-size: 1.6rem; }

.lb-podium-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 800; color: #fff;
    flex-shrink: 0;
}

.lb-podium-avatar--gold {
    width: 58px; height: 58px;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 0 24px rgba(245,158,11,.45), 0 0 0 3px rgba(245,158,11,.25);
}

.lb-podium-avatar--silver {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    box-shadow: 0 0 16px rgba(148,163,184,.3);
}

.lb-podium-avatar--bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
    box-shadow: 0 0 16px rgba(180,120,80,.3);
}

.lb-podium-name {
    font-weight: 700; font-size: .88rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%;
}

.lb-podium-pts {
    font-size: 1rem; font-weight: 800; margin-bottom: 6px;
}

.lb-podium-step.gold .lb-podium-pts   { color: #f59e0b; font-size: 1.1rem; }
.lb-podium-step.silver .lb-podium-pts { color: #94a3b8; }
.lb-podium-step.bronze .lb-podium-pts { color: #cd7f32; }

.lb-podium-pedestal {
    width: 100%;
    border-radius: 10px 10px 0 0;
}

.lb-podium-pedestal--gold {
    height: 80px;
    background: linear-gradient(180deg, rgba(245,158,11,.22) 0%, rgba(245,158,11,.08) 100%);
    border: 1px solid rgba(245,158,11,.3);
    border-bottom: none;
}

.lb-podium-pedestal--silver {
    height: 60px;
    background: linear-gradient(180deg, rgba(148,163,184,.18) 0%, rgba(148,163,184,.06) 100%);
    border: 1px solid rgba(148,163,184,.22);
    border-bottom: none;
}

.lb-podium-pedestal--bronze {
    height: 44px;
    background: linear-gradient(180deg, rgba(180,120,80,.18) 0%, rgba(180,120,80,.06) 100%);
    border: 1px solid rgba(180,120,80,.22);
    border-bottom: none;
}

@media (max-width: 480px) {
    .lb-podium { gap: 6px; }
    .lb-podium-avatar { width: 40px; height: 40px; font-size: .95rem; }
    .lb-podium-avatar--gold { width: 48px; height: 48px; font-size: 1.1rem; }
    .lb-podium-name { font-size: .78rem; }
}

/* ── Season stats strip ───────────────────────────────────────────── */
.lb-season-strip {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 28px;
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    padding: 18px 24px;
    flex-wrap: wrap;
    row-gap: 16px;
}

.lb-season-stat {
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.lb-season-stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1;
    color: var(--buli-primary-light);
}

.lb-season-stat-lbl {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .5;
    margin-top: 4px;
}

.lb-season-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--neutral-stroke-rest);
    flex-shrink: 0;
    margin: 0 4px;
}

@media (max-width: 480px) {
    .lb-season-strip { padding: 14px 16px; }
    .lb-season-stat-divider { display: none; }
    .lb-season-stat { min-width: calc(50% - 16px); }
    .lb-season-stat-val { font-size: 1.3rem; }
}

/* ── Chart tabs ───────────────────────────────────────────────────── */
.lb-chart-tabs {
    display: flex;
    gap: 4px;
}

.lb-chart-tab {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--neutral-stroke-rest);
    background: transparent;
    color: var(--neutral-foreground-rest);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
    white-space: nowrap;
}

.lb-chart-tab.active {
    background: var(--buli-primary-dim);
    border-color: var(--buli-primary);
    color: var(--buli-primary-light);
}

.lb-chart-tab:hover:not(.active) {
    background: var(--neutral-fill-rest);
}

/* Chart panel fade-in animation */
.lb-chart-panel {
    animation: lbFadeIn .3s ease;
}

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

/* ── Improved leaderboard rows (v2) ──────────────────────────────── */
.lb-row-v2 {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    margin-bottom: 8px;
    transition: box-shadow .15s, border-color .15s;
}

.lb-row-v2:hover {
    box-shadow: 0 2px 14px rgba(0,0,0,.08);
    border-color: rgba(99,102,241,.25);
}

.lb-row-gold {
    border-color: rgba(245,158,11,.35);
    box-shadow: 0 0 0 1px rgba(245,158,11,.15), inset 0 0 0 99px rgba(245,158,11,.03);
}

.lb-row-silver {
    border-color: rgba(148,163,184,.3);
}

.lb-row-bronze {
    border-color: rgba(180,120,80,.3);
}

/* Player name + progress bar */
.lb-player-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lb-progress-wrap {
    height: 4px;
    background: var(--neutral-stroke-rest);
    border-radius: 99px;
    overflow: hidden;
}

.lb-progress-fill {
    height: 100%;
    background: var(--buli-primary);
    border-radius: 99px;
    transition: width .9s cubic-bezier(.4,0,.2,1);
}

.lb-progress-fill--gold {
    background: linear-gradient(90deg, #f59e0b 0%, #fcd34d 100%);
}

/* Stats group in row */
.lb-row-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.lb-row-stat {
    text-align: center;
    min-width: 40px;
}

.lb-row-stat-val {
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.2;
}

.lb-row-pts {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--buli-primary-light);
}

.lb-row-pts--gold {
    color: #f59e0b;
}

.lb-row-stat-lbl {
    font-size: .68rem;
    opacity: .5;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 1px;
}

/* Exact score icon */
.lb-exact-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 700;
}

.lb-exact-icon {
    font-size: .82rem;
}

@media (max-width: 600px) {
    .lb-row-v2 { padding: 12px 12px; gap: 10px; }
    .lb-row-stats { gap: 14px; }
    .lb-row-stat--hide-sm { display: none; }
}

.section-title {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neutral-foreground-rest);
}

.admin-database-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 8px;
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
}

.admin-database-file span {
    min-width: 0;
    overflow-wrap: anywhere;
}
