/* ═══════════════════════════════════════════════════════════════════════════════
   NITROBLAZE — Global Stylesheet
   "Hoy entrenas, mañana ganas."
   ═══════════════════════════════════════════════════════════════════════════════ */

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

:root {
    /* Colors */
    --bg:              #0F1115;
    --surface:         #1C1E24;
    --surface-2:       #22252D;
    --surface-3:       #2A2D37;
    --primary:         #00E5FF;
    --primary-dim:     rgba(0,229,255,0.08);
    --primary-glow:    rgba(0,229,255,0.15);
    --primary-border:  rgba(0,229,255,0.22);
    --border:          rgba(255,255,255,0.05);
    --border-hover:    rgba(255,255,255,0.10);
    --text:            #FFFFFF;
    --text-2:          #A0A7B5;
    --text-3:          #6B7280;
    --success:         #22C55E;
    --success-dim:     rgba(34,197,94,0.10);
    --success-border:  rgba(34,197,94,0.22);
    --danger:          #EF4444;
    --danger-dim:      rgba(239,68,68,0.10);
    --danger-border:   rgba(239,68,68,0.22);
    --warning:         #F59E0B;
    --warning-dim:     rgba(245,158,11,0.10);
    --warning-border:  rgba(245,158,11,0.22);
    --gold:            #FFC107;
    --gold-dim:        rgba(255,193,7,0.10);
    --gold-border:     rgba(255,193,7,0.22);
    --silver:          #94A3B8;
    --bronze:          #CD7F32;
    --purple:          #8B5CF6;
    --purple-dim:      rgba(139,92,246,0.10);

    /* Layout */
    --sidebar-w:       260px;
    --header-h:        64px;
    --mobile-nav-h:    64px;

    /* Radius */
    --r-sm:   6px;
    --r:      10px;
    --r-md:   12px;
    --r-lg:   16px;
    --r-xl:   20px;
    --r-2xl:  24px;
    --r-full: 9999px;

    /* Shadows */
    --shadow:      0 2px 16px rgba(0,0,0,0.40);
    --shadow-lg:   0 8px 40px rgba(0,0,0,0.50);
    --glow:        0 0 20px rgba(0,229,255,0.14);
    --glow-strong: 0 0 40px rgba(0,229,255,0.24);

    /* Transitions */
    --t:      all 0.18s cubic-bezier(0.4,0,0.2,1);
    --t-slow: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ─── SCROLLBAR ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.09); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ─── TOP SHIMMER BAR ───────────────────────────────────────────────────────── */
.topbar-shimmer {
    position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9999;
    background: linear-gradient(90deg, transparent, var(--primary), #0099FF, var(--primary), transparent);
    background-size: 300% 100%;
    animation: shimmer 2.5s ease infinite;
}
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

/* ─── LAYOUT ────────────────────────────────────────────────────────────────── */
#app {
    display: flex;
    min-height: 100vh;
}

/* ─── SIDEBAR OVERLAY ───────────────────────────────────────────────────────── */
#sidebar-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 99;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#sidebar-overlay.show { display: block; }

/* ═══════════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════════ */
#sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}

/* Logo */
.sidebar-logo {
    padding: 22px 20px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.logo-mark {
    display: flex;
    align-items: center;
    gap: 11px;
}

.logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary) 0%, #0099FF 100%);
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--bg);
    box-shadow: 0 0 18px rgba(0,229,255,0.40), 0 2px 8px rgba(0,0,0,0.30);
    flex-shrink: 0;
}

.logo-text {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: var(--text);
    line-height: 1.2;
}
.logo-text span { color: var(--primary); }

.logo-tagline {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 14px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-3);
    text-transform: uppercase;
    padding: 0 8px;
    margin: 18px 0 6px;
}
.nav-section-label:first-child { margin-top: 4px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--r-md);
    transition: var(--t);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    position: relative;
    margin-bottom: 1px;
    border: 1px solid transparent;
}
.nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text);
}
.nav-item.active {
    background: var(--primary-dim);
    color: var(--primary);
    border-color: var(--primary-border);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -10px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 55%;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px var(--primary);
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: var(--bg);
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--r-full);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface-2);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: var(--t);
    border: 1px solid var(--border);
}
.user-card:hover {
    background: var(--surface-3);
    border-color: var(--border-hover);
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   MAIN + HEADER
   ═══════════════════════════════════════════════════════════════════════════════ */
#main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#header {
    height: var(--header-h);
    background: rgba(15,17,21,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 50;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.page-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.page-subtitle {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 1px;
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 0 12px;
    height: 36px;
    transition: var(--t);
}
.header-search:focus-within {
    border-color: var(--primary-border);
    box-shadow: var(--glow);
}
.header-search input {
    background: transparent; border: none; outline: none;
    color: var(--text); font-size: 13px; width: 180px;
}
.header-search input::placeholder { color: var(--text-3); }

.header-btn {
    width: 36px; height: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2);
    transition: var(--t);
    cursor: pointer;
    position: relative;
}
.header-btn:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border-hover);
}

.notif-dot {
    position: absolute; top: 7px; right: 7px;
    width: 7px; height: 7px;
    background: var(--primary);
    border-radius: 50%;
    border: 1.5px solid var(--bg);
    box-shadow: 0 0 6px var(--primary);
    animation: pulse-dot 1.8s ease infinite;
}
@keyframes pulse-dot {
    0%,100% { box-shadow: 0 0 6px var(--primary); }
    50%      { box-shadow: 0 0 12px var(--primary); }
}

.header-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #0099FF);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800;
    color: var(--bg);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0,229,255,0.30);
}

/* Mobile menu button */
#menu-btn {
    display: none;
    width: 36px; height: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    align-items: center; justify-content: center;
    color: var(--text-2);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════════════ */
#content {
    flex: 1;
    padding: 26px;
    overflow-y: auto;
    animation: pageIn 0.22s ease;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    transition: var(--t);
}
.card:hover { border-color: var(--border-hover); }
.card.glow:hover { border-color: var(--primary-border); box-shadow: var(--glow); }

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}
.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.card-subtitle {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: var(--t);
    position: relative;
    overflow: hidden;
    cursor: default;
}
.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Decorative corner glow */
.stat-card::after {
    content: '';
    position: absolute; top: -20px; right: -20px;
    width: 80px; height: 80px; border-radius: 50%;
    opacity: 0.07;
    pointer-events: none;
}
.stat-card.c-cyan::after   { background: var(--primary); }
.stat-card.c-green::after  { background: var(--success); }
.stat-card.c-gold::after   { background: var(--gold); }
.stat-card.c-purple::after { background: var(--purple); }

.stat-top { display: flex; align-items: flex-start; justify-content: space-between; }

.stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon.cyan   { background: rgba(0,229,255,0.10);   color: var(--primary); }
.stat-icon.green  { background: rgba(34,197,94,0.10);   color: var(--success); }
.stat-icon.gold   { background: rgba(255,193,7,0.10);   color: var(--gold); }
.stat-icon.purple { background: rgba(139,92,246,0.10);  color: var(--purple); }
.stat-icon svg { width: 18px; height: 18px; }

.stat-change {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--r-full);
}
.stat-change.up   { background: var(--success-dim); color: var(--success); }
.stat-change.down { background: var(--danger-dim);  color: var(--danger); }

.stat-value {
    font-size: 30px;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.03em;
}
.stat-label { font-size: 13px; font-weight: 500; color: var(--text-2); }

/* ═══════════════════════════════════════════════════════════════════════════════
   GRID HELPERS
   ═══════════════════════════════════════════════════════════════════════════════ */
.grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3     { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4     { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.grid-2-1   { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-1-2   { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.grid-3-1   { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-elite         { background: var(--primary-dim);  color: var(--primary); border: 1px solid var(--primary-border); }
.badge-junior-elite  { background: var(--purple-dim);   color: #A78BFA;        border: 1px solid rgba(139,92,246,0.22); }
.badge-senior        { background: var(--success-dim);  color: var(--success); border: 1px solid var(--success-border); }
.badge-junior        { background: var(--warning-dim);  color: var(--warning); border: 1px solid var(--warning-border); }
.badge-success       { background: var(--success-dim);  color: var(--success); }
.badge-danger        { background: var(--danger-dim);   color: var(--danger); }
.badge-warning       { background: var(--warning-dim);  color: var(--warning); }
.badge-gold          { background: var(--gold-dim);     color: var(--gold);    border: 1px solid var(--gold-border); }
.badge-neutral       { background: var(--surface-2);    color: var(--text-2);  border: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--t);
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1;
}
.btn svg { width: 15px; height: 15px; }

.btn-primary {
    background: var(--primary); color: var(--bg);
    box-shadow: 0 2px 12px rgba(0,229,255,0.25);
}
.btn-primary:hover {
    background: #22eeff;
    box-shadow: 0 2px 20px rgba(0,229,255,0.45);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent; color: var(--text-2);
    border-color: var(--border);
}
.btn-outline:hover {
    border-color: var(--border-hover); color: var(--text);
    background: rgba(255,255,255,0.04);
}

.btn-ghost {
    background: transparent; color: var(--text-3);
}
.btn-ghost:hover {
    color: var(--text); background: rgba(255,255,255,0.04);
}

.btn-danger {
    background: var(--danger-dim); color: var(--danger);
    border-color: var(--danger-border);
}
.btn-danger:hover { background: rgba(239,68,68,0.18); }

.btn-success {
    background: var(--success-dim); color: var(--success);
    border-color: var(--success-border);
}
.btn-success:hover { background: rgba(34,197,94,0.18); }

.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-lg  { padding: 10px 22px; font-size: 14px; }
.btn-icon { padding: 7px; border-radius: var(--r); }

/* ═══════════════════════════════════════════════════════════════════════════════
   AVATARS
   ═══════════════════════════════════════════════════════════════════════════════ */
.avatar {
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; flex-shrink: 0;
    color: var(--bg);
    width: 36px; height: 36px; font-size: 12px;
}
.avatar.sm  { width: 28px; height: 28px; font-size: 10px; }
.avatar.md  { width: 44px; height: 44px; font-size: 14px; }
.avatar.lg  { width: 56px; height: 56px; font-size: 18px; }
.avatar.xl  { width: 72px; height: 72px; font-size: 22px; }
.avatar.xxl { width: 90px; height: 90px; font-size: 26px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead { border-bottom: 1px solid var(--border); }

th {
    padding: 10px 14px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
}

td {
    padding: 13px 14px;
    font-size: 13px;
    color: var(--text-2);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: var(--t); }
tbody tr:hover { background: rgba(255,255,255,0.02); }

/* Rank styles */
.rank-1 { color: var(--gold);   font-weight: 800; font-size: 15px; }
.rank-2 { color: var(--silver); font-weight: 800; font-size: 15px; }
.rank-3 { color: var(--bronze); font-weight: 800; font-size: 15px; }
.rank-n { color: var(--text-3); font-weight: 700; font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ATHLETE MINI
   ═══════════════════════════════════════════════════════════════════════════════ */
.athlete-mini { display: flex; align-items: center; gap: 10px; }
.athlete-mini-name { font-size: 13px; font-weight: 600; color: var(--text); }
.athlete-mini-sub  { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════════════════════════════════════ */
.progress-wrap {
    background: var(--surface-2);
    border-radius: var(--r-full);
    height: 5px; overflow: hidden;
}
.progress-fill {
    height: 100%; border-radius: var(--r-full);
    background: linear-gradient(90deg, var(--primary), #0099FF);
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.green  { background: linear-gradient(90deg, var(--success), #16a34a); }
.progress-fill.gold   { background: linear-gradient(90deg, var(--gold), #e88e00); }
.progress-fill.purple { background: linear-gradient(90deg, var(--purple), #7c3aed); }

/* ═══════════════════════════════════════════════════════════════════════════════
   CHART CONTAINERS
   ═══════════════════════════════════════════════════════════════════════════════ */
.chart-box        { position: relative; height: 220px; }
.chart-box.sm     { height: 150px; }
.chart-box.md     { height: 260px; }
.chart-box.lg     { height: 300px; }
.chart-box.tall   { height: 360px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   SECTION HEADER
   ═══════════════════════════════════════════════════════════════════════════════ */
.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}
.section-title {
    font-size: 17px; font-weight: 800;
    color: var(--text); letter-spacing: -0.02em;
}
.section-sub {
    font-size: 12px; color: var(--text-3); margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ACTIVITY FEED
   ═══════════════════════════════════════════════════════════════════════════════ */
.activity-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 8px; height: 8px; border-radius: 50%;
    flex-shrink: 0; margin-top: 5px;
}
.dot-cyan   { background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.dot-green  { background: var(--success); }
.dot-gold   { background: var(--gold); }
.dot-purple { background: var(--purple); }
.dot-danger { background: var(--danger); }

.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.activity-text strong { color: var(--text); font-weight: 600; }
.activity-time { font-size: 11px; color: var(--text-3); white-space: nowrap; margin-top: 2px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════════
   COMPETITION CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */
.comp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: var(--t);
}
.comp-card:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.comp-date-box {
    min-width: 52px; height: 52px;
    background: var(--primary-dim);
    border: 1px solid var(--primary-border);
    border-radius: var(--r-md);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    flex-shrink: 0;
}
.comp-date-day   { font-size: 20px; font-weight: 900; color: var(--primary); line-height: 1; }
.comp-date-month { font-size: 10px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.08em; }

.comp-info { flex: 1; min-width: 0; }
.comp-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.comp-location { font-size: 12px; color: var(--text-3); margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.comp-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.comp-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ATTENDANCE
   ═══════════════════════════════════════════════════════════════════════════════ */
.attend-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    background: var(--surface-2);
    border-radius: var(--r-md);
    transition: var(--t);
    border: 1px solid transparent;
}
.attend-row:hover { background: var(--surface-3); border-color: var(--border); }

.attend-toggle-group { display: flex; gap: 6px; margin-left: auto; }

.tog-btn {
    padding: 5px 14px;
    border-radius: var(--r-sm);
    font-size: 12px; font-weight: 600;
    cursor: pointer; transition: var(--t);
    border: 1px solid var(--border);
    background: transparent; color: var(--text-3);
    font-family: inherit;
}
.tog-btn:hover { border-color: var(--border-hover); color: var(--text); }
.tog-btn.present { background: var(--success-dim); color: var(--success); border-color: var(--success-border); }
.tog-btn.absent  { background: var(--danger-dim);  color: var(--danger);  border-color: var(--danger-border); }

/* ═══════════════════════════════════════════════════════════════════════════════
   CALENDAR
   ═══════════════════════════════════════════════════════════════════════════════ */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { font-size: 10px; font-weight: 700; color: var(--text-3); text-align: center; padding: 5px 0; letter-spacing: 0.08em; text-transform: uppercase; }
.cal-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-sm); font-size: 12px; font-weight: 500;
    cursor: pointer; transition: var(--t);
    background: var(--surface-2); color: var(--text-2);
}
.cal-day:hover   { background: var(--surface-3); }
.cal-day.present { background: rgba(34,197,94,0.13); color: var(--success); }
.cal-day.absent  { background: rgba(239,68,68,0.10); color: var(--danger); }
.cal-day.today   { background: var(--primary-dim); color: var(--primary); border: 1px solid var(--primary-border); font-weight: 800; }
.cal-day.empty   { background: transparent; cursor: default; }

/* ═══════════════════════════════════════════════════════════════════════════════
   MEDALS
   ═══════════════════════════════════════════════════════════════════════════════ */
.medal-tally-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    background: var(--surface-2);
    border-radius: var(--r-md);
    transition: var(--t);
}
.medal-tally-row:hover { background: var(--surface-3); }

.medal-count { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; min-width: 36px; }
.medal-dot { width: 11px; height: 11px; border-radius: 50%; }
.medal-dot.gold   { background: var(--gold);   box-shadow: 0 0 8px rgba(255,193,7,0.5); }
.medal-dot.silver { background: var(--silver); }
.medal-dot.bronze { background: var(--bronze); }

/* ═══════════════════════════════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════════════════════════════ */
.settings-block { margin-bottom: 30px; }
.settings-block-title {
    font-size: 13px; font-weight: 700;
    color: var(--text); margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
}
.settings-block-title svg { width: 15px; height: 15px; color: var(--primary); }

.setting-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
    gap: 16px;
}
.setting-row:last-child { border-bottom: none; }
.setting-info { flex: 1; }
.setting-name { font-size: 13px; font-weight: 500; color: var(--text); }
.setting-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* Toggle switch */
.toggle-sw {
    width: 40px; height: 22px;
    background: var(--surface-3);
    border-radius: var(--r-full);
    position: relative; cursor: pointer;
    transition: var(--t); flex-shrink: 0;
    border: 1px solid var(--border);
}
.toggle-sw.on { background: var(--primary); border-color: transparent; box-shadow: 0 0 10px rgba(0,229,255,0.3); }
.toggle-sw::after {
    content: ''; position: absolute;
    width: 15px; height: 15px;
    background: white; border-radius: 50%;
    top: 2.5px; left: 3px;
    transition: var(--t);
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.toggle-sw.on::after { left: 20px; }

/* Input fields */
.field {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 9px 13px;
    color: var(--text); font-size: 13px; font-family: inherit;
    outline: none; transition: var(--t);
}
.field:focus { border-color: var(--primary-border); box-shadow: var(--glow); }
.field::placeholder { color: var(--text-3); }

.field-label { font-size: 11.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; display: block; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ATHLETE CARDS (grid page)
   ═══════════════════════════════════════════════════════════════════════════════ */
.athletes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.athlete-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    transition: var(--t);
    cursor: pointer;
    display: flex; flex-direction: column; gap: 0;
}
.athlete-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--glow);
    transform: translateY(-3px);
}

.ac-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.ac-info { margin-left: 12px; flex: 1; }
.ac-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.ac-meta { font-size: 11.5px; color: var(--text-3); }

.ac-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ac-stat { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; }
.ac-stat-val { font-size: 16px; font-weight: 900; color: var(--text); line-height: 1; }
.ac-stat-val.cyan   { color: var(--primary); }
.ac-stat-val.green  { color: var(--success); }
.ac-stat-lbl { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 3px; }

.ac-actions {
    display: flex; gap: 8px;
    margin-top: 14px; padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* Search/filter bar */
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-search {
    flex: 1; min-width: 200px;
    display: flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 0 13px; height: 40px;
    transition: var(--t);
}
.filter-search:focus-within { border-color: var(--primary-border); box-shadow: var(--glow); }
.filter-search input { background: transparent; border: none; outline: none; color: var(--text); font-size: 13px; font-family: inherit; flex: 1; }
.filter-search input::placeholder { color: var(--text-3); }
.filter-search svg { color: var(--text-3); flex-shrink: 0; }

.filter-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 0 14px; height: 40px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); color: var(--text-2);
    font-size: 13px; font-weight: 500;
    cursor: pointer; transition: var(--t); font-family: inherit;
}
.filter-pill:hover, .filter-pill.on {
    border-color: var(--primary-border);
    color: var(--primary); background: var(--primary-dim);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════════════════════════════════ */
.profile-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 30px;
    margin-bottom: 22px;
    position: relative; overflow: hidden;
}
.profile-hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at -10% 50%, rgba(0,229,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.profile-hero-top { display: flex; align-items: center; gap: 22px; position: relative; }
.profile-hero-text { flex: 1; }
.profile-hero-name { font-size: 24px; font-weight: 900; color: var(--text); letter-spacing: -0.03em; margin-bottom: 6px; }
.profile-hero-sub  { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.profile-stats-row {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 14px; margin-top: 24px; position: relative;
}
.profile-stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 14px 16px;
}
.profile-stat-val { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1; }
.profile-stat-val.cyan { color: var(--primary); }
.profile-stat-lbl { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   DIVIDER + MISC
   ═══════════════════════════════════════════════════════════════════════════════ */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.gap-row  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer   { flex: 1; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }

/* Live dot */
.live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--success); display: inline-block;
    box-shadow: 0 0 8px var(--success);
    animation: pulse-live 1.6s ease infinite;
}
@keyframes pulse-live {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.85); }
}

/* Glow line accent */
.glow-line {
    height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent);
    margin-bottom: 22px; opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
   ═══════════════════════════════════════════════════════════════════════════════ */
#mobile-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--mobile-nav-h);
    background: rgba(28,30,36,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding: 0 6px;
    align-items: center; justify-content: space-around;
}

.mobile-nav-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 3px;
    padding: 8px 14px;
    border-radius: var(--r-md);
    cursor: pointer; transition: var(--t);
    color: var(--text-3);
    font-size: 10px; font-weight: 600;
}
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item svg { width: 22px; height: 22px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1200px) {
    .stats-grid      { grid-template-columns: repeat(2, 1fr); }
    .athletes-grid   { grid-template-columns: repeat(2, 1fr); }
    .grid-3          { grid-template-columns: 1fr 1fr; }
    .grid-4          { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 900px) {
    #sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    #sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    #main          { margin-left: 0; }
    #mobile-nav    { display: flex; }
    #menu-btn      { display: flex; }
    #content       { padding: 16px; padding-bottom: calc(var(--mobile-nav-h) + 16px); }
    .header-search { display: none; }
    .grid-2, .grid-2-1, .grid-1-2, .grid-3-1 { grid-template-columns: 1fr; }
    .profile-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .stats-grid     { grid-template-columns: 1fr 1fr; }
    .athletes-grid  { grid-template-columns: 1fr; }
    .profile-hero-top { flex-direction: column; align-items: flex-start; }
    .grid-3         { grid-template-columns: 1fr; }
    .grid-4         { grid-template-columns: 1fr 1fr; }
    .comp-card      { flex-wrap: wrap; }
    .filter-bar     { gap: 8px; }
}
