﻿/* ============================================================================
   iRunSA — Premium Design System (mobile-first)
   ----------------------------------------------------------------------------
   Brand:   #FCA920 (orange)  /  #1a1a1a (carbon)  /  #FCFCFC (chalk)
   Approach: Mobile-first, layered shadows, micro-interactions, glassmorphism.
   Used on:  Public site (overrides bulky default theme), Admin portal,
             Event cards, Cart, Auth screens.
   ============================================================================ */

/* ---------- Design tokens ---------- */
:root {
    /* Brand */
    --brand-orange:        #FCA920;
    --brand-orange-soft:   #fff3d4;
    --brand-orange-glow:   rgba(252, 169, 32, 0.45);
    --brand-orange-hover:  #e89414;
    --brand-dark:          #0e0f12;
    --brand-dark-2:        #181a20;
    --brand-light:         #FCFCFC;

    /* Neutrals — light surfaces */
    --surface-0:           #ffffff;
    --surface-1:           #fafbfc;
    --surface-2:           #f4f5f7;
    --border-subtle:       rgba(15, 17, 21, 0.08);
    --border:              rgba(15, 17, 21, 0.12);
    --text:                #111418;
    --text-muted:          #5b6470;
    --text-soft:           #828a96;

    /* Semantic */
    --success:             #16a34a;
    --success-soft:        #dcfce7;
    --danger:              #dc2626;
    --danger-soft:         #fee2e2;
    --warning:             #d97706;
    --warning-soft:        #fef3c7;
    --info:                #0284c7;
    --info-soft:           #e0f2fe;

    /* Admin scoped */
    --admin-bg:            #f6f7f9;
    --admin-surface:       #ffffff;
    --admin-text:          var(--text);
    --admin-muted:         var(--text-muted);
    --admin-border:        var(--border);

    /* Type */
    --font-sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

    /* Shadows — layered for premium depth */
    --shadow-xs:   0 1px 2px rgba(15, 17, 21, 0.04);
    --shadow-sm:   0 1px 3px rgba(15, 17, 21, 0.06), 0 1px 2px rgba(15, 17, 21, 0.04);
    --shadow:      0 4px 12px rgba(15, 17, 21, 0.06), 0 2px 4px rgba(15, 17, 21, 0.04);
    --shadow-lg:   0 14px 32px rgba(15, 17, 21, 0.10), 0 4px 8px rgba(15, 17, 21, 0.05);
    --shadow-xl:   0 24px 48px rgba(15, 17, 21, 0.18), 0 8px 12px rgba(15, 17, 21, 0.06);
    --shadow-glow: 0 0 0 4px var(--brand-orange-glow);

    /* Radii */
    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  14px;
    --radius-xl:  20px;
    --radius-pill: 999px;

    /* Motion */
    --ease:       cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast:   140ms;
    --dur:        220ms;
    --dur-slow:   400ms;

    /* Layout */
    --topbar-h:        52px;
    --bottombar-h:     60px;
    --sidebar-w:       232px;
    --sidebar-w-collapsed: 64px;
    --safe-bottom:     env(safe-area-inset-bottom, 0px);

    /* Type scale (slim, premium) */
    --fs-xs:   0.72rem;
    --fs-sm:   0.82rem;
    --fs-base: 0.92rem;
    --fs-md:   1rem;
    --fs-lg:   1.15rem;
    --fs-xl:   1.4rem;
}

html { font-size: 15px; }
@media (min-width: 1280px) { html { font-size: 15.5px; } }

/* Reduce motion for users who want it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================================
   PUBLIC SITE — slim down the bulky default theme without changing markup
   ============================================================================ */

/* Slim, glassy fixed header on desktop. The existing markup uses
   .header-transparent + .header-body bg-dark — we make it less heavy. */
@media (min-width: 992px) {
    .header-body.bg-dark {
        background: rgba(14, 15, 18, 0.78) !important;
        backdrop-filter: saturate(160%) blur(14px);
        -webkit-backdrop-filter: saturate(160%) blur(14px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 8px 24px rgba(0, 0, 0, 0.25) !important;
    }

    .header-container {
        height: var(--topbar-h) !important;
        min-height: var(--topbar-h) !important;
    }

    /* Tighter nav links */
    .header-nav-main nav > ul.nav > li > a.nav-link {
        font-size: 0.78rem !important;
        letter-spacing: 0.6px;  
        padding: 0.55rem 0.9rem !important;
        font-weight: 600;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.78) !important;
        transition: color var(--dur) var(--ease), background var(--dur) var (--ease);
        border-radius: 8px;
    }
    .header-nav-main nav > ul.nav > li > a.nav-link:hover,
    .header-nav-main nav > ul.nav > li > a.nav-link.active {
        color: var(--brand-orange) !important;
        background: rgba(252, 169, 32, 0.08);
    }

    /* Smaller welcome / cart cluster */
    .header-row .gap-3 { gap: 0.75rem !important; font-size: 0.85rem; }
    .header-row .gap-3 i { font-size: 0.95rem !important; }
    #cartCount { font-size: 0.65rem !important; padding: 2px 6px !important; }
}

/* Mobile public header — make it actually elegant on phones */
@media (max-width: 991.98px) {
    .header-body {
        background: rgba(14, 15, 18, 0.92) !important;
        backdrop-filter: blur(10px);
    }
    .header-container { height: 56px !important; min-height: 56px !important; }
    .header-btn-collapse-nav {
        background: var(--brand-orange) !important;
        color: var(--brand-dark) !important;
        border-radius: 10px;
        width: 42px; height: 42px;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 4px 12px rgba(252,169,32,0.35);
    }
}

/* Footer slimmer + safe-area aware on mobile */
#footer {
    padding-bottom: calc(1.5rem + var(--safe-bottom));
}
#footer .container-fluid { padding-block: 2rem !important; }

/* ============================================================================
   PUBLIC SITE — mobile bottom navigation (Strava / Nike-style)
   Show only on authenticated mobile sessions. Markup is in _Layout.cshtml.
   ============================================================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--bottombar-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(14, 15, 18, 0.95);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1100;
}
.mobile-bottom-nav .mbn-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: var(--bottombar-h);
}
.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 6px;
    color: rgba(252, 252, 252, 0.6);
    text-decoration: none;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    gap: 3px;
    transition: color var(--dur) ease;
    position: relative;
}
.mobile-bottom-nav a span {
    display: block;
    line-height: 1;
}
.mobile-bottom-nav a i { font-size: 1.15rem; line-height: 1; }
.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover { color: var(--brand-orange); }
.mobile-bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--brand-orange);
    box-shadow: 0 0 12px var(--brand-orange-glow);
}
/* FAB item (Cart) */
.mobile-bottom-nav a.mbn-fab {
    color: var(--brand-dark);
    justify-content: flex-start;
    padding-top: 0;
}
.mobile-bottom-nav a.mbn-fab .mbn-fab-circle {
    width: 50px; height: 50px;
    border-radius: 999px;
    background: var(--brand-orange);
    display: flex; align-items: center; justify-content: center;
    margin-top: -14px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px var(--brand-orange-glow), 0 2px 6px rgba(0,0,0,0.3);
    transition: transform var(--dur) ease;
}
.mobile-bottom-nav a.mbn-fab:hover .mbn-fab-circle { transform: translateY(-2px) scale(1.05); }
.mobile-bottom-nav a.mbn-fab .mbn-fab-circle i { font-size: 1.25rem; color: var(--brand-dark); }
.mobile-bottom-nav a.mbn-fab span {
    color: rgba(252, 252, 252, 0.7);
    margin-top: 3px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    line-height: 1;
}

@media (max-width: 991.98px) {
    .mobile-bottom-nav { display: block; }    /* Push body content above the bottom nav */
    body { padding-bottom: calc(var(--bottombar-h) + var(--safe-bottom)); }
}
@media (min-width: 992px) {
    .mobile-bottom-nav { display: none !important; }
}

/* ── Mobile bottom-nav login-required modal ───────────────────────────────── */
.mbn-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    align-items: flex-end;
    justify-content: center;
    padding-bottom: calc(var(--bottombar-h, 4rem) + 0.5rem);
}
.mbn-modal-backdrop.is-open { display: flex; }

.mbn-modal {
    position: relative;
    width: min(92vw, 420px);
    background: var(--admin-surface, #fff);
    border-radius: 20px 20px 16px 16px;
    padding: 2rem 1.5rem 1.5rem;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.22);
    text-align: center;
    animation: mbnSlideUp 220ms cubic-bezier(.22,1,.36,1) both;
}
@keyframes mbnSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.mbn-modal-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(252,169,32,0.15);
    color: var(--brand-orange);
    font-size: 1.35rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.mbn-modal-title {
    font-size: 1.1rem; font-weight: 800;
    margin: 0 0 0.5rem;
    color: var(--admin-text, #111);
}
.mbn-modal-body {
    font-size: 0.85rem;
    color: var(--admin-muted, #6b7280);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}
.mbn-modal-actions {
    display: flex; flex-direction: column; gap: 0.6rem;
}
.mbn-modal-actions .btn-brand,
.mbn-modal-actions .btn-ghost { width: 100%; justify-content: center; }
.mbn-modal-close {
    position: absolute; top: 0.75rem; right: 0.85rem;
    background: none; border: none; cursor: pointer;
    font-size: 1rem; color: var(--admin-muted, #9ca3af);
    line-height: 1; padding: 0.25rem;
}
.mbn-modal-close:hover { color: var(--admin-text, #111); }
[data-theme="dark"] .mbn-modal {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
}
[data-theme="dark"] .mbn-modal-title { color: var(--admin-text); }

/* ============================================================================
   SITE FOOTER
   ============================================================================ */
.site-footer {
    background: #0e0f12;
    border-top: 1px solid #1f2229;
    color: #9ba3af;
    font-size: 0.82rem;
    margin-top: 3rem;
    padding-bottom: calc(var(--bottombar-h, 0px) + var(--safe-bottom, 0px));
}
.sf-top {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: space-between;
    align-items: flex-start;
}
.sf-brand { max-width: 240px; }
.sf-brand img { opacity: 0.88; margin-bottom: 0.6rem; display: block; }
.sf-tagline { font-size: 0.78rem; color: #6b7280; margin: 0; line-height: 1.5; }
.sf-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.sf-col { display: flex; flex-direction: column; gap: 0.45rem; }
.sf-heading {
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; color: #e5e7eb; margin: 0 0 0.35rem;
}
.sf-col a { color: #9ba3af; text-decoration: none; transition: color 160ms; font-size: 0.82rem; }
.sf-col a:hover { color: #FCA920; }
.sf-email { display: inline-flex; align-items: center; gap: 0.4rem; }
.sf-bottom {
    border-top: 1px solid #1f2229;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}
.sf-legal a { color: #6b7280; text-decoration: none; }
.sf-legal a:hover { color: #FCA920; }
.sf-felonk-link { color: #9ba3af; text-decoration: underline; }
.sf-felonk-link:hover { color: #FCA920; }

/* ── Participant search bar ───────────────────────────────────────────────── */
.participant-search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.psb-input-wrap {
    position: relative;
    flex: 1 1 260px;
    max-width: 420px;
}
.psb-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-muted, #9ca3af);
    font-size: 0.82rem;
    pointer-events: none;
}
.psb-input {
    width: 100%;
    padding: 0.52rem 2.25rem 0.52rem 2.1rem;
    border: 1px solid var(--admin-border, #2d3139);
    border-radius: var(--radius, 10px);
    background: var(--admin-surface, #15171c);
    color: var(--admin-text, #f3f4f6);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 160ms;
}
.psb-input:focus { border-color: var(--brand-orange, #FCA920); }
.psb-input::placeholder { color: var(--admin-muted, #6b7280); }
.psb-clear {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--admin-muted, #6b7280);
    cursor: pointer;
    font-size: 0.78rem;
    padding: 0.2rem;
    line-height: 1;
}
.psb-clear:hover { color: var(--admin-text, #f3f4f6); }
.psb-count {
    font-size: 0.75rem;
    color: var(--admin-muted, #6b7280);
    white-space: nowrap;
}
[data-theme="light"] .psb-input {
    background: #fff;
    color: #111;
    border-color: #d1d5db;
}
.support-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.85;
}
.support-hint a { color: inherit; text-decoration: underline; font-weight: 600; }
.support-hint a:hover { opacity: 1; }

/* ============================================================================
   ADMIN PORTAL — premium chrome
   ============================================================================ */

/* Admin shell adapts to sidebar on lg+, full-width on smaller screens */
.admin-shell {
    padding: calc(var(--topbar-h) + 1rem) 1rem 5rem 1rem;
    background: var(--admin-bg);
    background-image:
        radial-gradient(1100px 520px at 100% -10%, rgba(252, 169, 32, 0.05), transparent 55%),
        radial-gradient(700px 360px at -10% 110%, rgba(14, 15, 18, 0.035), transparent 55%);
    min-height: 100vh;
    color: var(--admin-text);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
}
@media (min-width: 768px) {
    .admin-shell { padding: calc(var(--topbar-h) + 1.25rem) 1.5rem 4rem 1.5rem; }
}
@media (min-width: 992px) {
    .admin-shell {
        padding: calc(var(--topbar-h) + 1.25rem) 1.75rem 3rem calc(var(--sidebar-w-collapsed) + 1.75rem);
    }
    body.sidebar-expanded .admin-shell {
        padding-left: calc(var(--sidebar-w) + 1.75rem);
    }
}

.admin-shell, .admin-shell h1, .admin-shell h2, .admin-shell h3, .admin-shell h4,
.admin-shell h5, .admin-shell h6, .admin-shell p, .admin-shell label,
.admin-shell span, .admin-shell li, .admin-shell td, .admin-shell th {
    color: var(--admin-text);
}

.admin-shell h1 {
    color: var(--brand-dark) !important;
    font-weight: 700;
    letter-spacing: -0.022em;
    font-size: clamp(1.25rem, 3.2vw, 1.6rem);
    line-height: 1.2;
    margin-bottom: 0.15rem;
}
.admin-shell h2, .admin-shell h3 {
    color: var(--brand-dark) !important;
    font-weight: 700;
    letter-spacing: -0.012em;
}
.admin-shell h4 {
    color: var(--brand-dark) !important;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-shell .text-muted { color: var(--admin-muted) !important; }
.admin-shell a:not([class*="btn-"]):not(.brand) {
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 600;
}
.admin-shell a:not([class*="btn-"]):not(.brand):hover {
    color: var(--brand-orange-hover);
    text-decoration: underline;
}

/* ============================================================================
   ADMIN — premium sidebar (lg+) + slim topbar (mobile/tablet)
   ============================================================================ */

/* Slim top bar — visible on < lg, hidden on lg+ where the sidebar takes over */
.admin-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: rgba(14, 15, 18, 0.92);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--brand-light);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 0.85rem;
    z-index: 1050;
}
.admin-topbar .brand {
    color: var(--brand-light) !important;
    font-weight: 700; letter-spacing: 0.4px; text-decoration: none;
    font-size: 0.84rem; text-transform: uppercase;
    display: flex; align-items: center; gap: 0.35rem;
}
.admin-topbar .brand .accent { color: var(--brand-orange); }
.admin-topbar .brand .sep { color: rgba(255,255,255,0.25); margin: 0 0.3rem; font-weight: 400; }

.admin-topbar .signout-form { margin: 0; }
.admin-topbar .signout-form button {
    background: transparent; color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.16);
    padding: 0.3rem 0.7rem; border-radius: 7px;
    font-size: 0.7rem; font-weight: 700; cursor: pointer;
    text-transform: uppercase; letter-spacing: 0.5px;
    transition: all var(--dur) var (--ease);
}
.admin-topbar .signout-form button:hover {
    background: var(--brand-orange); border-color: var(--brand-orange);
    color: var(--brand-dark);
}
@media (min-width: 992px) { .admin-topbar { display: none; } }

/* SIDEBAR (? lg) */
.admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w-collapsed);
    background: linear-gradient(180deg, #0e0f12 0%, #14161b 100%);
    border-right: 1px solid rgba(255,255,255,0.05);     
    color: var(--brand-light);  
    display: none; flex-direction: column;
    padding: 0.75rem 0.5rem 0.85rem 0.5rem;
    z-index: 1040;
    transition: width var(--dur) var (--ease);
}
@media (min-width: 992px) { .admin-sidebar { display: flex; } }
body.sidebar-expanded .admin-sidebar { width: var(--sidebar-w); }

.admin-sidebar .sb-brand {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 0.6rem 0.85rem;
    color: var(--brand-light); text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 0.5rem;
    height: var(--topbar-h);
}
.admin-sidebar .sb-brand .logo {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--brand-orange);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-dark); font-weight: 800; font-size: 1rem;
    box-shadow: 0 2px 8px var(--brand-orange-glow);
    flex-shrink: 0;
}
.admin-sidebar .sb-brand .label {
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
    opacity: 0; transform: translateX(-4px);
    transition: opacity var(--dur) var (--ease), transform var(--dur) var (--ease);
    white-space: nowrap;
}
body.sidebar-expanded .admin-sidebar .sb-brand .label { opacity: 1; transform: translateX(0); }

.admin-sidebar .sb-section {
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
    color: rgba(255,255,255,0.32);
    padding: 0.85rem 0.65rem 0.4rem;
    opacity: 0; transition: opacity var(--dur) var (--ease);
    height: 0; overflow: hidden;
}
body.sidebar-expanded .admin-sidebar .sb-section { opacity: 1; height: auto; }

.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-sidebar nav a {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.55rem 0.65rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none; font-size: 0.82rem; font-weight: 500;
    border-radius: 8px;
    transition: all var(--dur) var (--ease);
    white-space: nowrap; overflow: hidden;
}
.admin-sidebar nav a i { width: 18px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }
.admin-sidebar nav a .label {
    opacity: 0; transform: translateX(-4px);
    transition: opacity var(--dur) var (--ease), transform var(--dur) var (--ease);
}
body.sidebar-expanded .admin-sidebar nav a .label { opacity: 1; transform: translateX(0); }
.admin-sidebar nav a:hover {
    color: var(--brand-light);
    background: rgba(255,255,255,0.04);
}
.admin-sidebar nav a.active {
    color: var(--brand-orange);
    background: rgba(252,169,32,0.08);
}
.admin-sidebar nav a.active::before {
    content: ''; position: absolute; left: -0.5rem; top: 50%; transform: translateY(-50%);
    width: 3px; height: 60%; border-radius: 0 3px 3px 0; background: var(--brand-orange);
    box-shadow: 0 0 10px var(--brand-orange-glow);
}

.admin-sidebar .sb-foot { padding: 0.5rem 0.25rem 0; border-top: 1px solid rgba(255,255,255,0.06); }
.admin-sidebar .sb-foot button,
.admin-sidebar .sb-foot a {
    width: 100%;
    background: transparent; border: none;
    color: rgba(255,255,255,0.65); cursor: pointer;
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.55rem 0.65rem; border-radius: 8px;
    font-size: 0.78rem; font-weight: 500;
    transition: all var(--dur) var (--ease);
    text-decoration: none; white-space: nowrap; overflow: hidden;
}
.admin-sidebar .sb-foot button i,
.admin-sidebar .sb-foot a i { width: 18px; text-align: center; flex-shrink: 0; }
.admin-sidebar .sb-foot button:hover,
.admin-sidebar .sb-foot a:hover {
    color: var(--brand-orange);
    background: rgba(252,169,32,0.06);
}
.admin-sidebar .sb-foot .label {
    opacity: 0; transition: opacity var(--dur) var (--ease);
}
body.sidebar-expanded .admin-sidebar .sb-foot .label { opacity: 1; }

/* User chip at top of sidebar */
.admin-sidebar .sb-user {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 0.6rem;
    margin-bottom: 0.4rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}
.admin-sidebar .sb-user .avatar {
    width: 28px; height: 28px; border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-orange), #f3a000);
    color: var(--brand-dark); font-weight: 800; font-size: 0.72rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.admin-sidebar .sb-user .who {
    font-size: 0.74rem; opacity: 0;
    transition: opacity var(--dur) var (--ease);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    flex: 1;
}
.admin-sidebar .sb-user .who strong { display: block; font-weight: 700; color: #fff; }
.admin-sidebar .sb-user .who small { color: rgba(255,255,255,0.45); font-size: 0.65rem; }
body.sidebar-expanded .admin-sidebar .sb-user .who { opacity: 1; }

/* Admin cards — slim & minimal */
.admin-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-xs);
    margin-bottom: 1rem;
    transition: box-shadow var(--dur) var (--ease), border-color var(--dur) var (--ease);
}
@media (min-width: 768px) { .admin-card { padding: 1.15rem; margin-bottom: 1.15rem; } }
.admin-card:hover { box-shadow: var(--shadow-sm); border-color: rgba(15,17,21,0.16); }

/* Card with subdued surface — for charts & secondary content */
.admin-card.card-soft { background: var(--surface-1); border-color: var(--border-subtle); }

/* Stat tiles — slim, minimal, left-aligned (premium) */
.stat-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);  
    border-radius: var(--radius);
    padding: 0.95rem 1.05rem;
    text-align: left;
    box-shadow: var(--shadow-xs);
    transition: transform var(--dur) var (--ease-out), box-shadow var(--dur) var (--ease-out);
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; gap: 0.25rem;
}
.stat-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--brand-dark); border-radius: 3px 0 0 3px;
    transition: width var(--dur) var (--ease);
}
.stat-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.stat-card:hover::before { width: 4px; }
.stat-card.paid::before     { background: var(--success); }
.stat-card.payonday::before { background: var(--warning); }

.stat-card .stat-icon {
    position: absolute; top: 0.85rem; right: 0.95rem;
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-2); color: var(--admin-muted);
    font-size: 0.85rem;
}
.stat-card.paid .stat-icon { background: var(--success-soft); color: var(--success); }
.stat-card.payonday .stat-icon { background: var(--warning-soft); color: var(--warning); }

.stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--admin-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
}
.stat-card .stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.05;
    letter-spacing: -0.022em;
    font-feature-settings: 'tnum';
    margin-top: 0.1rem;
}
.stat-card .stat-scope {
    font-size: 0.66rem;
    color: var(--admin-muted);
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 0.15rem;
}
.stat-card .stat-delta {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.68rem; font-weight: 700;
    padding: 0.15rem 0.45rem; border-radius: 999px;
    margin-top: 0.4rem; align-self: flex-start;
}
.stat-card .stat-delta.up   { color: var(--success); background: var(--success-soft); }
.stat-card .stat-delta.down { color: var(--danger);  background: var(--danger-soft); }
.stat-card .stat-delta.flat { color: var(--text-muted); background: var(--surface-2); }

/* Tables — responsive on mobile by becoming card-stacks */
.events-table, .participants-table, .pool-table {
    width: 100%;
    background: var(--admin-surface);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius);
    overflow: hidden;
}
.events-table th, .participants-table th, .pool-table th {
    background: var(--surface-1);
    color: var(--admin-muted);
    padding: 0.65rem 0.85rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--admin-border);
}
.events-table td, .participants-table td, .pool-table td {
    padding: 0.7rem 0.85rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--admin-text);
    font-size: 0.85rem;
}
.events-table tr:last-child td, .participants-table tr:last-child td, .pool-table tr:last-child td { border-bottom: none; }
.events-table tr:hover, .participants-table tr:hover, .pool-table tr:hover { background: var(--surface-1); }

/* Mobile table ? card stack */
@media (max-width: 767.98px) {
    .events-table thead, .participants-table thead, .pool-table thead { display: none; }
    .events-table, .participants-table, .pool-table { background: transparent; box-shadow: none; }
    .events-table tr, .participants-table tr, .pool-table tr {
        display: block;
        background: var(--admin-surface);
        border: 1px solid var(--admin-border);
        border-radius: var(--radius);
        margin-bottom: 0.85rem;
        padding: 0.85rem 1rem;
        box-shadow: var(--shadow-xs);
    }
    .events-table tr:hover, .participants-table tr:hover, .pool-table tr:hover { background: var(--admin-surface); }
    .events-table td, .participants-table td, .pool-table td {
        display: flex; justify-content: space-between; align-items: center; gap: 1rem;
        padding: 0.5rem 0; border-bottom: 1px dashed var(--border-subtle); font-size: 0.88rem;
    }
    .events-table td::before, .participants-table td::before, .pool-table td::before {
        content: attr(data-label);
        font-size: 0.68rem; color: var(--admin-muted);
        text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
        flex-shrink: 0;
    }
    .events-table td:last-child, .participants-table td:last-child, .pool-table td:last-child { border-bottom: none; }
}

/* Badges — high-contrast, always visible */
.badge-paid, .badge-payonday, .badge-other, .badge-storage {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1;
}
.badge-paid       { background: var(--success-soft); color: var(--success); border: 1px solid rgba(22, 163, 74, 0.25); }
.badge-payonday   { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(217, 119, 6, 0.3); }
.badge-other      { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border-subtle); }
/* Storage / Bib badge — use the same high-contrast styling so bib numbers and
   storage IDs are clearly visible in all themes and on hovered rows. Use the
   brand orange background with dark text for best contrast and consistency. */
.badge-storage, .bib-number {
    background: var(--brand-orange);
    color: var(--brand-dark);
    font-family: var(--font-mono);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 6px rgba(252,169,32,0.12) inset;
}

/* ============================================================================
   BUTTONS — clear hierarchy, never invisible
   ============================================================================ */

/* Primary brand */
.btn-brand {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    background: var(--brand-orange);
    color: var(--brand-dark) !important;
    border: 1px solid var(--brand-orange);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none !important;
    box-shadow: 0 2px 8px var(--brand-orange-glow);
    transition: all var(--dur) var (--ease);
    min-height: 36px;
    white-space: nowrap;
}
.btn-brand:hover {
    background: var(--brand-orange-hover);
    border-color: var(--brand-orange-hover);
    box-shadow: 0 4px 14px var(--brand-orange-glow);
    transform: translateY(-1px);
}
.btn-brand:active { transform: translateY(0); }
.btn-brand:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }

/* Ghost variant — subtle, fits next to btn-brand without competing */
.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    background: transparent;
    color: var(--admin-text) !important;
    border: 1px solid var(--admin-border);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all var(--dur) var (--ease);
    min-height: 36px;
    white-space: nowrap;
}
.btn-ghost:hover {
    border-color: var(--brand-dark);
    background: var(--surface-1);
}

/* Dark pill (secondary) — slimmer */
.btn-dark-pill {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    background: var(--brand-dark);
    color: #fff !important;
    border: 1px solid var(--brand-dark);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all var(--dur) var (--ease);
    min-height: 34px;
    white-space: nowrap;
}
.btn-dark-pill:hover {
    background: var(--brand-orange);
    color: var(--brand-dark) !important;
    border-color: var(--brand-orange);
}

/* Tiny icon-only button (used in row action groups) */
.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 7px;
    background: var(--surface-1);
    color: var(--admin-text) !important;
    border: 1px solid var(--admin-border);
    cursor: pointer; text-decoration: none !important;
    transition: all var(--dur) var (--ease);
    font-size: 0.78rem;
}
.btn-icon:hover { background: var(--brand-dark); color: #fff !important; border-color: var(--brand-dark); transform: translateY(-1px); }
.btn-icon.brand:hover { background: var(--brand-orange); border-color: var(--brand-orange); color: var(--brand-dark) !important; }

/* Row action group — keeps multiple buttons from squashing in tight columns */
.row-actions { display: inline-flex; gap: 0.35rem; align-items: center; flex-wrap: nowrap; }
@media (max-width: 767.98px) {
    .row-actions { flex-wrap: wrap; }
}

/* Confirm (success) */
.btn-confirm {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    background: var(--success);
    color: #fff !important;
    border: 1px solid var(--success);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--dur) var (--ease);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
    min-height: 38px;
    text-decoration: none !important;
}
.btn-confirm:hover { background: #15803d; border-color: #15803d; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4); }

/* Assign */
.btn-assign {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    background: var(--brand-orange);
    color: var(--brand-dark) !important;
    border: 1px solid var(--brand-orange);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: all var(--dur) var (--ease);
    box-shadow: 0 2px 6px var(--brand-orange-glow);
    text-decoration: none !important;
}
.btn-assign:hover { background: var(--brand-orange-hover); border-color: var(--brand-orange-hover); transform: translateY(-1px); }
.btn-assign:disabled { background: var(--surface-2); color: var(--text-muted) !important; border-color: var(--border); box-shadow: none; cursor: not-allowed; }

/* Unassign — clearly visible at rest (was the invisible one) */
.btn-unassign {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--danger-soft);
    color: var(--danger) !important;
    border: 1px solid rgba(220, 38, 38, 0.35);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--dur) var (--ease);
    line-height: 1;
    min-width: 32px; min-height: 32px;
}
.btn-unassign:hover { background: var(--danger); color: #fff !important; border-color: var(--danger); transform: scale(1.06); }

/* Generic neutral button (white-on-light, used in the public site forms) */
.btn-outline-dark, .btn.btn-outline-dark {
    background: transparent;
    color: var(--brand-dark) !important;
    border: 1px solid var(--brand-dark);
    transition: all var(--dur) var (--ease);
}
.btn-outline-dark:hover { background: var(--brand-dark); color: #fff !important; }

/* Ensure bib-number inherits sizing/padding that matches storage badge while
   still being bold and readable. */
.bib-number {
    padding: 0.28rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.6px;
    display: inline-block;
}

/* Bib selector */
.bib-select {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--admin-border);
    max-width: 140px;
    background: #fff;
    color: var(--admin-text);
    transition: border-color var(--dur) var (--ease), box-shadow var(--dur) var (--ease);
}
.bib-select:focus { border-color: var(--brand-orange); box-shadow: var(--shadow-glow); outline: none; }

/* Filter pills — segmented & slim */
.filter-pill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-pill);
    background: var(--admin-surface);
    color: var(--admin-text) !important;
    border: 1px solid var(--admin-border);
    text-decoration: none !important;
    font-size: 0.76rem;
    font-weight: 600;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
    transition: all var(--dur) var (--ease);
}
.filter-pill:hover { border-color: var(--brand-dark); }
.filter-pill.active { background: var(--brand-dark); color: #fff !important; border-color: var(--brand-dark); }
.filter-pill.payonday.active { background: var(--brand-orange); color: var(--brand-dark) !important; border-color: var(--brand-orange); }
.filter-pill.paid.active { background: var(--success); color: #fff !important; border-color: var(--success); }

/* Status banners */
.status-banner {
    padding: 0.95rem 1.15rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid transparent;
    display: flex; align-items: center; gap: 0.65rem;
    animation: slide-down var(--dur-slow) var(--ease-out);
}
.status-success { background: var(--success-soft); color: var(--success); border-color: rgba(22, 163, 74, 0.25); }
.status-error   { background: var(--danger-soft);  color: var(--danger);  border-color: rgba(220, 38, 38, 0.25); }
@keyframes slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Form labels */
.form-label-sm {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--admin-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0.4rem;
    display: block;
}

/* ============================================================================
   ADMIN LOGIN CARD
   ============================================================================ */

.admin-login-wrapper {
    max-width: 440px;
    margin: 96px auto 80px auto;
    padding: 2rem 1.75rem 2.25rem;
    background: var(--admin-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--admin-border);
    position: relative;
    overflow: hidden;
}
.admin-login-wrapper::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-hover));
}
@media (min-width: 768px) {
    .admin-login-wrapper { margin-top: 120px; padding: 2.5rem; }
}
.admin-login-wrapper h2 {
    color: var(--brand-dark) !important;
    font-weight: 800;
    margin-bottom: 0.4rem;
    text-align: center;
    letter-spacing: -0.02em;
    font-size: 1.5rem;
}
.admin-login-wrapper .form-control {
    background: var(--surface-1) !important;
    color: var(--admin-text) !important;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius);
    padding: 0.7rem 0.95rem;
    font-size: 0.95rem;
    transition: border-color var(--dur) var (--ease), box-shadow var(--dur) var (--ease);
    min-height: 46px;
}
.admin-login-wrapper .form-control:focus {
    border-color: var(--brand-orange);
    box-shadow: var(--shadow-glow);
}
.admin-login-wrapper .form-label {
    color: var(--admin-text);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}
.admin-login-wrapper .btn-primary {
    background: var(--brand-dark);
    border: 1px solid var(--brand-dark);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-radius: var(--radius);
    padding: 0.75rem;
    min-height: 48px;
    transition: all var(--dur) var (--ease);
}
.admin-login-wrapper .btn-primary:hover {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: var(--brand-dark);
    box-shadow: 0 6px 18px var(--brand-orange-glow);
    transform: translateY(-1px);
}

/* ============================================================================
   PUBLIC SITE — premium event tiles (used on landing page)
   ============================================================================ */

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
@media (min-width: 768px) {
    .events-grid { gap: 1.5rem; margin-top: 2rem; }
}

.event-tile {
    position: relative;
    background: linear-gradient(180deg, #1a1d24 0%, #15171c 100%) !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--dur-slow) var (--ease-out), box-shadow var (--dur-slow) var (--ease-out), border-color var(--dur) var (--ease);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.06);
    will-change: transform;
    color-scheme: dark;
}
/* Body text is always light since the card is always dark */
.event-tile-body { background: transparent !important; }
.event-tile-title { color: #FCFCFC !important; }
.event-tile-title a { color: #FCFCFC !important; }
.event-tile-title a:hover { color: var(--brand-orange) !important; }
.event-tile-desc { color: rgba(252,252,252,0.62) !important; }
.event-tile-foot { color: rgba(252,252,252,0.5) !important; border-top-color: rgba(255,255,255,0.07) !important; }
.event-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(252, 169, 32, 0.18);
    border-color: rgba(252, 169, 32, 0.35);
}

.event-tile-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0d0e12;
}
.event-tile-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}
.event-tile:hover .event-tile-media img { transform: scale(1.08); }

/* Date chip */
.event-tile-date {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: #1a1a1a;
    border-radius: var(--radius);
    padding: 6px 10px;
    text-align: center; line-height: 1;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
/* Day and month are always dark — chip background is always near-white */
.event-tile-date .day   { display: block; font-size: 1.4rem; font-weight: 800; color: var(--brand-orange); letter-spacing: -0.025em; font-feature-settings: 'tnum'; }
.event-tile-date .month { display: block; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; color: #1a1a1a; }

/* Category chip */
.event-tile-cat {
    position: absolute; top: 12px; right: 12px;
    background: rgba(252, 169, 32, 0.96);
    color: var(--brand-dark);
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 2px 10px var(--brand-orange-glow);
    backdrop-filter: blur(8px);
}

/* Bottom gradient overlay */
.event-tile-media::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 50%);
    pointer-events: none;
}

.event-tile-body { padding: 1rem 1.1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }

.event-tile-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.45rem;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.event-tile-desc {
    font-size: 0.82rem;
    margin: 0 0 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.event-tile-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.7rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}
.event-tile-foot .reg-close { display: flex; flex-direction: column; }
.event-tile-foot .reg-close strong {
    color: var(--brand-orange);
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 1px;
    font-weight: 700;
    font-feature-settings: 'tnum';
}
.event-tile-foot .arrow { color: var(--brand-orange); font-size: 1.05rem; transition: transform var(--dur) var (--ease); }
.event-tile:hover .event-tile-foot .arrow { transform: translateX(5px); }

/* Stagger fade-in */
.event-tile { opacity: 0; transform: translateY(14px); animation: tile-in 0.55s var(--ease-out) forwards; }
.event-tile:nth-child(1)  { animation-delay: 0.04s; }
.event-tile:nth-child(2)  { animation-delay: 0.08s; }
.event-tile:nth-child(3)  { animation-delay: 0.12s; }
.event-tile:nth-child(4)  { animation-delay: 0.16s; }
.event-tile:nth-child(5)  { animation-delay: 0.20s; }
.event-tile:nth-child(6)  { animation-delay: 0.24s; }
.event-tile:nth-child(7)  { animation-delay: 0.28s; }
.event-tile:nth-child(8)  { animation-delay: 0.32s; }
@keyframes tile-in { to { opacity: 1; transform: translateY(0); } }

/* ============================================================================
   EVENT DETAIL — cinematic, sporty, world-class
   ============================================================================ */

.event-detail-shell { background: var(--page-bg); }

/* ── CLEAN HERO ──────────────────────────────────────────────────────── */
.ev-hero-clean {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(14,15,18,0.78) 0%, rgba(14,15,18,0.92) 100%),
        url('/img/demos/band/slides/irunback3.png') center / cover no-repeat;
    color: #fff;
    /* Top padding clears the fixed public-site navbar (~70–90px). */
    padding: clamp(6rem, 9vw, 8.5rem) 0 clamp(2.25rem, 6vw, 3.75rem);
}
.ev-hero-clean::after {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(900px 380px at 100% 0%, rgba(252, 169, 32, 0.20), transparent 55%),
        radial-gradient(700px 280px at 0% 100%, rgba(22,163,74,0.10), transparent 60%);
}
.ev-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 24px);
    pointer-events: none;
}
.ev-hero-grid {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: clamp(1rem, 3vw, 2.25rem);
    align-items: center;
}
@media (max-width: 767.98px) {
    .ev-hero-grid { grid-template-columns: 1fr; }
}
.ev-hero-text { display: flex; flex-direction: column; gap: 0.85rem; min-width: 0; position: relative; z-index: 2; }
.ev-hero-poster-wrap { position: relative; z-index: 2; }

/* Status + fee row */
.ev-hero-status {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.ev-status-pill {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.35rem 0.8rem; border-radius: 999px;
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px;
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.18);
}
.ev-status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
    animation: ev-pulse 1.6s ease-in-out infinite;
}
.status-open   .ev-status-dot { background: #22c55e; }
.status-warn   .ev-status-dot { background: #FCA920; }
.status-closed .ev-status-dot { background: #ef4444; animation: none; }
.status-open   { color: #bbf7d0; }
.status-warn   { color: #FCD581; }
.status-closed { color: #fecaca; }
@keyframes ev-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.3); opacity: 0.7; }
}
.ev-fee-badge {
    display: inline-flex; flex-direction: column; align-items: flex-start;
    padding: 0.35rem 0.8rem; border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.06) 100%);
    border: 1px solid rgba(252,169,32,0.45);
    box-shadow: 0 0 24px rgba(252,169,32,0.18);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    line-height: 1; gap: 2px;
}
.ev-fee-badge small  { font-size: 0.55rem; font-weight: 800; letter-spacing: 1.2px; opacity: 0.7; }
.ev-fee-badge strong { font-size: 1rem; font-weight: 800; color: #FCA920; letter-spacing: -0.01em; }

.ev-hero-title {
    font-size: clamp(1.6rem, 3.6vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.08;
    margin: 0;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.35);
}

.ev-hero-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ev-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.8rem; border-radius: 999px;
    font-size: 0.76rem; font-weight: 600;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: #fff;
}
.ev-chip i { color: #FCA920; }

.ev-countdown {
    margin-top: 0.25rem;
    align-self: flex-start;
    display: inline-flex; align-items: baseline; gap: 0.5rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(180deg, rgba(252,169,32,0.18) 0%, rgba(252,169,32,0.06) 100%);
    border: 1px solid rgba(252,169,32,0.35);
    border-radius: 12px;
    box-shadow: 0 0 28px rgba(252,169,32,0.18);
}
.ev-countdown-num   { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; color: #FCA920; letter-spacing: -0.03em; line-height: 1; font-feature-settings: 'tnum'; }
.ev-countdown-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: rgba(255,255,255,0.85); }

/* Poster (right column) — contained, never stretched */
.ev-hero-poster-wrap {
    display: flex; justify-content: center; align-items: center;
    min-width: 0;
}
.ev-hero-poster {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 6px;
    box-shadow:
        0 30px 60px -20px rgba(0,0,0,0.55),
        0 0 0 1px rgba(252,169,32,0.18) inset,
        0 0 60px -10px rgba(252,169,32,0.20);
    overflow: hidden;
    position: relative;
    transition: transform var(--dur) var(--ease);
}
.ev-hero-poster:hover { transform: translateY(-3px) scale(1.005); }
.ev-hero-poster::before {
    content: ''; position: absolute; left: 6px; right: 6px; top: 6px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(252,169,32,0.55), transparent);
    border-radius: inherit; pointer-events: none; z-index: 2;
}
.ev-hero-poster img {
    width: 100%; height: 100%;
    object-fit: cover;          /* fills nicely; swap to 'contain' if you prefer letterboxing */
    object-position: center;
    border-radius: 12px;
    display: block;
}
@media (max-width: 767.98px) {
    .ev-hero-poster { max-width: 280px; }
}

/* ============================================================================
   EVENT DETAIL — quick stats, cards, picker, options, modal
   This block was missing — restored. Variable-driven for theme support.
   ============================================================================ */

.event-detail-shell {
    background: var(--page-bg);
    min-height: 100vh;
}

/* ── Quick stats row ─────────────────────────────────────────────────── */
.ev-quickstats-wrap {
    margin-top: -2.25rem;
    margin-bottom: 1rem;
    position: relative; z-index: 5;
}
.ev-stat {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
    transition: transform var(--dur) var (--ease), box-shadow var (--dur) var (--ease);
}
.ev-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ev-stat::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, #FCA920 0%, transparent 100%);
}
.ev-stat > i {
    position: absolute; top: 12px; right: 12px;
    font-size: 1.05rem; color: #FCA920; opacity: 0.35;
}
.ev-stat-label {
    font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.7px; color: var(--admin-muted);
}
.ev-stat-value {
    font-size: 1.15rem; font-weight: 800; color: var(--brand-dark);
    letter-spacing: -0.015em; margin-top: 0.2rem; font-feature-settings: 'tnum';
}

/* ── Main two-column grid ────────────────────────────────────────────── */
.ev-main { padding-bottom: 5rem; }
.ev-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow-xs);
    margin-bottom: 1rem;
    position: relative;
    transition: box-shadow var(--dur) var (--ease);
}
.ev-card:hover { box-shadow: var(--shadow-sm); }

.ev-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; margin-bottom: 0.85rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border-subtle);
}
.ev-card-head h3, .ev-card-head h4 {
    margin: 0; font-size: 0.88rem; font-weight: 800; letter-spacing: -0.01em;
    color: var(--brand-dark);
    text-transform: uppercase;
}
.ev-card-head i { color: #FCA920; margin-right: 0.4rem; }

.ev-description {
    font-size: 0.92rem; line-height: 1.65; color: var(--admin-text);
}

/* Map card */
.ev-map-card { padding: 0; overflow: hidden; }
.ev-map-card .ev-card-head { padding: 1rem 1.2rem 0.75rem; margin-bottom: 0; border-bottom: 1px solid var(--border-subtle); }
.ev-map {
    width: 100%;
    min-height: 340px; height: 340px;
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-1);
}
.ev-directions {
    background: var(--surface-1);
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--border-subtle);
}
.ev-directions h4 {
    margin: 0 0 0.5rem; font-size: 0.78rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--brand-dark);
}
.ev-directions h4 i { color: #FCA920; margin-right: 0.35rem; }
.ev-directions ol { margin: 0; padding-left: 1.2rem; }
.ev-directions li { font-size: 0.82rem; color: var(--admin-text); padding: 0.25rem 0; }

.btn-ghost-sm {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 0.9rem; border-radius: 8px;
    background: var(--surface-1); border: 1px solid var(--admin-border);
    color: var(--brand-dark); font-size: 0.74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.4px;
    cursor: pointer; transition: all var(--dur) var (--ease);
}
.btn-ghost-sm:hover {
    background: var(--brand-orange); color: var(--brand-dark);
    border-color: var(--brand-orange);
    box-shadow: 0 4px 12px var(--brand-orange-glow);
}
.btn-ghost-sm i { color: inherit; }

/* Disclaimer details */
.ev-disclaimer-card { padding: 0; }
.ev-disclaimer-card details { padding: 0.95rem 1.2rem; }
.ev-disclaimer-card summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem;
}
.ev-disclaimer-card summary::-webkit-details-marker { display: none; }
.ev-disclaimer-card summary h3 {
    margin: 0;
    font-size: 0.85rem; font-weight: 800; letter-spacing: -0.01em;
    color: var(--brand-dark); text-transform: uppercase;
}
.ev-disclaimer-card summary i.fa-shield-halved { color: #FCA920; margin-right: 0.4rem; }
.ev-disc-chev { color: var(--admin-muted); transition: transform var(--dur) var (--ease); }
.ev-disclaimer-card details[open] .ev-disc-chev { transform: rotate(180deg); }
.ev-disclaimer-list {
    margin: 0.85rem 0 0; padding-left: 1.2rem;
    max-height: 320px; overflow-y: auto;
}
.ev-disclaimer-list li {
    padding: 0.25rem 0; font-size: 0.82rem; line-height: 1.55; color: var(--admin-text);
}

/* ── Discipline picker ───────────────────────────────────────────────── */
.ev-picker {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}
@media (min-width: 992px) { .ev-picker { position: sticky; top: 1rem; } }

.ev-picker-head {
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}
.ev-picker-head h3 {
    margin: 0 0 0.2rem;
    font-size: 0.92rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.4px;
    color: var(--brand-dark);
}
.ev-picker-head h3 i { color: #FCA920; margin-right: 0.4rem; }
.ev-picker-head small { color: var(--admin-muted); font-size: 0.8rem; }

.ev-auth-banner {
    display: flex; align-items: flex-start; gap: 0.65rem;
    padding: 0.75rem 0.9rem; border-radius: 10px;
    background: rgba(2,132,199,0.10);
    border: 1px solid rgba(2,132,199,0.22);
    color: #075985;
    margin-bottom: 1rem;
}
.ev-auth-banner i { color: #0284c7; font-size: 1rem; padding-top: 2px; }
.ev-auth-banner strong { display: block; font-size: 0.86rem; color: #0c4a6e; }
.ev-auth-banner span { font-size: 0.78rem; }
.ev-auth-banner a { color: #0284c7; font-weight: 700; text-decoration: underline; }

.ev-discipline-list {
    display: flex; flex-direction: column; gap: 0.5rem;
    margin-bottom: 1rem;
}

.ev-discipline {
    background: var(--surface-1);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color var(--dur) var (--ease), box-shadow var(--dur) var (--ease);
}
.ev-discipline:hover { border-color: rgba(252,169,32,0.40); }
.ev-discipline[open] {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(252,169,32,0.12), var(--shadow-xs);
}
.ev-discipline summary {
    list-style: none; cursor: pointer;
    display: grid; grid-template-columns: 1fr auto auto;
    align-items: center; gap: 0.6rem;
    padding: 0.85rem 1rem;
    transition: background var(--dur) var (--ease);
}
.ev-discipline summary::-webkit-details-marker { display: none; }
.ev-discipline summary:hover { background: rgba(252,169,32,0.07); }
.ev-disc-name {
    font-size: 1rem; font-weight: 800;
    color: var(--brand-dark); letter-spacing: -0.012em;
}
.ev-disc-meta {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--admin-muted);
}
.ev-discipline summary > i.fa-chevron-down {
    color: var(--admin-muted); font-size: 0.8rem;
    transition: transform var(--dur) var (--ease), color var(--dur) var (--ease);
}
.ev-discipline[open] summary > i.fa-chevron-down {
    transform: rotate(180deg); color: var(--brand-orange);
}

.ev-discipline-body {
    padding: 0.5rem 0.6rem 0.7rem;
    background: var(--admin-surface);
    border-top: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; gap: 0.4rem;
}

/* Each radio/checkbox option row */
.ev-option {
    display: grid; grid-template-columns: 22px 1fr auto;
    align-items: center; gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--admin-surface);
    cursor: pointer;
    transition: border-color var(--dur) var (--ease), background var(--dur) var (--ease), transform var(--dur) var (--ease);
    margin: 0;
}
.ev-option:hover {
    border-color: var(--brand-orange);
    background: rgba(252,169,32,0.06);
    transform: translateX(2px);
}
.ev-option input[type="radio"],
.ev-option input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--brand-orange);
    cursor: pointer; margin: 0;
}
.ev-option:has(input:checked) {
    border-color: var(--brand-orange);
    background: linear-gradient(90deg, rgba(252,169,32,0.12), transparent 80%);
    box-shadow: 0 0 0 3px rgba(252,169,32,0.12);
}
.ev-option-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.ev-option-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ev-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.7rem; font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--surface-2); color: var(--admin-text);
    border: 1px solid var(--border-subtle);
}
.ev-pill i { color: var(--brand-orange); font-size: 0.65rem; }
.ev-pill-gender {
    background: rgba(252,169,32,0.12);
    border-color: rgba(252,169,32,0.28);
    color: #92400e;
}
.ev-option-status {
    font-size: 0.7rem; font-weight: 700; color: #16a34a;
    display: inline-flex; align-items: center; gap: 0.3rem;
}
.ev-option-fee {
    font-size: 0.95rem; font-weight: 800; color: var(--brand-dark);
    letter-spacing: -0.012em; font-feature-settings: 'tnum';
    background: var(--surface-1); border: 1px solid var(--border-subtle);
    padding: 0.32rem 0.7rem; border-radius: 8px;
    white-space: nowrap;
}
.ev-option.is-registered {
    background: rgba(22,163,74,0.06);
    border-color: rgba(22,163,74,0.32);
}
.ev-option.is-registered .ev-option-fee {
    background: rgba(22,163,74,0.12);
    border-color: rgba(22,163,74,0.28);
    color: #16a34a;
}

/* Agree band + actions */
.ev-agree {
    margin-top: 0.5rem;
    padding: 0.8rem 0.9rem;
    background: var(--surface-1);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
}
.ev-agree-label {
    display: flex; align-items: flex-start; gap: 0.6rem;
    cursor: pointer; margin: 0;
    font-size: 0.85rem; color: var(--admin-text); line-height: 1.4;
}
.ev-agree-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--brand-orange);
    margin-top: 1px; flex: 0 0 auto;
}
.ev-agree-label a { color: var(--brand-orange); font-weight: 700; text-decoration: underline; }

.ev-actions {
    margin-top: 0.9rem;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.btn-block-lg {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1rem !important;
    font-size: 0.92rem !important;
    border-radius: 12px !important;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-block-lg:disabled,
.btn-block-lg[disabled] {
    opacity: 0.55; cursor: not-allowed;
    transform: none !important; box-shadow: none !important;
}

/* Modal restyle */
.ev-modal {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    color: var(--admin-text);
}
.ev-modal .modal-header {
    background: linear-gradient(135deg, #0e0f12 0%, #1a1d24 100%);
    color: #fff;
    border-bottom: 0;
    padding: 1rem 1.25rem;
}
.ev-modal .modal-header .modal-title { font-weight: 800; letter-spacing: -0.012em; }
.ev-modal .modal-header .btn-close { filter: invert(1) brightness(2); }
.ev-modal .modal-body {
    padding: 1rem 1.25rem;
    max-height: 60vh; overflow-y: auto;
    background: var(--admin-surface);
}
.ev-modal .modal-footer {
    background: var(--surface-1);
    border-top: 1px solid var(--admin-border);
    padding: 0.85rem 1.25rem;
    gap: 0.5rem;
}
.ev-athlete-row {
    display: grid; grid-template-columns: 22px 1fr;
    align-items: center; gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    margin-bottom: 0.4rem;
    cursor: pointer;
    background: var(--admin-surface);
    transition: border-color var(--dur) var (--ease), background var(--dur) var (--ease);
}
.ev-athlete-row:hover {
    border-color: var(--brand-orange);
    background: rgba(252,169,32,0.06);
}
.ev-athlete-row input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--brand-orange); margin: 0;
}
.ev-athlete-row span { display: flex; flex-direction: column; min-width: 0; }
.ev-athlete-row strong { font-size: 0.9rem; color: var(--brand-dark); }
.ev-athlete-row small { font-size: 0.74rem; color: var(--admin-muted); }
.ev-athlete-row:has(input:checked) {
    border-color: var(--brand-orange);
    background: linear-gradient(90deg, rgba(252,169,32,0.14), transparent 80%);
    box-shadow: 0 0 0 3px rgba(252,169,32,0.12);
}

/* Mobile polish */
@media (max-width: 575.98px) {
    .ev-quickstats-wrap { margin-top: -1.25rem; }
    .ev-stat { padding: 0.6rem 0.75rem; }
    .ev-stat > i { display: none; }
    .ev-option { grid-template-columns: 22px 1fr; }
    .ev-option-fee { grid-column: 1 / -1; justify-self: end; margin-top: 0.25rem; }
}

/* ============================================================================
   THEME TOKENS — light + dark
   These were missing — without them --page-bg is undefined and dark mode
   has no overrides. Brand orange stays constant in both modes.
   ============================================================================ */

/* LIGHT (default) — also re-asserts the variables on :root so cascade is clean */
:root,
html[data-theme="light"] {
    --page-bg:        #f6f7f9;
    --admin-surface:  #ffffff;
    --admin-border:   #e5e7eb;
    --border-subtle:  #eef0f3;
    --surface-1:      #f7f8fa;
    --surface-2:      #eef0f3;
    --admin-text:     #1f2937;
    --admin-muted:    #6b7280;
    --brand-dark:     #0e0f12;
    color-scheme: light;
}

/* DARK — surfaces flip; brand orange unchanged */
html[data-theme="dark"] {
    --page-bg:        #0c0d10;
    --admin-surface:  #15171c;
    --admin-border:   #262931;
    --border-subtle:  #1f2229;
    --surface-1:      #1a1d24;
    --surface-2:      #20242c;
    --admin-text:     #e5e7eb;
    --admin-muted:    #9ba3af;
    --brand-dark:     #f3f4f6;        /* "headline" colour flips to near-white */
    color-scheme: dark;
}

/* Body / main canvas honours the theme */
html[data-theme="dark"] body,
html[data-theme="dark"] .main           { background: var(--page-bg); color: var(--admin-text); }
html[data-theme="light"] body,
html[data-theme="light"] .main          { background: var(--page-bg); color: var(--admin-text); }

/* ── Tighten the EventDetail surfaces in dark mode (variables drive most of it,
   but a few spots needed direct colour because they used hard-coded #fff) ── */
[data-theme="dark"] .ev-card,
[data-theme="dark"] .ev-picker,
[data-theme="dark"] .ev-stat,
[data-theme="dark"] .ev-modal,
[data-theme="dark"] .ev-modal .modal-body  { background: var(--admin-surface); border-color: var(--admin-border); color: var(--admin-text); }
[data-theme="dark"] .ev-discipline         { background: var(--surface-1); border-color: var(--admin-border); }
[data-theme="dark"] .ev-discipline-body    { background: var(--admin-surface); border-color: var(--border-subtle); }
[data-theme="dark"] .ev-option             { background: var(--surface-1); border-color: var(--border-subtle); }
[data-theme="dark"] .ev-option:hover       { background: rgba(252,169,32,0.10); }
[data-theme="dark"] .ev-option-fee,
[data-theme="dark"] .ev-pill               { background: var(--surface-2); color: var(--admin-text); border-color: var(--admin-border); }
[data-theme="dark"] .ev-agree              { background: var(--surface-1); border-color: var(--admin-border); }
[data-theme="dark"] .btn-ghost-sm          { background: var(--surface-1); color: var(--admin-text); border-color: var(--admin-border); }
[data-theme="dark"] .ev-card-head h3,
[data-theme="dark"] .ev-card-head h4,
[data-theme="dark"] .ev-disc-name,
[data-theme="dark"] .ev-stat-value,
[data-theme="dark"] .ev-option-fee,
[data-theme="dark"] .ev-picker-head h3     { color: var(--admin-text); }
[data-theme="dark"] .ev-description,
[data-theme="dark"] .ev-disclaimer-list li,
[data-theme="dark"] .ev-directions li      { color: var(--admin-text); }
[data-theme="dark"] .ev-card-head          { border-bottom-color: var(--border-subtle); }
[data-theme="dark"] .ev-modal .modal-footer{ background: var(--surface-1); }

/* ── PROFILE PAGE dark-mode pass ──────────────────────────────────────────── */
[data-theme="dark"] .admin-card,
[data-theme="dark"] .ph-card,
[data-theme="dark"] .profile-shell .admin-card {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
    color: var(--admin-text);
}
[data-theme="dark"] .ph-cover                  { background: linear-gradient(135deg, #0e0f12 0%, #1a1d24 100%); }
[data-theme="dark"] .ph-card .ac-head h3,
[data-theme="dark"] .ph-card .ac-head h4,
[data-theme="dark"] .admin-card .ac-head h3,
[data-theme="dark"] .admin-card .ac-head h4   { color: var(--admin-text) !important; }
[data-theme="dark"] .profile-dl dt             { color: var(--admin-muted) !important; }
[data-theme="dark"] .profile-dl dd             { color: var(--admin-text) !important; }
[data-theme="dark"] .nav-tabs                  { border-bottom-color: var(--admin-border); }
[data-theme="dark"] .nav-tabs .nav-link        { color: var(--admin-muted); border-color: transparent; }
[data-theme="dark"] .nav-tabs .nav-link:hover  { color: var(--admin-text); border-color: var(--admin-border) var(--admin-border) transparent; }
[data-theme="dark"] .nav-tabs .nav-link.active {
    color: var(--brand-orange);
    background: var(--admin-surface);
    border-color: var(--admin-border) var(--admin-border) var(--admin-surface);
}

/* ── THEME TOGGLE BUTTON in the public header ─────────────────────────────── */
.theme-toggle {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    border-radius: 999px !important;
    width: 36px; height: 36px;
    display: inline-flex !important;
    align-items: center; justify-content: center;
    color: #fff !important;
    cursor: pointer;
    margin-right: 0.5rem;
    padding: 0 !important;
    position: relative;
    transition: background 220ms cubic-bezier(0.4,0,0.2,1), transform 220ms cubic-bezier(0.4,0,0.2,1);
}
.theme-toggle:hover {
    background: rgba(252,169,32,0.18) !important;
    transform: rotate(15deg);
}
.theme-toggle .theme-icon-light,
.theme-toggle .theme-icon-dark {
    position: absolute;
    transition: opacity 220ms cubic-bezier(0.4,0,0.2,1), transform 220ms cubic-bezier(0.4,0,0.2,1);
}
html[data-theme="light"] .theme-toggle .theme-icon-light { opacity: 0; transform: rotate(-90deg) scale(0.6); }
html[data-theme="light"] .theme-toggle .theme-icon-dark  { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="dark"]  .theme-toggle .theme-icon-light { opacity: 1; transform: rotate(0) scale(1); color: #FCA920 !important; }
html[data-theme="dark"]  .theme-toggle .theme-icon-dark  { opacity: 0; transform: rotate(90deg) scale(0.6); }
/* ============================================================================
   PROFILE PAGE — sporty hero + identity card, theme-aware
   Markup contract (Profile.cshtml):
     .profile-shell > .profile-hero > .ph-cover (bg) + .ph-bar
       .ph-bar > .ph-avatar-wrap > .ph-avatar
              > .ph-identity > .ph-name + .ph-meta(.ph-chip + .ph-flag)
              > .ph-completion > .ph-ring > .ph-ring-inner
     .profile-tabs (Bootstrap nav-tabs)
     .admin-card / .ac-head / .profile-dl   (content blocks)
   ============================================================================ */

.profile-shell {
    background: var(--page-bg);
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* ── HERO ──────────────────────────────────────────────────────────────── */
.profile-hero {
    position: relative;
    margin-top: 0;
    /* Top padding clears the fixed navbar */
    padding-top: clamp(4.5rem, 7vw, 5.5rem);
    /* Dark base — shows behind the cover while it loads, and behind the ph-bar */
    background: #0e0f12;
    /* Smoothly dissolve the bottom edge into the page background */
    padding-bottom: 0;
}

.ph-cover {
    position: relative;
    width: 100%;
    /* No fixed height — the <img> drives height naturally */
    min-height: 200px;
    max-height: clamp(300px, 48vw, 540px);
    overflow: hidden;
    line-height: 0;          /* kills the whitespace gap below the <img> */
    background: #0e0f12;     /* fallback while the image loads */
    isolation: isolate;
}

/* The actual cover photo — fills width, scales height proportionally */
.ph-cover-img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 200px;
    max-height: clamp(300px, 48vw, 540px);
    object-fit: cover;
    object-position: center 30%; /* show upper-centre of the image */
}

.ph-cover-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    /* Top-to-bottom: very light at top, strong fade at the bottom to dissolve into the hero background */
    background:
        linear-gradient(180deg,
            rgba(14,15,18,0.20)  0%,
            rgba(14,15,18,0.05) 40%,
            rgba(14,15,18,0.55) 80%,
            rgba(14,15,18,0.90) 100%
        );
}

.ph-cover-edit {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    margin: 0;
}

.ph-cover-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 220ms cubic-bezier(0.4,0,0.2,1), border-color 220ms cubic-bezier(0.4,0,0.2,1);
    margin: 0;
}

    .ph-cover-edit-btn:hover {
        background: rgba(252,169,32,0.95);
        color: #0e0f12;
        border-color: #FCA920;
    }

/* ── BAR (avatar + identity + completion) ──────────────────────────────── */
.ph-bar {
    position: relative;
    z-index: 5;
    /* Pull up so avatar overlaps the bottom of the cover */
    margin: -72px auto 0;
    max-width: 1180px;
    padding: 0 1rem 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 1.25rem;
}

@media (max-width: 767.98px) {
    .ph-bar {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        margin-top: -56px;
        gap: 0.85rem;
    }
}

/* Avatar */
.ph-avatar-wrap {
    position: relative;
}

.ph-avatar-form {
    margin: 0;
}

.ph-avatar {
    width: clamp(96px, 14vw, 132px);
    height: clamp(96px, 14vw, 132px);
    border-radius: 50%;
    background-color: var(--admin-surface);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border: 4px solid var(--admin-surface);
    box-shadow: 0 12px 30px -10px rgba(0,0,0,0.45), 0 0 0 1px rgba(252,169,32,0.20) inset;
    position: relative;
}

.ph-avatar-edit {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-orange);
    color: #0e0f12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(252,169,32,0.45);
    transition: transform 220ms cubic-bezier(0.4,0,0.2,1);
    margin: 0;
}

    .ph-avatar-edit:hover {
        transform: scale(1.08);
    }

    .ph-avatar-edit i {
        font-size: 0.78rem;
    }

/* Identity */
.ph-identity {
    min-width: 0;
    padding-bottom: 0.5rem;
}

.ph-name {
    font-size: clamp(1.4rem, 3.2vw, 2.1rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0 0 0.5rem;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.45);
    word-break: break-word;
}

.ph-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

@media (max-width: 767.98px) {
    .ph-meta {
        justify-content: center;
    }
}

.ph-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
}

    .ph-chip i {
        color: #FCA920;
        font-size: 0.7rem;
    }

.ph-flag {
    width: 22px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Completion ring */
.ph-completion {
    padding-bottom: 0.5rem;
}

.ph-ring {
    --p: 0;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: conic-gradient(#FCA920 calc(var(--p) * 1%), rgba(255,255,255,0.10) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px -8px rgba(252,169,32,0.45);
}

.ph-ring-inner {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(180deg, #1a1d24 0%, #0e0f12 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

    .ph-ring-inner strong {
        font-size: 1.05rem;
        font-weight: 900;
        color: #FCA920;
        font-feature-settings: 'tnum';
        letter-spacing: -0.02em;
    }
    .ph-ring-inner span {
        font-size: 0.55rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.7px;
        color: rgba(255,255,255,0.65);
        margin-top: 2px;
    }

/* ── Content wrap ── */
.profile-shell > :not(.profile-hero) {
    max-width: 1180px; margin-left: auto; margin-right: auto;
    padding-left: 1rem; padding-right: 1rem;
}
.profile-shell .status-banner { margin-top: 1.5rem; }

/* ── Tabs ── */
.profile-tabs {
    margin-top: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0;
    list-style: none;
}
.profile-tabs .nav-item { list-style: none; }
.profile-tabs .nav-link {
    border: 1px solid transparent; border-radius: 10px 10px 0 0;
    padding: 0.7rem 1.05rem; font-size: 0.8rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--admin-muted); background: transparent;
    transition: color 220ms, background 220ms, border-color 220ms;
    margin-bottom: -1px;
}
.profile-tabs .nav-link:hover { color: var(--admin-text); background: var(--surface-1); }
.profile-tabs .nav-link.active {
    color: var(--brand-orange); background: var(--admin-surface);
    border-color: var(--admin-border) var(--admin-border) var(--admin-surface);
}

/* ── Cards & dl ── */
.tab-pane { padding-top: 1.25rem; }
.admin-card {
    background: var(--admin-surface); border: 1px solid var(--admin-border);
    border-radius: 14px; padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow-xs, 0 2px 8px -4px rgba(0,0,0,0.10));
    margin-bottom: 1rem; color: var(--admin-text);
}
.admin-card .ac-head {
    margin: -1.1rem -1.2rem 1rem; padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-1); border-radius: 14px 14px 0 0;
}
.admin-card .ac-head h3,
.admin-card .ac-head h4 {
    margin: 0; font-size: 0.82rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--admin-text);
}
.profile-dl {
    display: grid; grid-template-columns: minmax(120px, 35%) 1fr;
    row-gap: 0.55rem; column-gap: 1rem; margin: 0;
}
.profile-dl dt {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--admin-muted); align-self: center;
}
.profile-dl dd { margin: 0; font-size: 0.92rem; font-weight: 500; color: var(--admin-text); word-break: break-word; }
.empty-illu {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--surface-1); border: 1px solid var(--admin-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-orange); font-size: 1.6rem;
}

/* ── Dark overrides ── */
[data-theme="dark"] .profile-tabs .nav-link.active { border-color: var(--admin-border) var(--admin-border) var(--admin-surface); background: var(--admin-surface); }
[data-theme="dark"] .admin-card .ac-head { background: var(--surface-1); }
[data-theme="dark"] .ph-avatar { border-color: var(--admin-surface); }

/* ============================================================================
   THEME TOKENS — light + dark
   ============================================================================ */
:root,
html[data-theme="light"] {
    --page-bg:       #f6f7f9;
    --admin-surface: #ffffff;
    --admin-border:  #e5e7eb;
    --border-subtle: #eef0f3;
    --surface-1:     #f7f8fa;
    --surface-2:     #eef0f3;
    --admin-text:    #1f2937;
    --admin-muted:   #6b7280;
    --brand-dark:    #0e0f12;
    color-scheme: light;
}
html[data-theme="dark"] {
    --page-bg:       #0c0d10;
    --admin-surface: #15171c;
    --admin-border:  #262931;
    --border-subtle: #1f2229;
    --surface-1:     #1a1d24;
    --surface-2:     #20242c;
    --admin-text:    #e5e7eb;
    --admin-muted:   #9ba3af;
    --brand-dark:    #f3f4f6;
    color-scheme: dark;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .main { background: var(--page-bg); color: var(--admin-text); }
html[data-theme="light"] body,
html[data-theme="light"] .main { background: var(--page-bg); color: var(--admin-text); }

/* EventDetail dark surfaces */
[data-theme="dark"] .ev-card,[data-theme="dark"] .ev-picker,[data-theme="dark"] .ev-stat,
[data-theme="dark"] .ev-modal,[data-theme="dark"] .ev-modal .modal-body { background: var(--admin-surface); border-color: var(--admin-border); color: var(--admin-text); }
[data-theme="dark"] .ev-discipline      { background: var(--surface-1); border-color: var(--admin-border); }
[data-theme="dark"] .ev-discipline-body { background: var(--admin-surface); border-color: var(--border-subtle); }
[data-theme="dark"] .ev-option          { background: var(--surface-1); border-color: var(--border-subtle); }
[data-theme="dark"] .ev-option:hover    { background: rgba(252,169,32,0.10); }
[data-theme="dark"] .ev-option-fee,
[data-theme="dark"] .ev-pill            { background: var(--surface-2); color: var(--admin-text); border-color: var(--admin-border); }
[data-theme="dark"] .ev-agree          { background: var(--surface-1); border-color: var(--admin-border); }
[data-theme="dark"] .btn-ghost-sm       { background: var(--surface-1); color: var(--admin-text); border-color: var(--admin-border); }
[data-theme="dark"] .ev-description,
[data-theme="dark"] .ev-disclaimer-list li,
[data-theme="dark"] .ev-directions li   { color: var(--admin-text); }
[data-theme="dark"] .ev-card-head h3,[data-theme="dark"] .ev-card-head h4,
[data-theme="dark"] .ev-disc-name,[data-theme="dark"] .ev-stat-value,
[data-theme="dark"] .ev-option-fee,[data-theme="dark"] .ev-picker-head h3 { color: var(--admin-text); }
[data-theme="dark"] .ev-card-head       { border-bottom-color: var(--border-subtle); }
[data-theme="dark"] .ev-modal .modal-footer { background: var(--surface-1); }

/* Cross-page Bootstrap dark */
[data-theme="dark"] .main .card,
[data-theme="dark"] .main .modal-content,
[data-theme="dark"] .main .list-group-item,
[data-theme="dark"] .main .accordion-item,
[data-theme="dark"] .main .accordion-button { background-color: var(--admin-surface) !important; color: var(--admin-text) !important; border-color: var(--admin-border) !important; }
[data-theme="dark"] .main .accordion-button::after { filter: invert(1) brightness(1.6); }
[data-theme="dark"] .main .table {
    --bs-table-bg: var(--admin-surface); --bs-table-color: var(--admin-text);
    --bs-table-border-color: var(--admin-border); --bs-table-striped-bg: var(--surface-1);
    --bs-table-striped-color: var(--admin-text); --bs-table-hover-bg: var(--surface-2);
    color: var(--admin-text);
}
[data-theme="dark"] .main .form-control,
[data-theme="dark"] .main .form-select,
[data-theme="dark"] .main textarea { background-color: var(--surface-1) !important; color: var(--admin-text) !important; border-color: var(--admin-border) !important; }
[data-theme="dark"] .main .form-control:focus,
[data-theme="dark"] .main .form-select:focus { border-color: var(--brand-orange) !important; box-shadow: 0 0 0 3px rgba(252,169,32,0.18) !important; }
[data-theme="dark"] .main .text-muted { color: var(--admin-muted) !important; }
[data-theme="dark"] .main .alert-info    { background-color: rgba(2,132,199,0.18)  !important; color: #bae6fd !important; border-color: rgba(2,132,199,0.35)  !important; }
[data-theme="dark"] .main .alert-success { background-color: rgba(22,163,74,0.18)  !important; color: #bbf7d0 !important; border-color: rgba(22,163,74,0.35)  !important; }
[data-theme="dark"] .main .alert-warning { background-color: rgba(252,169,32,0.18) !important; color: #fde68a !important; border-color: rgba(252,169,32,0.35) !important; }
[data-theme="dark"] .main .alert-danger  { background-color: rgba(239,68,68,0.18)  !important; color: #fecaca !important; border-color: rgba(239,68,68,0.35)  !important; }

/* Profile dark */
[data-theme="dark"] .admin-card,[data-theme="dark"] .ph-card { background: var(--admin-surface) !important; border-color: var(--admin-border) !important; color: var(--admin-text); }
[data-theme="dark"] .admin-card .ac-head h3,[data-theme="dark"] .admin-card .ac-head h4 { color: var(--admin-text) !important; }
[data-theme="dark"] .profile-dl dt { color: var(--admin-muted) !important; }
[data-theme="dark"] .profile-dl dd { color: var(--admin-text) !important; }
[data-theme="dark"] .nav-tabs { border-bottom-color: var(--admin-border); }
[data-theme="dark"] .nav-tabs .nav-link { color: var(--admin-muted); border-color: transparent; }
[data-theme="dark"] .nav-tabs .nav-link.active { color: var(--brand-orange); background: var(--admin-surface); border-color: var(--admin-border) var(--admin-border) var(--admin-surface); }
[data-theme="dark"] .main .modal-header .btn-close,
[data-theme="dark"] .ev-modal .modal-header .btn-close { filter: invert(1) brightness(2); }

/* Theme toggle */
.theme-toggle {
    background: rgba(255,255,255,0.08) !important; border: 1px solid rgba(255,255,255,0.18) !important;
    border-radius: 999px !important; width: 36px; height: 36px;
    display: inline-flex !important; align-items: center; justify-content: center;
    color: #fff !important; cursor: pointer; margin-right: 0.5rem; padding: 0 !important;
    position: relative;
    transition: background 220ms cubic-bezier(0.4,0,0.2,1), transform 220ms cubic-bezier(0.4,0,0.2,1);
}
.theme-toggle:hover { background: rgba(252,169,32,0.18) !important; transform: rotate(15deg); }
.theme-toggle .theme-icon-light,
.theme-toggle .theme-icon-dark { position: absolute; transition: opacity 220ms, transform 220ms; }
html[data-theme="light"] .theme-toggle .theme-icon-light { opacity: 0; transform: rotate(-90deg) scale(0.6); }
html[data-theme="light"] .theme-toggle .theme-icon-dark  { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="dark"]  .theme-toggle .theme-icon-light { opacity: 1; transform: rotate(0) scale(1); color: #FCA920 !important; }
html[data-theme="dark"]  .theme-toggle .theme-icon-dark  { opacity: 0; transform: rotate(90deg) scale(0.6); }

/* ============================================================================
   REGISTRATION PAGE
   ============================================================================ */
.reg-shell { max-width: 860px; margin: 0 auto; padding: clamp(5.5rem,8vw,7rem) 1rem 4rem; }
.reg-heading { text-align: center; margin-bottom: 2rem; }
.reg-heading h1 { font-size: clamp(1.5rem,3.5vw,2.1rem); font-weight: 900; letter-spacing: -0.025em; color: var(--admin-text); margin-bottom: 0.4rem; }
.reg-heading p { color: var(--admin-muted); font-size: 0.92rem; margin-bottom: 0.25rem; }
.reg-already { font-size: 0.88rem; }
.reg-already a { color: var(--brand-orange); font-weight: 700; text-decoration: underline; }
.reg-banner { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.9rem 1.1rem; border-radius: 12px; margin-bottom: 1.25rem; font-size: 0.9rem; line-height: 1.45; }
.reg-banner > i { font-size: 1.1rem; padding-top: 1px; flex-shrink: 0; }
.reg-banner-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35); color: #fca5a5; }
.reg-banner-error > i { color: #ef4444; }
.reg-banner-ok { background: rgba(22,163,74,0.12); border: 1px solid rgba(22,163,74,0.35); color: #86efac; }
.reg-banner-ok > i { color: #22c55e; }
.reg-form { background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: 18px; padding: clamp(1.2rem,3vw,2rem); box-shadow: var(--shadow-sm,0 4px 12px rgba(0,0,0,0.08)); }
.reg-section-label { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--brand-orange); margin-bottom: 0.85rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border-subtle); }
.reg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.25rem; }
@media (max-width: 599.98px) { .reg-grid { grid-template-columns: 1fr; } }
.reg-field { display: flex; flex-direction: column; gap: 0.3rem; }
.reg-field label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--admin-muted); }
.req { color: #ef4444; margin-left: 1px; }
.reg-input { width: 100%; padding: 0.6rem 0.85rem; border: 1px solid var(--admin-border); border-radius: 10px; font-size: 0.92rem; background: var(--surface-1); color: var(--admin-text); transition: border-color 200ms, box-shadow 200ms; outline: none; appearance: none; -webkit-appearance: none; }
.reg-input:focus { border-color: var(--brand-orange); box-shadow: 0 0 0 3px rgba(252,169,32,0.18); background: var(--admin-surface); }
.reg-input.is-invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.reg-input.is-valid   { border-color: #22c55e; }
.reg-err { font-size: 0.74rem; color: #ef4444; min-height: 1.1em; }
.reg-pw-wrap { position: relative; }
.reg-pw-wrap .reg-input { padding-right: 2.5rem; }
.reg-pw-eye { position: absolute; right: 0.65rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--admin-muted); font-size: 0.85rem; padding: 0; line-height: 1; }
.reg-pw-eye:hover { color: var(--brand-orange); }
.reg-pw-strength { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.reg-pw-bar { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.reg-pw-bar span { display: block; height: 100%; width: 0%; border-radius: 999px; transition: width 300ms, background 300ms; }
#pwLabel { font-size: 0.7rem; font-weight: 700; min-width: 5ch; }
.reg-submit { margin-top: 1.5rem; width: 100%; padding: 0.9rem 1rem; font-size: 0.95rem; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.reg-consent {
    font-size: 0.75rem; color: var(--admin-muted, #6b7280);
    text-align: center; margin: 1.25rem 0 0;
}
.reg-consent a { color: var(--brand-orange); text-decoration: underline; }
.reg-support-note {
    font-size: 0.78rem; color: var(--admin-muted, #6b7280);
    text-align: center; margin: 0.85rem 0 0; display: flex;
    align-items: center; justify-content: center; gap: 0.4rem; flex-wrap: wrap;
}
.reg-support-note a { color: var(--brand-orange); text-decoration: none; font-weight: 600; }
.reg-support-note a:hover { text-decoration: underline; }
.duplicate-icon-wrap { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg,rgba(252,169,32,0.18),rgba(252,169,32,0.06)); border: 1px solid rgba(252,169,32,0.35); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--brand-orange); }
html[data-theme="light"] .reg-input { background: #fff; color: #1f2937; border-color: #d1d5db; }
html[data-theme="light"] .reg-input:focus { background: #fff; border-color: #FCA920; }
html[data-theme="light"] .reg-form { background: #fff; border-color: #e5e7eb; }
        font-feature-settings: 'tnum';
        letter-spacing: -0.02em;
    }

    .ph-ring-inner span {
        font-size: 0.55rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.7px;
        color: rgba(255,255,255,0.65);
        margin-top: 2px;
    }

/* ── CONTENT WRAP (everything below the hero) ─────────────────────────── */
.profile-shell > :not(.profile-hero) {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.profile-shell .status-banner {
    margin-top: 1.5rem;
}

/* ── TABS ──────────────────────────────────────────────────────────────── */
.profile-tabs {
    margin-top: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0;
}

    .profile-tabs .nav-item {
        list-style: none;
    }

    .profile-tabs .nav-link {
        border: 1px solid transparent;
        border-radius: 10px 10px 0 0;
        padding: 0.7rem 1.05rem;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--admin-muted);
        background: transparent;
        transition: color 220ms, background 220ms, border-color 220ms;
        margin-bottom: -1px;
    }

        .profile-tabs .nav-link:hover {
            color: var(--admin-text);
            background: var(--surface-1);
        }

        .profile-tabs .nav-link.active {
            color: var(--brand-orange);
            background: var(--admin-surface);
            border-color: var(--admin-border) var(--admin-border) var(--admin-surface);
        }

/* ── CONTENT CARDS ─────────────────────────────────────────────────────── */
.tab-pane {
    padding-top: 1.25rem;
}

.admin-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow-xs, 0 2px 8px -4px rgba(0,0,0,0.10));
    margin-bottom: 1rem;
    color: var(--admin-text);
}

    .admin-card .ac-head {
        margin: -1.1rem -1.2rem 1rem;
        padding: 0.85rem 1.2rem;
        border-bottom: 1px solid var(--border-subtle);
        background: var(--surface-1);
        border-radius: 14px 14px 0 0;
    }

        .admin-card .ac-head h3,
        .admin-card .ac-head h4 {
            margin: 0;
            font-size: 0.82rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--admin-text);
        }

/* Definition list rows used for Personal / Medical */
.profile-dl {
    display: grid;
    grid-template-columns: minmax(120px, 35%) 1fr;
    row-gap: 0.55rem;
    column-gap: 1rem;
    margin: 0;
}

    .profile-dl dt {
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--admin-muted);
        align-self: center;
    }

    .profile-dl dd {
        margin: 0;
        font-size: 0.92rem;
        font-weight: 500;
        color: var(--admin-text);
        word-break: break-word;
    }

/* Empty state illustration (e.g. "no performances") */
.empty-illu {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--surface-1);
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-orange);
    font-size: 1.6rem;
}

/* ── DARK THEME OVERRIDES ──────────────────────────────────────────────── */
[data-theme="dark"] .profile-tabs .nav-link.active {
    border-color: var(--admin-border) var(--admin-border) var(--admin-surface);
    background: var(--admin-surface);
}

[data-theme="dark"] .admin-card .ac-head {
    background: var(--surface-1);
}

[data-theme="dark"] .ph-avatar {
    border-color: var(--admin-surface);
}

/* ============================================================================
   PROFILE — MY REGISTRATIONS TAB
   ============================================================================ */

/* Tab count badge */
.reg-count-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 999px;
    background: var(--brand-orange); color: var(--brand-dark);
    font-size: 0.65rem; font-weight: 800;
    margin-left: 0.35rem; line-height: 1;
}

/* Tab link styling (reuse .pt-tab from profile CSS) */
.pt-tab {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.65rem 1rem; border-radius: 10px 10px 0 0;
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--admin-muted); text-decoration: none;
    border: 1px solid transparent; margin-bottom: -1px;
    transition: color 200ms, background 200ms, border-color 200ms;
}
.pt-tab:hover { color: var(--admin-text); background: var(--surface-1); }
.pt-tab.active {
    color: var(--brand-orange); background: var(--admin-surface);
    border-color: var(--admin-border) var(--admin-border) var(--admin-surface);
}

/* Events list container */
.reg-events-list {
    display: flex; flex-direction: column; gap: 0.75rem;
}

/* Individual event card */
.reg-event-card {
    display: grid;
    grid-template-columns: 64px 1fr 36px;
    gap: 0; align-items: stretch;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 200ms, border-color 200ms;
}
.reg-event-card:hover {
    box-shadow: var(--shadow-sm, 0 4px 12px rgba(0,0,0,0.08));
    border-color: rgba(252,169,32,0.35);
}
.reg-event-card.reg-event-past  { opacity: 0.72; }
.reg-event-card.reg-event-today { border-color: #FCA920; box-shadow: 0 0 0 2px rgba(252,169,32,0.22); }

/* Date column */
.reg-event-date {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0.85rem 0.5rem;
    background: linear-gradient(180deg, #0e0f12 0%, #1a1d24 100%);
    color: #fff; line-height: 1; gap: 2px;
    min-width: 64px;
}
.reg-event-date .day   { font-size: 1.6rem; font-weight: 900; color: #FCA920; letter-spacing: -0.03em; font-feature-settings: 'tnum'; }
.reg-event-date .month { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255,255,255,0.7); }
.reg-event-date .year  { font-size: 0.58rem; font-weight: 600; color: rgba(255,255,255,0.45); }

/* Body */
.reg-event-body {
    padding: 0.85rem 1rem;
    display: flex; flex-direction: column; gap: 0.45rem;
    min-width: 0;
}
.reg-event-top {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap;
}
.reg-event-name {
    margin: 0; font-size: 0.95rem; font-weight: 800;
    color: var(--admin-text); letter-spacing: -0.012em;
    line-height: 1.2;
}
.reg-event-location {
    margin: 0; font-size: 0.78rem; color: var(--admin-muted);
    display: flex; align-items: center; gap: 0.35rem;
}
.reg-event-location i { color: #FCA920; font-size: 0.72rem; }

/* Status pills */
.reg-status-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.65rem; border-radius: 999px;
    font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px;
    white-space: nowrap; flex-shrink: 0;
}
.reg-status-upcoming { background: rgba(252,169,32,0.14); color: #b45309; border: 1px solid rgba(252,169,32,0.3); }
.reg-status-today    { background: rgba(252,169,32,0.28); color: #92400e; border: 1px solid rgba(252,169,32,0.5);
                        animation: reg-pulse 1.8s ease-in-out infinite; }
.reg-status-past     { background: var(--surface-2); color: var(--admin-muted); border: 1px solid var(--border-subtle); }
@keyframes reg-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(252,169,32,0); } 50% { box-shadow: 0 0 0 4px rgba(252,169,32,0.22); } }

/* Discipline pills */
.reg-disciplines {
    display: flex; flex-wrap: wrap; gap: 0.35rem;
}
.reg-discipline-pill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.28rem 0.65rem; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700;
    background: rgba(252,169,32,0.10);
    border: 1px solid rgba(252,169,32,0.28);
    color: var(--admin-text);
}
.reg-discipline-pill i { color: #FCA920; font-size: 0.65rem; }
.reg-disc-class {
    background: var(--surface-2); color: var(--admin-muted);
    padding: 0.1rem 0.45rem; border-radius: 999px;
    font-size: 0.64rem; font-weight: 700;
    border: 1px solid var(--border-subtle);
    margin-left: 0.2rem;
}

/* Arrow / link column */
.reg-event-arrow {
    display: flex; align-items: center; justify-content: center;
    padding: 0 0.75rem;
    color: var(--admin-muted); text-decoration: none;
    border-left: 1px solid var(--border-subtle);
    transition: color 200ms, background 200ms;
    font-size: 0.8rem;
}
.reg-event-arrow:hover { color: #FCA920; background: rgba(252,169,32,0.07); }

/* Mobile — stack date above body */
@media (max-width: 575.98px) {
    .reg-event-card { grid-template-columns: 1fr 36px; grid-template-rows: auto auto; }
    .reg-event-date { grid-column: 1 / -1; flex-direction: row; gap: 0.5rem; padding: 0.6rem 1rem; border-radius: 0; }
    .reg-event-date .day   { font-size: 1.2rem; }
    .reg-event-arrow { grid-row: 2; border-left: 1px solid var(--border-subtle); }
    .reg-event-body  { grid-row: 2; }
}

/* Dark mode */
[data-theme="dark"] .reg-event-card          { background: var(--admin-surface); border-color: var(--admin-border); }
[data-theme="dark"] .reg-event-name          { color: var(--admin-text); }
[data-theme="dark"] .reg-status-upcoming     { color: #fde68a; background: rgba(252,169,32,0.14); }
[data-theme="dark"] .reg-status-today        { color: #FCA920; }
[data-theme="dark"] .reg-discipline-pill     { color: var(--admin-text); }
[data-theme="dark"] .reg-event-arrow         { border-left-color: var(--border-subtle); }

/* ============================================================================
   PROFILE — IMAGE UPLOAD: spinner + toast
   ============================================================================ */

/* Spinner inside the cover / avatar buttons */
.ph-upload-spinner {
    display: inline-flex; align-items: center; justify-content: center;
}

/* Upload toast — fixed bottom-right notification */
.ph-upload-toast {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    z-index: 9999;
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.8rem 1.1rem;
    border-radius: 12px;
    font-size: 0.88rem; font-weight: 600;
    box-shadow: 0 8px 24px -4px rgba(0,0,0,0.35);
    max-width: 360px;
    animation: toastIn 250ms cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)     scale(1); }
}
.ph-toast-ok {
    background: #166534; color: #dcfce7;
    border: 1px solid rgba(34,197,94,0.4);
}
.ph-toast-ok i    { color: #22c55e; }
.ph-toast-error {
    background: #7f1d1d; color: #fecaca;
    border: 1px solid rgba(239,68,68,0.4);
}
.ph-toast-error i { color: #ef4444; }
/* ============================================================================
   PROXY REGISTRATION — role badge + form actions row
   ============================================================================ */
.reg-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(252,169,32,0.14);
    border: 1px solid rgba(252,169,32,0.35);
    color: #FCA920;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.65rem;
}

.reg-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ============================================================================
   MANAGE ATHLETE PAGE — page-head, athlete grid, athlete cards, role badges
   ============================================================================ */

/* Fix: profile-shell without a profile-hero needs its own navbar clearance */
.profile-shell:not(:has(.profile-hero)) {
    padding-top: clamp(4.5rem, 7vw, 5.5rem);
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.pg-title small {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brand-orange);
    display: block;
    margin-bottom: 0.2rem;
}
.pg-title h1 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 800;
    color: var(--admin-text, #111418);
    line-height: 1.2;
}
.row-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ── Athlete grid ────────────────────────────────────────────────────────── */
.athlete-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    padding: 0.25rem 0 0.5rem;
}

/* ── Athlete card ────────────────────────────────────────────────────────── */
.athlete-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--admin-surface, #fff);
    border: 1px solid var(--admin-border, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    cursor: pointer;
}
.athlete-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    border-color: var(--brand-orange);
    text-decoration: none;
    color: inherit;
}

/* Cover strip at the top of a grid card */
.ath-cover {
    width: 100%;
    height: 80px;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.ath-cover-fallback {
    background: linear-gradient(135deg, #1a1d24 0%, #262931 100%);
}

/* Avatar — used both as standalone (self-card) and overlaid on the cover */
.ath-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 2px solid var(--admin-surface, #fff);
}
.avatar-overlay {
    position: absolute;
    top: 48px;   /* half-overlaps the cover */
    left: 1rem;
    width: 56px;
    height: 56px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.ath-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-orange);
    color: #1a1a1a;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

/* Body section (name + meta) */
.ath-body {
    padding: 0.65rem 0.85rem 0.85rem;
    flex: 1;
    /* push down past the overlaid avatar */
}
.athlete-grid .ath-body { padding-top: 2rem; }

.ath-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--admin-text, #111418);
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ath-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    font-size: 0.75rem;
    color: var(--admin-muted, #6b7280);
}
.ath-meta span { display: flex; align-items: center; gap: 0.25rem; }
.ath-club {
    font-size: 0.72rem;
    color: var(--admin-muted, #6b7280);
    margin-top: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chevron (used on the self/list-style card) */
.ath-chev {
    font-size: 0.75rem;
    color: var(--admin-muted, #9ca3af);
    margin-left: auto;
    margin-right: 0.75rem;
    flex-shrink: 0;
    align-self: center;
}

/* Self-card layout (horizontal, not grid) */
.athlete-card.is-self {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
}
.athlete-card.is-self .ath-body { padding: 0; }
.athlete-card.is-self .ath-avatar { flex-shrink: 0; }

/* ── Role badge ──────────────────────────────────────────────────────────── */
.ath-role {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.athlete-card.is-self .ath-role {
    position: static;
    margin-left: auto;
    flex-shrink: 0;
}
.role-athlete { background: rgba(252,169,32,0.15); color: #FCA920; }
.role-coach   { background: rgba(59,130,246,0.15);  color: #3b82f6; }
.role-rep     { background: rgba(139,92,246,0.15);  color: #8b5cf6; }

/* ── Empty state illustration ────────────────────────────────────────────── */
.empty-illu {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--surface-1, #f3f4f6);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    color: var(--admin-muted, #9ca3af);
}

/* ── Dark mode ───────────────────────────────────────────────────────────── */
[data-theme="dark"] .athlete-card        { background: var(--admin-surface); border-color: var(--admin-border); }
[data-theme="dark"] .ath-name            { color: var(--admin-text); }
[data-theme="dark"] .pg-title h1         { color: var(--admin-text); }
[data-theme="dark"] .ath-cover-fallback  { background: linear-gradient(135deg, #0e0f12 0%, #1a1d24 100%); }
[data-theme="dark"] .ath-avatar.ath-initials { border-color: var(--admin-surface); }
[data-theme="dark"] .empty-illu         { background: var(--surface-1); color: var(--admin-muted); }

/* ── Proxy-view bar (shown at top of Profile when coach views another athlete) ── */
.proxy-view-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.6rem 1.25rem;
    background: rgba(252,169,32,0.10);
    border-bottom: 1px solid rgba(252,169,32,0.25);
    font-size: 0.8rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 90;
}
.proxy-back, .proxy-edit {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.78rem;
    transition: background 180ms;
}
.proxy-back { background: var(--surface-1, #f3f4f6); color: var(--admin-text, #111); }
.proxy-back:hover { background: var(--surface-2, #e5e7eb); color: var(--admin-text, #111); }
.proxy-edit { background: var(--brand-orange); color: #1a1a1a; }
.proxy-edit:hover { background: var(--brand-orange-hover, #e89414); color: #1a1a1a; }
.proxy-label { color: var(--admin-muted, #6b7280); flex: 1; text-align: center; }
[data-theme="dark"] .proxy-back { background: var(--surface-1); color: var(--admin-text); }
[data-theme="dark"] .proxy-back:hover { background: var(--surface-2); }

.bib-designer-shell {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
    width: 100%;
}

.bib-designer-sidebar {
    position: sticky;
    top: 24px;
}

.bib-preview-panel {
    width: 100%;
    overflow: auto;
}

    .bib-preview-panel img,
    .bib-preview-panel canvas {
        width: 100%;
        height: auto;
        border-radius: 24px;
        background: white;
        box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    }

@media (max-width: 1200px) {
    .bib-designer-shell {
        grid-template-columns: 1fr;
    }

    .bib-designer-sidebar {
        position: relative;
        top: unset;
    }
}
