/* ═══════════════════════════════════════════════════════════════════════════
   HealthHabit + FamilyHabit — Shared Design System
   Colors: #ff5e00 (accent) · #F0F0F0 (text) · #1c1c1c (base)
   Font: Bitcount Grid Single (headings) + system (body)
   Style: Frosted glass · Blur · Orange glow
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bitcount+Grid+Single:wght@100..900&display=swap');

/* ── Material Symbols Rounded base ──────────────────────────────────────── */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' -25, 'opsz' 24;
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
}
.page-header h1 .material-symbols-rounded { color: var(--accent); }

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
    /* Core palette */
    --accent:       #ff5e00;
    --accent-hover: #ff7a2e;
    --accent-dim:   rgba(255, 94, 0, 0.18);
    --accent-glow:  rgba(255, 94, 0, 0.12);

    /* Background layers */
    --bg-base:   #1c1c1c;
    --bg-deeper: #141414;
    --bg-raised: rgba(240, 240, 240, 0.04);
    --bg-hover:  rgba(240, 240, 240, 0.07);

    /* Flat solid cards (frosted glass removed) */
    --glass-bg:     #222222;
    --glass-border: rgba(240, 240, 240, 0.10);
    --glass-hover:  rgba(240, 240, 240, 0.14);
    --blur:         blur(0px);

    /* Text */
    --text-primary: #F0F0F0;
    --text-muted:   rgba(240, 240, 240, 0.55);
    --text-dim:     rgba(240, 240, 240, 0.28);

    /* Semantic */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --xp:      var(--accent);

    /* Typography */
    --font-brand: 'Bitcount Grid Single', 'Courier New', monospace;
    --font-body:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout */
    --sidebar-w:    264px;
    --header-h:     56px;
    --bottom-nav-h: 64px;

    /* Shapes */
    --radius:    14px;
    --radius-sm: 9px;
    --radius-xs: 6px;

    --shadow:       0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-glow:  none;
    --transition:   0.18s ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { cursor: pointer; font-family: inherit; }
input, select, textarea {
    font-family: inherit; font-size: 14px;
    background: rgba(240,240,240,0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.6rem 0.85rem; width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
select option { background: #232323; }
textarea { resize: vertical; }
h1, h2, h3 { letter-spacing: -0.3px; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Background mesh (disabled for flat design) ─────────────────────────── */
.bg-mesh { display: none; }

/* ── Loading Screen ──────────────────────────────────────────────────────── */
.loading-screen {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-base);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 32px;
}
.loading-logo { display: flex; align-items: center; gap: 12px; }
.loading-bar { width: 200px; height: 3px; background: var(--glass-border); border-radius: 2px; overflow: hidden; }
.loading-bar-fill {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    animation: loadProgress 1.2s ease forwards; border-radius: 2px;
}
@keyframes loadProgress { to { width: 100%; } }

/* ── Logo & Brand ────────────────────────────────────────────────────────── */
.logo-icon { font-size: 26px; display: inline-flex; align-items: center; }
.logo-icon .material-symbols-rounded { font-size: 26px; color: var(--accent); }
.logo-text {
    font-family: var(--font-brand);
    font-size: 22px; font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-sub {
    font-family: var(--font-brand);
    font-size: 11px; font-weight: 400;
    color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase;
    -webkit-text-fill-color: var(--text-dim);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 0.5rem 1rem; border: none;
    border-radius: var(--radius-sm); font-size: 14px;
    font-weight: 600; letter-spacing: 0.3px;
    transition: all var(--transition); white-space: nowrap;
    position: relative; overflow: hidden;
}
.btn-primary {
    background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { opacity: 0.9; }
.btn-ghost {
    background: transparent; color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--glass-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-google { background: #fff; color: #374151; border: 1px solid #d1d5db; font-weight: 500; }
.btn-google:hover { background: #f9fafb; }
.btn-full { width: 100%; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }

/* ── Glass Card ──────────────────────────────────────────────────────────── */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
    position: relative;
}
.card:hover { border-color: var(--glass-hover); }
.card-title {
    font-family: var(--font-brand);
    font-size: 15px; font-weight: 700;
    letter-spacing: 0.5px; margin-bottom: 14px;
    color: var(--text-primary);
}
.card-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-link { font-size: 13px; color: var(--accent); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error {
    color: var(--danger); font-size: 13px;
    background: rgba(239,68,68,0.08); padding: 8px 12px;
    border-radius: var(--radius-sm); border: 1px solid rgba(239,68,68,0.25);
}
.form-success {
    color: var(--success); font-size: 13px;
    background: rgba(34,197,94,0.08); padding: 8px 12px;
    border-radius: var(--radius-sm); border: 1px solid rgba(34,197,94,0.25);
}
.field-display {
    font-size: 14px; color: var(--text-primary);
    padding: 10px 14px; background: rgba(240,240,240,0.04);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list .tag { background: var(--accent-dim); color: var(--accent); padding: 2px 8px; border-radius: 100px; font-size: 12px; font-family: monospace; }

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-container {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    position: relative; z-index: 1;
}
.auth-page { width: 100%; max-width: 420px; }
.auth-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 40px 32px;
    box-shadow: var(--shadow);
}
.auth-card:hover { border-color: var(--glass-hover); }
.auth-logo { display: flex; align-items: baseline; gap: 8px; margin-bottom: 28px; flex-direction: column; }
.auth-title {
    font-family: var(--font-brand);
    font-size: 26px; font-weight: 700; margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; }
.auth-links { margin-top: 20px; text-align: center; font-size: 14px; color: var(--text-muted); display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.main-container { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-right: 1px solid var(--glass-border);
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; bottom: 0;
    z-index: 100; overflow-y: auto;
    transition: transform var(--transition);
}
.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 22px 20px 16px;
    border-bottom: 1px solid var(--glass-border);
}
.sidebar-user {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
}
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; flex-shrink: 0;
    box-shadow: 0 0 12px var(--accent-glow);
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 14px; }
.user-level { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.level-badge {
    background: var(--accent);
    color: #fff; border-radius: 100px;
    padding: 1px 8px; font-size: 11px; font-weight: 700;
    font-family: var(--font-brand);
    box-shadow: 0 2px 8px rgba(255,94,0,0.4);
}
#sidebar-xp { font-size: 12px; color: var(--text-muted); }

.sidebar-xp-bar { padding: 12px 20px; border-bottom: 1px solid var(--glass-border); }
.xp-bar-track { background: rgba(240,240,240,0.08); border-radius: 100px; overflow: hidden; }
.xp-bar-track.large { height: 10px; }
.xp-bar-track:not(.large) { height: 5px; }
.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 100px;
    transition: width 0.8s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 0 8px var(--accent-glow);
}
.xp-bar-label { font-size: 11px; color: var(--text-dim); margin-top: 4px; display: block; }

.nav-list { list-style: none; padding: 10px 10px; flex: 1; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 0.6rem 1.2rem; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 14px;
    transition: all var(--transition);
}
.nav-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-link.active {
    background: var(--accent-dim);
    color: var(--accent); font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent);
}
.nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-label { display: inline; white-space: nowrap; flex: 1; }
.nav-link .material-symbols-rounded { font-size: 18px; }

.nav-divider { height: 1px; background: var(--glass-border); margin: 8px 10px; }
.nav-section-label { font-size: 10px; color: var(--text-dim); letter-spacing: 1.5px; text-transform: uppercase; padding: 6px 22px 2px; }

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: space-between;
}
.streak-display { display: flex; align-items: center; gap: 6px; }
.streak-fire { font-size: 18px; display: inline-flex; align-items: center; }
.streak-fire .material-symbols-rounded { font-size: 18px; color: var(--accent); }
#streak-count { font-size: 18px; font-weight: 700; color: var(--accent); font-family: var(--font-brand); }
.streak-label { font-size: 12px; color: var(--text-muted); }

/* ── Main Content ────────────────────────────────────────────────────────── */
.main-content {
    flex: 1; margin-left: var(--sidebar-w);
    padding: 32px 32px 100px;
    max-width: 940px; position: relative; z-index: 1;
}
.page { display: none; }
.page.active { display: block; animation: pageFadeIn 0.2s ease; }
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.page-header h1 {
    font-family: var(--font-brand);
    font-size: 30px; font-weight: 700; letter-spacing: 0.5px;
    display: flex; align-items: center; gap: 0.5rem;
}
.page-header h1 i, .page-header h1 .material-symbols-rounded { color: var(--accent); }
.page-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ── Mobile Header ───────────────────────────────────────────────────────── */
.mobile-header {
    display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 99;
    height: var(--header-h);
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--glass-border);
    align-items: center; justify-content: space-between;
    padding: 0 16px;
}
.hamburger { background: none; border: none; color: var(--text-primary); font-size: 22px; padding: 4px; }
.mobile-title { font-family: var(--font-brand); font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.mobile-streak { font-size: 14px; font-weight: 700; color: var(--accent); }

/* ── Bottom Nav ──────────────────────────────────────────────────────────── */
.bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 99;
    height: var(--bottom-nav-h);
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-top: 1px solid var(--glass-border);
    justify-content: space-around; align-items: center; padding: 0 4px;
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--text-muted); font-size: 11px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    transition: color var(--transition); flex: 1; text-align: center;
}
.bottom-nav-item i, .bottom-nav-item .material-symbols-rounded { font-size: 20px; }
.bottom-nav-item span { display: none; }
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item.active span { display: inline; }
.bottom-nav-fab {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 18px var(--accent-glow);
    margin-top: -18px; transition: transform var(--transition);
}
.bottom-nav-fab:hover { transform: scale(1.08); }
.sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,0.6); }

/* ── Stats Grid ──────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 1rem; text-align: center;
    transition: all var(--transition); position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--accent-dim), transparent);
    opacity: 0; transition: opacity var(--transition);
    border-radius: var(--radius);
}
.stat-card:hover { border-color: var(--accent); }
.stat-icon { font-size: 26px; margin-bottom: 8px; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; }
.stat-icon .material-symbols-rounded { font-size: 28px; color: var(--accent); }
.stat-value { font-family: var(--font-brand); font-size: 28px; font-weight: 700; position: relative; z-index: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; position: relative; z-index: 1; }

/* ── XP Card ─────────────────────────────────────────────────────────────── */
.xp-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.xp-card-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.level-circle {
    width: 54px; height: 54px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-brand); font-size: 22px; font-weight: 800;
    box-shadow: 0 4px 18px var(--accent-glow);
}
.xp-bar-details { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-top: 6px; }

/* ── Quick Actions ───────────────────────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16px 8px; border-radius: var(--radius-sm);
    background: rgba(240,240,240,0.03); border: 1px solid var(--glass-border);
    color: var(--text-muted); font-size: 12px; font-weight: 600;
    transition: all var(--transition); backdrop-filter: var(--blur);
}
.quick-btn span:first-child { font-size: 22px; }
.quick-btn .material-symbols-rounded { font-size: 22px; color: inherit; }
.quick-btn:hover {
    border-color: var(--accent); background: var(--accent-dim);
    color: var(--accent);
}

/* ── Chart ───────────────────────────────────────────────────────────────── */
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-bottom: 4px; }
.chart-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar {
    width: 100%; border-radius: 4px 4px 0 0; min-height: 4px;
    background: linear-gradient(to top, var(--accent), var(--accent-hover));
    box-shadow: 0 0 8px var(--accent-glow);
    transition: height 0.6s cubic-bezier(.34,1.56,.64,1);
}
.chart-bar.empty { background: rgba(240,240,240,0.06); box-shadow: none; }
.chart-bar-val { font-size: 10px; color: var(--text-dim); }
.chart-labels { display: flex; gap: 8px; margin-top: 4px; }
.chart-label { flex: 1; text-align: center; font-size: 11px; color: var(--text-dim); }

/* ── Workout Items ───────────────────────────────────────────────────────── */
.workout-list { display: flex; flex-direction: column; gap: 8px; }
.workout-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: var(--glass-bg);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.workout-item:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.workout-icon { font-size: 28px; flex-shrink: 0; }
.workout-info { flex: 1; }
.workout-name { font-weight: 600; font-size: 15px; }
.workout-meta { font-size: 13px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.workout-meta span::before { content: '·'; margin-right: 10px; }
.workout-meta span:first-child::before { content: none; }
.icon-btn { background: none; border: none; color: var(--text-dim); font-size: 16px; padding: 4px; border-radius: 4px; transition: color var(--transition); }
.icon-btn:hover { color: var(--danger); }

/* ── Diet ────────────────────────────────────────────────────────────────── */
.macro-summary {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px;
    background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 20px;
}
.macro-item { text-align: center; }
.macro-value { font-family: var(--font-brand); font-size: 24px; font-weight: 700; color: var(--accent); }
.macro-label { font-size: 12px; color: var(--text-muted); }
.diet-list { display: flex; flex-direction: column; gap: 12px; }
.meal-section {
    background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden;
}
.meal-section-header {
    padding: 12px 16px; background: rgba(255,94,0,0.06);
    border-bottom: 1px solid var(--glass-border);
    font-family: var(--font-brand); font-weight: 700; font-size: 14px;
    display: flex; justify-content: space-between;
}
.diet-item {
    display: flex; align-items: center; padding: 10px 16px;
    border-bottom: 1px solid var(--glass-border); gap: 12px;
}
.diet-item:last-child { border-bottom: none; }
.diet-name { font-size: 14px; font-weight: 600; }
.diet-macros { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 8px; }

/* ── Goals ───────────────────────────────────────────────────────────────── */
.goals-list { display: flex; flex-direction: column; gap: 12px; }
.goal-item {
    background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 18px;
    transition: all var(--transition);
}
.goal-item:hover { border-color: var(--accent); }
.goal-item.completed { opacity: 0.65; border-color: rgba(34,197,94,0.4); }
.goal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.goal-title { font-family: var(--font-brand); font-weight: 700; font-size: 16px; }
.goal-type { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.goal-completed-badge { background: var(--success); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 100px; white-space: nowrap; }
.goal-progress-bar { background: rgba(240,240,240,0.08); border-radius: 100px; height: 7px; overflow: hidden; margin: 8px 0; }
.goal-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 100px; transition: width 0.6s ease; box-shadow: 0 0 6px var(--accent-glow); }
.goal-stats { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); }
.goal-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.badge-card {
    background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 20px 14px; text-align: center; transition: all var(--transition);
}
.badge-card.earned { border-color: rgba(255,94,0,0.4); background: rgba(255,94,0,0.06); box-shadow: 0 0 14px rgba(255,94,0,0.12); }
.badge-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.badge-icon { font-size: 38px; margin-bottom: 10px; }
.badge-icon.locked { filter: grayscale(1) opacity(0.3); }
.badge-name { font-family: var(--font-brand); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.badge-desc { font-size: 11px; color: var(--text-muted); }
.badge-xp { font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 6px; font-family: var(--font-brand); }
.badge-row { display: flex; gap: 12px; flex-wrap: wrap; }
.badge-mini { font-size: 30px; }

/* ── Leaderboard ─────────────────────────────────────────────────────────── */
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.lb-item {
    display: flex; align-items: center; gap: 16px; padding: 14px 16px;
    background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.lb-item:hover { border-color: var(--accent); }
.lb-rank { font-family: var(--font-brand); font-size: 20px; font-weight: 800; width: 40px; text-align: center; color: var(--text-muted); }
.lb-rank.gold   { color: #fbbf24; text-shadow: 0 0 10px rgba(251,191,36,0.4); }
.lb-rank.silver { color: #94a3b8; }
.lb-rank.bronze { color: #b45309; }
.lb-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-hover)); display: flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: 0 0 8px var(--accent-glow); }
.lb-info { flex: 1; }
.lb-name { font-weight: 600; }
.lb-level { font-size: 12px; color: var(--text-muted); }
.lb-xp { font-family: var(--font-brand); font-weight: 800; color: var(--accent); font-size: 16px; }

/* ── Settings ────────────────────────────────────────────────────────────── */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 14px; font-weight: 600; }
.toggle-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: rgba(240,240,240,0.12); border-radius: 100px; cursor: pointer; transition: background var(--transition); }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform var(--transition); }
input:checked + .toggle-slider { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
input:checked + .toggle-slider::before { transform: translateX(20px); }
.api-key-display { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(240,240,240,0.04); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.api-key-display code { flex: 1; font-family: monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); }
.google-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Admin ───────────────────────────────────────────────────────────────── */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab {
    padding: 8px 16px; border-radius: var(--radius-sm);
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur); color: var(--text-muted);
    font-size: 13px; font-weight: 600; transition: all var(--transition);
}
.admin-tab:hover { color: var(--text-primary); border-color: var(--accent); }
.admin-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 14px var(--accent-glow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 10px 12px; text-align: left; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid var(--glass-border); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--glass-border); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-hover); }
.mini-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mini-stat { background: var(--glass-bg); backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 10px 16px; }
.mini-stat-val { font-family: var(--font-brand); font-size: 20px; font-weight: 800; }
.mini-stat-label { font-size: 11px; color: var(--text-muted); }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 700; }
.status-active   { background: rgba(34,197,94,0.12); color: var(--success); }
.status-inactive { background: rgba(239,68,68,0.12); color: var(--danger); }
.status-admin    { background: var(--accent-dim); color: var(--accent); }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.65);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    background: rgba(28,28,28,0.85);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 28px;
    width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto;
    animation: slideUp 0.22s ease; box-shadow: var(--shadow);
}
.modal-box-wide { max-width: 720px; }
@keyframes slideUp { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h2 { font-family: var(--font-brand); font-size: 20px; font-weight: 700; letter-spacing: 0.5px; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 24px; line-height: 1; padding: 0 4px; transition: color var(--transition); }
.modal-close:hover { color: var(--danger); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ── Level Up Modal ──────────────────────────────────────────────────────── */
.levelup-box { text-align: center; border-color: var(--accent); }
.levelup-stars { font-size: 36px; margin-bottom: 8px; animation: spin 0.6s ease; display: flex; justify-content: center; gap: 4px; }
.levelup-stars .material-symbols-rounded { font-size: 36px; color: #fbbf24; font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' -25, 'opsz' 36; }
@keyframes spin { from { transform: rotate(-20deg) scale(0.5); } to { transform: none; } }
.levelup-box h2 { font-family: var(--font-brand); font-size: 32px; font-weight: 900; color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); }
.levelup-number { font-family: var(--font-brand); font-size: 80px; font-weight: 900; line-height: 1; margin: 8px 0; color: var(--accent); text-shadow: 0 0 30px var(--accent-glow); }
.badge-box { text-align: center; border-color: var(--accent); }
.badge-modal-icon { font-size: 72px; margin-bottom: 8px; animation: badgePop 0.4s cubic-bezier(.34,1.56,.64,1); display: flex; justify-content: center; }
.badge-modal-icon .material-symbols-rounded { font-size: 72px; color: var(--accent); font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' -25, 'opsz' 48; }
@keyframes badgePop { from { transform: scale(0); } to { transform: scale(1); } }
.badge-modal-xp { font-family: var(--font-brand); font-size: 18px; font-weight: 700; color: var(--accent); }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 80px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
    background: rgba(28,28,28,0.9);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px;
    box-shadow: var(--shadow); pointer-events: auto; max-width: 320px;
    animation: toastIn 0.3s ease;
}
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
.toast.info    { border-color: var(--accent); box-shadow: 0 0 14px rgba(255,94,0,0.15); }
@keyframes toastIn  { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
.toast.out { animation: toastOut 0.3s ease forwards; }

/* ── XP Popup ────────────────────────────────────────────────────────────── */
.xp-popup {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    z-index: 400; pointer-events: none;
    font-family: var(--font-brand); font-size: 32px; font-weight: 900;
    color: var(--accent); text-shadow: 0 0 20px var(--accent-glow);
    animation: xpFloat 1.5s ease forwards;
}
@keyframes xpFloat {
    0%   { transform: translate(-50%,-50%) scale(0.5); opacity: 1; }
    30%  { transform: translate(-50%,-80%) scale(1.2); }
    100% { transform: translate(-50%,-150%) scale(1); opacity: 0; }
}

/* ── Loading placeholder ─────────────────────────────────────────────────── */
.loading-placeholder { text-align: center; color: var(--text-muted); padding: 40px; font-size: 14px; }

/* ── App switcher pill ───────────────────────────────────────────────────── */
.app-switcher {
    display: flex; gap: 4px; padding: 4px;
    background: rgba(240,240,240,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 100px; margin: 12px 16px 0;
    box-sizing: border-box;
}
.app-pill {
    flex: 1; text-align: center; padding: 6px 10px;
    border-radius: 100px; font-size: 12px; font-weight: 600;
    color: var(--text-muted); transition: all var(--transition);
    cursor: pointer; border: none; background: none;
    font-family: var(--font-brand); letter-spacing: 0.3px;
    white-space: nowrap;
    display: flex; align-items: center; justify-content: center; gap: 0.25rem;
}
.app-pill i { font-size: 14px; }
.app-pill .material-symbols-rounded { font-size: 14px; }
.app-label { display: none; }
.app-pill.active .app-label { display: inline; }
.app-pill.active { background: var(--accent); color: #fff; box-shadow: 0 2px 10px var(--accent-glow); }
.app-pill:hover:not(.active) { color: var(--text-primary); background: var(--bg-hover); }

/* ── Family specific ─────────────────────────────────────────────────────── */
.family-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 22px; transition: all var(--transition); cursor: pointer;
    position: relative; overflow: hidden;
}
.family-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    opacity: 0; transition: opacity var(--transition);
}
.family-card:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.family-card:hover::after { opacity: 1; }
.family-avatar { font-size: 48px; margin-bottom: 10px; }
.family-name { font-family: var(--font-brand); font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.family-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.family-role-badge { padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; font-family: var(--font-brand); }
.family-role-badge.parent { background: var(--accent-dim); color: var(--accent); }
.family-role-badge.member { background: rgba(240,240,240,0.08); color: var(--text-muted); }

.member-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px;
    background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.member-row:hover { border-color: var(--accent); }
.member-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-hover)); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; box-shadow: 0 0 8px var(--accent-glow); }
.member-info { flex: 1; }
.member-name { font-weight: 600; font-size: 14px; }
.member-stats { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 10px; }
.member-xp { font-family: var(--font-brand); font-weight: 700; color: var(--accent); }

.challenge-card {
    background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 18px;
    transition: all var(--transition);
}
.challenge-card:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.challenge-title { font-family: var(--font-brand); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.challenge-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.challenge-progress-bar { background: rgba(240,240,240,0.08); border-radius: 100px; height: 8px; overflow: hidden; margin: 6px 0; }
.challenge-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 100px; box-shadow: 0 0 6px var(--accent-glow); transition: width 0.6s ease; }

.invite-code-display {
    display: flex; align-items: center; gap: 10px;
    background: var(--accent-dim); border: 1px solid rgba(255,94,0,0.3);
    border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0;
}
.invite-code { font-family: var(--font-brand); font-size: 22px; font-weight: 700; color: var(--accent); letter-spacing: 3px; flex: 1; text-align: center; }

/* ── About page ──────────────────────────────────────────────────────────── */
.about-hero {
    background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 48px 40px; margin-bottom: 24px; text-align: center;
    position: relative; overflow: hidden;
}
.about-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, var(--accent-dim), transparent 70%);
    pointer-events: none;
}
.about-hero h1 { font-family: var(--font-brand); font-size: 40px; font-weight: 900; margin-bottom: 12px; letter-spacing: 1px; color: var(--accent); text-shadow: 0 0 30px var(--accent-glow); position: relative; z-index: 1; }
.about-hero p { color: var(--text-muted); max-width: 600px; margin: 0 auto; line-height: 1.7; position: relative; z-index: 1; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.feature-card { background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 20px; transition: all var(--transition); }
.feature-card:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.feature-icon { font-size: 32px; margin-bottom: 10px; }
.feature-title { font-family: var(--font-brand); font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: 14px; color: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); z-index: 101; }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,0.6); }
    .sidebar-overlay { display: block; }
    .sidebar-overlay.hidden { display: none !important; }
    .mobile-header { display: flex; }
    .bottom-nav    { display: flex; }
    .main-content  { margin-left: 0; padding: 76px 16px 90px; }
    .stats-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .macro-summary { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .form-row    { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: repeat(4, 1fr); }
    .quick-btn   { padding: 12px 4px; font-size: 11px; }
    .toast-container { bottom: 72px; left: 16px; right: 16px; }
    .toast { max-width: 100%; }
    .badges-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .stats-grid    { grid-template-columns: repeat(2, 1fr); }
    .macro-summary { grid-template-columns: repeat(2, 1fr); }
    .modal-box     { padding: 20px 16px; }
    .auth-card     { padding: 28px 20px; }
    .badges-grid   { grid-template-columns: repeat(2, 1fr); }
    .page-header h1 { font-size: 24px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Missing / alias classes — used by family.html & shared layout
   ═══════════════════════════════════════════════════════════════════════════ */

/* Glass card (flat solid variant) */
.glass-card {
    background: #222;
    border: 1px solid rgba(240,240,240,0.10);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

/* App shell — flex wrapper for sidebar + content */
.app-shell {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Auth wall — full-screen gate */
.auth-wall {
    position: fixed; inset: 0; z-index: 500;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-base);
    padding: 20px;
}
.auth-wall .auth-card { max-width: 380px; width: 100%; }

/* Sidebar header & nav aliases */
.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(240,240,240,0.10);
}
.sidebar-nav {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
}

/* Nav item (alias for nav-link) */
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: none; background: none; width: 100%;
}
.nav-item:hover { background: rgba(240,240,240,0.06); color: var(--text-primary); }
.nav-item.active { background: rgba(255,94,0,0.12); color: var(--accent); font-weight: 600; }
.nav-item .nav-icon { font-size: 17px; width: 22px; text-align: center; }

/* User chip in sidebar footer */
.user-chip { display: flex; align-items: center; gap: 10px; width: 100%; }
.user-chip-info { flex: 1; min-width: 0; }
.user-chip-name { font-weight: 600; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-sub { font-size: 12px; color: var(--text-muted); display: block; }
.user-chip .user-avatar { width: 36px; height: 36px; font-size: 14px; }

/* Mobile topbar */
.mobile-topbar {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; z-index: 99;
    height: var(--header-h);
    background: var(--bg-base);
    border-bottom: 1px solid rgba(240,240,240,0.10);
    align-items: center; justify-content: space-between;
    padding: 0 16px;
}
.mobile-topbar .hamburger { background: none; border: none; color: var(--text-primary); font-size: 22px; padding: 4px; }
.mobile-topbar .mobile-title { font-family: var(--font-brand); font-size: 16px; font-weight: 700; }

/* Form aliases */
.form-label { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.3px; display: block; margin-bottom: 5px; }
.form-input {
    font-family: inherit; font-size: 14px;
    background: rgba(240,240,240,0.04);
    border: 1px solid rgba(240,240,240,0.10);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.6rem 0.85rem; width: 100%;
    transition: border-color var(--transition);
}
.form-input:focus { outline: none; border-color: var(--accent); }
select.form-input option { background: #222; }
textarea.form-input { resize: vertical; }

/* Alert boxes */
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin: 10px 0; border: 1px solid transparent; }
.alert-error   { background: rgba(239,68,68,0.08);  border-color: rgba(239,68,68,0.25);  color: #ef4444; }
.alert-success { background: rgba(34,197,94,0.08);  border-color: rgba(34,197,94,0.25);  color: #22c55e; }
.alert-info    { background: var(--accent-dim);      border-color: rgba(255,94,0,0.3);    color: var(--accent); }

/* Loading spinner */
.loading-spinner {
    width: 32px; height: 32px;
    border: 3px solid rgba(240,240,240,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spinnerTurn 0.8s linear infinite;
    margin: 40px auto;
    display: block;
}
@keyframes spinnerTurn { to { transform: rotate(360deg); } }

/* Grid utilities */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

/* Page title */
.page-title { font-family: var(--font-brand); font-size: 28px; font-weight: 700; letter-spacing: 0.5px; }

/* Button utilities */
.btn-block { width: 100%; }
.btn-block.btn { display: flex; }

/* Form card padding adjustment */
.form-card.glass-card { padding: 24px 28px; }

/* Sidebar open state on mobile for app-shell pages */
@media (max-width: 768px) {
    .app-shell .sidebar { transform: translateX(-100%); }
    .app-shell .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.5); }
    .app-shell .mobile-topbar { display: flex; }
    .app-shell .main-content { margin-left: 0; padding: 76px 16px 40px; }
}

/* ─── Nav icon hiding ─────────────────────────────────────────────────────── */
.nav-link .nav-icon { display: inline-flex; align-items: center; margin: 0; transition: all 0.2s ease; }
.nav-item.active .nav-icon { display: inline-flex; margin-right: 0.3rem; }
.nav-label { transition: opacity 0.2s ease; }

/* ─── Invite tabs ────────────────────────────────────────────────────────── */
.invite-tab.active { border-bottom-color: var(--accent); color: var(--accent); }

/* ─── Leaderboard ────────────────────────────────────────────────────────── */
.leaderboard-row {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem;
    background: #222;
    border: 1px solid rgba(240,240,240,0.10);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}
.leaderboard-rank {
    font-family: var(--font-brand);
    font-size: 1.2rem; font-weight: 800;
    width: 32px; text-align: center;
    background: rgba(255,94,0,0.12); color: var(--accent);
    border-radius: 6px; padding: 4px;
}
.leaderboard-rank.rank-1 { background: rgba(251,191,36,0.2); color: #fbbf24; }
.leaderboard-rank.rank-2 { background: rgba(148,163,184,0.15); color: #cbd5e1; }
.leaderboard-rank.rank-3 { background: rgba(180,83,9,0.15); color: #d97706; }
.leaderboard-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff8c42);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-name { font-weight: 600; font-size: 1rem; }
.leaderboard-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.leaderboard-xp {
    font-family: var(--font-brand);
    font-size: 1.1rem; font-weight: 800;
    color: var(--accent); text-align: right;
}
