/* =====================================================================
   Oxlyn Truck Job — Liquid Glass
   Apple-inspired liquid glass aesthetic for FiveM NUI.
   Translucent layered surfaces (no backdrop-filter — CEF would paint
   solid black behind it). Glass is built via stacked semi-transparent
   gradients + inner top highlight + soft drop shadow. Aurora blobs
   provide the underlying color the glass "picks up".
   ===================================================================== */

/* ---------- Design tokens ------------------------------------------- */
:root {
    /* Deep base — cool indigo-black */
    --ink-950:        #07070f;
    --ink-900:        #0c0d1b;
    --ink-850:        #111222;
    --ink-800:        #18182d;
    --ink-700:        #1f1f38;

    /* Glass tints — light cool whites layered over the dark base */
    --glass-100:      rgba(255, 255, 255, 0.06);
    --glass-200:      rgba(255, 255, 255, 0.09);
    --glass-300:      rgba(255, 255, 255, 0.13);
    --glass-400:      rgba(255, 255, 255, 0.18);
    --glass-500:      rgba(255, 255, 255, 0.26);

    /* Hairline borders */
    --hair-100:       rgba(255, 255, 255, 0.06);
    --hair-200:       rgba(255, 255, 255, 0.10);
    --hair-300:       rgba(255, 255, 255, 0.16);
    --hair-400:       rgba(255, 255, 255, 0.24);

    /* Aurora colors — picked up by translucent glass */
    --aurora-blue:    #e963c7;
    --aurora-indigo:  #4b2f54;
    --aurora-cyan:    #ffdf80;
    --aurora-violet:  #2c3868;
    --aurora-pink:    #f4717c;

    /* iOS-style system blue accent */
    --accent-100:     #fff9cb;
    --accent-200:     #fed1df;
    --accent-300:     #ffc6d4;
    --accent-400:     #ffb2c6;
    --accent-500:     #f4717c;
    --accent-600:     #e963c7;
    --accent-700:     #603a55;
    --accent-glow:    rgba(255, 178, 199, 0.28);

    /* Emerald — money only */
    --money-200:      #f2ffd1;
    --money-300:      #e6ffa3;
    --money-400:      #e6ffa3;
    --money-500:      #c9e88a;
    --money-600:      #a9c86c;

    /* Amber — bonus / warning */
    --amber-300:      #ffe9a8;
    --amber-400:      #ffdf80;
    --amber-500:      #ffd4a8;

    /* Red — hard difficulty / errors */
    --red-300:        #ffc6d4;
    --red-400:        #f4717c;
    --red-500:        #f4717c;

    /* Text scale */
    --text:           #f5f7fb;
    --text-soft:      #e5ddff;
    --text-muted:     #ccc2f5;
    --text-dim:       #8f86b8;

    /* Shadows — Apple-style soft, layered */
    --shadow-glass:   0 1px 0 rgba(255, 255, 255, 0.05) inset,
                      0 1px 2px rgba(0, 0, 0, 0.30),
                      0 8px 24px -8px rgba(0, 0, 0, 0.45),
                      0 24px 48px -16px rgba(0, 0, 0, 0.50);
    --shadow-lift:    0 1px 0 rgba(255, 255, 255, 0.08) inset,
                      0 2px 4px rgba(0, 0, 0, 0.35),
                      0 12px 28px -8px rgba(0, 0, 0, 0.50),
                      0 36px 72px -20px rgba(0, 0, 0, 0.60);
    --shadow-float:   0 2px 6px rgba(0, 0, 0, 0.40),
                      0 16px 40px -12px rgba(0, 0, 0, 0.55),
                      0 48px 96px -24px rgba(0, 0, 0, 0.70);

    /* Radii — generous, Apple-like */
    --r-frame:        28px;
    --r-card:         18px;
    --r-tile:         14px;
    --r-pill:         999px;
    --r-btn:          14px;
    --r-tight:        10px;

    /* Motion */
    --ease-out:       cubic-bezier(0.16, 1, 0.30, 1);
    --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-soft:      cubic-bezier(0.25, 0.10, 0.25, 1);

    /* Type */
    --font-body:      "GTAArtDeco", Arial, sans-serif;
    --font-display:   "GTAArtDeco", Arial, sans-serif;
    --font-mono:      "GTAArtDeco", Arial, sans-serif;

    /* Legacy aliases preserved for components that reference them */
    --neon-200:       var(--accent-200);
    --neon-300:       var(--accent-300);
    --neon-400:       var(--accent-400);
    --neon-500:       var(--accent-500);
}

/* ---------- Reset / base -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    height: 100%;
    overflow: hidden;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.45;
    background: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}
body { user-select: none; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.hidden { display: none !important; }
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* =====================================================================
   FRAME
   ===================================================================== */
.app {
    position: fixed; inset: 0;
    display: grid; place-items: center;
    background: transparent;
    z-index: 50;
    pointer-events: none;
    animation: app-fade 320ms var(--ease-out);
}
.app .frame { pointer-events: auto; }
.app.hidden { display: none; }
@keyframes app-fade {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.frame {
    position: relative;
    width: 92vw;
    max-width: 1340px;
    height: 84vh;
    max-height: 840px;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, #0c0f18 0%, #0a0d15 60%, #08090f 100%);
    border: 1px solid var(--hair-300);
    border-radius: var(--r-frame);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 0 0 1px rgba(0, 0, 0, 0.40),
        0 32px 80px -16px rgba(0, 0, 0, 0.65),
        0 80px 160px -32px rgba(0, 0, 0, 0.75);
}

/* ===== Aurora orbs — provide the color glass picks up ===== */
.aurora {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    opacity: 0.7;
    z-index: 0;
}
.aurora-1 {
    width: 520px; height: 520px;
    top: -160px; left: -120px;
    background: radial-gradient(circle, rgba(255, 178, 198, 0.55), transparent 65%);
    animation: aurora-drift-1 22s ease-in-out infinite;
}
.aurora-2 {
    width: 460px; height: 460px;
    top: 30%; right: -140px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.45), transparent 65%);
    animation: aurora-drift-2 26s ease-in-out infinite;
}
.aurora-3 {
    width: 540px; height: 540px;
    bottom: -180px; left: 40%;
    background: radial-gradient(circle, rgba(255, 223, 128, 0.40), transparent 65%);
    animation: aurora-drift-3 30s ease-in-out infinite;
}
@keyframes aurora-drift-1 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(60px, 40px); }
}
@keyframes aurora-drift-2 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-50px, 60px); }
}
@keyframes aurora-drift-3 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-80px, -30px); }
}

/* ===== Paper grain ===== */
.frame-grain {
    position: absolute; inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/></svg>");
    opacity: 0.40;
    mix-blend-mode: overlay;
    z-index: 1;
}

/* Legacy decoration hooks neutralised */
.frame-grid, .frame-mesh, .frame-glow, .frame-glow-tl,
.frame-glow-br, .frame-glow-c, .frame-scan { display: none; }

/* All frame children except aurora sit above z-index 1 */
.topbar, .hero, .content { position: relative; z-index: 2; }

/* =====================================================================
   GLASS — reusable mixin via CSS custom properties
   The "glass surface" is built from these stacked layers:
     1. radial highlight at top-left (light source)
     2. translucent linear gradient (the body)
     3. inner top hairline (the edge catching light)
   ===================================================================== */

/* =====================================================================
   TOPBAR — floating glass bar at top
   ===================================================================== */
.topbar {
    margin: 18px 18px 0;
    padding: 10px 14px 10px 18px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    border-radius: 22px;
    background:
        /* light catches top-left */
        radial-gradient(80% 100% at 0% 0%, rgba(255, 255, 255, 0.12), transparent 60%),
        /* glass body */
        linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.02) 100%),
        /* dark base under the glass */
        linear-gradient(180deg, rgba(24, 24, 45, 0.55), rgba(17, 18, 34, 0.65));
    border: 1px solid var(--hair-300);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.30),
        0 8px 24px -8px rgba(0, 0, 0, 0.50),
        0 1px 0 rgba(0, 0, 0, 0.40);
}
.topbar::before {
    /* top hairline highlight — the meniscus where light wraps */
    content: '';
    position: absolute;
    top: -1px; left: 24%; right: 24%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    pointer-events: none;
}

.brand {
    display: flex; align-items: center; gap: 11px;
    flex-shrink: 0;
}
.brand-mark {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px;
    border-radius: 11px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 60%),
        linear-gradient(180deg, var(--accent-400), var(--accent-600));
    color: #fff;
    font-size: 15px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25),
        0 3px 6px -2px rgba(233, 99, 199, 0.45);
}
.brand-text {
    display: flex; flex-direction: column;
    line-height: 1.1;
}
.brand-text strong {
    color: var(--text);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
}
.brand-text span {
    color: var(--text-muted);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
    margin-top: 1px;
}

/* ===== Nav (horizontal segmented pill bar) ===== */
.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    justify-self: center;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.10));
    border: 1px solid var(--hair-100);
    border-radius: var(--r-pill);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.30);
}
.nav-item {
    position: relative;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    border-radius: var(--r-pill);
    transition:
        background 240ms var(--ease-out),
        color 240ms var(--ease-out),
        transform 220ms var(--ease-out);
    cursor: pointer;
    white-space: nowrap;
}
.nav-item .nav-ico {
    font-size: 12px;
    color: var(--text-muted);
    transition: color 240ms var(--ease-out);
}
.nav-item:hover {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.04);
}
.nav-item:hover .nav-ico { color: var(--text-soft); }
.nav-item.is-active {
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.20),
        0 1px 2px rgba(0, 0, 0, 0.20);
}
.nav-item.is-active .nav-ico { color: var(--accent-300); }
.nav-item:active { transform: scale(0.97); }

/* ===== Topbar right side: clock + profile chip + close ===== */
.topbar-meta {
    display: flex; align-items: center; gap: 10px;
    justify-self: end;
}
.clock {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--hair-200);
    border-radius: var(--r-pill);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.clock i { color: var(--text-muted); font-size: 10px; }

.profile-chip {
    display: flex; align-items: center; gap: 9px;
    padding: 5px 12px 5px 5px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--hair-200);
    border-radius: var(--r-pill);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.20);
}
.profile-avatar {
    position: relative;
    width: 30px; height: 30px;
    flex-shrink: 0;
}
.profile-avatar-frame {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 249, 203, 0.40), transparent 60%),
        linear-gradient(180deg, var(--accent-400), var(--accent-700));
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
.profile-avatar img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 280ms var(--ease-out);
}
.profile-avatar img.is-loaded { opacity: 1; }
.profile-avatar img.is-loaded ~ .profile-avatar-fallback { opacity: 0; }
.profile-avatar-fallback {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    transition: opacity 200ms ease;
}
.profile-online {
    position: absolute;
    right: -1px; bottom: -1px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--money-400);
    border: 2px solid #0c0f18;
    box-shadow: 0 0 4px rgba(230, 255, 163, 0.55);
}

.profile-meta {
    display: flex; flex-direction: column;
    line-height: 1.1;
}
.profile-name {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.1px;
    max-width: 110px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-level {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 1px;
}
.profile-level strong { color: var(--accent-300); margin-left: 2px; }

.btn-icon {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px;
    color: var(--text-muted);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--hair-200);
    border-radius: 50%;
    font-size: 12px;
    transition: background 200ms ease, color 200ms ease, transform 180ms var(--ease-out);
}
.btn-icon:hover {
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}
.btn-icon:active { transform: scale(0.92); }

/* =====================================================================
   HERO STRIP — XP card + status card + inline pills
   ===================================================================== */
.hero {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 14px 18px 0;
    min-height: 64px;
}

.hero-card {
    position: relative;
    padding: 12px 16px;
    background:
        radial-gradient(80% 100% at 0% 0%, rgba(255, 255, 255, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%),
        linear-gradient(180deg, rgba(24, 24, 45, 0.45), rgba(17, 18, 34, 0.55));
    border: 1px solid var(--hair-200);
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.30),
        0 4px 14px -4px rgba(0, 0, 0, 0.40);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-xp {
    flex: 1 1 auto;
    min-width: 340px;
    max-width: 620px;
    padding: 13px 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 8px;
    align-items: center;
}
.hero-xp-head {
    grid-column: 1;
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
}
.hero-xp-tag {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}
.hero-xp-tag i { color: var(--accent-300); font-size: 11px; }
.hero-xp-tag strong {
    color: var(--accent-200);
    font-family: var(--font-mono);
    font-weight: 800;
    margin-left: 4px;
}
.hero-xp-progress {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
}
.hero-xp-bar {
    grid-column: 1;
    position: relative;
    height: 6px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: var(--r-pill);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55);
}
.lvl-fill {
    display: block;
    height: 100%;
    width: 0%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, var(--accent-600), var(--accent-400) 60%, var(--accent-200));
    border-radius: var(--r-pill);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.40),
        0 0 12px rgba(255, 178, 198, 0.45);
    transition: width 700ms var(--ease-out);
}
.lvl-bonus {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px;
    background:
        linear-gradient(180deg, rgba(230, 255, 163, 0.18), rgba(230, 255, 163, 0.04));
    color: var(--money-300);
    border: 1px solid rgba(230, 255, 163, 0.30);
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(167, 243, 208, 0.20);
}
.lvl-bonus i { font-size: 10px; }

.hero-spacer { flex: 1; }

@keyframes dot-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

.hero-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 14px;
    align-self: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--hair-200);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--r-pill);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 2px 6px -2px rgba(0, 0, 0, 0.35);
}
.hero-pill-ico {
    color: var(--accent-300);
    font-size: 11px;
    animation: spin-slow 10s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.hero-pill-text strong {
    color: var(--accent-200);
    font-family: var(--font-mono);
    font-weight: 700;
    margin: 0 1px;
}
.hero-pill.is-bonus {
    background:
        radial-gradient(80% 100% at 0% 0%, rgba(252, 211, 77, 0.30), transparent 60%),
        linear-gradient(180deg, rgba(251, 191, 36, 0.20), rgba(217, 119, 6, 0.10));
    color: #fef3c7;
    border-color: rgba(251, 191, 36, 0.40);
    box-shadow:
        inset 0 1px 0 rgba(254, 243, 199, 0.30),
        0 0 16px -6px rgba(251, 191, 36, 0.50);
}
.hero-pill.is-bonus.is-waiting {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    color: var(--text-muted);
    border-color: var(--hair-200);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.bonus-pulse {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--amber-300);
    box-shadow: 0 0 6px rgba(252, 211, 77, 0.70);
    animation: dot-pulse 1.4s ease-in-out infinite;
}
.is-waiting .bonus-pulse {
    background: var(--text-muted);
    box-shadow: none;
    animation: none;
}

/* =====================================================================
   CONTENT
   ===================================================================== */
.content {
    margin: 14px 18px 18px;
    padding: 16px 22px 18px;
    overflow: hidden;
    background:
        radial-gradient(60% 70% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%),
        linear-gradient(180deg, rgba(17, 18, 34, 0.55), rgba(10, 12, 20, 0.65));
    border: 1px solid var(--hair-200);
    border-radius: 22px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(0, 0, 0, 0.40),
        0 12px 32px -12px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.content-head {
    margin-bottom: 14px;
    padding: 0 4px;
}
.content-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.4px;
}
.content-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.content-sub {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 500;
}

/* =====================================================================
   TABS
   ===================================================================== */
.tab {
    display: none;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
}
.tab.is-active {
    display: flex;
    animation: tab-fade 280ms var(--ease-out);
}
@keyframes tab-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* =====================================================================
   ROUTES — horizontal ticket rows
   ===================================================================== */
.route-grid {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 6px;
}

.route-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 22px;
    padding: 14px 14px 14px 18px;
    background:
        radial-gradient(70% 100% at 0% 0%, rgba(255, 255, 255, 0.09), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%),
        linear-gradient(180deg, rgba(31, 31, 56, 0.50), rgba(24, 24, 45, 0.60));
    border: 1px solid var(--hair-200);
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.30),
        0 4px 12px -4px rgba(0, 0, 0, 0.40);
    transition:
        transform 280ms var(--ease-out),
        border-color 280ms var(--ease-out),
        box-shadow 280ms var(--ease-out);
    animation: card-in 380ms var(--ease-out) both;
}
@keyframes card-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
.route-card:nth-child(1) { animation-delay:  40ms; }
.route-card:nth-child(2) { animation-delay:  80ms; }
.route-card:nth-child(3) { animation-delay: 120ms; }
.route-card:nth-child(4) { animation-delay: 160ms; }
.route-card:nth-child(5) { animation-delay: 200ms; }
.route-card:nth-child(6) { animation-delay: 240ms; }
.route-card:nth-child(n+7) { animation-delay: 280ms; }

.route-card:hover {
    transform: translateY(-2px);
    border-color: var(--hair-400);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.30),
        0 12px 28px -8px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 178, 198, 0.18),
        0 0 32px -8px rgba(255, 178, 198, 0.30);
}

.route-card.is-boosted {
    border-color: rgba(252, 211, 77, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(254, 243, 199, 0.20),
        inset 0 -1px 0 rgba(0, 0, 0, 0.30),
        0 4px 12px -4px rgba(0, 0, 0, 0.40),
        0 0 24px -6px rgba(251, 191, 36, 0.30);
}

.route-card.is-locked {
    opacity: 0.55;
    background:
        repeating-linear-gradient(135deg,
            rgba(255, 255, 255, 0.015) 0 8px,
            transparent 8px 16px),
        linear-gradient(180deg, rgba(24, 24, 45, 0.50), rgba(17, 18, 34, 0.55));
}
.route-card.is-locked:hover {
    transform: none;
    border-color: var(--hair-200);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 4px 12px -4px rgba(0, 0, 0, 0.40);
}

/* ----- route-head: icon spans 2 rows, title + cargo stack to the right ----- */
.route-head {
    display: flex; align-items: center; gap: 14px;
    min-width: 0;
}
.route-head > div:first-child {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 11px;
    row-gap: 5px;
    align-items: center;
    min-width: 0;
    flex: 1;
}
.route-title-wrap { display: contents; }
.route-title-wrap > i {
    grid-row: 1 / 3;
    grid-column: 1;
    align-self: center;
    display: inline-grid; place-items: center;
    width: 38px; height: 38px;
    color: var(--accent-200);
    font-size: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03) 60%),
        linear-gradient(180deg, rgba(255, 178, 198, 0.24), rgba(233, 99, 199, 0.08));
    border: 1px solid rgba(255, 178, 198, 0.32);
    border-radius: 12px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.30),
        inset 0 -1px 0 rgba(0, 0, 0, 0.20);
}
.route-title {
    grid-row: 1;
    grid-column: 2;
    align-self: end;
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.route-cargo {
    grid-row: 2;
    grid-column: 2;
    align-self: start;
    margin: 0;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px;
    font-size: 9.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hair-100);
    border-radius: var(--r-pill);
    text-transform: uppercase;
    letter-spacing: 1.1px;
    font-weight: 600;
    width: max-content;
    max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.route-cargo i { color: var(--text-muted); font-size: 9px; flex-shrink: 0; }

/* ----- route-badges: difficulty + boost ----- */
.route-badges {
    display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
    flex-shrink: 0;
}
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: var(--r-pill);
    border: 1px solid transparent;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.badge i { font-size: 9px; }
.badge.easy {
    color: var(--money-300);
    background: linear-gradient(180deg, rgba(230, 255, 163, 0.18), rgba(230, 255, 163, 0.04));
    border-color: rgba(230, 255, 163, 0.30);
}
.badge.medium {
    color: var(--amber-300);
    background: linear-gradient(180deg, rgba(252, 211, 77, 0.18), rgba(245, 158, 11, 0.04));
    border-color: rgba(252, 211, 77, 0.30);
}
.badge.hard {
    color: var(--red-300);
    background: linear-gradient(180deg, rgba(244, 113, 124, 0.18), rgba(220, 38, 38, 0.04));
    border-color: rgba(244, 113, 124, 0.30);
}

.boost-pill {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 3px 9px;
    background: linear-gradient(180deg, rgba(252, 211, 77, 0.22), rgba(245, 158, 11, 0.06));
    color: var(--amber-300);
    font-size: 9.5px;
    font-weight: 700;
    border: 1px solid rgba(252, 211, 77, 0.35);
    border-radius: var(--r-pill);
    box-shadow: inset 0 1px 0 rgba(254, 243, 199, 0.18);
}
.boost-pill i { font-size: 9px; }

/* ----- route-meta: payment + level inline, fixed-width for vertical alignment ----- */
.route-meta {
    display: grid;
    grid-template-columns: 112px 80px;
    gap: 16px;
    flex-shrink: 0;
    border: none;
    background: none;
}
.meta {
    display: flex; flex-direction: column; gap: 4px;
    padding: 0;
    background: none;
    align-items: flex-start;
    min-width: 0;
}
.meta + .meta::before { display: none; }
.meta-label {
    display: flex; align-items: center; gap: 5px;
    color: var(--text-muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}
.meta-label i { color: var(--text-muted); font-size: 8.5px; }
.meta-value {
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.35px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.meta-value.money {
    color: var(--money-400);
    text-shadow: 0 0 12px rgba(230, 255, 163, 0.25);
}

/* ----- route-foot: action button at far right ----- */
.route-foot {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    box-shadow: none;
}
.route-foot-left { display: flex; align-items: center; gap: 6px; }
.route-foot-left:empty { display: none; }

.completed-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px;
    background: linear-gradient(180deg, rgba(230, 255, 163, 0.16), rgba(230, 255, 163, 0.04));
    color: var(--money-300);
    border: 1px solid rgba(230, 255, 163, 0.28);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    border-radius: var(--r-pill);
}
.completed-pill i { font-size: 8.5px; }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--hair-200);
    border-radius: var(--r-btn);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 2px 4px rgba(0, 0, 0, 0.25);
    transition:
        background 200ms ease,
        border-color 200ms ease,
        transform 180ms var(--ease-out);
}
.btn:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
    border-color: var(--hair-300);
}
.btn:active { transform: scale(0.985); }

.btn-block { width: 100%; }

.btn-primary {
    position: relative;
    overflow: hidden;
    padding: 10px 18px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 30%, transparent 60%, rgba(0, 0, 0, 0.12) 100%),
        linear-gradient(180deg, var(--accent-400) 0%, var(--accent-600) 100%);
    border: 1px solid rgba(255, 178, 198, 0.65);
    font-weight: 700;
    letter-spacing: 0.1px;
    border-radius: var(--r-btn);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 rgba(0, 0, 0, 0.20),
        0 1px 2px rgba(0, 0, 0, 0.30),
        0 4px 12px -2px rgba(233, 99, 199, 0.45),
        0 8px 24px -8px rgba(233, 99, 199, 0.45);
    transition:
        background 220ms ease,
        transform 180ms var(--ease-out),
        box-shadow 220ms ease,
        filter 180ms ease;
}
.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.70),
        inset 0 -1px 0 rgba(0, 0, 0, 0.20),
        0 2px 4px rgba(0, 0, 0, 0.40),
        0 8px 18px -2px rgba(233, 99, 199, 0.55),
        0 16px 36px -10px rgba(233, 99, 199, 0.55);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.30),
        0 1px 2px rgba(0, 0, 0, 0.40);
}
.btn-primary:disabled {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    color: var(--text-muted);
    border-color: var(--hair-200);
    cursor: not-allowed;
    transform: none;
    filter: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-primary:disabled i { color: var(--text-dim); }

.route-foot .btn-primary,
.route-foot .btn-primary:disabled {
    min-width: 132px;
    padding: 10px 18px;
    font-size: 12px;
    border-radius: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-weight: 700;
}
.route-foot .btn-primary i { transition: transform 240ms var(--ease-out); }
.route-foot .btn-primary:hover i { transform: translateX(2px); }

.btn-quit {
    align-self: flex-end;
    margin-top: 12px;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--hair-100);
    border-radius: var(--r-pill);
    font-size: 11.5px;
    font-weight: 600;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.btn-quit i { font-size: 11px; }
.btn-quit:hover {
    color: var(--red-300);
    border-color: rgba(244, 113, 124, 0.30);
    background: rgba(244, 113, 124, 0.06);
}

/* =====================================================================
   HISTORY — ticket-style rows
   ===================================================================== */
.history-list {
    flex: 1;
    min-height: 0;
    display: flex; flex-direction: column; gap: 6px;
    overflow-y: auto;
    padding-right: 6px;
}
.history-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 70px 100px 60px;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--hair-100);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background 200ms ease, border-color 200ms ease;
    animation: card-in 280ms var(--ease-out) both;
}
.history-item:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border-color: var(--hair-300);
}
.h-ico {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    color: var(--accent-300);
    border: 1px solid var(--hair-200);
    border-radius: 10px;
    font-size: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.h-label {
    color: var(--text);
    font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    letter-spacing: -0.1px;
    font-size: 13px;
}
.xp-pill {
    justify-self: center;
    padding: 2px 9px;
    background: linear-gradient(180deg, rgba(255, 178, 198, 0.16), rgba(233, 99, 199, 0.04));
    color: var(--accent-200);
    border: 1px solid rgba(255, 178, 198, 0.30);
    border-radius: var(--r-pill);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.history-item .pay {
    justify-self: end;
    color: var(--money-400);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.history-item .ts {
    justify-self: end;
    color: var(--text-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.history-item .ts i { margin-right: 4px; font-size: 10px; }

.history-empty {
    grid-column: 1 / -1;
    padding: 44px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    border: 1px dashed var(--hair-200);
    border-radius: 16px;
}
.history-empty i {
    display: block;
    font-size: 28px;
    color: var(--text-dim);
    margin-bottom: 10px;
}

/* =====================================================================
   STATS — redesigned: hero + records + progression + routes
   ===================================================================== */
.stats-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-auto-rows: 1fr;
    gap: 12px;
    overflow-y: auto;
    padding-right: 6px;
}

.stat-block {
    position: relative;
    padding: 18px 20px;
    background:
        radial-gradient(70% 100% at 0% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%),
        linear-gradient(180deg, rgba(31, 31, 56, 0.50), rgba(24, 24, 45, 0.60));
    border: 1px solid var(--hair-200);
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.30),
        0 4px 14px -4px rgba(0, 0, 0, 0.40);
    display: flex; flex-direction: column;
    animation: card-in 360ms var(--ease-out) both;
    overflow: hidden;
}
.stat-block:nth-child(2) { animation-delay:  60ms; }
.stat-block:nth-child(3) { animation-delay: 120ms; }
.stat-block:nth-child(4) { animation-delay: 180ms; }

/* ===== Block header ===== */
.stat-block-head {
    display: flex; align-items: center; gap: 11px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hair-100);
}
.stat-block-head-ico {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px;
    color: var(--accent-200);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 60%),
        linear-gradient(180deg, rgba(255, 178, 198, 0.22), rgba(233, 99, 199, 0.06));
    border: 1px solid rgba(255, 178, 198, 0.32);
    border-radius: 10px;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.stat-block-head > div {
    display: flex; flex-direction: column; line-height: 1.15;
}
.stat-block-head strong {
    color: var(--text);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
}
.stat-block-head span {
    color: var(--text-muted);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 600;
    margin-top: 1px;
}

/* ===== Hero block — total earnings ===== */
.stat-hero {
    grid-column: 1;
    grid-row: 1;
    padding: 22px 24px;
}
.stat-hero-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.stat-hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-weight: 700;
}
.stat-hero-tag i {
    color: var(--money-400);
    font-size: 12px;
}
.stat-hero-chip {
    padding: 3px 10px;
    background: linear-gradient(180deg, rgba(255, 178, 198, 0.14), rgba(233, 99, 199, 0.04));
    color: var(--accent-200);
    border: 1px solid rgba(255, 178, 198, 0.28);
    border-radius: var(--r-pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
}
.stat-hero-value {
    font-family: var(--font-display);
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -1.4px;
    line-height: 1;
    color: var(--money-400);
    text-shadow: 0 0 22px rgba(230, 255, 163, 0.28);
    margin-bottom: 22px;
    font-variant-numeric: tabular-nums;
}
.stat-hero-value .cur {
    color: var(--money-300);
    font-size: 28px;
    font-weight: 700;
    margin-right: 4px;
    vertical-align: 6px;
    opacity: 0.85;
}
.stat-hero-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--hair-100);
}
.stat-inline {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--hair-100);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.stat-inline-ico {
    display: inline-grid; place-items: center;
    width: 30px; height: 30px;
    color: var(--accent-300);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--hair-200);
    border-radius: 9px;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.stat-inline-body {
    display: flex; flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}
.stat-inline-body strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.4px;
    font-variant-numeric: tabular-nums;
}
.stat-inline-body em {
    font-style: normal;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    margin-left: 1px;
}
.stat-inline-body span {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    margin-top: 2px;
}

/* ===== Records block ===== */
.stat-records {
    grid-column: 2;
    grid-row: 1;
}

/* ===== Progression block ===== */
.stat-progression {
    grid-column: 1;
    grid-row: 2;
}
.stat-prog-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.stat-prog-level {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--text-soft);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 700;
}
.stat-prog-level strong {
    color: var(--accent-200);
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    margin-left: 4px;
}
.stat-prog-xp {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
}
.stat-prog-bar {
    position: relative;
    height: 8px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: var(--r-pill);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55);
    margin-bottom: 12px;
}
#stat-xp-fill {
    display: block;
    height: 100%;
    width: 0%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, var(--accent-600), var(--accent-400) 60%, var(--accent-200));
    border-radius: var(--r-pill);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.40),
        0 0 12px rgba(255, 178, 198, 0.40);
    transition: width 700ms var(--ease-out);
}
.stat-prog-foot {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--hair-100);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 500;
}
.stat-prog-foot strong {
    color: var(--text);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 13px;
}

/* ===== Routes block ===== */
.stat-routes {
    grid-column: 2;
    grid-row: 2;
}

/* ===== Shared list rows (Records + Routes) ===== */
.stat-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
    flex: 1;
}
.stat-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 0;
    border-bottom: 1px dashed var(--hair-100);
}
.stat-list li:last-child { border-bottom: none; }
.stat-list-label {
    color: var(--text-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    font-weight: 600;
}
.stat-list-value {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.4px;
    font-variant-numeric: tabular-nums;
}
.stat-list-value.money {
    color: var(--money-400);
    font-family: var(--font-mono);
}
.stat-list-value .cur {
    color: var(--money-300);
    font-weight: 700;
    margin-right: 1px;
    opacity: 0.85;
}

/* Responsive — collapse to single column at narrow widths */
@media (max-width: 880px) {
    .stats-layout { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .stat-hero, .stat-records, .stat-progression, .stat-routes {
        grid-column: 1; grid-row: auto;
    }
}

/* =====================================================================
   RANKING
   ===================================================================== */
.ranking-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 14px;
    padding: 0 4px;
}
.ranking-head h2,
.ranking-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.4px;
}
.ranking-list {
    flex: 1;
    min-height: 0;
    display: flex; flex-direction: column; gap: 5px;
    overflow-y: auto;
    padding-right: 6px;
}
.ranking-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 64px 80px 80px 110px;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--hair-100);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
    animation: card-in 260ms var(--ease-out) both;
}
.ranking-row.is-self {
    background:
        linear-gradient(180deg, rgba(255, 178, 198, 0.10), rgba(233, 99, 199, 0.02)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
    border-color: rgba(255, 178, 198, 0.30);
    box-shadow:
        inset 0 1px 0 rgba(255, 249, 203, 0.18),
        0 0 18px -6px rgba(255, 178, 198, 0.35);
}
.ranking-self-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--hair-200);
}
.ranking-pos {
    display: inline-grid; place-items: center;
    width: 30px; height: 30px;
    background: rgba(0, 0, 0, 0.30);
    color: var(--text);
    border: 1px solid var(--hair-200);
    border-radius: 9px;
    font-weight: 800;
    font-size: 12.5px;
    font-family: var(--font-mono);
}
.ranking-row[data-rank="1"] .ranking-pos {
    color: #1a1208;
    background: linear-gradient(180deg, var(--amber-300), var(--amber-500));
    border-color: rgba(252, 211, 77, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.ranking-row[data-rank="2"] .ranking-pos {
    color: #1a1c25;
    background: linear-gradient(180deg, #e5e7eb, #9ca3af);
    border-color: rgba(229, 231, 235, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.ranking-row[data-rank="3"] .ranking-pos {
    color: #2a1a0d;
    background: linear-gradient(180deg, #fdba74, #c2410c);
    border-color: rgba(253, 186, 116, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.40);
}
.ranking-name {
    color: var(--text);
    font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    letter-spacing: -0.1px;
    display: inline-flex; align-items: center; gap: 8px;
}
.ranking-self-pill {
    padding: 1px 7px;
    background: linear-gradient(180deg, rgba(255, 178, 198, 0.18), rgba(233, 99, 199, 0.04));
    color: var(--accent-200);
    border: 1px solid rgba(255, 178, 198, 0.32);
    border-radius: var(--r-pill);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.ranking-cell {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 1px;
    color: var(--text);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}
.ranking-cell strong { font-weight: 700; letter-spacing: -0.2px; }
.ranking-cell-label {
    color: var(--text-muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}
.ranking-cell.earned strong { color: var(--money-400); font-family: var(--font-mono); }

.ranking-empty {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-muted);
    font-size: 13px;
}
.ranking-empty i {
    display: block;
    font-size: 30px;
    color: var(--text-dim);
    margin-bottom: 10px;
}

/* =====================================================================
   SETTINGS / INFO
   ===================================================================== */
.settings {
    flex: 1;
    min-height: 0;
    display: flex; flex-direction: column; gap: 6px;
    overflow-y: auto;
    padding-right: 6px;
}
.setting-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 13px 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--hair-100);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: border-color 180ms ease, background 180ms ease;
    animation: card-in 260ms var(--ease-out) both;
}
.setting-row:hover {
    border-color: var(--hair-300);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}
.setting-info {
    display: flex; align-items: flex-start; gap: 12px;
    flex: 1;
}
.setting-ico {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    color: var(--accent-300);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--hair-200);
    border-radius: 10px;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.setting-info strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.1px;
}
.setting-info p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.5;
}
.setting-value {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.setting-value.muted { color: var(--text-muted); }

/* =====================================================================
   TOASTS
   ===================================================================== */
.toasts {
    position: fixed;
    top: 22px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    z-index: 100;
    pointer-events: none;
}
.toast {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 11px 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.02) 100%),
        linear-gradient(180deg, rgba(24, 24, 45, 0.85), rgba(17, 18, 34, 0.92));
    border: 1px solid var(--hair-300);
    border-radius: 14px;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 8px 24px -6px rgba(0, 0, 0, 0.55);
    animation: toast-in 280ms var(--ease-spring);
    max-width: 340px;
    pointer-events: auto;
}
.toast i { font-size: 14px; flex-shrink: 0; }
.toast.success { border-color: rgba(230, 255, 163, 0.40); }
.toast.success i { color: var(--money-400); }
.toast.error { border-color: rgba(244, 113, 124, 0.40); }
.toast.error i { color: var(--red-400); }
.toast.warning { border-color: rgba(252, 211, 77, 0.40); }
.toast.warning i { color: var(--amber-400); }
.toast.info i { color: var(--accent-300); }
.toast.out { animation: toast-out 240ms ease forwards; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-16px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translateY(-16px); }
}

/* =====================================================================
   WORLD ICON
   ===================================================================== */
#world-icon {
    position: fixed;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    z-index: 30;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    transition: opacity 240ms ease, transform 320ms var(--ease-spring);
}
#world-icon.wi-show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.wi-card {
    position: relative;
    width: 46px; height: 46px;
    display: grid; place-items: center;
    background:
        radial-gradient(80% 100% at 0% 0%, rgba(255, 255, 255, 0.20), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(24, 24, 45, 0.78), rgba(17, 18, 34, 0.88));
    border: 1px solid var(--hair-300);
    border-radius: 50%;
    color: var(--accent-200);
    font-size: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 6px 16px rgba(0, 0, 0, 0.55),
        0 0 16px -4px rgba(255, 178, 198, 0.35);
}
.wi-shine, .wi-pulse { display: none; }
.wi-arrow {
    color: var(--text);
    font-size: 12px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

/* =====================================================================
   PROGRESS
   ===================================================================== */
#progress {
    position: fixed;
    left: 50%; bottom: 110px;
    transform: translateX(-50%);
    z-index: 30;
    pointer-events: none;
    animation: panel-in 240ms ease-out;
}
@keyframes panel-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#progress.hidden { display: none; }
.pg-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(24, 24, 45, 0.85), rgba(17, 18, 34, 0.92));
    border: 1px solid var(--hair-300);
    border-radius: 16px;
    min-width: 340px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        var(--shadow-float);
}
.pg-ring {
    position: relative;
    width: 44px; height: 44px;
    flex-shrink: 0;
}
.pg-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pg-ring-track { fill: none; stroke: rgba(255, 255, 255, 0.10); stroke-width: 4; }
.pg-ring-fill {
    fill: none;
    stroke: url(#pgRingGrad);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 119.4;
    stroke-dashoffset: 119.4;
    transition: stroke-dashoffset 240ms var(--ease-out);
}
.pg-ring-ico {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex; align-items: center; justify-content: center;
    width: auto; height: auto;
    line-height: 1;
    color: var(--accent-300);
    font-size: 14px;
    pointer-events: none;
}
.pg-text { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.pg-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.1px;
}
.pg-bar {
    position: relative;
    height: 4px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: var(--r-pill);
    overflow: hidden;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.50);
}
.pg-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-500), var(--accent-300));
    transition: width 180ms var(--ease-out);
    border-radius: var(--r-pill);
}
.pg-meta {
    display: flex; justify-content: space-between;
    font-size: 10.5px;
    color: var(--text-muted);
}
.pg-step { font-weight: 600; }
.pg-pct { color: var(--accent-300); font-weight: 700; }

/* =====================================================================
   INTERACT PROMPT
   ===================================================================== */
#interact-prompt {
    position: fixed;
    left: 50%; bottom: 18%;
    transform: translateX(-50%) translateY(8px);
    z-index: 30;
    pointer-events: none;
    opacity: 0;
    transition: opacity 240ms ease, transform 240ms var(--ease-out);
}
#interact-prompt.ip-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ip-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px 10px 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(24, 24, 45, 0.85), rgba(17, 18, 34, 0.92));
    border: 1px solid var(--hair-300);
    border-radius: var(--r-pill);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 8px 24px -6px rgba(0, 0, 0, 0.55);
}
.ip-shine { display: none; }
.ip-key {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px;
    background: linear-gradient(180deg, #ffffff, #d4d9e4);
    color: #0a0c13;
    border-radius: 9px;
    font-weight: 800;
    font-size: 12px;
    font-family: var(--font-mono);
    box-shadow:
        inset 0 -2px 0 rgba(0, 0, 0, 0.18),
        0 1px 2px rgba(0, 0, 0, 0.40);
}
.ip-divider { width: 1px; height: 20px; background: var(--hair-300); }
.ip-text { display: flex; flex-direction: column; gap: 1px; }
.ip-label {
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: -0.1px;
}
.ip-hint {
    color: var(--text-muted);
    font-size: 10.5px;
}

/* =====================================================================
   DELIVERY PAPER
   ===================================================================== */
#delivery-paper {
    position: fixed; inset: 0;
    display: grid; place-items: center;
    background: rgba(6, 8, 14, 0.72);
    z-index: 60;
    opacity: 0;
    transition: opacity 280ms var(--ease-out);
}
#delivery-paper.hidden { display: none; }
#delivery-paper.show { opacity: 1; }
.paper {
    position: relative;
    width: 88vw;
    max-width: 540px;
    padding: 28px 32px;
    background: linear-gradient(180deg, #f8f1de 0%, #f1e6c8 100%);
    color: #2a221a;
    border-radius: 4px;
    box-shadow:
        0 30px 60px -16px rgba(0, 0, 0, 0.55),
        0 60px 120px -32px rgba(0, 0, 0, 0.70);
    transform: rotate(-1deg) translateY(20px);
    opacity: 0;
    transition: transform 320ms var(--ease-out), opacity 280ms ease;
}
#delivery-paper.show .paper { transform: rotate(-1deg) translateY(0); opacity: 1; }
.paper-tape {
    position: absolute;
    top: -14px;
    width: 80px; height: 22px;
    background: rgba(180, 160, 120, 0.45);
    border: 1px solid rgba(120, 100, 70, 0.25);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.paper-tape-l { left: 16%; transform: rotate(-4deg); }
.paper-tape-r { right: 16%; transform: rotate(3deg); }
.paper-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 2px solid #2a221a;
    margin-bottom: 18px;
}
.paper-brand { display: flex; align-items: center; gap: 10px; }
.paper-brand-mark {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px;
    background: #2a221a;
    color: #f8f1de;
    border-radius: 4px;
    font-size: 18px;
}
.paper-brand-text strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #1f1d18;
}
.paper-brand-text span {
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #6b5e48;
    margin-top: 2px;
}
.paper-doc {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #6b5e48;
}
.paper-doc strong {
    display: block;
    font-size: 16px;
    color: #1f1d18;
    margin-top: 2px;
}
.paper-body { display: flex; flex-direction: column; gap: 10px; }
.paper-row {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 14px;
}
.paper-row strong {
    color: #1f1d18;
    font-weight: 700;
    text-align: right;
    font-size: 14px;
}
.paper-label {
    display: inline-flex; align-items: center; gap: 6px;
    color: #6b5e48;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}
.paper-label i { color: #8a7a5e; font-size: 10px; }
.paper-label-strong { color: #1f1d18; }
.paper-row-split {
    display: flex; gap: 24px;
    border-top: 1px dashed rgba(60, 50, 30, 0.30);
    border-bottom: 1px dashed rgba(60, 50, 30, 0.30);
    padding: 10px 0;
}
.paper-row-split > div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.paper-row-split strong { font-size: 13px; text-align: left; }
.paper-divider { height: 1px; background: rgba(60, 50, 30, 0.20); margin: 4px 0; }
.paper-breakdown {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 12px;
    background: rgba(60, 50, 30, 0.06);
    border-radius: 4px;
    font-size: 12px;
    color: #4a3f2e;
}
.paper-breakdown:empty { display: none; }
.paper-row-total {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 2px solid #2a221a;
    align-items: center;
}
.paper-money {
    font-size: 22px !important;
    font-weight: 800;
    color: #047857 !important;
    font-family: var(--font-mono);
}
.paper-foot {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: flex-end;
    margin-top: 22px;
}
.paper-sig { position: relative; min-height: 56px; display: flex; flex-direction: column; }
.paper-sig-svg { width: 100%; height: 48px; margin-bottom: -4px; }
.paper-sig.signed .paper-sig-path { animation: sig-draw 1.1s ease-out forwards; }
@keyframes sig-draw { to { stroke-dashoffset: 0; } }
.paper-sig-line { display: block; height: 1px; background: #2a221a; }
.paper-sig-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #6b5e48;
    text-align: center;
    margin-top: 4px;
}
.paper-actions { display: flex; gap: 8px; }
.paper-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: background 180ms ease, transform 180ms ease;
}
.paper-btn-ghost {
    background: transparent;
    color: #6b5e48;
    border-color: rgba(60, 50, 30, 0.28);
}
.paper-btn-ghost:hover { background: rgba(60, 50, 30, 0.06); color: #1f1d18; }
.paper-btn-primary {
    background: linear-gradient(180deg, #2a221a, #1a140f);
    color: #f8f1de;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.30);
}
.paper-btn-primary:hover {
    background: linear-gradient(180deg, #3a2e22, #28201a);
    transform: translateY(-1px);
}
.paper-btn-primary:active { transform: translateY(0); }
.paper-stamp {
    position: absolute;
    top: 30%; right: 8%;
    color: #b91c1c;
    border: 3px solid #b91c1c;
    padding: 6px 16px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    transform: rotate(-12deg) scale(0.4);
    opacity: 0;
    pointer-events: none;
    border-radius: 4px;
    background: rgba(185, 28, 28, 0.04);
}
.paper.stamped .paper-stamp { animation: stamp-in 320ms var(--ease-spring) forwards; }
@keyframes stamp-in {
    0%   { opacity: 0; transform: rotate(-12deg) scale(2); }
    60%  { opacity: 1; transform: rotate(-12deg) scale(0.85); }
    100% { opacity: 1; transform: rotate(-12deg) scale(1); }
}

/* =====================================================================
   LEVEL-UP BURST
   ===================================================================== */
#levelup {
    position: fixed;
    left: 50%; top: 24%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
    z-index: 40;
    pointer-events: none;
    transition: opacity 240ms ease, transform 320ms var(--ease-spring);
}
#levelup.hidden { display: none; }
#levelup.show { opacity: 1; transform: translateX(-50%) scale(1); }
.lu-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
        linear-gradient(180deg, rgba(24, 24, 45, 0.85), rgba(17, 18, 34, 0.92));
    border: 1px solid rgba(255, 178, 198, 0.50);
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        var(--shadow-float),
        0 0 36px -4px rgba(255, 178, 198, 0.45);
}
.lu-shine { display: none; }
.lu-icon {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px;
    background: linear-gradient(180deg, var(--accent-300), var(--accent-600));
    color: #fff;
    border-radius: 50%;
    font-size: 17px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 2px 4px rgba(0, 0, 0, 0.40);
}
.lu-text { display: flex; flex-direction: column; gap: 1px; }
.lu-tag {
    color: var(--accent-200);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 700;
}
.lu-value {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

/* =====================================================================
   HUD (in-job)
   ===================================================================== */
.hud {
    position: fixed;
    right: 20px; top: 64px;
    width: 320px;
    z-index: 20;
    animation: hud-slide 320ms var(--ease-out);
}
.hud.hidden { display: none; }
@keyframes hud-slide {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: none; }
}
.hud-card {
    padding: 14px 16px;
    background:
        radial-gradient(70% 100% at 0% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
        linear-gradient(180deg, rgba(24, 24, 45, 0.92), rgba(17, 18, 34, 0.95));
    border: 1px solid var(--hair-300);
    border-radius: 16px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        var(--shadow-float);
}
.hud-shine { display: none; }
.hud-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 11px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--hair-100);
}
.hud-label {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--text-muted);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-weight: 700;
}
.hud-label i { font-size: 10px; color: var(--accent-300); }
.hud-row strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    max-width: 200px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    letter-spacing: -0.2px;
}
.hud-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}
.hud-stat {
    padding: 9px 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--hair-100);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.hud-stat-label {
    display: flex; align-items: center; gap: 4px;
    color: var(--text-muted);
    font-size: 8.5px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    margin-bottom: 4px;
}
.hud-stat-label i { color: var(--text-dim); font-size: 8.5px; }
.hud-stat-value {
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.hud-stat-value.money { color: var(--money-400); }
.hud-stat-value em {
    font-style: normal;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    margin-left: 2px;
}
.hud-bar {
    position: relative;
    height: 5px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: var(--r-pill);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.50);
}
.hud-bar-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-500), var(--accent-300));
    border-radius: var(--r-pill);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
    transition: width 320ms var(--ease-out);
}
.hud-foot {
    display: flex; justify-content: space-between; align-items: center;
    color: var(--text-soft);
    font-size: 11.5px;
    padding-top: 8px;
    border-top: 1px solid var(--hair-100);
}
.hud-foot i { color: var(--text-muted); margin-right: 5px; font-size: 10.5px; }
.hud-level {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 9px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--hair-100);
}
.hud-level-label {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
}
.hud-level-label i { font-size: 10px; color: var(--accent-400); }
.hud-level-label strong { color: var(--text); }
.hud-level-bar {
    position: relative;
    height: 4px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: var(--r-pill);
    overflow: hidden;
}
.hud-level-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-500), var(--accent-300));
    border-radius: var(--r-pill);
    transition: width 460ms var(--ease-out);
}
.hud-level-xp {
    color: var(--text-muted);
    font-size: 10px;
    font-family: var(--font-mono);
}

/* =====================================================================
   SCROLLBARS
   ===================================================================== */
.route-grid::-webkit-scrollbar,
.history-list::-webkit-scrollbar,
.stats-layout::-webkit-scrollbar,
.ranking-list::-webkit-scrollbar,
.settings::-webkit-scrollbar {
    width: 6px;
}
.route-grid::-webkit-scrollbar-track,
.history-list::-webkit-scrollbar-track,
.stats-layout::-webkit-scrollbar-track,
.ranking-list::-webkit-scrollbar-track,
.settings::-webkit-scrollbar-track {
    background: transparent;
}
.route-grid::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.stats-layout::-webkit-scrollbar-thumb,
.ranking-list::-webkit-scrollbar-thumb,
.settings::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.10);
    border-radius: var(--r-pill);
}
.route-grid::-webkit-scrollbar-thumb:hover,
.history-list::-webkit-scrollbar-thumb:hover,
.stats-layout::-webkit-scrollbar-thumb:hover,
.ranking-list::-webkit-scrollbar-thumb:hover,
.settings::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}
