/* ═══════════════════════════════════════════════════════════════
   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:          transparent;
    --header-border:      color-mix(in srgb, var(--neutral-stroke-rest, rgba(15,23,42,.12)), transparent 42%);
    --header-shadow:      none;
    --header-fg:          var(--neutral-foreground-rest, #111827);
    --header-muted:       color-mix(in srgb, var(--neutral-foreground-rest, #111827), transparent 48%);
    --header-control-bg:  transparent;
    --header-control-brd: color-mix(in srgb, var(--neutral-stroke-rest, rgba(15,23,42,.12)), transparent 18%);
    --brand-mark-bg:      transparent;
    --brand-mark-fg:      #0f766e;
    --brand-mark-shadow:  none;
    --nav-surface:        color-mix(in srgb, var(--neutral-layer-1, #f8fafc), transparent 4%);
    --app-header-height:  64px;
}

[data-theme="dark"] {
    --header-bg:          transparent;
    --header-border:      rgba(255,255,255,.055);
    --header-shadow:      none;
    --header-fg:          rgba(255,255,255,.88);
    --header-muted:       rgba(255,255,255,.50);
    --header-control-bg:  transparent;
    --header-control-brd: rgba(255,255,255,.10);
    --brand-mark-bg:      transparent;
    --brand-mark-fg:      #5eead4;
    --brand-mark-shadow:  none;
    --nav-surface:        color-mix(in srgb, var(--neutral-layer-1, #0b1220), transparent 8%);
}

/* ── 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 ───────────────────────────────────────────────────── */
fluent-header,
.app-header {
    height: var(--app-header-height);
    background: var(--header-bg) !important;
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--header-shadow);
    padding: 0 18px 0 12px;
    flex-shrink: 0;
    z-index: 100;
    position: relative;
    overflow: visible;
    backdrop-filter: none;
}

fluent-header::after,
.app-header::after {
    display: none;
}

.header-gutters {
    margin: 0.5rem 1rem !important;
}

.header-inner {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
    align-items: center;
    height: var(--app-header-height); gap: 12px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.header-brand { display: flex; align-items: center; gap: 10px; min-width: 0; justify-self: start; }

.brand-icon {
    width: 40px; height: 40px;
    background: var(--brand-mark-bg);
    border: 1px solid transparent;
    border-radius: 13px; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--brand-mark-shadow);
    flex-shrink: 0;
    color: var(--brand-mark-fg);
}

.brand-toggle {
    cursor: pointer;
    padding: 0;
    color: var(--brand-mark-fg);
    transition: transform .16s, filter .16s, box-shadow .16s;
}

.brand-toggle:hover {
    transform: translateY(-1px);
    filter: none;
    background: color-mix(in srgb, var(--brand-mark-fg), transparent 92%);
    border-color: color-mix(in srgb, var(--brand-mark-fg), transparent 72%);
    box-shadow: none;
}

.brand-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand-mark-fg), transparent 68%);
    outline-offset: 3px;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
    font-size: 1.16rem; font-weight: 900; letter-spacing: 0;
    color: var(--header-fg);
    text-shadow: none;
}
.brand-sub {
    font-size: .66rem; color: var(--header-muted);
    text-transform: uppercase; letter-spacing: .08em; display: none;
}
@media (min-width: 600px) { .brand-sub { display: block; } }

.top-nav {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
    border-radius: 999px;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

.top-nav-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border-radius: 0;
    color: var(--header-muted);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 760;
    white-space: nowrap;
    position: relative;
    transition: color .16s, transform .15s;
}

.top-nav-link::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: transparent;
    transition: background .16s, transform .16s;
    transform: scaleX(.55);
}

.top-nav-link:hover {
    color: var(--header-fg);
    background: transparent;
}

.top-nav-link.active {
    color: var(--header-fg);
    background: transparent;
    box-shadow: none;
}

.top-nav-link.active::after {
    background: #14b8a6;
    transform: scaleX(1);
}

.header-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }

@media (max-width: 1120px) {
    .header-inner {
        display: flex;
        justify-content: space-between;
    }

    .top-nav {
        display: none;
    }
}

/* Theme toggle pill */
.theme-pill {
    display: flex; align-items: center;
    background: var(--header-control-bg);
    border: 1px solid transparent;
    border-radius: 999px; padding: 4px; gap: 3px;
    backdrop-filter: blur(12px);
}
.theme-pill-btn {
    background: none; border: none; cursor: pointer;
    width: 30px; height: 30px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    color: var(--header-muted);
    transition: background .18s, color .18s;
}
.theme-pill-btn.active {
    background: color-mix(in srgb, var(--brand-mark-fg), transparent 88%);
    color: var(--brand-mark-fg);
    box-shadow: none;
}
.theme-pill-btn:hover:not(.active) { color: var(--header-fg); }

/* User chip */
.user-chip {
    display: flex; align-items: center; gap: 8px;
    background: var(--header-control-bg);
    border: 1px solid transparent;
    border-radius: 999px; padding: 5px 13px 5px 5px;
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: background .16s, border-color .16s, transform .15s;
}
.user-chip:hover {
    background: color-mix(in srgb, var(--brand-mark-fg), transparent 92%);
    border-color: color-mix(in srgb, var(--brand-mark-fg), transparent 58%);
    transform: translateY(-1px);
}
.user-chip-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: color-mix(in srgb, var(--brand-mark-fg), transparent 86%);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-mark-fg);
    font-size: .75rem; font-weight: 800; flex-shrink: 0;
}

.player-avatar-img {
    object-fit: cover;
    overflow: hidden;
    background: #fff;
    color: transparent;
}

.user-chip-name {
    font-size: .82rem; font-weight: 700; color: var(--header-fg);
    max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 520px) { .user-chip-name { display: none; } }
@media (max-width: 520px) {
    fluent-header,
    .app-header { padding: 0 10px 0 8px; }
    .header-inner { gap: 8px; }
    .brand-icon { width: 38px; height: 38px; border-radius: 13px; }
    .brand-name { font-size: 1.02rem; }
    .theme-pill { display: none; }
}

/* Sign-out icon button */
.signout-btn {
    background: var(--header-control-bg);
    border: 1px solid transparent;
    cursor: pointer;
    width: 38px; height: 38px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s, border-color .18s, transform .15s;
    color: var(--header-muted);
}
.signout-btn:hover {
    background: color-mix(in srgb, var(--brand-mark-fg), transparent 92%);
    border-color: color-mix(in srgb, var(--brand-mark-fg), transparent 58%);
    transform: translateY(-1px);
    color: var(--header-fg);
}

/* Sign-in button */
.signin-btn {
    display: flex; align-items: center; gap: 6px;
    background: transparent;
    color: var(--header-fg);
    border: 1px solid transparent; border-radius: 12px;
    padding: 9px 15px; font-size: .86rem; font-weight: 800;
    cursor: pointer; transition: background .18s, transform .15s;
}
.signin-btn:hover {
    background: color-mix(in srgb, var(--brand-mark-fg), transparent 90%);
    border-color: color-mix(in srgb, var(--brand-mark-fg), transparent 54%);
    color: var(--header-fg);
    transform: translateY(-1px);
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
    width: 248px;
    background: var(--nav-surface);
    border-right: 1px solid var(--header-border);
    display: flex; flex-direction: column;
    flex-shrink: 0; overflow: hidden;
    transition: width .25s cubic-bezier(.4,0,.2,1);
    position: relative;
    box-shadow: none;
}
.sidebar.collapsed { width: 72px; }

/* Mobile: sidebar becomes a full-height drawer */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 286px !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 .sidebar-brand-card {
        margin: 14px 12px 8px !important;
        padding: 12px !important;
        justify-content: flex-start !important;
    }
    .sidebar .sidebar-brand-copy {
        display: flex !important;
    }
}

.sidebar-scrim {
    display: none;
}

@media (max-width: 768px) {
    .sidebar-scrim {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 190;
        border: 0;
        padding: 0;
        background: rgba(2,6,23,.48);
        backdrop-filter: blur(3px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .sidebar-scrim.open {
        opacity: 1;
        pointer-events: auto;
    }
}


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

.sidebar-brand-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 12px 8px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(20,184,166,.08));
    overflow: hidden;
}

@media (min-width: 769px) {
    .sidebar-brand-card {
        display: none;
    }
}

.sidebar-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--brand-mark-fg);
    background: var(--brand-mark-bg);
    border: 1px solid var(--header-control-brd);
    box-shadow: var(--brand-mark-shadow);
}

.sidebar-brand-close {
    padding: 0;
    cursor: pointer;
    font: inherit;
    transition: background .16s, border-color .16s, transform .15s;
}

.sidebar-brand-close:hover {
    background: color-mix(in srgb, var(--brand-mark-fg), transparent 92%);
    border-color: color-mix(in srgb, var(--brand-mark-fg), transparent 68%);
    transform: translateY(-1px);
}

.sidebar-brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-brand-copy strong {
    color: var(--header-fg);
    font-size: .94rem;
    font-weight: 850;
    white-space: nowrap;
}

.sidebar-brand-copy span {
    margin-top: 2px;
    color: var(--header-muted);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-brand-card {
    margin: 14px 10px 8px;
    padding: 8px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-brand-copy {
    display: none;
}

/* Nav items */
.sidebar-nav-item {
    display: flex; align-items: center; gap: 11px;
    min-height: 42px;
    padding: 10px 11px; border-radius: 14px;
    color: var(--header-muted);
    text-decoration: none; font-size: .9rem; font-weight: 650;
    transition: background .16s, color .16s, border-color .16s, transform .15s;
    border: 1px solid transparent;
    white-space: nowrap; overflow: hidden;
    position: relative;
}
.sidebar-nav-item:hover {
    background: color-mix(in srgb, var(--brand-mark-fg), transparent 94%);
    color: var(--header-fg);
    border-color: color-mix(in srgb, var(--brand-mark-fg), transparent 76%);
    transform: translateX(2px);
}
.sidebar-nav-item.active {
    background: transparent;
    color: var(--header-fg);
    border-color: transparent;
    box-shadow: none;
}
/* Indigo left-bar accent on active */
.sidebar-nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 56%; background: var(--brand-mark-fg);
    border-radius: 0 999px 999px 0;
}
.sidebar-nav-item.active .sidebar-icon {
    color: var(--brand-mark-fg);
    background: color-mix(in srgb, var(--brand-mark-fg), transparent 90%);
    border-color: color-mix(in srgb, var(--brand-mark-fg), transparent 72%);
}

.sidebar-icon {
    width: 24px; height: 24px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    border: 1px solid transparent;
    transition: background .16s, border-color .16s, color .16s;
}

.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;
}

.sidebar.collapsed .sidebar-nav {
    padding-left: 10px;
    padding-right: 10px;
}

.sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
}

.sidebar.collapsed .sidebar-nav-item:hover {
    transform: none;
}

/* Divider / group label */
.sidebar-divider {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 10px 6px; overflow: hidden;
}
.sidebar-divider--top {
    padding-top: 8px;
}
.sidebar-divider-label {
    font-size: .62rem; font-weight: 850; letter-spacing: .1em;
    text-transform: uppercase; color: color-mix(in srgb, var(--header-muted), transparent 18%);
    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: var(--header-border);
    min-width: 0;
}
.sidebar.collapsed .sidebar-divider::after { display: none; }

/* Collapse toggle button */
.sidebar-collapse-btn {
    background: transparent;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 48px;
    border-top: 1px solid var(--header-border);
    transition: background .16s;
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover { background: color-mix(in srgb, var(--brand-mark-fg), transparent 94%); }

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

fluent-footer {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px calc(8px + env(safe-area-inset-bottom));
    background: transparent;
    border-top: 1px solid color-mix(in srgb, var(--neutral-stroke-rest), transparent 36%);
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 54%);
    font-size: .71rem;
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
    max-width: 1120px;
    line-height: 1.4;
}

.app-footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--neutral-foreground-rest), transparent 74%);
}

.app-footer-inner a {
    display: inline-flex;
    align-items: center;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 28%);
    font-weight: 850;
    text-decoration: none;
    transition: color .16s, border-color .16s, background .16s;
}

.app-footer-inner a:hover {
    color: var(--neutral-foreground-rest);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--brand-mark-fg), transparent 40%);
    text-underline-offset: 4px;
}

@media (max-width: 520px) {
    .app-footer-inner {
        gap: 6px 8px;
    }

    .app-footer-optional,
    .app-footer-optional + .app-footer-dot {
        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: 20px; flex-wrap: wrap; gap: 14px;
    padding: 22px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 22px;
    background:
        linear-gradient(135deg, var(--neutral-layer-2), color-mix(in srgb, var(--neutral-layer-2), var(--buli-primary) 5%));
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}
.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; }

/* ── Home Dashboard 2026 ─────────────────────────────────────── */
.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid rgba(20,184,166,.24);
    background:
        linear-gradient(135deg, rgba(8,11,24,.96) 0%, rgba(16,23,47,.94) 50%, rgba(5,48,45,.9) 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    position: relative;
    overflow: hidden;
}

.home-hero::after {
    content: '';
    position: absolute;
    inset: auto -10% -42% 30%;
    height: 190px;
    background: linear-gradient(90deg, rgba(20,184,166,.28), rgba(99,102,241,.20), rgba(245,158,11,.14));
    transform: rotate(-7deg);
    pointer-events: none;
}

.home-hero-copy,
.home-score-card {
    position: relative;
    z-index: 1;
}

.home-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #99f6e4;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.2rem, 5.4vw, 5rem);
    line-height: .96;
    font-weight: 900;
    letter-spacing: 0;
}

.home-hero p {
    margin: 14px 0 0;
    max-width: 650px;
    color: rgba(255,255,255,.72);
    line-height: 1.55;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.home-hero-actions fluent-button,
.home-hero-actions fluent-button::part(control) {
    color: #ffffff;
}

.home-hero-actions fluent-button[appearance="outline"]::part(control) {
    border-color: rgba(255,255,255,.34);
    background: rgba(255,255,255,.08);
}

.home-hero-actions fluent-button[appearance="outline"]:hover::part(control) {
    border-color: rgba(255,255,255,.52);
    background: rgba(255,255,255,.14);
}

.home-score-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
}

.home-score-card > span {
    color: rgba(255,255,255,.62);
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.home-score-card > strong {
    margin: 18px 0;
    font-size: clamp(3rem, 7vw, 5.2rem);
    line-height: .85;
    color: #99f6e4;
    font-weight: 950;
}

.home-score-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.home-score-meta span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.82);
    font-size: .74rem;
    font-weight: 800;
}

.home-worldcup-card {
    width: 100%;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(245,158,11,.28);
    background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(20,184,166,.08));
    color: var(--neutral-foreground-rest);
    cursor: pointer;
    text-align: left;
    transition: transform .16s, border-color .16s, box-shadow .16s;
}

.home-worldcup-card:hover {
    transform: translateY(-1px);
    border-color: rgba(245,158,11,.42);
    box-shadow: 0 12px 28px rgba(245,158,11,.10);
}

.home-worldcup-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245,158,11,.16);
    font-size: 1.35rem;
}

.home-worldcup-card strong,
.home-worldcup-card span {
    display: block;
    min-width: 0;
}

.home-worldcup-card strong {
    font-size: .96rem;
    font-weight: 850;
}

.home-worldcup-card span {
    margin-top: 3px;
    font-size: .78rem;
    opacity: .62;
}

.home-worldcup-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border-radius: 999px;
    background: rgba(245,158,11,.16);
    color: #b45309;
    font-size: .78rem;
    font-weight: 850;
}

.home-stats-strip {
    margin-bottom: 20px;
    border-radius: 18px;
}

.home-focus-panel {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.home-focus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.home-focus-card {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 15px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 17px;
    background: var(--neutral-layer-1);
    color: var(--neutral-foreground-rest);
    text-align: left;
    cursor: pointer;
    transition: transform .16s, border-color .16s, box-shadow .16s;
}

.home-focus-card:hover {
    transform: translateY(-1px);
    border-color: rgba(99,102,241,.35);
    box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

.home-focus-card.urgent {
    border-color: rgba(99,102,241,.34);
    box-shadow: inset 0 0 0 99px rgba(99,102,241,.035);
}

.home-focus-card strong {
    font-size: 1.9rem;
    font-weight: 950;
    line-height: 1;
    color: var(--buli-primary-light);
}

.home-focus-card span {
    font-size: .86rem;
    font-weight: 850;
}

.home-focus-card small {
    color: var(--neutral-foreground-hint);
    font-size: .74rem;
    line-height: 1.35;
}

.home-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: 20px;
    align-items: start;
}

.home-actions-panel,
.home-next-panel {
    padding: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.home-section-head h2 {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 850;
}

.home-section-head span {
    display: block;
    margin-top: 3px;
    font-size: .78rem;
    opacity: .58;
}

.home-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-action-card {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 7px;
    padding: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 18px;
    background: var(--neutral-layer-1);
    color: var(--neutral-foreground-rest);
    text-align: left;
    cursor: pointer;
    transition: transform .16s, border-color .16s, box-shadow .16s, background .16s;
}

.home-action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99,102,241,.34);
    box-shadow: 0 14px 32px rgba(15,23,42,.08);
}

.home-action-card.primary {
    background: linear-gradient(135deg, rgba(20,184,166,.15), rgba(99,102,241,.12));
    border-color: rgba(20,184,166,.28);
}

.home-action-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: auto;
    border-radius: 15px;
    color: #14b8a6;
    background: rgba(20,184,166,.12);
    border: 1px solid rgba(20,184,166,.20);
}

.home-action-card strong {
    font-size: 1rem;
    font-weight: 850;
}

.home-action-card small {
    color: var(--neutral-foreground-rest);
    opacity: .58;
    font-size: .78rem;
    line-height: 1.35;
}

.home-rules-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.home-rules-strip div {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
}

.home-rules-strip strong {
    display: block;
    color: var(--buli-primary-light);
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 900;
}

.home-rules-strip span {
    display: block;
    margin-top: 5px;
    font-size: .72rem;
    opacity: .58;
    line-height: 1.35;
}

.home-next-list {
    display: grid;
    gap: 8px;
}

.home-next-list .match-card {
    margin-bottom: 0;
}

.home-empty-panel {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--neutral-stroke-rest);
    border-radius: 16px;
    color: var(--neutral-foreground-rest);
    opacity: .58;
    font-size: .88rem;
}

/* ── Admin action pages ───────────────────────────────────────── */
.admin-hero,
.admin-action-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 20px;
    padding: 30px;
    border-radius: 24px;
    border: 1px solid rgba(99,102,241,.24);
    background:
        linear-gradient(135deg, rgba(8,11,24,.96) 0%, rgba(16,23,47,.94) 52%, rgba(5,48,45,.9) 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.admin-hero::after,
.admin-action-hero::after {
    content: '';
    position: absolute;
    inset: auto -10% -42% 30%;
    height: 190px;
    background: linear-gradient(90deg, rgba(99,102,241,.25), rgba(20,184,166,.20), rgba(245,158,11,.12));
    transform: rotate(-7deg);
    pointer-events: none;
}

.admin-hero > div,
.admin-action-hero > div {
    position: relative;
    z-index: 1;
}

.admin-hero-copy {
    min-width: 0;
}

.admin-hero-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    min-width: min(100%, 320px);
    position: relative;
    z-index: 1;
}

.admin-kicker,
.admin-action-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #a7f3d0;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.admin-hero h1,
.admin-action-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: .96;
    font-weight: 900;
    letter-spacing: 0;
}

.admin-hero p,
.admin-action-hero p {
    margin: 14px 0 0;
    max-width: 620px;
    color: rgba(255,255,255,.72);
    line-height: 1.55;
}

.admin-content-card,
.admin-action-panel {
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.admin-full-width,
.admin-content-card,
.admin-action-panel,
.matches-filter-panel,
.tips-filter-bar,
.tips-bulk-bar,
.tips-admin-stats,
.admin-push-stats,
.tips-admin-list,
.matches-admin-list,
.user-mgmt-grid,
.events-grid,
.teams-grid,
.admin-service-grid,
.admin-database-browser,
.admin-db-grid,
.admin-openliga-note,
.admin-openliga-empty,
.admin-openliga-stats,
.admin-openliga-table-wrap,
.admin-push-empty,
.profile-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.admin-content-card > :first-child {
    margin-top: 0;
}

.admin-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 760px) {
    .admin-hero,
    .admin-action-hero {
        flex-direction: column;
        padding: 24px;
    }

    .admin-hero-actions {
        justify-content: flex-start;
        min-width: 0;
    }
}

@media (max-width: 980px) {
    .home-hero,
    .home-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .home-focus-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .home-hero {
        padding: 22px;
        border-radius: 18px;
    }

    .home-worldcup-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .home-worldcup-action {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .home-action-grid,
    .home-rules-strip {
        grid-template-columns: 1fr;
    }

    .home-actions-panel,
    .home-next-panel {
        padding: 14px;
        border-radius: 16px;
    }
}

/* ── 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; }
}

/* ── Spielplan 2026 ───────────────────────────────────────────── */
.matches-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 20px;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid rgba(20,184,166,.24);
    background:
        linear-gradient(135deg, rgba(8,11,24,.96) 0%, rgba(16,23,47,.94) 52%, rgba(5,48,45,.9) 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    position: relative;
    overflow: hidden;
}

.matches-hero::after {
    content: '';
    position: absolute;
    inset: auto -10% -42% 30%;
    height: 190px;
    background: linear-gradient(90deg, rgba(20,184,166,.28), rgba(99,102,241,.20), rgba(245,158,11,.14));
    transform: rotate(-7deg);
    pointer-events: none;
}

.matches-hero-copy,
.matches-hero-panel {
    position: relative;
    z-index: 1;
}

.matches-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #99f6e4;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.matches-hero h1 {
    margin: 0;
    font-size: clamp(2.35rem, 5.6vw, 5rem);
    line-height: .96;
    font-weight: 900;
    letter-spacing: 0;
}

.matches-hero p {
    margin: 14px 0 0;
    max-width: 660px;
    color: rgba(255,255,255,.72);
    line-height: 1.55;
}

.matches-hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
}

.matches-hero-panel span {
    color: rgba(255,255,255,.62);
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.matches-hero-panel strong {
    display: block;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
    color: #99f6e4;
    font-weight: 950;
}

.matches-hero-panel small {
    color: rgba(255,255,255,.72);
    line-height: 1.35;
}

.matches-stats-strip {
    margin-bottom: 20px;
    border-radius: 18px;
}

.matches-filter-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.matches-status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.matches-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(145px, .8fr));
    gap: 10px;
    align-items: end;
}

.admin-matches-filter-panel {
    margin-bottom: 20px;
}

.admin-matches-filter-grid {
    grid-template-columns: minmax(220px, 1.35fr) repeat(5, minmax(140px, .8fr));
}

.matches-field {
    display: grid;
    gap: 7px;
}

.matches-field > span:first-child {
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .58;
}

.matches-field input,
.matches-field select,
.matches-field-control {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 14px;
    background: var(--neutral-layer-1);
    color: var(--neutral-foreground-rest);
    padding: 0 12px;
    font: inherit;
    outline: none;
}

.matches-field select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image:
        linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--neutral-foreground-rest), transparent 42%) 50%),
        linear-gradient(135deg, color-mix(in srgb, var(--neutral-foreground-rest), transparent 42%) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 19px,
        calc(100% - 12px) 19px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.matches-field input:focus,
.matches-field select:focus,
.matches-field-control:focus-within {
    border-color: var(--buli-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}

.matches-field-control {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 40%);
}

.matches-field-control input {
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.matches-reset-btn {
    justify-self: start;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(239,68,68,.24);
    background: rgba(239,68,68,.08);
    color: #ef4444;
    font-size: .78rem;
    font-weight: 850;
    cursor: pointer;
}

.matches-schedule {
    display: grid;
    gap: 18px;
}

.matches-day-group {
    padding: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.matches-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.matches-day-header span,
.matches-day-header small {
    display: block;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .55;
}

.matches-day-header strong {
    display: block;
    margin-top: 2px;
    font-size: 1.08rem;
    font-weight: 850;
}

.matches-card {
    border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
    color: var(--neutral-foreground-rest);
    overflow: hidden;
    margin-bottom: 10px;
    transition: transform .16s, border-color .16s, box-shadow .16s;
}

.matches-card:last-child {
    margin-bottom: 0;
}

.matches-card:hover {
    transform: translateY(-1px);
    border-color: rgba(99,102,241,.32);
    box-shadow: 0 12px 28px rgba(15,23,42,.07);
}

.matches-card.is-live {
    border-color: rgba(239,68,68,.36);
    box-shadow: inset 0 0 0 99px rgba(239,68,68,.035);
}

.matches-card.is-played {
    opacity: .76;
}

.matches-card.has-tip:not(.is-played) {
    border-color: rgba(20,184,166,.28);
}

.matches-card-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(118px, 158px) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
}

.matches-team {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.matches-team--away {
    justify-content: flex-end;
}

.matches-team-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .92rem;
    font-weight: 800;
}

.matches-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.matches-score {
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 950;
}

.matches-score span {
    opacity: .36;
    margin: 0 4px;
}

.matches-score.live {
    animation: sp-live-pulse 1.8s ease-in-out infinite;
}

.matches-countdown {
    font-size: .98rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.matches-status,
.matches-event-pill,
.matches-my-tip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.matches-status.done {
    background: var(--neutral-fill-rest);
    color: var(--neutral-foreground-rest);
    opacity: .72;
}

.matches-status.live {
    background: rgba(239,68,68,.14);
    color: #ef4444;
}

.matches-event-pill {
    background: rgba(245,158,11,.13);
    color: #b45309;
}

.matches-my-tip {
    background: rgba(20,184,166,.13);
    color: #0f766e;
}

.matches-tip-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 14px;
    border-top: 1px solid color-mix(in srgb, var(--neutral-stroke-rest), transparent 20%);
    background: linear-gradient(135deg, rgba(20,184,166,.055), rgba(99,102,241,.045));
}

.matches-tip-label {
    font-size: .74rem;
    font-weight: 850;
    opacity: .62;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

.matches-tip-inputs {
    display: flex;
    align-items: center;
    gap: 7px;
}

.matches-tip-inputs input {
    width: 48px;
    height: 38px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 12px;
    background: var(--neutral-layer-1);
    color: var(--neutral-foreground-rest);
    text-align: center;
    font-weight: 900;
    font-size: .95rem;
}

.matches-tip-inputs input:focus {
    outline: none;
    border-color: var(--buli-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}

.matches-tip-inputs span {
    font-weight: 900;
    opacity: .46;
}

.matches-tip-btn {
    min-height: 38px;
    padding: 0 15px;
    border-radius: 12px;
    border: 1px solid var(--buli-primary);
    background: var(--buli-primary);
    color: #fff;
    font-size: .82rem;
    font-weight: 850;
    cursor: pointer;
}

.matches-tip-btn.saved {
    background: #14b8a6;
    border-color: #14b8a6;
}

.matches-tip-btn:disabled {
    opacity: .6;
    cursor: wait;
}

.matches-locked-tip {
    padding: 9px 16px 12px;
    border-top: 1px solid var(--neutral-stroke-rest);
    color: var(--neutral-foreground-rest);
    opacity: .68;
    font-size: .8rem;
    font-weight: 750;
}

.matches-empty {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px;
    border: 1px dashed var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
}

.matches-empty h2 {
    margin: 12px 0 4px;
    font-size: 1.35rem;
}

.matches-empty p {
    margin: 0;
    opacity: .58;
}

@media (max-width: 980px) {
    .matches-hero {
        grid-template-columns: 1fr;
    }

    .matches-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-matches-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .matches-hero {
        padding: 22px;
        border-radius: 18px;
    }

    .matches-filter-grid {
        grid-template-columns: 1fr;
    }

    .admin-matches-filter-grid {
        grid-template-columns: 1fr;
    }

    .matches-day-group,
    .matches-filter-panel {
        padding: 12px;
        border-radius: 16px;
    }

    .matches-card-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        text-align: center;
    }

    .matches-team,
    .matches-team--away {
        justify-content: center;
    }

    .matches-team--away {
        flex-direction: row-reverse;
    }

    .matches-center {
        order: -1;
    }

    .matches-tip-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .matches-tip-label {
        width: 100%;
        text-align: center;
    }
}

/* ── Match detail hero ────────────────────────────────────────── */
.match-hero {
    border-radius: 24px;
    padding: 36px 24px;
    background:
        linear-gradient(135deg, rgba(20,184,166,.12), transparent 44%),
        var(--neutral-layer-1);
    color: var(--neutral-foreground-rest);
    display: flex; align-items: center; justify-content: center;
    gap: 32px; flex-wrap: wrap;
    margin-bottom: 22px;
    box-shadow: 0 22px 60px rgba(15,23,42,.20);
    border: 1px solid var(--neutral-stroke-rest);
    position: relative; overflow: hidden;
}

[data-theme="dark"] .match-hero {
    background: var(--header-bg);
    color: #fff;
    border-color: rgba(99,102,241,.25);
}

.match-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 110%, rgba(20,184,166,.18) 0%, transparent 65%);
    pointer-events: none;
}

[data-theme="dark"] .match-hero::before {
    background: radial-gradient(ellipse at 50% 110%, rgba(99,102,241,.22) 0%, transparent 65%);
}

.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: 800; color: var(--neutral-foreground-rest); }
.hero-badge { font-size: .62rem; padding: 2px 10px; border-radius: 99px;
              background: color-mix(in srgb, var(--neutral-layer-2), transparent 24%);
              color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 38%);
              border: 1px solid var(--neutral-stroke-rest);
              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: var(--neutral-foreground-rest);
               letter-spacing: -2px; line-height: 1;
               text-shadow: none; }
.hero-sep    { opacity: .35; margin: 0 5px; }
.hero-vs     { font-size: 1.3rem; font-weight: 800; color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 58%); letter-spacing: 2px; }
.hero-date   { font-size: .78rem; color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 42%); margin-top: 4px; }

[data-theme="dark"] .hero-team-name { color: rgba(255,255,255,.9); }
[data-theme="dark"] .hero-badge {
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.55);
    border-color: rgba(255,255,255,.12);
}
[data-theme="dark"] .hero-score {
    color: #fff;
    text-shadow: 0 2px 16px rgba(99,102,241,.5);
}
[data-theme="dark"] .hero-vs { color: rgba(255,255,255,.28); }
[data-theme="dark"] .hero-date { color: rgba(255,255,255,.45); }

/* ── Tip card (theme-aware) ───────────────────────────────────── */
.tip-card {
    border-radius: 22px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    padding: 24px; margin-bottom: 18px;
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}
.tip-card-title { font-size: 1.05rem; font-weight: 850; margin: 0 0 16px;
                  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; }

/* ── Match detail 2026 ───────────────────────────────────────── */
.match-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    margin-bottom: 12px;
    padding: 0 13px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 999px;
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    font-size: .82rem;
    font-weight: 850;
    cursor: pointer;
}

.match-detail-back:hover {
    border-color: rgba(99,102,241,.32);
    background: var(--neutral-layer-1);
}

.match-detail-hero {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
}

.match-detail-hero.is-live {
    border-color: rgba(239,68,68,.36);
}

.match-detail-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 160px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.match-detail-team {
    display: grid;
    justify-items: start;
    gap: 8px;
    min-width: 0;
}

.match-detail-team--away {
    justify-items: end;
    text-align: right;
}

.match-detail-team span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-size: clamp(1.22rem, 3vw, 2.2rem);
    line-height: 1.05;
    font-weight: 950;
}

.match-detail-team small {
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.09);
    color: rgba(255,255,255,.62);
    font-size: .66rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.match-detail-scoreboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.match-detail-scoreboard .matches-score {
    color: #fff;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    text-shadow: 0 14px 34px rgba(0,0,0,.22);
}

.match-detail-vs {
    color: rgba(255,255,255,.42);
    font-size: clamp(1.3rem, 4vw, 2.4rem);
    font-weight: 950;
    letter-spacing: .08em;
}

.matches-status.upcoming {
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.76);
}

.match-detail-scoreboard .matches-status.done {
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.78);
    opacity: 1;
}

.match-detail-meta-panel {
    min-height: 176px;
}

.match-detail-meta-tip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.14);
}

.match-detail-meta-tip span {
    font-size: .68rem;
}

.match-detail-meta-tip b {
    color: #99f6e4;
    font-size: 1.35rem;
    font-weight: 950;
}

.match-detail-card {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.match-detail-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--neutral-foreground-rest);
    font-size: 1.05rem;
    font-weight: 900;
}

.match-detail-note {
    padding: 13px 15px;
    border-radius: 14px;
    font-size: .88rem;
    font-weight: 750;
}

.match-detail-note.success {
    border: 1px solid rgba(20,184,166,.22);
    background: rgba(20,184,166,.10);
    color: #0f766e;
}

.match-detail-note.warning {
    border: 1px solid rgba(245,158,11,.24);
    background: rgba(245,158,11,.10);
    color: #b45309;
}

.match-detail-tip-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.match-detail-tip-team {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--neutral-foreground-rest);
    font-weight: 850;
}

.match-detail-tip-team span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-detail-tip-team--away {
    justify-content: flex-end;
}

.match-detail-tip-inputs input {
    width: 58px;
    height: 46px;
    font-size: 1.15rem;
}

.match-detail-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.match-detail-trend-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.match-detail-result-item {
    padding: 15px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 16px;
    background: var(--neutral-layer-1);
}

.match-detail-result-item span {
    display: block;
    color: var(--neutral-foreground-hint);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.match-detail-result-item strong {
    display: block;
    margin-top: 7px;
    color: var(--neutral-foreground-rest);
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 950;
}

.match-detail-result-item.highlight strong {
    color: #14b8a6;
}

@media (max-width: 760px) {
    .match-detail-teams,
    .match-detail-tip-grid,
    .match-detail-trend-grid,
    .match-detail-result-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .match-detail-team,
    .match-detail-team--away,
    .match-detail-tip-team,
    .match-detail-tip-team--away {
        justify-content: center;
        justify-items: center;
        text-align: center;
    }

    .match-detail-scoreboard {
        order: -1;
    }

    .match-detail-tip-inputs {
        justify-content: center;
    }
}

/* ── 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;
    color: var(--neutral-foreground-rest);
}
.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-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 280px);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 20px;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid rgba(245,158,11,.26);
    background:
        linear-gradient(135deg, rgba(8,11,24,.96) 0%, rgba(30,24,18,.94) 52%, rgba(5,48,45,.9) 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    position: relative;
    overflow: hidden;
}

.events-hero::after {
    content: '';
    position: absolute;
    inset: auto -10% -42% 30%;
    height: 190px;
    background: linear-gradient(90deg, rgba(245,158,11,.26), rgba(99,102,241,.18), rgba(20,184,166,.18));
    transform: rotate(-7deg);
    pointer-events: none;
}

.events-hero-copy,
.events-feature-card {
    position: relative;
    z-index: 1;
}

.events-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #fcd34d;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.events-hero h1 {
    margin: 0;
    font-size: clamp(2.35rem, 5.6vw, 5rem);
    line-height: .96;
    font-weight: 900;
    letter-spacing: 0;
}

.events-hero p {
    margin: 14px 0 0;
    max-width: 680px;
    color: rgba(255,255,255,.72);
    line-height: 1.55;
}

.events-feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: #fff;
    backdrop-filter: blur(14px);
    cursor: pointer;
}

.events-feature-card span {
    font-size: 2.3rem;
}

.events-feature-card strong {
    font-size: 2.7rem;
    line-height: .9;
    font-weight: 950;
    color: #fcd34d;
}

.events-feature-card small {
    color: rgba(255,255,255,.68);
    font-weight: 750;
}

.events-stats-strip {
    margin-bottom: 20px;
    border-radius: 18px;
}

.events-list-panel {
    padding: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.events-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.events-section-head h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 850;
}

.events-section-head span {
    display: block;
    margin-top: 3px;
    opacity: .58;
    font-size: .78rem;
}

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

.event-card {
    border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    padding: 20px; 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(-2px);
    border-color: var(--ev-accent, #e8c55a);
    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,.10) 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); }

@media (max-width: 760px) {
    .events-hero {
        grid-template-columns: 1fr;
        padding: 22px;
        border-radius: 18px;
    }

    .events-list-panel {
        padding: 14px;
        border-radius: 16px;
    }
}

/* ── Sidebar WM highlight ─────────────────────────────────────── */
.sidebar-nav-item--event {
    background: transparent !important;
    color: color-mix(in srgb, #ca8a04, var(--header-muted) 34%) !important;
    border-color: transparent !important;
}
.sidebar-nav-item--event:hover {
    background: rgba(245,158,11,.08) !important;
    color: #b45309 !important;
}
.sidebar-nav-item--event.active {
    background: transparent !important;
    color: #b45309 !important;
    border-color: transparent !important;
}
.sidebar-nav-item--event.active::before {
    background: #f59e0b;
}
.sidebar-nav-item--event .sidebar-icon { font-size: 1.1rem; }

/* ── Event detail hero ────────────────────────────────────────── */
.ev-hero {
    border-radius: 24px; margin-bottom: 22px;
    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: 34px 32px 26px;
}
.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; z-index: 1; }
.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-champion-pick {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 16px;
    align-items: end;
    position: relative;
    z-index: 1;
    margin-top: 24px;
    padding: 18px;
    border: 1px solid rgba(232,197,90,.34);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(232,197,90,.18), rgba(255,255,255,.08)),
        rgba(0,0,0,.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 16px 34px rgba(0,0,0,.16);
}

.ev-hero-champion-main {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.ev-hero-champion-main > span {
    color: #e8c55a;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ev-hero-champion-main > strong {
    color: #fff;
    font-size: clamp(1.35rem, 2.2vw, 2.1rem);
    font-weight: 950;
    line-height: 1.05;
}

.ev-hero-champion-main > small {
    color: rgba(255,255,255,.68);
    font-size: .82rem;
    font-weight: 750;
}

.ev-hero-champion-current {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
    color: rgba(255,255,255,.78);
    font-size: .82rem;
    font-weight: 750;
}

.ev-hero-champion-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.ev-hero-champion-select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 14px;
    background: rgba(255,255,255,.94);
    color: #111827;
    font-size: .9rem;
    font-weight: 800;
}

.ev-hero-champion-select:disabled {
    opacity: .68;
}

.ev-hero-champion-btn {
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    background: #e8c55a;
    color: #201600;
    font-weight: 950;
    box-shadow: 0 10px 24px rgba(232,197,90,.24);
    cursor: pointer;
}

.ev-hero-champion-btn:disabled {
    cursor: default;
    opacity: .55;
    box-shadow: none;
}

.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;
    position: relative;
    z-index: 1;
}
.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;
}

.event-detail-admin-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.event-leaderboard-panel {
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.event-detail-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.event-detail-section-head h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 850;
}

.event-detail-section-head span {
    display: block;
    margin-top: 3px;
    opacity: .58;
    font-size: .78rem;
}

.event-chart-wrapper {
    margin-bottom: 16px;
    border-color: rgba(232,197,90,.20);
}

.event-leaderboard-row {
    margin-bottom: 10px;
}

.event-leaderboard-panel .event-leaderboard-row:last-child {
    margin-bottom: 0;
}

.event-me-panel {
    margin-bottom: 20px;
}

.event-special-picks-panel {
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid rgba(232,197,90,.30);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(232,197,90,.10), rgba(99,102,241,.08)),
        var(--neutral-layer-2);
    box-shadow: 0 14px 34px rgba(15,23,42,.06);
}

.event-special-picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.event-special-picks-info {
    margin: -4px 0 14px;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 26%);
    font-size: .84rem;
    font-weight: 750;
}

.event-special-pick {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 16px;
    background: color-mix(in srgb, var(--neutral-layer-1) 82%, transparent);
}

.event-special-pick--champion {
    grid-column: 1 / -1;
}

.event-special-pick-title {
    color: #e8c55a;
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.event-special-pick-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.event-special-pick-current {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 36%);
    font-size: .78rem;
    font-weight: 700;
}

.event-special-pick-points {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(232,197,90,.15);
    color: #b68a12;
    font-size: .72rem;
    font-weight: 900;
}

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

.ev-group-card {
    border-radius: 20px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15,23,42,.045);
    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: 14px 16px 12px;
    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; }

.ev-group-winner-pick {
    display: grid;
    gap: 10px;
    margin: 12px 14px 4px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, #e8c55a 36%, var(--neutral-stroke-rest));
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(232,197,90,.12), transparent),
        var(--neutral-layer-1);
}

.ev-group-winner-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ev-group-winner-main span {
    color: #c89514;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.ev-group-winner-main strong {
    color: var(--neutral-foreground-rest);
    font-size: .98rem;
    font-weight: 900;
    line-height: 1.1;
}

.ev-group-winner-main small {
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 38%);
    font-size: .74rem;
    font-weight: 750;
}

.ev-group-winner-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.ev-group-winner-select {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 12px;
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    font-size: .84rem;
    font-weight: 750;
}

.ev-group-winner-btn {
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: #e8c55a;
    color: #201600;
    font-size: .82rem;
    font-weight: 950;
    cursor: pointer;
}

.ev-group-winner-btn:disabled,
.ev-group-winner-select:disabled {
    cursor: default;
    opacity: .55;
}

.ev-group-winner-current {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 34%);
    font-size: .76rem;
    font-weight: 750;
}

@media (max-width: 700px) {
    .ev-hero-champion-pick,
    .ev-hero-champion-control,
    .ev-group-winner-control {
        grid-template-columns: 1fr;
    }

    .ev-hero-champion-btn,
    .ev-group-winner-btn {
        width: 100%;
    }
}

/* 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; }

.event-table-overview {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(232,197,90,.12), transparent 28%),
        var(--neutral-layer-1);
    box-shadow: 0 16px 36px rgba(15,23,42,.06);
}

.event-table-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.event-table-overview-head h2 {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 900;
    letter-spacing: -.01em;
}

.event-table-overview-head span {
    display: block;
    margin-top: 4px;
    color: var(--neutral-foreground-hint);
    font-size: .84rem;
    font-weight: 650;
}

.event-table-source {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(232,197,90,.25);
    color: #e8c55a !important;
    background: rgba(232,197,90,.09);
    font-size: .74rem !important;
    font-weight: 850 !important;
}

.event-table-grid {
    margin-top: 0;
}

.event-table-card {
    box-shadow: none;
}

.event-table-standings .ev-std-team {
    min-width: 170px;
}

.event-table-standings .ev-std-num {
    width: 38px;
}

@media (max-width: 720px) {
    .event-table-overview {
        padding: 12px;
        border-radius: 18px;
    }

    .event-table-overview-head {
        flex-direction: column;
        gap: 8px;
    }

    .event-table-card {
        overflow-x: auto;
    }

    .event-table-standings {
        min-width: 560px;
    }
}

/* 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: 10px; border-radius: 12px;
    font-size: .8rem;
    background: var(--neutral-layer-3, rgba(128,128,128,.05));
    border: 1px solid color-mix(in srgb, var(--neutral-stroke-rest), transparent 30%);
}
.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: 8px 0 2px;
    border-top: 1px solid rgba(128,128,128,.1);
}
.ev-tip-num {
    width: 46px; height: 36px; text-align: center; padding: 2px 4px;
    background: var(--neutral-layer-1);
    border: 1px solid var(--neutral-stroke-rest); border-radius: 12px;
    color: inherit; font-size: .8rem;
    font-family: inherit;
    -moz-appearance: textfield;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
.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);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}
.ev-tip-colon { font-weight: 700; opacity: .5; }
.ev-tip-btn {
    min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: .74rem; 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: 6px; border-bottom: 0;
    margin-bottom: 16px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}
.admin-ev-tab {
    min-height: 34px;
    padding: 0 16px; border: none; background: none; cursor: pointer;
    border-radius: 999px;
    font-size: .84rem; color: inherit; opacity: .62; border-bottom: 0;
    transition: opacity .15s, background .15s, color .15s;
    white-space: nowrap;
}
.admin-ev-tab.active {
    opacity: 1;
    background: var(--buli-primary-dim);
    color: var(--buli-primary-light);
}
.admin-ev-tab:hover { opacity: .8; }

@media (max-width: 620px) {
    .ev-hero {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .ev-hero-emoji {
        font-size: 3rem;
    }

    .event-leaderboard-panel,
    .ev-group-card {
        border-radius: 16px;
    }

    .event-leaderboard-panel {
        padding: 14px;
    }
}

/* Fixtures list inside admin group card */
.admin-ev-fixtures {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.admin-ev-fixture {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: color-mix(in srgb, var(--neutral-layer-1), transparent 10%);
    box-shadow: 0 8px 22px rgba(15,23,42,.04);
}
.admin-ev-fx-teams {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .86rem;
    flex-wrap: wrap;
}
.admin-ev-fx-name {
    font-weight: 800;
    min-width: 0;
}
.admin-ev-fx-vs {
    opacity: .42;
    margin: 0 2px;
    font-size: .78rem;
    text-transform: uppercase;
}
.admin-ev-fx-score {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.admin-score-input {
    width: 50px !important;
    min-height: 34px !important;
    font-size: .9rem !important;
    text-align: center;
}
.admin-ev-clear-btn {
    min-height: 30px;
    padding: 4px 9px;
    border-radius: 10px;
    border: 1px solid rgba(239,68,68,.28);
    background: rgba(239,68,68,.08);
    color: #dc2626;
    font-size: .74rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.admin-ev-clear-btn:hover {
    background: rgba(239,68,68,.16);
    transform: translateY(-1px);
}

/* K.O. round grid */
.admin-ko-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.admin-ko-card {
    padding: 16px;
    border-radius: 18px;
    background: var(--neutral-layer-2, rgba(128,128,128,.08));
    border: 1px solid var(--neutral-stroke-rest);
    box-shadow: 0 10px 26px rgba(15,23,42,.05);
}
.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: var(--neutral-layer-1);
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 14px;
    min-height: 42px;
    padding: 0 12px;
    color: inherit;
    font-size: .84rem;
    font-family: inherit;
    outline: none;
    transition: border-color .16s, box-shadow .16s;
}
.admin-ko-select {
    flex: 1; min-width: 0; max-width: 190px;
    background: var(--neutral-layer-1);
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 14px;
    min-height: 42px;
    padding: 0 12px;
    color: inherit;
    font-size: .84rem;
    font-family: inherit;
    outline: none;
    transition: border-color .16s, box-shadow .16s;
}

.admin-ko-team-input:focus,
.admin-ko-select:focus {
    border-color: var(--buli-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}

/* ── Admin Tips Management ─────────────────────────────────────── */
.tips-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.tips-stat {
    display: flex; flex-direction: column; align-items: center;
    padding: 14px 20px; border-radius: 16px;
    background: var(--neutral-layer-2);
    border: 1px solid var(--neutral-stroke-rest);
    min-width: 0;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.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: 14px;
    padding: 12px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 18px;
    background: var(--neutral-layer-2);
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.tips-filter-input {
    flex: 1; min-width: 200px; min-height: 46px; padding: 0 13px;
    background: var(--neutral-layer-1);
    border: 1px solid var(--neutral-stroke-rest); border-radius: 14px;
    color: inherit; font-size: .88rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
.tips-filter-input:focus {
    outline: none;
    border-color: var(--buli-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}
.tips-filter-select {
    min-width: 170px;
    min-height: 46px;
    border-radius: 14px;
}

.tips-filter-bar > .tips-filter-select,
.tips-filter-bar > select.auth-input {
    flex: 0 1 210px;
}

.tips-bulk-bar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    padding: 12px 14px; border-radius: 16px;
    background: var(--neutral-layer-2); border: 1px solid var(--neutral-stroke-rest);
    margin-bottom: 16px;
}

@media (max-width: 620px) {
    .tips-filter-bar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tips-filter-input,
    .tips-filter-bar > .tips-filter-select,
    .tips-filter-bar > select.auth-input {
        width: 100%;
        min-width: 0;
    }
}
.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: 14px 16px; border-radius: 18px;
    background: var(--neutral-layer-2);
    border: 1px solid var(--neutral-stroke-rest);
    transition: background .15s, transform .15s, border-color .15s, box-shadow .15s;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.tips-admin-row--open { opacity: .75; }
.tips-admin-row:hover {
    transform: translateY(-1px);
    border-color: rgba(99,102,241,.26);
    box-shadow: 0 12px 28px rgba(15,23,42,.07);
}

.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; }

/* ── My Tips 2026 ─────────────────────────────────────────────── */
.mytips-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 20px;
    align-items: stretch;
    margin-bottom: 20px;
    padding: 30px;
    border-radius: 22px;
    border: 1px solid rgba(20,184,166,.24);
    background:
        linear-gradient(135deg, rgba(8,11,24,.96) 0%, rgba(18,42,56,.94) 52%, rgba(63,63,70,.88) 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    position: relative;
    overflow: hidden;
}

.mytips-hero::after {
    content: '';
    position: absolute;
    inset: auto -12% -42% 30%;
    height: 190px;
    background: linear-gradient(90deg, rgba(20,184,166,.28), rgba(99,102,241,.20), rgba(245,158,11,.14));
    transform: rotate(-7deg);
    pointer-events: none;
}

.mytips-hero-copy,
.mytips-hero-panel {
    position: relative;
    z-index: 1;
}

.mytips-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #99f6e4;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mytips-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: .95;
    font-weight: 900;
    letter-spacing: 0;
}

.mytips-hero p {
    margin: 14px 0 0;
    max-width: 640px;
    color: rgba(255,255,255,.72);
    line-height: 1.55;
}

.mytips-hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
}

.mytips-hero-ratio strong {
    display: block;
    font-size: 2.3rem;
    line-height: 1;
    font-weight: 900;
    color: #99f6e4;
}

.mytips-hero-ratio span {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.62);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.mytips-hero-spark {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    align-items: end;
}

.mytips-hero-spark span {
    min-height: 42px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
}

.mytips-hero-spark .points-exact { background: linear-gradient(180deg, #fbbf24, #f59e0b); min-height: 64px; }
.mytips-hero-spark .points-hit { background: linear-gradient(180deg, #34d399, #14b8a6); min-height: 52px; }
.mytips-hero-spark .points-zero { background: linear-gradient(180deg, #fb7185, #ef4444); min-height: 30px; }
.mytips-hero-spark .points-open { background: rgba(255,255,255,.18); min-height: 38px; }

.mytips-stats-strip {
    border-radius: 18px;
    margin-bottom: 20px;
}

.mytips-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.mytips-insight-card {
    min-height: 108px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 15px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 18px;
    background: var(--neutral-layer-2);
    box-shadow: 0 8px 24px rgba(15,23,42,.045);
}

.mytips-insight-card span {
    color: var(--neutral-foreground-hint);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.mytips-insight-card strong {
    color: var(--neutral-foreground-rest);
    font-size: 1.5rem;
    font-weight: 950;
    line-height: 1;
}

.mytips-insight-card small {
    color: var(--neutral-foreground-hint);
    font-size: .78rem;
    line-height: 1.35;
}

.mytips-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 18px;
    background: var(--neutral-layer-2);
}

.mytips-tabs {
    flex-wrap: wrap;
}

.mytips-search {
    display: grid;
    grid-template-columns: 18px minmax(150px, 260px);
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 40%);
}

.mytips-search:focus-within {
    border-color: var(--buli-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
    color: var(--buli-primary);
}

.mytips-search input {
    width: 100%;
    min-height: 40px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--neutral-foreground-rest);
    font: inherit;
}

.mytips-list {
    display: grid;
    gap: 10px;
}

.mytips-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 86px 42px;
    gap: 14px;
    align-items: center;
    padding: 14px;
    min-height: 94px;
    border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    box-shadow: 0 8px 24px rgba(15,23,42,.045);
    transition: transform .16s, border-color .16s, box-shadow .16s;
}

.mytips-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(15,23,42,.08);
}

.mytips-card.points-exact {
    border-color: rgba(245,158,11,.35);
    box-shadow: inset 0 0 0 99px rgba(245,158,11,.035);
}

.mytips-card.points-hit {
    border-color: rgba(20,184,166,.32);
}

.mytips-card.points-zero {
    border-color: rgba(239,68,68,.22);
}

.mytips-card.points-open {
    border-color: rgba(99,102,241,.24);
}

.mytips-missing-list {
    margin-bottom: 10px;
}

.mytips-missing-card {
    border-color: rgba(245,158,11,.28);
    background: linear-gradient(135deg, rgba(245,158,11,.07), rgba(99,102,241,.045)), var(--neutral-layer-2);
}

.mytips-missing-card .mytips-team-row {
    grid-template-columns: minmax(0, 1fr);
}

.mytips-card-main {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.mytips-date {
    width: 64px;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(20,184,166,.14), rgba(99,102,241,.12));
    border: 1px solid rgba(99,102,241,.16);
}

.mytips-date strong {
    font-size: .92rem;
    line-height: 1;
}

.mytips-date span {
    margin-top: 5px;
    font-size: .72rem;
    opacity: .6;
}

.mytips-match {
    min-width: 0;
}

.mytips-team-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 10px;
    align-items: center;
    min-height: 25px;
}

.mytips-team-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 750;
}

.mytips-team-row strong {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 900;
}

.mytips-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.mytips-meta span {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(99,102,241,.10);
    color: var(--buli-primary-light);
    font-size: .68rem;
    font-weight: 800;
}

.mytips-result,
.mytips-points {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    border-radius: 15px;
    background: var(--neutral-layer-1);
    border: 1px solid var(--neutral-stroke-rest);
}

.mytips-result span,
.mytips-points span {
    font-size: .66rem;
    opacity: .52;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 800;
}

.mytips-result strong,
.mytips-points strong {
    margin-top: 4px;
    font-size: 1.08rem;
    font-weight: 900;
}

.mytips-points strong {
    color: var(--buli-primary-light);
}

.mytips-points small {
    margin-top: 3px;
    max-width: 82px;
    color: var(--neutral-foreground-hint);
    font-size: .63rem;
    line-height: 1.2;
    text-align: center;
}

.mytips-card.points-exact .mytips-points strong { color: #f59e0b; }
.mytips-card.points-hit .mytips-points strong { color: #14b8a6; }
.mytips-card.points-zero .mytips-points strong { color: #ef4444; }

.mytips-actions {
    display: flex;
    justify-content: flex-end;
}

.mytips-empty {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 18px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 22px;
    background: var(--neutral-layer-2);
}

.mytips-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #14b8a6;
    background: rgba(20,184,166,.12);
    border: 1px solid rgba(20,184,166,.22);
}

.mytips-empty h1 {
    margin: 18px 0 8px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
}

.mytips-empty p {
    max-width: 460px;
    margin: 0 0 18px;
    opacity: .62;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .mytips-hero {
        grid-template-columns: 1fr;
    }

    .mytips-card {
        grid-template-columns: minmax(0, 1fr) 92px 76px;
    }

    .mytips-insights {
        grid-template-columns: 1fr;
    }

    .mytips-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .mytips-hero {
        padding: 22px;
        border-radius: 18px;
    }

    .mytips-toolbar {
        align-items: stretch;
    }

    .mytips-tabs,
    .mytips-search {
        width: 100%;
    }

    .mytips-search {
        grid-template-columns: 18px minmax(0, 1fr);
    }

    .mytips-card {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .mytips-card-main {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .mytips-date {
        width: 56px;
        min-height: 56px;
        border-radius: 14px;
    }

    .mytips-result,
    .mytips-points {
        min-height: 54px;
    }

    .mytips-actions {
        justify-content: flex-start;
    }
}

/* ── 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: 10px; }
.team-row {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 14px 18px; border-radius: 18px;
    background: var(--neutral-layer-2);
    border: 1px solid var(--neutral-stroke-rest);
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    transition: background .15s, transform .15s, border-color .15s, box-shadow .15s;
}
.team-row:hover {
    transform: translateY(-1px);
    border-color: rgba(99,102,241,.28);
    box-shadow: 0 12px 28px rgba(15,23,42,.07);
}
.team-row-flag {
    width: 46px; height: 46px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    background: var(--neutral-layer-1);
    border: 1px solid var(--neutral-stroke-rest);
    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; }

/* ── Auth pages (Login selector, Razor Page forms) ────────────── */
.auth-standalone {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(20,184,166,.18), transparent 34%),
        linear-gradient(135deg, var(--neutral-layer-1, #f8fafc), color-mix(in srgb, var(--neutral-layer-1, #f8fafc), #6366f1 7%));
    color: var(--neutral-foreground-rest, #111827);
    font-family: var(--body-font, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    box-sizing: border-box;
}

.auth-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-wrap--wide {
    max-width: 420px;
}

.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - var(--app-header-height) - 80px);
    padding: 34px 0;
    position: relative;
}

.login-card, .auth-card {
    width: 100%; max-width: 420px;
    background:
        linear-gradient(135deg, var(--neutral-layer-2), color-mix(in srgb, var(--neutral-layer-2), var(--buli-primary) 5%));
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 26px; padding: 38px 34px;
    box-shadow: 0 22px 60px rgba(15,23,42,.14);
}
@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--with-action {
    align-items: flex-start;
}
.auth-logo--with-action > div:nth-child(2) {
    flex: 1;
    min-width: 0;
}
.auth-header-link {
    flex: 0 0 auto;
    margin-top: 4px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--buli-primary);
    background: var(--neutral-layer-3, rgba(128,128,128,.06));
    font-size: .76rem;
    font-weight: 800;
    text-decoration: none;
}
.auth-header-link:hover {
    border-color: rgba(99,102,241,.45);
}
.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-brand-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 1.8rem;
}
.auth-brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #14b8a6, #6366f1);
    box-shadow: 0 16px 32px rgba(99,102,241,.24);
}
.auth-logo .login-brand-name {
    font-size: 1.5rem;
}
.login-brand-tagline {
    font-size: .72rem;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 52%);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.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: 15px 16px; border-radius: 16px;
    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--disabled {
    cursor: default;
    opacity: .72;
}
.login-option--disabled:hover {
    transform: none;
    box-shadow: none;
}
.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; }
.login-warning {
    font-size: .82rem;
    color: #b45309;
    margin: .4rem 0;
    text-align: center;
    line-height: 1.5;
}
.login-warning-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 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-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.auth-label-row a {
    font-size: .75rem;
    opacity: .7;
    font-weight: 500;
    color: var(--buli-primary, #4f46e5);
    text-decoration: none;
}
.auth-label-row a:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.auth-input {
    width: 100%; min-height: 46px; padding: 0 14px; border-radius: 14px;
    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);
}

select.auth-input,
.tips-filter-select,
.groups-select,
.admin-ko-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--neutral-foreground-rest), transparent 42%) 50%),
        linear-gradient(135deg, color-mix(in srgb, var(--neutral-foreground-rest), transparent 42%) 50%, transparent 50%);
    background-position:
        calc(100% - 19px) 20px,
        calc(100% - 13px) 20px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.groups-select {
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255,255,255,.76) 50%),
        linear-gradient(135deg, rgba(255,255,255,.76) 50%, transparent 50%);
}

textarea.auth-input,
textarea.groups-input {
    min-height: 96px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: vertical;
}
.auth-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 12px 20px; border-radius: 13px;
    background: linear-gradient(135deg, #14b8a6, #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;
    box-sizing: border-box;
}
.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; }
.auth-footer--split {
    display: flex;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
}

/* ── Admin user management ────────────────────────────────────── */
.admin-users-filter-panel {
    margin-bottom: 16px;
}

.admin-users-filter-grid {
    grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, .75fr));
}

.admin-users-list {
    gap: 8px;
}

.user-mgmt-grid { display: flex; flex-direction: column; gap: 8px; }

.user-mgmt-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    flex-wrap: wrap;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.user-mgmt-row:hover {
    transform: translateY(-1px);
    border-color: rgba(99,102,241,.26);
    box-shadow: 0 12px 28px rgba(15,23,42,.07);
}

.admin-group-row-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-mgmt-info {
    min-width: 0;
}

.admin-group-row-head .user-mgmt-info {
    flex: 1 1 280px;
}

.admin-group-row-head fluent-button,
.user-mgmt-row fluent-button {
    flex: 0 0 auto;
}

.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-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.user-mgmt-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 240px; }
.user-mgmt-name { font-weight: 700; font-size: .92rem; }
.user-mgmt-email {
    font-size: .78rem;
    opacity: .68;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-mgmt-meta { font-size: .74rem; opacity: .5; }
.user-mgmt-provider { text-transform: uppercase; font-size: .65rem; letter-spacing: .06em; }

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

.admin-user-badge {
    font-size: .62rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--neutral-fill-rest);
    color: var(--neutral-foreground-rest);
    opacity: .72;
}

.admin-user-badge--ok {
    background: rgba(34,197,94,.14);
    color: #16a34a;
    opacity: 1;
}

.admin-user-badge--warn {
    background: rgba(245,158,11,.16);
    color: #d97706;
    opacity: 1;
}

.admin-user-badge--danger {
    background: rgba(239,68,68,.15);
    color: #ef4444;
    opacity: 1;
}

.admin-user-facts {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 230px;
    color: var(--neutral-foreground-rest);
    font-size: .76rem;
    opacity: .62;
}

.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) ─────────────────────────── */
.invites-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    align-items: stretch;
    gap: 22px;
    margin-bottom: 20px;
    padding: 32px;
    border-radius: 22px;
    border: 1px solid rgba(99,102,241,.26);
    background:
        linear-gradient(135deg, rgba(8,11,24,.96) 0%, rgba(23,24,61,.94) 54%, rgba(20,83,45,.88) 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    overflow: hidden;
    position: relative;
}

.invites-hero::after {
    content: '';
    position: absolute;
    inset: auto -8% -45% 34%;
    height: 180px;
    background:
        linear-gradient(90deg, rgba(99,102,241,.28), rgba(20,184,166,.22), rgba(245,158,11,.16));
    transform: rotate(-6deg);
    opacity: .72;
    pointer-events: none;
}

.invites-hero-copy,
.invites-hero-card {
    position: relative;
    z-index: 1;
}

.invites-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #a7f3d0;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.invites-hero h1 {
    margin: 0;
    max-width: 620px;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: .96;
    font-weight: 850;
    letter-spacing: 0;
}

.invites-hero p {
    margin: 14px 0 0;
    max-width: 680px;
    color: rgba(255,255,255,.72);
    font-size: 1rem;
    line-height: 1.55;
}

.invites-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.invites-hero-card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.invites-hero-card span,
.invites-hero-card small {
    color: rgba(255,255,255,.62);
    font-size: .82rem;
}

.invites-hero-card strong {
    color: #fff;
    font-size: 3.3rem;
    line-height: .95;
    font-weight: 900;
}

.invites-stats-strip {
    border-radius: 18px;
    margin-bottom: 20px;
}

.invites-panel {
    margin-bottom: 20px;
}

.invite-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px dashed rgba(99,102,241,.34);
    background: rgba(99,102,241,.07);
    color: var(--neutral-foreground-rest);
}

.invite-empty div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.invite-empty strong {
    font-size: .92rem;
    font-weight: 800;
}

.invite-empty span {
    font-size: .82rem;
    opacity: .58;
}

.invite-row {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 17px 20px; border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    margin-bottom: 10px; flex-wrap: wrap;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.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: 12px; padding: 8px 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; }

@media (max-width: 820px) {
    .invites-hero {
        grid-template-columns: 1fr;
        padding: 24px;
    }
}

/* ── 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; }

.admin-user-dialog-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-dialog-subtitle {
    font-size: .82rem;
    opacity: .58;
    margin-top: 2px;
}

.admin-user-dialog-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.admin-user-dialog-section {
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-user-section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .72;
}

.admin-user-status-row,
.admin-user-dialog-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-user-inline-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-user-inline-control .auth-input {
    flex: 1 1 220px;
}

.admin-user-reset-link {
    font-size: .72rem;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
}

.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;
}

@media (max-width: 920px) {
    .admin-users-filter-grid,
    .admin-user-dialog-grid {
        grid-template-columns: 1fr;
    }

    .admin-user-facts {
        min-width: 0;
        width: 100%;
    }
}

/* ── Admin push devices ───────────────────────────────────────── */
.admin-push-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.admin-push-stat,
.admin-push-empty {
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

.admin-push-stat span {
    display: block;
    font-size: .72rem;
    opacity: .55;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 800;
}

.admin-push-stat strong {
    display: block;
    margin-top: 4px;
    font-size: 1.35rem;
    font-weight: 900;
}

.admin-push-stat--warn {
    border-color: rgba(245,158,11,.34);
    background: rgba(245,158,11,.08);
}

.admin-push-empty {
    color: var(--neutral-foreground-rest);
    opacity: .7;
}

.admin-push-token {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin-top: 5px;
    padding: 5px 8px;
    border-radius: 10px;
    background: var(--neutral-layer-3, rgba(128,128,128,.08));
    border: 1px solid var(--neutral-stroke-rest);
    font-size: .68rem;
    opacity: .68;
    overflow-wrap: anywhere;
}

.admin-push-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-push-composer {
    margin-bottom: 16px;
}

.admin-push-form-grid {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(280px, 1.3fr);
    gap: 14px;
    align-items: start;
}

.admin-push-message-field {
    min-width: 0;
}

.admin-push-textarea {
    min-height: 108px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: vertical;
    line-height: 1.45;
}

.admin-push-counter {
    margin-top: 5px;
    color: var(--neutral-foreground-hint);
    font-size: .72rem;
    font-weight: 750;
}

.admin-push-error {
    max-width: 620px;
}

.admin-push-send-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-goal-log-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.admin-log-filter-bar {
    margin: 14px 0 12px;
}

.admin-log-pagination {
    margin-top: 12px;
    padding-bottom: 0;
}

.admin-goal-log-row {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--neutral-stroke-rest);
    border-left: 4px solid rgba(100,116,139,.44);
    border-radius: 14px;
    background: var(--neutral-layer-2);
}

.admin-goal-log-row--success {
    border-left-color: #16a34a;
}

.admin-goal-log-row--error {
    border-left-color: #ef4444;
}

.admin-goal-log-time {
    color: var(--neutral-foreground-hint);
    font-size: .76rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-goal-log-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.admin-goal-log-main strong {
    font-size: .86rem;
    font-weight: 900;
}

.admin-goal-log-main span,
.admin-goal-log-main small {
    color: var(--neutral-foreground-hint);
    line-height: 1.35;
}

.admin-goal-log-main small {
    overflow-wrap: anywhere;
}

.admin-goal-log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    max-width: 260px;
}

.admin-goal-log-meta span {
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--neutral-layer-3, rgba(128,128,128,.08));
    color: var(--neutral-foreground-hint);
    font-size: .68rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.admin-service-card {
    min-width: 0;
    padding: 16px;
}

.admin-service-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.admin-service-card-head .profile-card-title {
    margin-bottom: 4px;
    padding: 0;
    border-bottom: 0;
}

.admin-service-status {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 999px;
    background: var(--neutral-layer-3, rgba(128,128,128,.08));
    color: var(--neutral-foreground-hint);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.admin-service-status--active {
    border-color: rgba(34,197,94,.28);
    background: rgba(34,197,94,.1);
    color: #16a34a;
}

.admin-service-status--paused {
    border-color: rgba(245,158,11,.34);
    background: rgba(245,158,11,.1);
    color: #d97706;
}

.admin-service-latest {
    display: grid;
    gap: 3px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--neutral-stroke-rest);
    border-left: 4px solid rgba(100,116,139,.44);
    border-radius: 12px;
    background: var(--neutral-layer-2);
}

.admin-service-latest strong {
    font-size: .84rem;
    font-weight: 900;
}

.admin-service-latest span {
    color: var(--neutral-foreground-hint);
    font-size: .82rem;
    line-height: 1.35;
}

@media (max-width: 760px) {
    .admin-push-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-goal-log-row {
        grid-template-columns: 1fr;
    }

    .admin-goal-log-meta {
        justify-content: flex-start;
        max-width: none;
    }
}

/* ── Admin OpenLigaDB telemetry ─────────────────────────────────── */
.admin-openliga-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-openliga-note,
.admin-openliga-empty {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 16px;
    background: var(--neutral-layer-1);
    color: var(--neutral-foreground-hint);
    font-size: .88rem;
    line-height: 1.45;
}

.admin-openliga-note code {
    color: var(--neutral-foreground-rest);
    font-weight: 800;
}

.admin-openliga-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-openliga-stat {
    padding: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 18px;
    background: var(--neutral-layer-1);
    box-shadow: 0 10px 26px rgba(15,23,42,.045);
}

.admin-openliga-stat span {
    display: block;
    color: var(--neutral-foreground-hint);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.admin-openliga-stat strong {
    display: block;
    margin-top: 6px;
    color: var(--neutral-foreground-rest);
    font-size: 1.55rem;
    font-weight: 950;
    line-height: 1;
}

.admin-openliga-stat--warn strong {
    color: #ef4444;
}

.admin-openliga-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-1);
    box-shadow: 0 12px 30px rgba(15,23,42,.05);
}

.admin-openliga-table {
    width: 100%;
    min-width: 1240px;
    border-collapse: collapse;
}

.admin-openliga-table th,
.admin-openliga-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--neutral-stroke-rest);
    text-align: left;
    vertical-align: middle;
    font-size: .84rem;
}

.admin-openliga-table tr:last-child td {
    border-bottom: 0;
}

.admin-openliga-table th {
    color: var(--neutral-foreground-hint);
    background: var(--neutral-layer-2);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-openliga-row--warn {
    background: rgba(239,68,68,.045);
}

.admin-openliga-service,
.admin-openliga-method,
.admin-openliga-result,
.admin-openliga-table small {
    display: block;
}

.admin-openliga-service {
    color: var(--neutral-foreground-rest);
    font-weight: 900;
}

.admin-openliga-method {
    margin-top: 3px;
    color: var(--neutral-foreground-hint);
    font-size: .68rem;
    font-weight: 850;
}

.admin-openliga-endpoint {
    color: var(--neutral-foreground-rest);
    font-size: .78rem;
    overflow-wrap: anywhere;
}

.admin-openliga-num {
    font-variant-numeric: tabular-nums;
    text-align: right !important;
    white-space: nowrap;
}

.admin-openliga-ok {
    color: #16a34a;
    font-weight: 850;
}

.admin-openliga-rate {
    color: var(--neutral-foreground-rest);
    font-weight: 850;
}

.admin-openliga-fail {
    color: #ef4444;
    font-weight: 850;
}

.admin-openliga-result {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.admin-openliga-result--ok {
    color: #16a34a;
    background: rgba(34,197,94,.10);
}

.admin-openliga-result--fail {
    color: #ef4444;
    background: rgba(239,68,68,.10);
}

.admin-openliga-table small {
    margin-top: 4px;
    color: var(--neutral-foreground-hint);
    font-size: .7rem;
}

.admin-openliga-structure {
    margin-top: 8px;
}

.admin-openliga-structure summary {
    width: fit-content;
    cursor: pointer;
    color: var(--neutral-foreground-rest);
    font-size: .72rem;
    font-weight: 850;
}

.admin-openliga-structure pre {
    max-width: 520px;
    max-height: 280px;
    margin: 8px 0 0;
    padding: 10px 12px;
    overflow: auto;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 12px;
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    font-size: .72rem;
    line-height: 1.45;
    white-space: pre;
}

@media (max-width: 760px) {
    .admin-openliga-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── 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: 14px 16px; border-radius: 18px;
    background: var(--neutral-layer-2); border: 1px solid var(--neutral-stroke-rest);
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

.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: 8px 16px; border-radius: 999px; border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2); 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: 0 12px; border-radius: 14px; cursor: pointer;
    border: 1px solid var(--neutral-stroke-rest); background: var(--neutral-layer-1);
    min-height: 46px; user-select: none;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
.team-picker-trigger--open,
.team-picker-trigger:focus {
    outline: none;
    border-color: var(--buli-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}

.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(--neutral-layer-1); border: 1px solid var(--neutral-stroke-rest);
    border-radius: 14px; box-shadow: 0 14px 36px rgba(15,23,42,.16);
    overflow: hidden;
}
.team-picker-search {
    width: 100%; min-height: 44px; padding: 0 12px; border: none; border-bottom: 1px solid var(--neutral-stroke-rest);
    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-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: stretch;
    gap: 22px;
    margin-bottom: 20px;
    padding: 32px;
    border-radius: 22px;
    border: 1px solid rgba(99,102,241,.26);
    background:
        linear-gradient(135deg, rgba(8,11,24,.96) 0%, rgba(23,24,61,.94) 54%, rgba(20,83,45,.88) 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    overflow: hidden;
    position: relative;
}

.profile-hero::after {
    content: '';
    position: absolute;
    inset: auto -8% -45% 34%;
    height: 180px;
    background:
        linear-gradient(90deg, rgba(99,102,241,.28), rgba(20,184,166,.22), rgba(245,158,11,.16));
    transform: rotate(-6deg);
    opacity: .72;
    pointer-events: none;
}

.profile-hero-copy,
.profile-summary-card {
    position: relative;
    z-index: 1;
}

.profile-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #a7f3d0;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-hero h1 {
    margin: 0;
    max-width: 620px;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: .96;
    font-weight: 850;
    letter-spacing: 0;
}

.profile-hero p {
    margin: 14px 0 0;
    max-width: 680px;
    color: rgba(255,255,255,.72);
    font-size: 1rem;
    line-height: 1.55;
}

.profile-summary-card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.profile-hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #14b8a6, #6366f1);
    box-shadow: 0 18px 34px rgba(99,102,241,.22);
}

.profile-hero-avatar-img {
    object-fit: cover;
    background: rgba(255,255,255,.16);
}

.profile-avatar-editor {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 18px;
    background: var(--neutral-layer-1);
}

.profile-avatar-preview {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    border-radius: 24px;
    object-fit: cover;
    background:
        linear-gradient(135deg, rgba(20,184,166,.12), rgba(99,102,241,.10)),
        var(--neutral-layer-2);
    box-shadow: 0 16px 32px rgba(15,23,42,.10);
}

.profile-avatar-editor-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.profile-avatar-editor-copy strong {
    font-size: .95rem;
    font-weight: 900;
}

.profile-avatar-editor-copy span {
    font-size: .82rem;
    line-height: 1.4;
    opacity: .62;
}

.profile-avatar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-avatar-adjustments {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 16px;
    background: color-mix(in srgb, var(--neutral-fill-layer-rest, #fff) 82%, transparent);
}

.profile-avatar-adjustment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: .82rem;
    font-weight: 900;
    color: var(--neutral-foreground-rest);
}

.profile-avatar-icon-toggle {
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 999px;
    background: transparent;
    color: var(--neutral-foreground-rest);
    padding: 7px 11px;
    font: inherit;
    font-size: .74rem;
    font-weight: 900;
    cursor: pointer;
}

.profile-avatar-icon-toggle.is-active {
    border-color: var(--accent-fill-rest, #6366f1);
    background: color-mix(in srgb, var(--accent-fill-rest, #6366f1) 14%, transparent);
    color: var(--accent-fill-rest, #6366f1);
}

.profile-avatar-adjustment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.profile-avatar-slider {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.profile-avatar-slider span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: .72rem;
    font-weight: 850;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 28%);
}

.profile-avatar-slider strong {
    color: var(--neutral-foreground-rest);
    font-weight: 950;
}

.profile-avatar-slider input[type="range"] {
    width: 100%;
    accent-color: var(--accent-fill-rest, #6366f1);
}

.profile-avatar-slider input[type="range"]:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent-fill-rest, #6366f1) 32%, transparent);
    outline-offset: 4px;
    border-radius: 999px;
}

.profile-avatar-variant-sections {
    display: grid;
    gap: 18px;
}

.profile-avatar-category-grid {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-avatar-category-btn {
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 999px;
    background: color-mix(in srgb, var(--neutral-fill-layer-rest, #fff) 88%, white);
    color: var(--neutral-foreground-rest);
    padding: 9px 13px;
    font: inherit;
    font-size: .78rem;
    font-weight: 900;
    cursor: pointer;
}

.profile-avatar-category-btn.is-basic {
    border-color: color-mix(in srgb, var(--accent-fill-rest, #6366f1) 24%, var(--neutral-stroke-rest));
}

.profile-avatar-category-btn.is-selected {
    border-color: var(--accent-fill-rest, #6366f1);
    background: color-mix(in srgb, var(--accent-fill-rest, #6366f1) 12%, white);
    color: var(--neutral-foreground-rest, #111827);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-fill-rest, #6366f1) 14%, transparent);
}

[data-theme="dark"] .profile-avatar-category-btn {
    border-color: rgba(148,163,184,.22);
    background: #1f2937;
    color: #f8fafc;
}

[data-theme="dark"] .profile-avatar-category-btn.is-basic {
    border-color: rgba(129,140,248,.42);
}

[data-theme="dark"] .profile-avatar-category-btn.is-selected {
    border-color: #818cf8;
    background: #312e81;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(129,140,248,.22);
}

.profile-avatar-variant-section {
    display: grid;
    gap: 10px;
}

.profile-avatar-variant-title {
    font-size: .82rem;
    font-weight: 900;
    color: var(--neutral-foreground-rest);
}

.profile-avatar-variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px;
}

.profile-avatar-variant-tile {
    min-width: 0;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 14px;
    background: color-mix(in srgb, var(--neutral-fill-layer-rest, #fff) 88%, white);
    color: var(--neutral-foreground-rest);
    padding: 8px;
    display: grid;
    justify-items: center;
    cursor: pointer;
    font: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.profile-avatar-variant-tile:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent-fill-rest, #6366f1) 45%, var(--neutral-stroke-rest));
    box-shadow: 0 14px 30px rgba(15, 23, 42, .1);
}

.profile-avatar-variant-tile.is-selected {
    border-color: var(--accent-fill-rest, #6366f1);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-fill-rest, #6366f1) 18%, transparent);
}

.profile-avatar-variant-tile img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: block;
    background: var(--avatar-preview-bg, rgba(255,255,255,.72));
}

.profile-summary-main,
.profile-summary-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.profile-status-list {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.profile-status-pill {
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.84);
    border: 1px solid rgba(255,255,255,.12);
}

.profile-status-pill--ok {
    background: rgba(34,197,94,.14);
    color: #86efac;
    border-color: rgba(134,239,172,.22);
}

.profile-status-pill--warn {
    background: rgba(245,158,11,.16);
    color: #fcd34d;
    border-color: rgba(252,211,77,.22);
}

.profile-summary-card span {
    font-size: .78rem;
    color: rgba(255,255,255,.62);
}

.profile-summary-card strong {
    font-size: .92rem;
    color: #fff;
    overflow-wrap: anywhere;
}

.profile-stats-strip {
    border-radius: 18px;
    margin-bottom: 20px;
}

.profile-stats-strip .lb-season-stat-val {
    font-size: 1rem;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.profile-insight-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.profile-insight-card {
    min-height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 18px;
    background: var(--neutral-layer-2);
    box-shadow: 0 10px 28px rgba(15,23,42,.05);
}

.profile-insight-card span {
    color: var(--neutral-foreground-hint);
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.profile-insight-card strong {
    color: var(--neutral-foreground-rest);
    font-size: 1.55rem;
    font-weight: 950;
    line-height: 1;
}

.profile-insight-card small {
    color: var(--neutral-foreground-hint);
    font-size: .78rem;
    line-height: 1.25;
}

.profile-achievements-panel {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.profile-achievements-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.profile-achievements-head h2 {
    margin: 0;
    color: var(--neutral-foreground-rest);
    font-size: 1.05rem;
    font-weight: 900;
}

.profile-achievements-head span {
    display: block;
    margin-top: 3px;
    color: var(--neutral-foreground-hint);
    font-size: .78rem;
}

.profile-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.profile-achievement-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 82px;
    padding: 12px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 16px;
    background: var(--neutral-layer-1);
    opacity: .58;
}

.profile-achievement-card.is-unlocked {
    border-color: rgba(20,184,166,.32);
    background: linear-gradient(135deg, rgba(20,184,166,.10), rgba(245,158,11,.07)), var(--neutral-layer-1);
    opacity: 1;
}

.profile-achievement-marker {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: color-mix(in srgb, var(--neutral-fill-layer-rest, #fff) 80%, transparent);
    color: var(--neutral-foreground-hint);
    font-size: .82rem;
    font-weight: 950;
    letter-spacing: 0;
}

.profile-achievement-card.is-unlocked .profile-achievement-marker {
    background: linear-gradient(135deg, #14b8a6, #f59e0b);
    color: white;
    box-shadow: 0 12px 24px rgba(20,184,166,.18);
}

.profile-achievement-card strong {
    display: block;
    color: var(--neutral-foreground-rest);
    font-size: .9rem;
    font-weight: 900;
}

.profile-achievement-card span {
    display: block;
    margin-top: 3px;
    color: var(--neutral-foreground-hint);
    font-size: .76rem;
    line-height: 1.25;
}

.profile-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.profile-card {
    background: var(--neutral-layer-2);
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.profile-danger-card {
    grid-column: 1 / -1;
    border-color: rgba(239,68,68,.32);
}

.profile-card-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 850; margin: 0;
    padding: 15px 20px; border-bottom: 1px solid var(--neutral-stroke-rest);
    opacity: .92;
}

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

.profile-card-body .auth-input,
.profile-card-body fluent-text-field {
    max-width: 360px;
}

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

.profile-danger-list {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid rgba(239,68,68,.28);
    border-radius: 14px;
    background: rgba(239,68,68,.07);
    color: #b91c1c;
    font-size: .84rem;
    font-weight: 700;
}

.profile-delete-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 620px;
    font-size: .86rem;
    line-height: 1.35;
}

.profile-delete-check input {
    margin-top: 3px;
}

.profile-danger-button {
    width: fit-content;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #dc2626;
    color: #fff;
    font: inherit;
    font-size: .88rem;
    font-weight: 850;
    cursor: pointer;
}

.profile-danger-button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

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

.profile-provider {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 14px; border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
}
.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; }

@media (max-width: 820px) {
    .profile-hero {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .profile-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-sections { grid-template-columns: 1fr; }
}

/* ── 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;
}
.auth-info--warning {
    border-color: rgba(217,119,6,.28);
    background: rgba(251,191,36,.10);
    color: #92400e;
}

/* 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 .app-header,
html.in-teams .sidebar,
html.in-teams fluent-footer,
body.in-teams fluent-header,
body.in-teams .app-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
   ══════════════════════════════════════════════════════════════════ */

.leaderboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 20px;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid rgba(245,158,11,.26);
    background:
        linear-gradient(135deg, rgba(8,11,24,.96) 0%, rgba(30,24,18,.94) 52%, rgba(5,48,45,.9) 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    position: relative;
    overflow: hidden;
}

.leaderboard-hero::after {
    content: '';
    position: absolute;
    inset: auto -10% -42% 30%;
    height: 190px;
    background: linear-gradient(90deg, rgba(245,158,11,.26), rgba(99,102,241,.18), rgba(20,184,166,.18));
    transform: rotate(-7deg);
    pointer-events: none;
}

.leaderboard-hero-copy,
.leaderboard-leader-card {
    position: relative;
    z-index: 1;
}

.leaderboard-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #fcd34d;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.leaderboard-hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(2.25rem, 5.5vw, 5rem);
    line-height: .96;
    font-weight: 900;
    letter-spacing: 0;
}

.leaderboard-hero p {
    margin: 14px 0 0;
    max-width: 680px;
    color: rgba(255,255,255,.72);
    line-height: 1.55;
}

.leaderboard-leader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
    text-align: center;
}

.leaderboard-leader-card > span {
    color: rgba(255,255,255,.62);
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.leaderboard-leader-avatar {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 950;
    background: linear-gradient(135deg, #f59e0b, #14b8a6);
    box-shadow: 0 12px 30px rgba(245,158,11,.22);
}

.leaderboard-leader-card strong {
    font-size: 1.12rem;
    font-weight: 900;
}

.leaderboard-leader-card small {
    color: rgba(255,255,255,.68);
}

.leaderboard-podium-panel {
    margin-bottom: 22px;
    padding: 22px 18px 0;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 22px;
    background: linear-gradient(180deg, var(--neutral-layer-2), color-mix(in srgb, var(--neutral-layer-2), transparent 14%));
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.leaderboard-stats-strip {
    margin-bottom: 20px;
    border-radius: 18px;
}

.leaderboard-me-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: stretch;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(99,102,241,.28);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99,102,241,.10), rgba(20,184,166,.07)), var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.leaderboard-me-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.leaderboard-me-main span,
.leaderboard-me-stats span {
    color: var(--neutral-foreground-hint);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.leaderboard-me-main strong {
    color: var(--neutral-foreground-rest);
    font-size: 1.7rem;
    font-weight: 950;
    line-height: 1;
}

.leaderboard-me-main small {
    color: var(--neutral-foreground-hint);
    font-size: .82rem;
}

.leaderboard-me-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(76px, 1fr));
    gap: 10px;
}

.leaderboard-me-stats > div {
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 15px;
    background: var(--neutral-layer-1);
}

.leaderboard-me-stats strong {
    color: var(--buli-primary-light);
    font-size: 1.2rem;
    font-weight: 950;
}

.leaderboard-chart-section,
.leaderboard-list-section {
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 20px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.leaderboard-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.leaderboard-section-head h2 {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 850;
}

.leaderboard-section-head > span {
    opacity: .58;
    font-size: .78rem;
}

.leaderboard-row-modern {
    margin-bottom: 10px;
}

.user-profile-link {
    color: inherit;
    text-decoration: none;
}

.user-profile-link:hover {
    color: var(--buli-primary-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.leaderboard-list-section .leaderboard-row-modern:last-child {
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .leaderboard-hero {
        grid-template-columns: 1fr;
        padding: 22px;
        border-radius: 18px;
    }

    .leaderboard-chart-section,
    .leaderboard-list-section,
    .leaderboard-podium-panel {
        padding: 14px;
        border-radius: 16px;
    }

    .leaderboard-me-panel {
        grid-template-columns: 1fr;
    }

    .leaderboard-me-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ── Podium ───────────────────────────────────────────────────────── */
.lb-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 8px;
}

.lb-podium-step {
    width: 100%;
    min-width: 0;
    max-width: 180px;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    padding: 12px 10px 0;
    border: 0;
    background: transparent;
    color: var(--neutral-foreground-rest);
    font-family: inherit;
    text-align: center;
    cursor: pointer;
}

.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-avatar.small {
    width: 40px;
    height: 40px;
    font-size: .9rem;
}

.lb-podium-name {
    font-weight: 700; font-size: .88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-height: 36px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--neutral-foreground-rest);
}

.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: 92px;
    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: 68px;
    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: 52px;
    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; }
}

.lb-podium-tie-stack {
    display: contents;
}

.lb-podium-player {
    display: contents;
}

.lb-podium-step.is-empty {
    opacity: .72;
}

.podium-modal-scrim {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15,23,42,.42);
    backdrop-filter: blur(10px);
}

.podium-modal {
    width: min(520px, 100%);
    max-height: min(560px, 82vh);
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
    box-shadow: 0 26px 70px rgba(0,0,0,.28);
}

.podium-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 12px;
    border-bottom: 1px solid var(--neutral-stroke-rest);
}

.podium-modal-head span {
    margin-right: 8px;
    font-size: 1.35rem;
}

.podium-modal-head strong {
    font-size: 1.02rem;
    font-weight: 850;
}

.podium-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.podium-modal-empty {
    padding: 22px 18px;
    color: var(--neutral-foreground-hint);
}

.podium-modal-list {
    display: grid;
    gap: 10px;
    padding: 14px;
    max-height: 460px;
    overflow-y: auto;
}

.podium-modal-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
}

.podium-modal-player {
    min-width: 0;
}

.podium-modal-player strong,
.podium-modal-player span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-modal-player strong {
    font-weight: 850;
}

.podium-modal-player span {
    margin-top: 2px;
    font-size: .78rem;
    color: var(--neutral-foreground-hint);
}

.podium-modal-points {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--accent);
}

/* ── 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 fluent-persona,
.lb-row-v2 fluent-persona::part(control),
.lb-row-v2 fluent-persona::part(primary-text),
.lb-row-v2 fluent-persona::part(secondary-text) {
    color: var(--neutral-foreground-rest);
}

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

.lb-row-v2.is-current-user {
    border-color: rgba(99,102,241,.45);
    box-shadow: inset 0 0 0 99px rgba(99,102,241,.045), 0 12px 28px rgba(15,23,42,.07);
}

.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);
}

.lb-row-gold.is-current-user,
.lb-row-silver.is-current-user,
.lb-row-bronze.is-current-user {
    border-color: rgba(99,102,241,.48);
}

/* 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);
}

/* ══════════════════════════════════════════════════════════════════
   Game Groups 2026
   ══════════════════════════════════════════════════════════════════ */

.groups-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 20px;
    padding: 32px;
    border-radius: 22px;
    border: 1px solid rgba(99,102,241,.26);
    background:
        linear-gradient(135deg, rgba(8,11,24,.96) 0%, rgba(23,24,61,.94) 54%, rgba(20,83,45,.88) 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    overflow: hidden;
    position: relative;
}

.groups-hero::after {
    content: '';
    position: absolute;
    inset: auto -8% -45% 34%;
    height: 180px;
    background:
        linear-gradient(90deg, rgba(99,102,241,.28), rgba(20,184,166,.22), rgba(245,158,11,.16));
    transform: rotate(-6deg);
    opacity: .72;
    pointer-events: none;
}

.groups-hero-content,
.groups-hero-actions {
    position: relative;
    z-index: 1;
}

.groups-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #a7f3d0;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.groups-hero h1 {
    margin: 0;
    max-width: 620px;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: .96;
    font-weight: 850;
    letter-spacing: 0;
}

.groups-hero p {
    margin: 14px 0 0;
    max-width: 680px;
    color: rgba(255,255,255,.72);
    font-size: 1rem;
    line-height: 1.55;
}

.groups-hero-actions {
    display: flex;
    align-items: flex-end;
    min-width: min(100%, 320px);
}

.groups-select,
.groups-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid color-mix(in srgb, var(--neutral-stroke-rest), transparent 8%);
    border-radius: 12px;
    background: var(--neutral-layer-1);
    color: var(--neutral-foreground-rest);
    padding: 10px 13px;
    font: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s, transform .15s;
}

.groups-select {
    background:
        linear-gradient(45deg, transparent 50%, rgba(255,255,255,.76) 50%) calc(100% - 19px) 20px / 6px 6px no-repeat,
        linear-gradient(135deg, rgba(255,255,255,.76) 50%, transparent 50%) calc(100% - 13px) 20px / 6px 6px no-repeat,
        rgba(255,255,255,.1);
    color: #fff;
    border-color: rgba(255,255,255,.22);
    backdrop-filter: blur(12px);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
}

.groups-select option {
    color: #111827;
}

.groups-input:focus,
.groups-select:focus {
    border-color: var(--buli-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.16);
}

.groups-textarea {
    min-height: 96px;
    line-height: 1.45;
    resize: vertical;
}

.groups-stats-strip {
    border-radius: 18px;
    margin-bottom: 20px;
}

.groups-shell {
    display: grid;
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.groups-sidebar-panel,
.groups-main-panel,
.groups-admin-panel,
.groups-section {
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.groups-sidebar-panel {
    padding: 18px;
    position: sticky;
    top: 16px;
}

.groups-main-panel {
    min-height: 420px;
    padding: 18px;
}

.groups-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.groups-panel-head.compact {
    margin-bottom: 12px;
}

.groups-panel-head--stacked {
    align-items: flex-start;
}

.groups-panel-title {
    font-size: 1rem;
    font-weight: 800;
}

.groups-panel-subtitle {
    margin-top: 2px;
    font-size: .76rem;
    opacity: .56;
}

.groups-panel-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f766e;
    background: rgba(20,184,166,.12);
    border: 1px solid rgba(20,184,166,.22);
}

.groups-form-grid,
.groups-admin-grid {
    display: grid;
    gap: 14px;
}

.groups-admin-grid {
    grid-template-columns: minmax(220px, .9fr) minmax(260px, 1.1fr);
    align-items: start;
}

.groups-admin-grid .groups-switch-card {
    grid-column: 1 / -1;
}

.groups-create-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--neutral-stroke-rest);
}

.groups-search-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--neutral-stroke-rest);
}

.groups-field {
    display: grid;
    gap: 7px;
}

.groups-field > span:first-child {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .58;
}

.groups-field-control {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 38%);
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.groups-field-control:focus-within {
    border-color: var(--buli-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
    color: var(--buli-primary);
}

.groups-field-control .groups-input {
    min-height: 46px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.groups-field-control .groups-input:focus {
    box-shadow: none;
}

.groups-select-control {
    position: relative;
    padding-right: 38px;
}

.groups-select-control::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-66%) rotate(45deg);
    opacity: .58;
    pointer-events: none;
}

.groups-field-control .groups-control-select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 0;
    padding-right: 0;
    cursor: pointer;
}

.groups-field-control .groups-control-select option {
    color: #111827;
    background: #fff;
}

.groups-switch-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--neutral-layer-1), color-mix(in srgb, var(--neutral-layer-1), var(--buli-primary) 4%));
    cursor: pointer;
}

.groups-switch-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.groups-switch-ui {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--neutral-stroke-rest), #64748b 18%);
    position: relative;
    transition: background .18s;
}

.groups-switch-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15,23,42,.25);
    transition: transform .18s;
}

.groups-switch-card input:checked + .groups-switch-ui {
    background: linear-gradient(90deg, #14b8a6, var(--buli-primary));
}

.groups-switch-card input:checked + .groups-switch-ui::after {
    transform: translateX(18px);
}

.groups-switch-card strong {
    display: block;
    font-size: .88rem;
}

.groups-switch-card small {
    display: block;
    margin-top: 2px;
    opacity: .58;
    font-size: .75rem;
    line-height: 1.35;
}

.groups-own-list {
    display: grid;
    gap: 10px;
}

.groups-own-card {
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 16px;
    background: var(--neutral-layer-1);
    color: var(--neutral-foreground-rest);
    text-align: left;
    cursor: pointer;
    transition: transform .16s, border-color .16s, box-shadow .16s, background .16s;
}

.groups-own-card:hover {
    transform: translateY(-1px);
    border-color: rgba(99,102,241,.30);
    box-shadow: 0 8px 22px rgba(15,23,42,.08);
}

.groups-own-card.active {
    border-color: rgba(20,184,166,.42);
    background: linear-gradient(135deg, rgba(20,184,166,.12), rgba(99,102,241,.10));
    box-shadow: 0 0 0 1px rgba(20,184,166,.08), 0 10px 26px rgba(20,184,166,.10);
}

.groups-own-card.is-locked {
    opacity: .7;
}

.groups-own-copy {
    min-width: 0;
}

.groups-own-copy strong,
.groups-own-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.groups-own-copy strong {
    font-size: .92rem;
    font-weight: 800;
}

.groups-own-copy span {
    margin-top: 2px;
    font-size: .73rem;
    opacity: .58;
}

.groups-own-rank {
    min-width: 38px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(99,102,241,.12);
    color: var(--buli-primary-light);
    font-size: .78rem;
    font-weight: 850;
}

.groups-chat-badge {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 10px 22px rgba(239,68,68,.28);
    font-size: .72rem;
    font-weight: 950;
}

.groups-search-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.groups-search-list.compact {
    max-height: 270px;
    overflow: auto;
    padding-right: 2px;
}

.groups-search-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.groups-search-item:hover {
    transform: translateY(-1px);
    border-color: rgba(20,184,166,.28);
    box-shadow: 0 8px 22px rgba(15,23,42,.06);
}

.groups-search-item.is-locked {
    opacity: .66;
}

.groups-mini-avatar,
.groups-detail-avatar,
.groups-member-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 850;
    background: linear-gradient(135deg, #14b8a6 0%, #4f46e5 100%);
}

.groups-mini-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: .78rem;
}

.groups-search-copy,
.groups-request-copy,
.groups-member-copy {
    min-width: 0;
}

.groups-search-name {
    font-size: .9rem;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.groups-search-meta,
.groups-request-copy span,
.groups-member-copy span {
    display: block;
    margin-top: 2px;
    font-size: .73rem;
    opacity: .56;
}

.groups-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .14s, border-color .14s, background .14s;
}

.groups-icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(99,102,241,.35);
}

.groups-icon-btn.accent {
    background: var(--buli-primary);
    border-color: var(--buli-primary);
    color: #fff;
}

.groups-icon-btn.danger {
    color: #ef4444;
}

.groups-status-pill,
.groups-scope-pill,
.groups-member-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(245,158,11,.12);
    color: #b45309;
    font-size: .68rem;
    font-weight: 800;
    white-space: nowrap;
}

.groups-scope-pill {
    margin-top: 8px;
    background: rgba(20,184,166,.12);
    color: #0f766e;
}

.groups-status-pill.locked {
    background: rgba(239,68,68,.12);
    color: #dc2626;
}

.groups-empty-compact {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-foreground-rest);
    opacity: .55;
    font-size: .84rem;
    border: 1px dashed var(--neutral-stroke-rest);
    border-radius: 16px;
}

.groups-invite-panel {
    margin-bottom: 18px;
}

.groups-invite-box {
    margin-top: 16px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--neutral-layer-1), #14b8a6 5%), var(--neutral-layer-1));
}

.groups-invite-box .groups-empty-compact {
    margin-top: 10px;
    min-height: 74px;
}

.groups-link-invite {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
}

.groups-link-invite strong,
.groups-link-invite span {
    display: block;
}

.groups-link-invite strong {
    font-size: .88rem;
    font-weight: 850;
}

.groups-link-invite span {
    margin-top: 2px;
    font-size: .74rem;
    opacity: .58;
}

.groups-group-link {
    margin-bottom: 14px;
}

@media (max-width: 620px) {
    .admin-group-row-head {
        align-items: stretch;
    }

    .admin-group-row-head .user-mgmt-avatar {
        align-self: flex-start;
    }

    .admin-group-row-head > div[style*="flex:1"] {
        display: none;
    }

    .admin-group-row-head fluent-button,
    .user-mgmt-row fluent-button,
    .groups-link-invite fluent-button {
        flex: 1 1 150px;
        min-width: 0;
    }

    .groups-link-invite {
        align-items: stretch;
    }

    .groups-link-invite > div {
        flex: 1 1 100%;
        min-width: 0;
    }

    .groups-group-link {
        flex-wrap: wrap;
    }

    .groups-group-link code {
        flex: 1 1 100%;
    }
}

.groups-empty-state {
    min-height: 390px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 18px;
}

.groups-empty-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    background: rgba(99,102,241,.12);
    border: 1px solid rgba(99,102,241,.22);
}

.groups-empty-state h2 {
    margin: 16px 0 6px;
    font-size: 1.35rem;
}

.groups-empty-state p {
    margin: 0;
    max-width: 420px;
    opacity: .58;
    line-height: 1.5;
}

.groups-detail-hero {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 20px;
    border: 1px solid rgba(20,184,166,.26);
    background:
        linear-gradient(135deg, rgba(20,184,166,.14), rgba(99,102,241,.12) 58%, rgba(245,158,11,.10));
}

.groups-detail-hero.is-locked {
    border-color: rgba(239,68,68,.28);
    background: linear-gradient(135deg, rgba(239,68,68,.11), rgba(99,102,241,.08));
}

.groups-detail-avatar {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    font-size: 1.35rem;
    box-shadow: 0 12px 30px rgba(20,184,166,.22);
}

.groups-detail-copy h2 {
    margin: 4px 0 4px;
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    line-height: 1.08;
    font-weight: 850;
}

.groups-detail-copy p {
    margin: 0;
    color: var(--neutral-foreground-rest);
    opacity: .66;
    line-height: 1.45;
}

.groups-last-message-preview {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    max-width: 620px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(99,102,241,.14);
    background: rgba(255,255,255,.42);
}

.groups-last-message-preview span {
    font-size: .68rem;
    font-weight: 850;
    opacity: .58;
}

.groups-last-message-preview strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
}

.groups-detail-topline {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.groups-detail-topline span {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.45);
    border: 1px solid rgba(99,102,241,.14);
    color: var(--neutral-foreground-rest);
    font-size: .66rem;
    font-weight: 800;
}

.groups-detail-metrics {
    display: flex;
    gap: 10px;
}

.groups-detail-metrics div {
    min-width: 82px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.38);
    background: rgba(255,255,255,.38);
    text-align: center;
}

.groups-detail-metrics strong {
    display: block;
    font-size: 1.2rem;
    line-height: 1;
}

.groups-detail-metrics span {
    display: block;
    margin-top: 4px;
    font-size: .66rem;
    opacity: .62;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.groups-podium {
    margin-top: 2px;
    margin-bottom: 20px;
    padding: 18px 14px 0;
    border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background:
        radial-gradient(circle at 50% 0%, rgba(245,158,11,.16), transparent 44%),
        var(--neutral-layer-2);
    box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.groups-stake-panel {
    border-color: rgba(34,197,94,.24);
    background:
        linear-gradient(135deg, rgba(34,197,94,.08), rgba(232,197,90,.08)),
        var(--neutral-layer-2);
}

.groups-stake-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.groups-stake-summary div {
    display: grid;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 14px;
    background: var(--neutral-layer-1);
}

.groups-stake-summary strong {
    color: var(--neutral-foreground-rest);
    font-size: 1rem;
    font-weight: 950;
}

.groups-stake-summary span {
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 42%);
    font-size: .72rem;
    font-weight: 750;
}

.groups-prize-list,
.groups-payment-list {
    display: grid;
    gap: 8px;
}

.groups-prize-list {
    margin-bottom: 14px;
}

.groups-prize-row,
.groups-payment-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 14px;
    background: var(--neutral-layer-1);
}

.groups-prize-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.groups-prize-row strong,
.groups-payment-row strong {
    display: block;
    color: var(--neutral-foreground-rest);
    font-size: .88rem;
    font-weight: 850;
}

.groups-prize-row small,
.groups-payment-row span {
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 44%);
    font-size: .74rem;
    font-weight: 720;
}

.groups-prize-row b {
    color: #16a34a;
    font-size: .94rem;
    font-weight: 950;
}

.groups-payment-row.is-paid {
    border-color: rgba(34,197,94,.28);
}

.groups-payment-toggle,
.groups-payment-status {
    justify-self: end;
    padding: 7px 10px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 999px;
    background: var(--neutral-layer-2);
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 30%);
    font-size: .72rem;
    font-weight: 900;
}

.groups-payment-toggle {
    cursor: pointer;
}

.groups-payment-toggle.is-paid,
.groups-payment-status.is-paid {
    border-color: rgba(34,197,94,.32);
    background: rgba(34,197,94,.12);
    color: #16a34a;
}

.groups-admin-panel,
.groups-section {
    padding: 18px;
    margin-top: 18px;
}

.groups-section .lb-row-v2 {
    margin-top: 10px;
}

.groups-section .lb-row-v2:first-of-type {
    margin-top: 0;
}

.groups-chat-section {
    display: grid;
    gap: 14px;
}

.groups-chat-composer {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 18px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--neutral-layer-1), #14b8a6 5%), var(--neutral-layer-1));
}

.groups-chat-mode {
    display: inline-flex;
    gap: 6px;
    width: max-content;
    padding: 4px;
    border-radius: 14px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
}

.groups-chat-mode-btn {
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--neutral-foreground-rest);
    font-size: .78rem;
    font-weight: 850;
    cursor: pointer;
}

.groups-chat-mode-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #4f46e5);
    box-shadow: 0 6px 16px rgba(79,70,229,.18);
}

.groups-chat-input {
    min-height: 92px;
    resize: vertical;
}

.groups-chat-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.groups-chat-action-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.groups-emoji-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 12px;
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-rest);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 1.14rem;
    line-height: 1;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.groups-emoji-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(20,184,166,.36);
    background: color-mix(in srgb, var(--neutral-layer-2), #14b8a6 8%);
}

.bulitipps-emoji-picker {
    position: fixed;
    z-index: 10020;
    max-height: min(420px, calc(100vh - 24px));
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15,23,42,.24);
}

.groups-chat-actions span {
    font-size: .74rem;
    opacity: .56;
    font-weight: 750;
}

.groups-chat-list {
    display: grid;
    gap: 10px;
}

.groups-chat-message {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
}

.groups-chat-message.is-own {
    border-color: rgba(99,102,241,.24);
    background: linear-gradient(135deg, rgba(99,102,241,.08), var(--neutral-layer-1));
}

.groups-chat-message.is-congrats {
    border-color: rgba(245,158,11,.28);
    background: linear-gradient(135deg, rgba(245,158,11,.11), var(--neutral-layer-1));
}

.groups-chat-bubble {
    min-width: 0;
}

.groups-chat-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.groups-chat-meta strong {
    font-size: .9rem;
    font-weight: 850;
}

.groups-chat-meta span {
    font-size: .72rem;
    opacity: .56;
}

.groups-chat-bubble p {
    margin: 4px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.45;
    font-size: .9rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.groups-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.groups-section-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.groups-section-head span {
    font-size: .75rem;
    opacity: .56;
}

.groups-request-list {
    display: grid;
    gap: 8px;
}

.groups-request-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border-radius: 16px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
}

.groups-request-copy {
    flex: 1;
}

.groups-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
}

.groups-member-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 14px;
    min-height: 82px;
    border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-1);
}

.groups-member-card.is-admin {
    border-color: rgba(245,158,11,.32);
    box-shadow: inset 0 0 0 99px rgba(245,158,11,.035);
}

.groups-member-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    font-size: .82rem;
}

.groups-member-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.groups-member-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.groups-member-badges:empty {
    display: none;
}

.groups-member-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

@media (max-width: 980px) {
    .groups-hero {
        flex-direction: column;
    }

    .groups-shell {
        grid-template-columns: 1fr;
    }

    .groups-sidebar-panel {
        position: static;
    }

    .groups-detail-hero {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .groups-detail-avatar {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .groups-detail-metrics {
        grid-column: 1 / -1;
        width: 100%;
    }

    .groups-detail-metrics div {
        flex: 1;
    }

    .groups-admin-grid {
        grid-template-columns: 1fr;
    }

    .groups-admin-grid .groups-switch-card {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .groups-hero {
        padding: 22px;
        border-radius: 16px;
    }

    .groups-main-panel,
    .groups-sidebar-panel,
    .groups-admin-panel,
    .groups-section {
        padding: 14px;
        border-radius: 16px;
    }

    .groups-detail-hero {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .groups-detail-metrics {
        flex-wrap: wrap;
    }

    .groups-request-row {
        flex-wrap: wrap;
    }

    .groups-member-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .groups-member-badges {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

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

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

.admin-database-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-database-browser {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.admin-database-sidebar,
.admin-database-content {
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 18px;
    background: var(--neutral-layer-2);
    box-shadow: 0 12px 30px rgba(15,23,42,.05);
}

.admin-database-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    max-height: min(780px, calc(100vh - 180px));
    position: sticky;
    top: 92px;
}

.admin-database-sidebar-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: var(--neutral-foreground-rest);
}

.admin-database-sidebar-head strong {
    font-size: .95rem;
    font-weight: 850;
}

.admin-database-sidebar-head span {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    text-align: center;
    font-size: .75rem;
    font-weight: 800;
    color: var(--buli-primary);
    background: color-mix(in srgb, var(--buli-primary), transparent 88%);
}

.admin-database-table-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}

.admin-database-table-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
    width: 100%;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 12px;
    text-align: left;
    color: var(--neutral-foreground-rest);
    background: transparent;
    cursor: pointer;
}

.admin-database-table-button:hover,
.admin-database-table-button.active {
    border-color: color-mix(in srgb, var(--buli-primary), transparent 70%);
    background: color-mix(in srgb, var(--buli-primary), transparent 91%);
}

.admin-database-table-button span,
.admin-database-table-button small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-database-table-button span {
    font-weight: 800;
}

.admin-database-table-button small {
    grid-column: 1;
    font-size: .72rem;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 48%);
}

.admin-database-table-button em {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-style: normal;
    font-size: .73rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 34%);
}

.admin-database-content {
    min-width: 0;
    padding: 16px;
}

.admin-database-table-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.admin-database-table-head h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0;
}

.admin-database-table-head p {
    margin: 0;
    font-size: .85rem;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 42%);
}

.admin-database-pager-compact {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: .8rem;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 35%);
}

.admin-database-filters {
    margin-bottom: 12px;
}

.admin-database-schema {
    margin-bottom: 12px;
    font-size: .84rem;
}

.admin-database-schema summary {
    cursor: pointer;
    color: var(--buli-primary);
    font-weight: 800;
}

.admin-database-column-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.admin-database-column-list span {
    display: inline-flex;
    gap: 6px;
    align-items: baseline;
    max-width: 100%;
    padding: 6px 9px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 999px;
    background: var(--neutral-layer-1);
}

.admin-database-column-list strong,
.admin-database-column-list small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-database-column-list small {
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 48%);
}

.admin-database-row-wrap {
    max-height: min(680px, calc(100vh - 260px));
}

.admin-database-row-table {
    min-width: max-content;
}

.admin-database-row-table th,
.admin-database-row-table td {
    max-width: 260px;
    white-space: nowrap;
}

.admin-database-row-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .78rem;
}

.admin-db-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.admin-db-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
    padding: 20px;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 22px;
    background:
        linear-gradient(135deg, var(--neutral-layer-2), color-mix(in srgb, var(--neutral-layer-2), var(--buli-primary) 4%));
    box-shadow: 0 14px 34px rgba(15,23,42,.06);
}

.admin-db-panel--import {
    background:
        linear-gradient(135deg, var(--neutral-layer-2), color-mix(in srgb, var(--neutral-layer-2), #ef4444 4%));
}

.admin-db-panel-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.admin-db-panel-head h2 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: 0;
}

.admin-db-panel-head p {
    margin: 0;
    max-width: 46ch;
    font-size: .88rem;
    line-height: 1.45;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 42%);
}

.admin-db-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #0f766e;
    background: rgba(20,184,166,.12);
    border: 1px solid rgba(20,184,166,.22);
}

.admin-db-icon--danger {
    color: #dc2626;
    background: rgba(239,68,68,.11);
    border-color: rgba(239,68,68,.22);
}

@media (max-width: 860px) {
    .admin-database-browser {
        grid-template-columns: 1fr;
    }

    .admin-database-sidebar {
        position: static;
        max-height: 360px;
    }

    .admin-database-table-head {
        flex-direction: column;
    }

    .admin-database-pager-compact {
        justify-content: flex-start;
    }

    .admin-db-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Privacy page ───────────────────────────────────────────────── */
.privacy-page {
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: 24px clamp(16px, 3vw, 32px) 56px;
}

.privacy-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.16), transparent 30%),
        linear-gradient(135deg, rgba(15,23,42,.98), rgba(30,64,175,.92));
    box-shadow: 0 22px 48px rgba(15,23,42,.16);
}

.privacy-kicker {
    margin-bottom: 10px;
    color: rgba(255,255,255,.68);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.privacy-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: .98;
    font-weight: 950;
    letter-spacing: -.02em;
}

.privacy-hero p {
    max-width: 720px;
    margin: 14px 0 0;
    color: rgba(255,255,255,.78);
    font-size: 1rem;
    line-height: 1.6;
}

.privacy-updated {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.11);
    color: rgba(255,255,255,.82);
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.privacy-card {
    margin-bottom: 14px;
    padding: clamp(18px, 2.6vw, 26px);
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 22px;
    background: var(--neutral-layer-1);
    box-shadow: 0 10px 28px rgba(15,23,42,.045);
}

.privacy-card--compact {
    background: color-mix(in srgb, var(--buli-primary, #6366f1) 6%, var(--neutral-layer-1));
}

.privacy-card h2 {
    margin: 0 0 12px;
    color: var(--neutral-foreground-rest);
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: -.01em;
}

.privacy-card p,
.privacy-card li,
.privacy-card address {
    color: var(--neutral-foreground-hint);
    font-size: .94rem;
    line-height: 1.7;
}

.privacy-card p {
    margin: 0 0 12px;
}

.privacy-card p:last-child {
    margin-bottom: 0;
}

.privacy-card address {
    margin: 0 0 12px;
    font-style: normal;
}

.privacy-card a {
    color: var(--buli-primary-light, #818cf8);
    font-weight: 750;
    text-decoration: none;
}

.privacy-card a:hover {
    text-decoration: underline;
}

.privacy-card ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

.privacy-note {
    padding: 12px 14px;
    border: 1px solid rgba(232,197,90,.2);
    border-radius: 14px;
    background: rgba(232,197,90,.08);
    color: color-mix(in srgb, var(--neutral-foreground-rest) 82%, #e8c55a) !important;
}

.privacy-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 16px;
}

.privacy-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.privacy-table th,
.privacy-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--neutral-stroke-rest);
    text-align: left;
    vertical-align: top;
}

.privacy-table tr:last-child td {
    border-bottom: 0;
}

.privacy-table th {
    color: var(--neutral-foreground-rest);
    background: var(--neutral-layer-2);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.privacy-table td {
    color: var(--neutral-foreground-hint);
    font-size: .88rem;
    line-height: 1.55;
}

.privacy-table td:first-child {
    color: var(--neutral-foreground-rest);
    font-weight: 850;
}

@media (max-width: 720px) {
    .privacy-page {
        padding: 16px 12px 42px;
    }

    .privacy-hero {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 22px;
    }

    .privacy-updated {
        white-space: normal;
    }

    .privacy-card {
        border-radius: 18px;
    }
}

/* ── Bundesliga live table ─────────────────────────────────────── */
.bundesliga-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 28px;
    border-radius: 26px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15,118,110,.96), rgba(49,46,129,.94)),
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.18), transparent 28%);
    box-shadow: 0 22px 54px rgba(15,23,42,.16);
    overflow: hidden;
}

.bundesliga-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.72);
}

.bundesliga-hero h1 {
    margin: 10px 0 0;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: .96;
    font-weight: 950;
    letter-spacing: 0;
}

.bundesliga-hero p {
    margin: 14px 0 0;
    max-width: 680px;
    color: rgba(255,255,255,.74);
    line-height: 1.55;
}

.bundesliga-leader-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-height: 210px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(14px);
}

.bundesliga-leader-card > span {
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.62);
}

.bundesliga-leader-logo {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.24);
}

.bundesliga-leader-logo img,
.bundesliga-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bundesliga-leader-card strong {
    font-size: 1.35rem;
    font-weight: 950;
}

.bundesliga-leader-card small {
    color: rgba(255,255,255,.68);
    font-size: .86rem;
}

.bundesliga-meta-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.bundesliga-meta-strip > div {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--neutral-stroke-rest);
    background: var(--neutral-layer-2);
    box-shadow: 0 10px 26px rgba(15,23,42,.05);
}

.bundesliga-meta-strip strong {
    display: block;
    font-size: 1.45rem;
    font-weight: 950;
    color: var(--buli-primary);
}

.bundesliga-meta-strip span {
    display: block;
    margin-top: 3px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 46%);
}

.bundesliga-table-panel,
.bundesliga-empty {
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 24px;
    background: var(--neutral-layer-2);
    box-shadow: 0 14px 36px rgba(15,23,42,.06);
}

.bundesliga-empty {
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 30px;
    text-align: center;
}

.bundesliga-empty h1 {
    margin: 14px 0 6px;
    font-size: 1.5rem;
}

.bundesliga-empty p {
    margin: 0;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 44%);
}

.bundesliga-table-panel {
    overflow: hidden;
}

.bundesliga-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--neutral-stroke-rest);
}

.bundesliga-section-head h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 900;
}

.bundesliga-section-head span,
.bundesliga-section-head a {
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 46%);
    font-size: .82rem;
}

.bundesliga-section-head a {
    text-decoration: none;
    font-weight: 800;
}

.bundesliga-section-head a:hover {
    color: var(--buli-primary);
}

.bundesliga-table {
    min-width: 820px;
}

.bundesliga-table-head,
.bundesliga-row {
    display: grid;
    grid-template-columns: 48px minmax(250px, 1fr) 52px 44px 44px 44px 78px 68px 62px;
    align-items: center;
    gap: 10px;
}

.bundesliga-table-head {
    padding: 12px 18px;
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 50%);
    background: color-mix(in srgb, var(--neutral-layer-1), transparent 35%);
}

.bundesliga-row {
    position: relative;
    padding: 12px 18px;
    border-top: 1px solid var(--neutral-stroke-rest);
    color: var(--neutral-foreground-rest);
}

.bundesliga-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: transparent;
}

.bundesliga-row.zone-champions::before { background: #14b8a6; }
.bundesliga-row.zone-europa::before { background: #6366f1; }
.bundesliga-row.zone-playoff::before { background: #f59e0b; }
.bundesliga-row.zone-relegation::before { background: #ef4444; }

.bundesliga-rank,
.bundesliga-points {
    font-weight: 950;
}

.bundesliga-team {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bundesliga-logo {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    padding: 5px;
    border-radius: 12px;
    background: var(--neutral-layer-1);
    border: 1px solid var(--neutral-stroke-rest);
    font-weight: 900;
}

.bundesliga-team strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .94rem;
}

.bundesliga-team span {
    display: block;
    margin-top: 1px;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 54%);
    font-size: .75rem;
}

.bundesliga-diff.positive { color: #059669; font-weight: 850; }
.bundesliga-diff.negative { color: #dc2626; font-weight: 850; }
.bundesliga-points { color: var(--buli-primary); font-size: 1.05rem; }

.bundesliga-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px 18px;
    border-top: 1px solid var(--neutral-stroke-rest);
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 42%);
    font-size: .78rem;
}

.bundesliga-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bundesliga-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.bundesliga-legend .champions { background: #14b8a6; }
.bundesliga-legend .europa { background: #6366f1; }
.bundesliga-legend .relegation { background: #ef4444; }

@media (max-width: 860px) {
    .bundesliga-hero {
        grid-template-columns: 1fr;
        padding: 22px;
        border-radius: 20px;
    }

    .bundesliga-leader-card {
        min-height: auto;
    }

    .bundesliga-meta-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bundesliga-table-panel {
        overflow-x: auto;
    }
}

@media (max-width: 520px) {
    .bundesliga-meta-strip {
        grid-template-columns: 1fr;
    }
}

/* ── Global live goal notification ───────────────────────────────── */
.goal-notification-shell {
    position: fixed;
    top: calc(var(--app-header-height, 72px) + 18px);
    right: 22px;
    z-index: 3000;
    pointer-events: none;
    animation: goal-slide-in .24s ease-out;
}

.goal-notification-card {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: min(420px, calc(100vw - 28px));
    padding: 14px 14px 14px 16px;
    border: 1px solid color-mix(in srgb, var(--neutral-stroke-rest), #14b8a6 44%);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(20,184,166,.22), transparent 48%),
        color-mix(in srgb, var(--neutral-layer-1), transparent 4%);
    box-shadow:
        0 24px 70px rgba(15,23,42,.22),
        0 1px 0 rgba(255,255,255,.22) inset;
    color: var(--neutral-foreground-rest);
    backdrop-filter: blur(18px);
}

[data-theme="dark"] .goal-notification-card {
    background:
        linear-gradient(135deg, rgba(20,184,166,.22), transparent 50%),
        color-mix(in srgb, var(--neutral-layer-1), #020617 20%);
    box-shadow:
        0 26px 80px rgba(0,0,0,.44),
        0 1px 0 rgba(255,255,255,.1) inset;
}

.goal-notification-pulse {
    position: relative;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #10b981, #14b8a6);
    color: #fff;
    box-shadow: 0 12px 28px rgba(20,184,166,.34);
}

.goal-notification-pulse::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 20px;
    border: 1px solid rgba(20,184,166,.5);
    animation: goal-pulse 1.4s ease-out infinite;
}

.goal-notification-copy {
    min-width: 0;
}

.goal-notification-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 35%);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.goal-notification-kicker span {
    color: #0f766e;
}

[data-theme="dark"] .goal-notification-kicker span {
    color: #5eead4;
}

.goal-notification-copy strong,
.goal-notification-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.goal-notification-copy strong {
    font-size: 1.02rem;
    font-weight: 950;
}

.goal-notification-copy > span {
    margin-top: 2px;
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 24%);
    font-size: .88rem;
    font-weight: 750;
}

.goal-notification-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 12px;
    background: color-mix(in srgb, var(--neutral-layer-1), transparent 24%);
    color: color-mix(in srgb, var(--neutral-foreground-rest), transparent 28%);
    cursor: pointer;
}

.goal-notification-close:hover {
    color: var(--neutral-foreground-rest);
    border-color: color-mix(in srgb, var(--neutral-stroke-rest), #14b8a6 42%);
}

@keyframes goal-slide-in {
    from {
        opacity: 0;
        transform: translate3d(0, -10px, 0) scale(.98);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes goal-pulse {
    0% {
        opacity: .8;
        transform: scale(.92);
    }
    100% {
        opacity: 0;
        transform: scale(1.26);
    }
}

@media (max-width: 640px) {
    .goal-notification-shell {
        top: calc(var(--app-header-height, 72px) + 10px);
        right: 14px;
        left: 14px;
    }

    .goal-notification-card {
        width: 100%;
        grid-template-columns: auto minmax(0, 1fr) auto;
        border-radius: 16px;
    }
}
