:root {
    /* ── Z-INDEX SCALE (layer coerenti, anti-collisione overlay) ── */
    --z-map:        400;
    --z-dropdown:   1000;
    --z-sticky:     1500;
    --z-alert:      6000;
    --z-backdrop:   8000;
    --z-modal:      9000;   /* modali bloccanti */
    --z-cmdpalette: 9300;   /* command palette */
    --z-spotlight:  9500;   /* tutorial */
    --z-takeover:   9800;   /* takeover a schermo intero: capitalism, lightbox */
    --z-toast:      9900;   /* notifiche, sempre in cima */
    /* ── MIDNIGHT EMPIRE THEME ── */
    --gold:        #d4af37;
    --gold-light:  #f0d060;
    --gold-dim:    rgba(212,175,55,0.12);
    --gold-border: rgba(212,175,55,0.28);
    --topbar:      #080b12;
    --nav:         #080b12;
    --nav-dark:    #060810;
    --bg:          #0a0c12;
    --bg2:         #0e111a;
    --bg3:         #0c0f18;
    --panel:       #0a0c12;
    --card:        rgba(255,255,255,0.05);
    --card-border: rgba(255,255,255,0.08);
    --sidebar-w:   160px;
    --topbar-h:    42px;
    --border:      rgba(255,255,255,0.08);
    --border-sub:  rgba(255,255,255,0.06);
    --border-gold: rgba(212,175,55,0.28);
    --shadow-sm:   0 1px 4px rgba(0,0,0,0.4);
    --shadow-md:   0 4px 16px rgba(0,0,0,0.5);
    --text:        #f0f4ff;
    --text-muted:  rgba(240,244,255,0.50);
    --text-dim:    rgba(240,244,255,0.28);
    /* ── accent colors ─ */
    --blue:        #00f2ff;
    --blue-dim:    rgba(0,242,255,0.12);
    --red:         #ef4444;
    --red-dim:     rgba(239,68,68,0.12);
    --green:       #22c55e;
    --green-dim:   rgba(34,197,94,0.12);
    --orange:      #f59e0b;
    --purple:      #a78bfa;
    --surface:     rgba(255,255,255,0.04);
    --surface2:    rgba(255,255,255,0.07);
    --glow-gold:   0 0 20px rgba(212,175,55,0.18);
    --glow-blue:   0 0 20px rgba(0,242,255,0.15);
    --glow-green:  0 0 16px rgba(34,197,94,0.15);
    --glow-red:    0 0 16px rgba(239,68,68,0.18);
    --sp-xs:  4px; --sp-sm: 8px; --sp-md: 12px;
    --sp-lg: 16px; --sp-xl: 24px; --sp-2xl: 32px;
    --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;
    --font-mono:    'Roboto Mono', monospace;
    --font-display: 'Orbitron', sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;
    --ease-fast:  0.12s ease;
    --ease-std:   0.20s ease;
    --ease-slow:  0.35s ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-fade-in { animation: tabFadeIn 0.18s ease-out forwards; }

@keyframes tut-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
  50%     { box-shadow: 0 0 0 4px rgba(34,197,94,0.20); }
}

body {
    font-family: 'Inter', 'Open Sans', Arial, Helvetica, sans-serif;
    background: #0a0c12;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* Clean typography — no text-shadow on content (kills readability) */
#main-panel, header, nav { text-shadow: none; }
.font-mono { font-family: 'Roboto Mono', monospace; }
.font-display { font-family: 'Montserrat', sans-serif !important; font-weight: 700 !important; }

/* ── Pannello principale e header: sempre leggibili ──────── */
#main-panel {
    background: var(--panel) !important;
}

/* ── hud-card: più visibili ──────────────────────────────── */

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.22); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.38); }

/* ── Map Overlay ─────────────────────────────────────── */
#map-overlay {
    display: none;
    background: #050510;
}
#map-overlay:not(.hidden) { display: flex; flex-direction: column; }
#map2d-root { flex: 1; position: relative; min-height: 0; }

/* ── Top Navigation Bar — steel-blue eRepublik style ─── */
.top-nav-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 0 14px; height: 100%;
    font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.75);
    background: none; border: none; cursor: pointer;
    position: relative; white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
    border-bottom: 3px solid transparent;
    letter-spacing: 0.02em;
}
.top-nav-btn:hover { color: #ffffff; background: rgba(0,0,0,0.15); }
.top-nav-btn.active { color: #ffffff; border-bottom-color: #7fc8e8; background: rgba(0,0,0,0.12); }

.nav-cat {
    position: relative;
    display: flex; align-items: stretch;
}
.nav-cat:hover > .top-nav-btn { color: #ffffff; background: rgba(255,255,255,0.08); }

.nav-drop {
    display: none;
    position: absolute; top: 100%; left: 0;
    min-width: 200px;
    background: #1e3d55;
    border: 1px solid rgba(0,0,0,0.25);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    z-index: 9999;
    padding: 6px 0;
}
.nav-cat:hover .nav-drop { display: block; }

.nav-drop-item {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 8px 16px;
    font-size: 11px; color: rgba(255,255,255,0.65);
    background: none; border: none; cursor: pointer;
    transition: all 0.12s ease; text-align: left;
}
.nav-drop-item:hover {
    background: rgba(255,255,255,0.06);
    color: #ffffff; padding-left: 22px;
}

.nav-drop-divider {
    height: 1px; background: rgba(255,255,255,0.08); margin: 4px 0;
}

.nav-arrow { font-size: 8px; opacity: 0.45; margin-left: 2px; }

.nav-notif {
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px;
    background: #ef4444; color: #fff;
    border-radius: 50%; font-size: 8px; font-weight: 800;
    margin-left: 4px; flex-shrink: 0;
}
.nav-notif.hidden { display: none !important; }

/* ── Sidebar Nav (legacy, keep for any remaining refs) ── */
.nav-btn {
    width: 60px; height: 60px;
    background: rgba(6, 6, 18, 0.92);
    border: 1px solid rgba(0,242,255,0.18);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: #667;
    transition: all 0.18s ease;
    position: relative;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.nav-btn:hover {
    border-color: var(--blue); color: var(--blue);
    transform: translateX(3px);
    box-shadow: 0 0 12px rgba(0,242,255,0.2);
}
.nav-btn.active {
    background: rgba(0,242,255,0.12); border-color: var(--blue); color: var(--blue);
    box-shadow: 0 0 20px rgba(0,242,255,0.35), inset 0 0 10px rgba(0,242,255,0.08);
}
.nav-btn[data-title]:hover::after {
    content: attr(data-title);
    position: absolute; left: 76px;
    background: #050510; color: #e0e0ff;
    padding: 7px 12px; border-radius: 8px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
    border: 1px solid rgba(0,242,255,0.3);
    pointer-events: none; z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
    animation: fadeIn 0.18s ease-out forwards;
}

/* ── HUD Cards ────────────────────────────────────────── */
.hud-card {
    background: var(--bg2);
    border: 1px solid var(--border-sub);
    border-radius: 12px; padding: 12px;
    transition: all 0.18s ease;
}
.hud-card:hover {
    border-color: rgba(74,222,128,0.35);
    background: rgba(74,222,128,0.05);
    box-shadow: 0 0 12px rgba(74,222,128,0.1);
}
.hud-card.active-card {
    border-color: rgba(74,222,128,0.5) !important;
    background: rgba(74,222,128,0.08) !important;
}

/* ── POI Markers (custom HTML) ───────────────────────── */
.poi-marker {
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.8); cursor: pointer;
    transition: transform 0.15s ease;
}
.poi-marker:hover { transform: scale(1.7); }
.poi-marker.hub    { width:13px; height:13px; background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.7); }
.poi-marker.luxury { background: #d4af37; box-shadow: 0 0 8px rgba(212,175,55,0.9); }
.poi-marker.city   { background: rgba(255,255,255,0.85); }
.poi-marker.locked { background: #2a2a3a; opacity: 0.35; border-color: #111; }


/* ── Car Arrow ────────────────────────────────────────── */
.car-arrow {
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 15px solid var(--blue);
    filter: drop-shadow(0 0 5px var(--blue)) drop-shadow(0 0 10px rgba(0,242,255,0.6));
    transform-origin: 50% 100%;
    transition: none !important;
}
.car-marker-wrap { display: flex; align-items: center; justify-content: center; z-index: 9999; }
.car-marker-wrap.waiting .car-arrow {
    border-bottom-color: #22c55e;
    filter: drop-shadow(0 0 5px #22c55e) drop-shadow(0 0 10px rgba(34,197,94,0.6));
    animation: car-waiting-pulse 1.4s ease-in-out infinite;
}
@keyframes car-waiting-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ── Cantieri marker ─────────────────────────────────── */
.cantiere-marker {
    width: 10px; height: 10px; border-radius: 2px;
    background: #f59e0b; border: 2px solid #92400e;
    box-shadow: 0 0 6px rgba(245,158,11,0.7);
    animation: cantierePulse 1.5s ease-in-out infinite;
}
@keyframes cantierePulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── Notifications ───────────────────────────────────── */
.notif {
    padding: 12px 22px; border-radius: 10px;
    background: rgba(22,40,70,0.98);
    border-left: 3px solid var(--green);
    color: #f1f5f9; font-size: 13px; font-weight: 600;
    animation: slideUp 0.28s ease-out forwards;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
}
.notif.error-notif { border-left-color: var(--red); }

/* ── Progress Bars ───────────────────────────────────── */
.ride-progress-bg {
    width: 100%; height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px; overflow: hidden; margin-top: 7px;
}
.ride-progress-fill {
    height: 100%; background: var(--blue); width: 0%;
    transition: width 0.15s linear;
    box-shadow: 0 0 6px var(--blue);
}

/* ── Fatigue / Generic Bars ─────────────────────────── */
/* ── Driver Avatar ───────────────────────────────────── */
.driver-avatar {
    width: 2.4rem; height: 2.4rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(212,175,55,0.4);
    cursor: pointer; flex-shrink: 0;
    transition: border-color 0.2s;
}
.driver-avatar:hover { border-color: rgba(212,175,55,0.8); }
.driver-avatar-placeholder {
    width: 2.4rem; height: 2.4rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1.5px dashed rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer; flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}
.driver-avatar-placeholder:hover { border-color: rgba(212,175,55,0.5); background: rgba(212,175,55,0.06); }

.fatigue-bar-bg {
    width: 100%; height: 3px;
    background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden;
}
.fatigue-bar-fill { height: 100%; transition: width 0.4s ease; }

/* ── XP Bars ─────────────────────────────────────────── */
.xp-bar-bg {
    width: 100%; height: 2px;
    background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; margin-top: 3px;
}
.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f2ff, #0066ff);
    box-shadow: 0 0 4px #00f2ff;
    transition: width 0.5s ease;
}

/* ── Fuel / Tire Bars ────────────────────────────────── */
.fuel-bar-bg {
    width: 100%; height: 3px;
    background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden;
}
.fuel-bar-fill { height: 100%; transition: width 0.4s ease; border-radius: 3px; }

/* ── Drag & Drop ─────────────────────────────────────── */
.driver-card.dragging-over { background: rgba(0,242,255,0.08) !important; border-color: rgba(0,242,255,0.4) !important; }

/* ── Buttons ─────────────────────────────────────────── */
/* Global press-feedback micro-interaction (eRepublik flat).
   Systematic scale(0.97) on press for every <button> across tabs,
   modals and overlays, so individual call-sites don't each need an
   inline onmousedown handler. Inline transform handlers still win by
   specificity; map controls are excluded; reduced-motion is honored. */
button { transition: transform .09s ease, opacity .15s ease; }
button:active:not(:disabled) { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { button:active { transform: none !important; } }

.btn-blue {
    background: rgba(0,242,255,0.12); color: var(--blue); font-weight: 700;
    padding: 7px 13px; border-radius: 8px; cursor: pointer;
    text-transform: uppercase; font-size: 10px; transition: 0.18s;
    border: 1px solid rgba(0,242,255,0.3);
}
.btn-blue:hover {
    background: rgba(0,242,255,0.22); border-color: var(--blue);
    box-shadow: 0 0 10px rgba(0,242,255,0.25);
    transform: translateY(-1px);
}
.btn-gold {
    background: var(--gold); color: #000; font-weight: 700;
    padding: 7px 13px; border-radius: 8px; cursor: pointer;
    text-transform: uppercase; font-size: 10px; transition: 0.18s; border: none;
}
.btn-gold:hover { background: #eed575; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(212,175,55,0.2); }
.btn-green {
    background: #27ae60; color: #fff; font-weight: 700;
    padding: 7px 13px; border-radius: 8px; cursor: pointer;
    text-transform: uppercase; font-size: 10px; transition: 0.18s; border: none;
}
.btn-green:hover { background: #219a52; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(39,174,96,0.3); }

/* ── Driver Store ────────────────────────────────────────── */
.store-item-title       { font-size: 1.05rem !important; font-weight: 700; color: #ffffff; line-height: 1.2; }
.store-item-description { font-size: 0.85rem !important; color: #e2e8f0; line-height: 1.4; margin-top: 2px; }
.store-buy-button       { padding: 10px 16px !important; font-weight: 700 !important; font-size: 0.88rem !important; white-space: nowrap; }

/* ── Weather Overlay ─────────────────────────────────── */
#weather-overlay { transition: opacity 2s ease, background 2s ease; opacity: 0; }
#weather-overlay.weather-rain  { opacity: 1; background: linear-gradient(180deg, rgba(0,80,200,0.09), rgba(0,40,180,0.16)); animation: rainPulse 4s ease-in-out infinite; }
#weather-overlay.weather-snow  { opacity: 1; background: linear-gradient(180deg, rgba(180,220,255,0.07), rgba(160,200,255,0.13)); }
#weather-overlay.weather-storm { opacity: 1; background: linear-gradient(180deg, rgba(0,40,120,0.18), rgba(0,20,80,0.28)); animation: rainPulse 2s ease-in-out infinite; }
#weather-overlay.weather-fog   { opacity: 1; background: radial-gradient(ellipse at center, rgba(100,130,180,0.12), rgba(60,80,120,0.07)); }

/* ── News Ticker ─────────────────────────────────────── */
#news-ticker-wrap {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: #1a2f4a; border-top: 1px solid rgba(255,255,255,0.12);
    padding: 5px 0; overflow: hidden; pointer-events: none;
}
#news-ticker-track {
    display: flex; gap: 80px; white-space: nowrap;
    animation: tickerScroll 70s linear infinite;
    font-size: 11px; color: rgba(255,255,255,0.65); font-family: 'Inter', sans-serif; font-weight: 500;
}
#news-ticker-track span { flex-shrink: 0; }
#news-ticker-track span::before { content: '◆  '; color: #4ade80; }

/* ── Fine / Legal badges ─────────────────────────────── */
.fine-card { border-left: 3px solid #ff4060; }
.fine-card.contesting { border-left-color: #f59e0b; }
.fine-card.paid { border-left-color: #22c55e; opacity: 0.5; }

/* ── Level Badges ────────────────────────────────────── */
.lvl-badge {
    display: inline-block; font-size: 8px; font-weight: 700;
    padding: 1px 5px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em;
}
.lvl-rookie { background: rgba(100,100,100,0.2); color: #888; border: 1px solid #444; }
.lvl-pro    { background: rgba(0,242,255,0.12);  color: var(--blue); border: 1px solid rgba(0,242,255,0.4); }
.lvl-expert { background: rgba(180,100,255,0.12); color: #c084ff; border: 1px solid rgba(180,100,255,0.4); }
.lvl-elite  { background: rgba(212,175,55,0.15);  color: var(--gold); border: 1px solid rgba(212,175,55,0.5); }

/* ── Upgrade Pill ────────────────────────────────────── */
.upgrade-pill {
    display: inline-block; font-size: 8px; font-weight: 600;
    padding: 1px 5px; border-radius: 10px;
    background: rgba(0,242,255,0.08); color: #00d4e8; border: 1px solid rgba(0,242,255,0.25);
}

/* ── Garage 3D ───────────────────────────────────────── */
#garage3d-canvas canvas { border-radius: 10px; cursor: grab; display: block; }
#garage3d-canvas canvas:active { cursor: grabbing; }

/* ── Animations ──────────────────────────────────────── */
@keyframes slideUp        { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn         { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes rainPulse      { 0%,100% { opacity: 0.8; } 50% { opacity: 1; } }
@keyframes tickerScroll   { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }
@keyframes bluePulse      { 0%,100% { box-shadow: 0 0 8px rgba(0,242,255,0.3); } 50% { box-shadow: 0 0 18px rgba(0,242,255,0.6); } }
@keyframes exhaustedPulse { 0%,100% { filter: saturate(0.6) brightness(0.9); } 50% { filter: saturate(0.3) brightness(0.75) blur(0.4px); } }
@keyframes incidentPulse  { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.7; } }
@keyframes vip-toast-in  { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes vip-toast-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

/* ── CEO Exhaustion (energy < 15%) ───────────────────────── */
body.ceo-exhausted #main-panel,
body.ceo-exhausted header {
    animation: exhaustedPulse 3s ease-in-out infinite;
}
body.ceo-exhausted #main-panel::after {
    content: '';
    position: absolute; inset: 0; z-index: 200;
    background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(255,0,60,0.06) 100%);
    pointer-events: none; border-radius: inherit;
    animation: exhaustedPulse 3s ease-in-out infinite;
}

/* ── Incident Marker ─────────────────────────────────────── */
.incident-marker {
    font-size: 18px; line-height: 1;
    animation: incidentPulse 0.8s ease-in-out infinite;
    cursor: default; user-select: none;
}
.incident-marker::after { content: '🚨'; }

/* ── Checkpoint Marker (Shadow Mission police block) ─────── */
@keyframes checkpointPulse {
    0%   { background: #ff4060; box-shadow: 0 0 8px rgba(255,64,96,0.9),  0 0 20px rgba(255,64,96,0.4);  transform: scale(1);   }
    50%  { background: #0066ff; box-shadow: 0 0 16px rgba(0,102,255,0.9), 0 0 32px rgba(0,102,255,0.5); transform: scale(1.35); }
    100% { background: #ff4060; box-shadow: 0 0 8px rgba(255,64,96,0.9),  0 0 20px rgba(255,64,96,0.4);  transform: scale(1);   }
}
.checkpoint-marker {
    width: 14px; height: 14px; border-radius: 50%;
    background: #ff4060;
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 0 10px rgba(255,64,96,0.9);
    animation: checkpointPulse 0.55s ease-in-out infinite alternate;
    cursor: default; user-select: none;
}

/* ════════════════════════════════════════════════════════════════
   DARK FINANCE — $WALL-ST · Broker · Lifestyle
   ════════════════════════════════════════════════════════════════ */

/* Root Finance variables */
:root {
    --finance-bg:     rgba(8, 10, 18, 0.96);
    --finance-card:   rgba(10, 12, 24, 0.92);
    --finance-border: rgba(0, 242, 255, 0.12);
    --finance-gold:   #d4af37;
    --finance-green:  #22c55e;
    --finance-red:    #ef4444;
}

/* Base font upgrade for data elements */
body { font-family: 'Inter', 'Open Sans', Arial, Helvetica, sans-serif; }
.font-mono { font-family: 'Roboto Mono', monospace !important; }

/* ── Finance Header ──────────────────────────────────────────── */
.finance-header {
    background: linear-gradient(135deg, rgba(0,10,30,0.9), rgba(0,5,20,0.95));
    border: 1px solid rgba(0,242,255,0.2);
    border-radius: 12px; padding: 14px;
    box-shadow: 0 0 20px rgba(0,242,255,0.06), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── Stock Cards ─────────────────────────────────────────────── */
.finance-stock-card {
    background: var(--finance-card);
    border: 1px solid var(--finance-border);
    border-radius: 10px; padding: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.finance-stock-card:hover {
    border-color: rgba(0,242,255,0.30);
    box-shadow: 0 0 12px rgba(0,242,255,0.07);
}
.stock-bar-track {
    width: 100%; height: 3px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px; overflow: hidden;
}
.stock-bar-fill {
    height: 100%; border-radius: 2px;
    transition: width 0.6s ease;
    box-shadow: 0 0 6px currentColor;
}

/* ── Finance Input ───────────────────────────────────────────── */
.finance-input {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px; padding: 6px 10px;
    color: #fff; font-family: 'Roboto Mono', monospace;
    font-size: 11px; outline: none;
    transition: border-color 0.2s;
}
.finance-input:focus { border-color: rgba(0,242,255,0.5); }
.finance-input::-webkit-inner-spin-button { opacity: 0.4; }

/* ── Finance Section Title ───────────────────────────────────── */
.finance-section-title {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: rgba(0,242,255,0.85);
    padding: 8px 0; border-bottom: 1px solid rgba(0,242,255,0.1);
    list-style: none; user-select: none;
    display: flex; align-items: center; gap: 6px;
}
.finance-section-title::-webkit-details-marker { display: none; }

details[open] .finance-section-title { color: #00f2ff; }

/* ── Risk Buttons ────────────────────────────────────────────── */
.risk-btn { transition: all 0.2s ease; }
.risk-btn.active {
    background: rgba(255,255,255,0.08) !important;
    border-color: var(--risk-color, #fff) !important;
    box-shadow: 0 0 10px rgba(255,255,255,0.08);
}
.dur-btn { transition: all 0.2s ease; color: #9ca3af; }
.dur-btn.active {
    background: rgba(0,242,255,0.1) !important;
    border-color: rgba(0,242,255,0.5) !important;
    color: #00f2ff !important;
}

/* ── Broker Cards ────────────────────────────────────────────── */
.finance-broker-card {
    background: rgba(0,5,20,0.8);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 10px;
}
.broker-progress-track {
    width: 100%; height: 4px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px; overflow: hidden; margin-top: 6px;
}
.broker-progress-fill {
    height: 100%; border-radius: 2px;
    transition: width 0.8s ease;
}

/* ── Credit Score Bar ────────────────────────────────────────── */
.credit-bar-track {
    width: 100%; height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px; overflow: hidden;
}
.credit-bar-fill {
    height: 100%; border-radius: 3px;
    transition: width 1s ease;
    box-shadow: 0 0 8px currentColor;
}

/* ── Finance Lock Placeholder ────────────────────────────────── */
.finance-lock-card {
    background: rgba(8,10,28,0.8);
    border: 1px solid rgba(212,175,55,0.15);
}

/* ════════════════════════════════════════════════════════════════
   LIFESTYLE TAB — Empire Status
   ════════════════════════════════════════════════════════════════ */

.lifestyle-header {
    background: linear-gradient(135deg, rgba(15,10,5,0.95), rgba(25,15,0,0.9));
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 12px; padding: 14px;
    box-shadow: 0 0 24px rgba(212,175,55,0.05);
}

.lifestyle-card {
    background: rgba(10, 8, 5, 0.90);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 12px; padding: 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.lifestyle-card:hover {
    border-color: rgba(212,175,55,0.40);
    box-shadow: 0 0 18px rgba(212,175,55,0.07);
}
.lifestyle-owned {
    border-color: rgba(212,175,55,0.45) !important;
    background: rgba(20,15,2,0.9) !important;
    box-shadow: 0 0 16px rgba(212,175,55,0.08), inset 0 1px 0 rgba(212,175,55,0.08) !important;
}

/* ── Lifestyle card con immagine ──────────────────────────────── */
.ls-card {
    background: rgba(10,8,5,0.92);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.ls-card:hover { border-color: rgba(212,175,55,0.4); box-shadow: 0 4px 24px rgba(0,0,0,0.4); transform: translateY(-1px); }
.ls-card-owned { border-color: rgba(212,175,55,0.5) !important; box-shadow: 0 0 20px rgba(212,175,55,0.1) !important; }
.ls-card-img-wrap { position: relative; height: 160px; overflow: hidden; }
.ls-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.ls-card:hover .ls-card-img { transform: scale(1.04); }
.ls-card-img-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(5,4,3,0.85) 0%, rgba(5,4,3,0.1) 55%, transparent 100%);
}
.ls-card-img-title { position: absolute; bottom: 12px; left: 14px; right: 14px; }
.ls-card-name  { font-size: 13px; font-weight: 700; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.8); }
.ls-card-location { font-size: 10px; margin-top: 1px; opacity: 0.85; }
.ls-card-no-img { background: rgba(20,15,5,0.6); padding-bottom: 10px; }
.ls-card-owned-badge {
    position: absolute; top: 10px; right: 10px;
    background: rgba(16,185,129,0.85); color: #fff;
    font-size: 9px; font-weight: 700; padding: 3px 8px;
    border-radius: 20px; backdrop-filter: blur(4px);
}
.ls-badge {
    font-size: 9px; font-weight: 600; padding: 2px 8px;
    border-radius: 20px; display: inline-block;
}
.ls-badge-gold   { background: rgba(212,175,55,0.12); color: #d4af37; border: 1px solid rgba(212,175,55,0.3); }
.ls-badge-green  { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.ls-badge-cyan   { background: rgba(0,242,255,0.10);  color: #00f2ff; border: 1px solid rgba(0,242,255,0.25); }
.ls-badge-purple { background: rgba(168,85,247,0.12); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }

/* ================================================================
   SAVE SYSTEM — Slot Selector Landing Page
   ================================================================ */
#ss-overlay {
    position: fixed; inset: 0; z-index: var(--z-modal);
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(16px) saturate(1.4);
}
.ss-bg {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 30%, rgba(212,175,55,0.06) 0%, transparent 70%),
                radial-gradient(ellipse at 80% 80%, rgba(0,242,255,0.04) 0%, transparent 60%);
}
.ss-inner {
    width: 100%; max-width: 560px;
    padding: 2rem 1.5rem;
    animation: ssSlideIn 0.5s cubic-bezier(0.22,1,0.36,1);
}
@keyframes ssSlideIn {
    from { opacity:0; transform:translateY(24px); }
    to   { opacity:1; transform:translateY(0); }
}
.ss-header {
    text-align: center;
    margin-bottom: 2rem;
}
.ss-main-logo { font-size: 2.5rem; margin-bottom: 0.5rem; }
.ss-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem; font-weight: 900;
    letter-spacing: 0.18em;
    background: linear-gradient(135deg, #d4af37, #fff8e0, #d4af37);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}
.ss-subtitle {
    font-size: 0.75rem; color: #6b7280;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}
.ss-edition {
    display: inline-block;
    font-size: 0.65rem; color: #374151;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 999px;
    padding: 0.15rem 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ss-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.ss-slot {
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(15,15,22,0.8);
    padding: 1rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.ss-slot:hover { border-color: rgba(212,175,55,0.4); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.ss-slot-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 140px;
    border-style: dashed;
    border-color: rgba(255,255,255,0.1);
}
.ss-slot-empty:hover { border-color: rgba(212,175,55,0.5); }
.ss-empty-plus { font-size: 2rem; color: rgba(255,255,255,0.2); line-height: 1; margin-bottom: 0.4rem; }
.ss-empty-label { font-size: 0.65rem; color: #6b7280; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.ss-empty-sub   { font-size: 0.6rem; color: #4b5563; margin-top: 0.1rem; }
.ss-slot-occupied { min-height: 140px; }
.ss-slot-logo { font-size: 1.5rem; margin-bottom: 0.3rem; }
.ss-slot-name {
    font-size: 0.7rem; font-weight: 700;
    color: #e5e7eb;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 0.4rem;
}
.ss-ngp-badge {
    display: inline-block; font-size: 0.55rem;
    background: rgba(212,175,55,0.15); color: #d4af37;
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 999px; padding: 0.1rem 0.4rem;
    margin-bottom: 0.4rem;
}
.ss-slot-stats { margin-bottom: 0.6rem; }
.ss-stat {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.6rem;
    margin-bottom: 0.15rem;
}
.ss-stat-lbl { color: #6b7280; }
.ss-stat-val { font-weight: 700; font-family: monospace; }
.ss-slot-actions {
    display: flex; gap: 0.3rem;
    margin-top: 0.4rem;
}
.ss-btn-primary {
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05));
    border: 1px solid rgba(212,175,55,0.4);
    color: #d4af37; border-radius: 0.4rem;
    font-size: 0.6rem; font-weight: 700;
    padding: 0.25rem 0.5rem; cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.ss-btn-primary:hover { background: rgba(212,175,55,0.25); }
.ss-btn-secondary {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.12);
    color: #9ca3af; border-radius: 0.4rem;
    font-size: 0.65rem; font-weight: 600;
    padding: 0.3rem 0.75rem; cursor: pointer;
    transition: all 0.15s;
}
.ss-btn-secondary:hover { border-color: rgba(255,255,255,0.25); color: #e5e7eb; }
.ss-btn-danger {
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.2);
    color: #ef4444; border-radius: 0.4rem;
    font-size: 0.6rem; font-weight: 700;
    padding: 0.25rem 0.4rem; cursor: pointer;
    transition: all 0.15s;
}
.ss-btn-danger:hover { background: rgba(239,68,68,0.15); }
.ss-btn-sm { font-size: 0.6rem !important; padding: 0.2rem 0.4rem !important; }

/* Company setup card */
.ss-setup-card {
    background: rgba(12,12,20,0.95);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 1.25rem;
    padding: 2rem;
    width: 100%; max-width: 420px;
    backdrop-filter: blur(20px);
    animation: ssSlideIn 0.4s ease;
}
.ss-setup-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem; font-weight: 900;
    color: #d4af37; letter-spacing: 0.1em;
    text-align: center; margin-bottom: 0.25rem;
}
.ss-setup-sub {
    font-size: 0.65rem; color: #6b7280;
    text-align: center; margin-bottom: 1.5rem;
}
.ss-field { margin-bottom: 1rem; }
.ss-label {
    display: block; font-size: 0.65rem; font-weight: 700;
    color: #9ca3af; text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}
.ss-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.5rem;
    color: #e5e7eb; font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.15s;
}
.ss-input:focus { border-color: rgba(212,175,55,0.5); }
.ss-logo-grid {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.logo-opt-btn {
    width: 2.5rem; height: 2.5rem;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.logo-opt-btn:hover { border-color: rgba(212,175,55,0.4); background: rgba(212,175,55,0.08); }
.logo-opt-btn.active { border-color: rgba(212,175,55,0.7); background: rgba(212,175,55,0.15); box-shadow: 0 0 8px rgba(212,175,55,0.2); }
.ss-color-grid {
    display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem;
}
.brand-color-btn {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    cursor: pointer; transition: all 0.15s;
}
.brand-color-btn:hover { transform: scale(1.15); border-color: rgba(255,255,255,0.5); }
.brand-color-btn.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.4); transform: scale(1.1); }
.ss-btn-row {
    display: flex; gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}
.ss-btn-row .ss-btn-primary { font-size: 0.75rem; padding: 0.5rem 1.25rem; }
.ss-btn-row .ss-btn-secondary { font-size: 0.75rem; padding: 0.5rem 1rem; }

/* Sync bar */
.ss-sync-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.75rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.75rem;
    flex-wrap: wrap;
}
.ss-sync-left {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}
.ss-sync-btn {
    font-size: 0.6rem !important;
    padding: 0.25rem 0.55rem !important;
    transition: border-color 0.2s, color 0.2s;
}
.ss-sync-info {
    font-size: 0.58rem;
    color: #6b7280;
    font-style: italic;
    text-align: right;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Macro bar at bottom of slot selector */
.ss-macro-bar {
    text-align: center;
    font-size: 0.6rem; color: #4b5563;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.ss-macro-item { color: #6b7280; }
.ss-macro-item b { color: #9ca3af; }
.ss-macro-sep { margin: 0 0.4rem; color: #374151; }

/* ================================================================
   SPARKLINES (stock history SVG)
   ================================================================ */
.sparkline-svg {
    display: block;
    opacity: 0.85;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

/* ================================================================
   ADDITIONAL BUTTONS (short/cover)
   ================================================================ */
.btn-red {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #ef4444;
    border-radius: 0.375rem;
    font-size: 0.7rem; font-weight: 700;
    padding: 0.3rem 0.6rem;
    cursor: pointer; transition: all 0.15s;
}
.btn-red:hover { background: rgba(239,68,68,0.22); }
.btn-purple {
    background: rgba(167,139,250,0.12);
    border: 1px solid rgba(167,139,250,0.3);
    color: #a78bfa;
    border-radius: 0.375rem;
    font-size: 0.7rem; font-weight: 700;
    padding: 0.3rem 0.6rem;
    cursor: pointer; transition: all 0.15s;
}
.btn-purple:hover { background: rgba(167,139,250,0.22); }

/* ================================================================
   SMART HUB SIDEBAR
   ================================================================ */
.hub-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0.25rem 0;
}
.hub-btn {
    position: relative;
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05)) !important;
    border-color: rgba(212,175,55,0.35) !important;
}
.hub-btn:hover { background: rgba(212,175,55,0.22) !important; }
.hub-hamburger {
    display: flex; flex-direction: column;
    gap: 3px; align-items: center; justify-content: center;
    width: 16px; height: 16px;
}
.hub-hamburger span {
    display: block;
    height: 1.5px; width: 100%;
    background: #d4af37;
    border-radius: 2px;
    transition: all 0.2s;
}
.hub-badge {
    position: absolute; top: 4px; right: 4px;
    width: 14px; height: 14px;
    background: #ef4444;
    border-radius: 999px;
    font-size: 8px; font-weight: 900;
    color: #fff; display: flex; align-items: center; justify-content: center;
    animation: hubBadgePulse 1.4s ease-in-out infinite;
}
@keyframes hubBadgePulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    50%      { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

/* ================================================================
   SMART HUB MODAL
   ================================================================ */
.hub-modal {
    position: fixed; inset: 0; z-index: var(--z-modal);
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    animation: hubFadeIn 0.18s ease;
}
.hub-modal.hidden { display: none !important; }
@keyframes hubFadeIn { from { opacity:0; } to { opacity:1; } }

.hub-inner {
    width: 100%; max-width: 680px;
    margin: 1rem;
    background: rgba(14,14,22,0.92);
    border: 1px solid rgba(212,175,55,0.18);
    border-radius: 25px;
    backdrop-filter: blur(20px) saturate(1.5);
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 60px rgba(212,175,55,0.04);
    animation: hubSlideUp 0.22s cubic-bezier(0.22,1,0.36,1);
}
@keyframes hubSlideUp {
    from { opacity:0; transform: translateY(20px) scale(0.98); }
    to   { opacity:1; transform: translateY(0) scale(1); }
}

/* Header */
.hub-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(135deg, rgba(212,175,55,0.04), transparent);
}
.hub-header-left { display: flex; align-items: center; gap: 0.75rem; }
.hub-logo { font-size: 1.75rem; }
.hub-company-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem; font-weight: 800;
    color: #d4af37; letter-spacing: 0.04em;
    line-height: 1.2;
}
.hub-tagline { font-size: 0.6rem; color: #4b5563; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.1rem; }
.hub-header-right { display: flex; align-items: center; gap: 0.75rem; }
.hub-event-pill {
    font-size: 0.6rem; padding: 0.2rem 0.6rem;
    background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3);
    border-radius: 999px; color: #ef4444; font-weight: 700;
    animation: hubBadgePulse 2s infinite;
}
.hub-close {
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%; color: #6b7280;
    font-size: 0.7rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.hub-close:hover { background: rgba(255,255,255,0.1); color: #e5e7eb; }

/* Stats Row */
.hub-stats-row {
    display: flex; gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    overflow-x: auto;
}
.hub-stat-chip {
    display: flex; align-items: center; gap: 0.3rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.5rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem; color: #e5e7eb;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap; flex-shrink: 0;
}
.hub-stat-icon { font-size: 0.75rem; }

/* Module Grid */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}
.hub-module {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 1rem;
    padding: 1rem 0.5rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.22,1,0.36,1);
    overflow: hidden;
}
.hub-module:hover {
    background: rgba(212,175,55,0.07);
    border-color: rgba(212,175,55,0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3), 0 0 20px rgba(212,175,55,0.06);
}
.hub-module:active { transform: translateY(0) scale(0.97); }
.hub-mod-icon { font-size: 1.5rem; margin-bottom: 0.3rem; line-height: 1; }
.hub-mod-title {
    font-size: 0.65rem; font-weight: 700;
    color: #e5e7eb; text-transform: uppercase;
    letter-spacing: 0.04em; margin-bottom: 0.15rem;
}
.hub-mod-desc {
    font-size: 0.55rem; color: #4b5563;
    line-height: 1.3;
}
.hub-mod-badge {
    position: absolute; top: 6px; right: 6px;
    background: rgba(212,175,55,0.2); color: #d4af37;
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 999px;
    font-size: 0.55rem; font-weight: 800;
    padding: 0 0.3rem; min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
}
.hub-mod-badge-red {
    background: rgba(239,68,68,0.2) !important;
    color: #ef4444 !important;
    border-color: rgba(239,68,68,0.3) !important;
}
.hub-mod-alert {
    position: absolute; top: 6px; left: 6px;
    font-size: 0.7rem;
}

/* Active Event Banner */
.hub-event-banner {
    margin: 0 1.25rem 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 0.75rem;
    display: flex; align-items: center; gap: 0.75rem;
}
.hub-event-icon { font-size: 1.5rem; flex-shrink: 0; }
.hub-event-info { flex: 1; min-width: 0; }
.hub-event-name { font-size: 0.75rem; font-weight: 700; color: #e5e7eb; margin-bottom: 0.15rem; }
.hub-event-meta { font-size: 0.6rem; color: #6b7280; }
.hub-event-mult {
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem; font-weight: 900;
    color: #d4af37; flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════════
   LANDING PAGE — MMO Auth Overlay
   ══════════════════════════════════════════════════════════════ */

#auth-overlay {
    position: fixed; inset: 0; z-index: var(--z-modal);
    overflow-y: auto;
    font-family: 'Montserrat', 'Inter', sans-serif;
    background-image:
        linear-gradient(rgba(10,20,40,0.38) 0%, rgba(12,22,42,0.52) 60%, rgba(10,18,36,0.72) 100%),
        url('https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

/* ── Page wrapper ── */
.lp-page {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* ── HERO ── */
.lp-hero {
    min-height: 100vh;
    display: flex; align-items: center;
    padding: 48px clamp(24px, 7vw, 100px);
    gap: clamp(32px, 5vw, 64px);
}

/* Left: copywriting */
.lp-copy {
    flex: 1 1 0;
    display: flex; flex-direction: column; gap: 22px;
    max-width: 600px;
}

.lp-monogram {
    display: inline-flex; align-items: center; justify-content: center;
    width: 72px; height: 72px;
    background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(212,175,55,0.03));
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 18px;
    font-family: 'Orbitron', sans-serif;
    font-size: 20px; font-weight: 900;
    color: #d4af37; letter-spacing: -1px;
    box-shadow: 0 0 28px rgba(212,175,55,0.14), inset 0 1px 0 rgba(255,255,255,0.06);
    overflow: hidden; padding: 6px;
}

.lp-headline {
    font-family: 'Cinzel', 'Orbitron', sans-serif;
    font-size: clamp(26px, 4.5vw, 54px);
    font-weight: 900; line-height: 1.08; letter-spacing: -0.02em; margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(0,0,0,0.55), 0 0 40px rgba(255,255,255,0.08);
}

.lp-tagline {
    font-size: clamp(13px, 1.6vw, 16px);
    color: rgba(255,255,255,0.82); line-height: 1.75; margin: 0; max-width: 500px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.lp-badges {
    display: flex; gap: 8px; flex-wrap: wrap;
}

.lp-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 20px; padding: 5px 13px;
    font-size: 11px; color: rgba(255,255,255,0.85);
    transition: border-color .25s, color .25s, background .25s;
    backdrop-filter: blur(4px);
}
.lp-badge span { color: #7ee8a2; font-weight: 700; }
.lp-badge:hover { border-color: rgba(255,255,255,0.5); color: #ffffff; background: rgba(255,255,255,0.22); }

/* Right: login form column */
.lp-form-col {
    flex: 0 0 min(410px, 100%);
    display: flex; align-items: center; justify-content: center;
}

.lp-glass-card {
    width: 100%;
    background: #ffffff;
    border: none;
    border-radius: 10px; padding: 28px 24px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.15);
}

.lp-card-eyebrow {
    font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
    color: #9ca3af; font-family: 'Montserrat', sans-serif;
    margin-bottom: 6px;
}

.lp-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px; font-weight: 800; color: #1a2c45;
    letter-spacing: 0.01em; margin-bottom: 20px;
}

.lp-btn-primary {
    display: block; width: 100%; padding: 13px 20px;
    background: #27ae60;
    border: none; border-radius: 8px;
    color: #ffffff; font-family: 'Montserrat', sans-serif;
    font-size: 13px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
    cursor: pointer; transition: background .18s, box-shadow .18s, transform .12s;
    box-shadow: 0 3px 10px rgba(39,174,96,0.35);
}
.lp-btn-primary:hover:not(:disabled) {
    background: #219a52;
    box-shadow: 0 5px 18px rgba(39,174,96,0.45); transform: translateY(-1px);
}
.lp-btn-primary:active:not(:disabled) { transform: translateY(0); }
.lp-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.lp-btn-secondary {
    display: block; width: 100%; padding: 12px 20px;
    background: #2980b9;
    border: none; border-radius: 8px;
    color: #ffffff; font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
    cursor: pointer; transition: background .18s, box-shadow .18s, transform .12s;
    box-shadow: 0 3px 10px rgba(41,128,185,0.35);
}
.lp-btn-secondary:hover:not(:disabled) {
    background: #2471a3;
    box-shadow: 0 5px 18px rgba(41,128,185,0.45); transform: translateY(-1px);
}
.lp-btn-secondary:active:not(:disabled) { transform: translateY(0); }
.lp-btn-secondary:disabled { opacity: .5; cursor: not-allowed; }

/* shared form utils (used by landing page form AND sync overlay) */
.auth-form {
    display: flex; flex-direction: column; gap: 12px;
}
.auth-error {
    display: none;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px; color: #fca5a5;
    font-size: 12px; padding: 8px 12px;
    text-align: left; line-height: 1.5;
}
.auth-hint {
    font-size: 11px; color: #9ca3af; text-align: center; margin-top: 2px;
}
.auth-support-link {
    text-align: center;
    font-size: 10px;
    color: #9ca3af;
    margin-top: 8px;
}
.auth-support-link a {
    color: #2980b9;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Light inputs inside white card */
.lp-glass-card .ss-input {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #1f2937;
}
.lp-glass-card .ss-input:focus { border-color: #27ae60; outline: none; box-shadow: 0 0 0 3px rgba(39,174,96,0.12); }
.lp-glass-card .ss-input::placeholder { color: #9ca3af; }
.lp-glass-card .auth-error { background: #fef2f2; border-color: #fca5a5; color: #dc2626; display: none; }
.lp-glass-card .auth-error[style*="block"] { display: block !important; }

/* ── STATS BAR ── */
.lp-stats {
    background: rgba(20,36,60,0.85);
    border: none;
    padding: 0 clamp(24px, 7vw, 100px);
    display: flex; justify-content: center; align-items: stretch;
    backdrop-filter: blur(12px);
}

.lp-stat {
    flex: 1; min-width: 140px; max-width: 260px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px 16px;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.lp-stat:last-child { border-right: none; }

.lp-stat-icon { font-size: 24px; margin-bottom: 8px; line-height: 1; }

.lp-stat-val {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(20px, 2.8vw, 30px); font-weight: 900;
    color: #4ade80;
    letter-spacing: -0.02em;
}

.lp-stat-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
    color: rgba(255,255,255,0.65); margin-top: 4px; font-weight: 600;
}

/* ── FEATURES ── */
.lp-features {
    padding: 64px clamp(24px, 7vw, 100px) 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.lp-feat-card {
    background: rgba(22,40,70,0.75);
    border: 1px solid rgba(255,255,255,0.12);
    border-top: 3px solid #4ade80;
    border-radius: 14px; padding: 28px 22px;
    position: relative; overflow: hidden;
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
    backdrop-filter: blur(8px);
    cursor: default;
}
.lp-feat-card::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% -10%, rgba(39,174,96,0.07), transparent 65%);
    opacity: 0; transition: opacity .35s;
}
.lp-feat-card:hover {
    border-color: rgba(39,174,96,0.45);
    border-top-color: #27ae60;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(39,174,96,0.12), 0 2px 8px rgba(0,0,0,0.4);
}
.lp-feat-card:hover::before { opacity: 1; }

/* SVG icon wrapper inside feature cards */
.lp-feat-icon-wrap {
    width: 48px; height: 48px;
    background: rgba(39,174,96,0.12);
    border: 1px solid rgba(39,174,96,0.25);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
    transition: background .3s, border-color .3s;
}
.lp-feat-card:hover .lp-feat-icon-wrap {
    background: rgba(39,174,96,0.2);
    border-color: rgba(39,174,96,0.45);
}

.lp-feat-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px; font-weight: 700; letter-spacing: 0.03em;
    color: #ffffff; margin-bottom: 10px;
}

.lp-feat-desc { font-size: 13px; color: rgba(255,255,255,0.70); line-height: 1.7; }

/* ── SVG Icon Classes ── */
.lp-icon-xs {
    width: 13px; height: 13px; flex-shrink: 0;
    fill: none; stroke: rgba(255,255,255,0.7);
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.lp-icon-stat {
    width: 28px; height: 28px; margin-bottom: 10px;
    fill: none; stroke: rgba(255,255,255,0.6);
    stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
    opacity: .85;
}
.lp-icon-lg {
    width: 24px; height: 24px;
    fill: none; stroke: #27ae60;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ── CINZEL — Luxury headings on landing page ── */
.lp-headline,
.lp-section-title,
.lp-nav-brand,
.lp-footer-name,
.lp-community-inner h2 {
    font-family: 'Cinzel', 'Orbitron', serif;
}

/* ── NAVBAR ── */
.lp-navbar {
    position: sticky; top: 0; z-index: 100;
    background: #1a2c45;
    padding: 0 clamp(24px, 7vw, 100px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.lp-navbar.lp-navbar-solid {
    background: #1a2c45;
    border-color: rgba(255,255,255,0.08);
}
.lp-navbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; max-width: 1400px; margin: 0 auto;
}
.lp-nav-logo { display: flex; align-items: center; gap: 12px; }
.lp-nav-monogram {
    width: 36px; height: 36px; flex-shrink: 0;
    background-color: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0; font-weight: 900; color: transparent; letter-spacing: -1px;
    overflow: hidden; padding: 0;
}
.lp-nav-brand {
    font-size: 13px; font-weight: 700; color: #ffffff; letter-spacing: 0.06em;
}
.lp-nav-links { display: flex; align-items: center; gap: 4px; }
.lp-nav-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.72);
    padding: 6px 12px; border-radius: 6px;
    text-decoration: none; letter-spacing: 0.02em;
    transition: color .2s, background .2s;
}
.lp-nav-link:hover { color: #ffffff; background: rgba(255,255,255,0.1); }
.lp-nav-discord-link { color: #7289da !important; }
.lp-nav-discord-link:hover { background: rgba(114,137,218,0.15) !important; }
.lp-icon-discord { width: 14px; height: 14px; flex-shrink: 0; }
.lp-nav-cta {
    display: inline-flex; align-items: center; margin-left: 8px;
    font-size: 11px; font-weight: 700; color: #ffffff;
    padding: 8px 18px; border-radius: 6px; text-decoration: none;
    background: #27ae60;
    border: none;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.04em; text-transform: uppercase;
    transition: background .18s, box-shadow .18s, transform .12s;
    box-shadow: 0 2px 8px rgba(39,174,96,0.35);
}
.lp-nav-cta:hover {
    background: #219a52;
    box-shadow: 0 4px 14px rgba(39,174,96,0.45); transform: translateY(-1px);
}

/* ── SECTION HEADERS (shared) ── */
.lp-section-header { text-align: center; margin-bottom: 44px; }
.lp-section-eyebrow {
    font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
    color: rgba(255,255,255,0.45); font-family: 'Montserrat', sans-serif; margin-bottom: 10px;
}
.lp-section-title {
    font-size: clamp(24px, 3.5vw, 38px); font-weight: 700;
    color: #ffffff; margin: 0; letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ── NEWS & PATCH NOTES ── */
.lp-news-section {
    padding: 80px clamp(24px, 7vw, 100px);
    background: rgba(0,0,8,0.45);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.lp-news-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
}
.lp-news-card {
    background: rgba(22,40,70,0.75); border: 1px solid rgba(255,255,255,0.11);
    border-left: 3px solid rgba(255,255,255,0.15);
    border-radius: 12px; padding: 24px 20px; position: relative;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    cursor: pointer; color: inherit; backdrop-filter: blur(8px);
}
.lp-news-card:hover {
    border-color: rgba(39,174,96,0.25); transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.lp-news-hot { border-left-color: #27ae60; }
.lp-news-badge {
    display: inline-block; font-size: 8px; font-weight: 800; letter-spacing: 0.14em;
    background: rgba(39,174,96,0.12); color: #27ae60;
    border: 1px solid rgba(39,174,96,0.28);
    border-radius: 4px; padding: 2px 7px; margin-bottom: 12px;
    text-transform: uppercase;
}
.lp-news-date {
    font-size: 9px; color: rgba(255,255,255,0.35); text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: 7px;
}
.lp-news-title {
    font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700;
    color: #ffffff; letter-spacing: 0.02em; margin-bottom: 10px; line-height: 1.45;
}
.lp-news-body { font-size: 13px; color: rgba(255,255,255,0.62); line-height: 1.75; }

/* ── GAMEPLAY SHOWCASE ── */
.lp-showcase {
    padding: 80px clamp(24px, 7vw, 100px);
    border-top: 1px solid rgba(255,255,255,0.04);
}
.lp-showcase-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px;
}
.lp-showcase-slot { cursor: pointer; }
.lp-showcase-thumb {
    width: 100%; aspect-ratio: 16 / 9; border-radius: 14px;
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.08); margin-bottom: 14px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.lp-showcase-slot:hover .lp-showcase-thumb {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.55);
    border-color: rgba(39,174,96,0.3);
}
.lp-st-map  { background: linear-gradient(135deg, #03091c 0%, #071630 60%, #04102a 100%); }
.lp-st-fleet{ background: linear-gradient(135deg, #130700 0%, #221100 60%, #160800 100%); }
.lp-st-rank { background: linear-gradient(135deg, #001515 0%, #002c2c 60%, #001515 100%); }
.lp-st-fin  { background: linear-gradient(135deg, #001408 0%, #00240f 60%, #001408 100%); }
.lp-st-icon {
    font-size: 3.2rem; line-height: 1; position: relative; z-index: 1;
    filter: drop-shadow(0 0 18px rgba(212,175,55,0.35)); opacity: .7;
    transition: opacity .3s, filter .3s;
}
.lp-showcase-slot:hover .lp-st-icon {
    opacity: 1; filter: drop-shadow(0 0 28px rgba(212,175,55,0.65));
}
.lp-showcase-thumb::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(212,175,55,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212,175,55,0.035) 1px, transparent 1px);
    background-size: 28px 28px;
}
.lp-showcase-label {
    font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 700;
    color: #ffffff; letter-spacing: 0.04em; margin-bottom: 5px;
}
.lp-showcase-sub { font-size: 11px; color: rgba(255,255,255,0.5); line-height: 1.65; }

/* ── SHOWCASE EXPAND HINT ── */
.lp-sc-expand {
    position: absolute; bottom: 8px; right: 10px; z-index: 3;
    font-size: 14px; color: rgba(212,175,55,0.55);
    transition: color .25s, opacity .25s; opacity: 0; pointer-events: none;
    line-height: 1;
}
.lp-showcase-slot:hover .lp-sc-expand { opacity: 1; color: rgba(212,175,55,0.9); }

/* ── SHOWCASE LIGHTBOX ── */
#lp-lightbox { position: fixed; inset: 0; z-index: var(--z-takeover); }
.lp-lb-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.82);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.lp-lb-panel {
    position: relative; display: flex; flex-direction: row; gap: 0;
    max-width: 1100px; width: 100%; max-height: 90vh;
    background: #07070f;
    border: 1px solid rgba(212,175,55,0.18);
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 0 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
    opacity: 0; transform: scale(0.94) translateY(12px);
    transition: opacity .28s ease, transform .28s ease;
}
#lp-lightbox.lp-lb-in .lp-lb-panel { opacity: 1; transform: scale(1) translateY(0); }
.lp-lb-img-wrap {
    flex: 0 0 65%; position: relative; overflow: hidden; min-height: 440px;
}
.lp-lb-img-wrap img {
    position: absolute; inset: 0; width: 100%; height: 100%;
}
.lp-lb-body {
    flex: 1; padding: 36px 32px; display: flex; flex-direction: column;
    justify-content: center; overflow-y: auto;
}
.lp-lb-title {
    font-family: 'Orbitron', sans-serif; font-size: 15px; font-weight: 700;
    color: #d4af37; letter-spacing: 0.06em; margin-bottom: 18px;
    text-transform: uppercase;
}
.lp-lb-desc {
    font-size: 14px; color: #9ca3af; line-height: 1.8;
}
.lp-lb-close {
    position: absolute; top: 12px; right: 14px; z-index: 10;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    color: #d1d5db; font-size: 20px; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: background .2s, color .2s; line-height: 1;
}
.lp-lb-close:hover { background: rgba(212,175,55,0.18); color: #d4af37; }
@media (max-width: 640px) {
    .lp-lb-panel { flex-direction: column; }
    .lp-lb-img-wrap { flex: 0 0 200px; min-height: 200px; }
}

/* ── COMMUNITY BOX ── */
.lp-community {
    padding: 80px clamp(24px, 7vw, 100px);
    background: rgba(20,36,60,0.70);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.08);
}
.lp-community-inner {
    max-width: 680px; margin: 0 auto;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px; padding: 52px 40px;
    text-align: center;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    position: relative; overflow: hidden;
}
.lp-community-inner::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(114,137,218,0.07), transparent 65%);
}
.lp-community-inner h2 {
    font-size: clamp(22px, 3vw, 32px); font-weight: 700;
    color: #f0f0f8; margin: 0 0 14px; letter-spacing: 0.02em; position: relative;
}
.lp-community-inner p {
    font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.75;
    max-width: 460px; margin: 0 auto 36px; position: relative;
}
.lp-discord-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, rgba(114,137,218,0.18), rgba(114,137,218,0.06));
    border: 1px solid rgba(114,137,218,0.35); border-radius: 12px;
    padding: 14px 32px; color: #7289da;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; text-decoration: none; cursor: pointer;
    transition: background .25s, border-color .25s, box-shadow .25s, color .25s;
    position: relative;
}
.lp-discord-btn:hover {
    background: linear-gradient(135deg, rgba(114,137,218,0.3), rgba(114,137,218,0.12));
    border-color: rgba(114,137,218,0.65);
    box-shadow: 0 0 28px rgba(114,137,218,0.18); color: #a0b4ff;
}
.lp-icon-discord-lg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }

/* ── FOOTER (professional) ── */
.lp-footer {
    padding: 28px clamp(24px, 7vw, 100px);
    border-top: 1px solid rgba(255,255,255,0.07);
    background: #121722;
}
.lp-footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 20px; max-width: 1400px; margin: 0 auto;
}
.lp-footer-brand { display: flex; align-items: center; gap: 12px; }
.lp-footer-monogram {
    width: 34px; height: 34px; flex-shrink: 0;
    background-color: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', sans-serif; font-size: 0; font-weight: 900;
    color: transparent; letter-spacing: -1px; overflow: hidden;
}
.lp-footer-name {
    font-size: 11px; font-weight: 700; color: #6b7280;
    letter-spacing: 0.06em; margin-bottom: 2px;
}
.lp-footer-copy { font-size: 9px; color: #374151; letter-spacing: 0.05em; }
.lp-footer-links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.lp-footer-link {
    font-size: 10px; color: #4b5563; text-decoration: none;
    padding: 5px 10px; border-radius: 6px;
    transition: color .2s, background .2s;
}
.lp-footer-link:hover { color: #9ca3af; background: rgba(255,255,255,0.04); }
.lp-footer-sep { color: #1f2937; font-size: 10px; user-select: none; padding: 0 2px; }

/* ── Responsive ── */
@media (max-width: 800px) {
    .lp-hero {
        flex-direction: column;
        min-height: auto; padding-top: 56px; padding-bottom: 40px;
    }
    .lp-copy  { order: 2; }
    .lp-form-col { order: 1; width: 100%; max-width: 420px; margin: 0 auto; }
    .lp-stats { flex-wrap: wrap; }
    .lp-stat  { min-width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .lp-stat:last-child { border-bottom: none; }

    /* Navbar: hide text links, keep brand + CTA */
    .lp-nav-links .lp-nav-link { display: none; }
    .lp-nav-cta { font-size: 9px; padding: 6px 12px; margin-left: 4px; }

    /* Sections */
    .lp-news-section, .lp-showcase, .lp-community { padding-top: 52px; padding-bottom: 52px; }
    .lp-community-inner { padding: 36px 20px; }

    /* Footer */
    .lp-footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    .lp-dark-info { grid-template-columns: 1fr; }
}

/* ── DARK INFO SECTION (3-col, eRepublik style) ──────────────────── */
.lp-dark-info {
    background: rgba(20,36,60,0.82);
    backdrop-filter: blur(12px);
    padding: 48px clamp(24px, 7vw, 100px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.lp-dark-info-col h3 {
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255,255,255,0.55); margin: 0 0 20px;
    font-family: 'Montserrat', sans-serif; font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 12px;
}
.lp-dark-info-feature {
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 18px;
}
.lp-dark-info-feature-icon {
    font-size: 24px; flex-shrink: 0; margin-top: 1px; line-height: 1;
}
.lp-dark-info-feature-text { font-size: 13px; color: rgba(255,255,255,0.72); line-height: 1.6; }
.lp-dark-info-feature-title {
    font-weight: 700; color: #ffffff; display: block;
    margin-bottom: 3px; font-size: 14px;
}
.lp-rank-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 13px; color: rgba(255,255,255,0.8);
}
.lp-rank-row:last-child { border-bottom: none; }
.lp-rank-num { font-weight: 700; color: rgba(255,255,255,0.4); width: 22px; font-size: 12px; text-align: right; }
.lp-rank-avatar { width: 24px; height: 24px; border-radius: 50%; background: rgba(74,222,128,0.2); border: 1px solid rgba(74,222,128,0.4); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.lp-rank-name { flex: 1; font-weight: 600; color: #ffffff; font-size: 13px; }
.lp-rank-val { color: #4ade80; font-family: 'Roboto Mono', monospace; font-size: 12px; font-weight: 700; }
.lp-rank-loading { color: rgba(255,255,255,0.4); font-size: 12px; text-align: center; padding: 16px 0; }
.lp-dark-news-item {
    padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.lp-dark-news-item:last-child { border-bottom: none; }
.lp-dark-news-date { font-size: 10px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.lp-dark-news-title { font-size: 13px; font-weight: 700; color: #ffffff; margin-bottom: 5px; line-height: 1.4; }
.lp-dark-news-body { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.65; }

/* ── Override lightbox close btn gold → green ── */
.lp-lb-close:hover { background: rgba(39,174,96,0.18); color: #7ee8a2; }

/* ── Daily Reward Modal ──────────────────────────────────────── */
#daily-reward-modal {
    position: fixed; inset: 0; z-index: var(--z-modal);
    background: rgba(0,0,0,0.82); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn .25s ease;
}
.dr-inner {
    background: rgba(8,8,20,0.97);
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 20px;
    padding: 28px 28px 24px;
    width: min(420px, 95vw);
    box-shadow: 0 0 60px rgba(212,175,55,0.15);
    text-align: center;
}
.dr-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px; font-weight: 900;
    color: var(--gold);
    letter-spacing: .08em;
    text-shadow: 0 0 12px rgba(212,175,55,0.6);
    margin-bottom: 6px;
}
.dr-streak {
    font-size: 12px; color: #f59e0b;
    margin-bottom: 18px; font-weight: 600;
}
.dr-days-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 6px; margin-bottom: 18px;
}
.dr-day {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; padding: 6px 2px;
}
.dr-day-done {
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.25);
    opacity: .65;
}
.dr-day-today {
    background: rgba(212,175,55,0.12);
    border-color: rgba(212,175,55,0.5);
    box-shadow: 0 0 10px rgba(212,175,55,0.2);
}
.dr-day-num {
    font-size: 8px; color: #6b7280;
    text-transform: uppercase; letter-spacing: .04em;
    margin-bottom: 4px;
}
.dr-day-today .dr-day-num { color: var(--gold); font-weight: 700; }
.dr-day-reward {
    font-size: 9px; font-weight: 700;
    color: #d1d5db; line-height: 1.2;
}
.dr-day-today .dr-day-reward { color: var(--gold); }
.dr-day-done .dr-day-reward  { color: #22c55e; }
.dr-highlight {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px; font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 16px rgba(212,175,55,0.5);
    padding: 10px 0;
}

/* ── Driver Skill Bars ───────────────────────────────────────── */
.driver-skills-row {
    display: flex; flex-direction: column; gap: 3px;
}
.driver-skill-chip {
    display: flex; align-items: center; gap: 4px;
}
.driver-skill-label {
    font-size: 8px; color: #6b7280;
    text-transform: uppercase; width: 36px; flex-shrink: 0;
    letter-spacing: .03em;
}
.driver-skill-bar-bg {
    flex: 1; height: 3px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px; overflow: hidden;
}
.driver-skill-bar-fill {
    height: 100%; border-radius: 2px;
    transition: width .3s ease;
}
.driver-skill-val {
    font-size: 8px; font-family: 'Roboto Mono', monospace;
    width: 22px; text-align: right; font-weight: 700;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── LOGOUT BUTTON (now inline in header) ─────────────────────── */
#logout-btn {
    background: none;
    border: 1px solid rgba(239,68,68,0.25);
    color: #f87171; font-size: 13px;
    padding: 3px 7px; border-radius: 6px; cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
#logout-btn:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.6); }

/* ── COLLAPSIBLE RIGHT PANEL ──────────────────────────────────── */
#main-panel {
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
#main-panel.panel-collapsed {
    /* Slides the panel completely off the right edge of the viewport */
    transform: translateX(calc(100% + 1.5rem)) !important;
}
/* Peek tab — visible only when panel is collapsed */
#panel-peek-tab {
    position: fixed; right: 0; top: 50%;
    transform: translateY(-50%) translateX(64px);
    z-index: 45; cursor: pointer; pointer-events: none; opacity: 0;
    background: rgba(8,8,20,0.95); backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.35); border-right: none;
    border-radius: 14px 0 0 14px; padding: 16px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
    box-shadow: -4px 0 20px rgba(0,0,0,0.4);
}
#panel-peek-tab.visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1; pointer-events: auto;
}
#panel-peek-tab .peek-icon { font-size: 20px; line-height: 1; }
#panel-peek-tab .peek-arrow {
    font-size: 11px; color: #d4af37; opacity: 0.7; writing-mode: vertical-rl;
    letter-spacing: 0.1em; user-select: none;
}
/* Collapse button inside panel header */
#panel-collapse-btn {
    background: none; border: none; cursor: pointer; padding: 4px 6px;
    color: #6b7280; font-size: 13px; border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}
#panel-collapse-btn:hover { color: #d4af37; background: rgba(212,175,55,0.1); }

/* ── SLOT SELECTOR LOGOUT ROW ─────────────────────────────────── */
.ss-logout-row {
    display: flex; align-items: center; gap: 10px;
    margin-top: 12px; justify-content: center;
}
.ss-user-label { font-size: 10px; color: #6b7280; }

/* ── CLOUD SAVE INDICATOR ─────────────────────────────────────── */
#cloud-sync-dot {
    font-size: 14px; cursor: pointer; opacity: 0.35;
    color: #6b7280; transition: opacity 0.4s, color 0.4s;
    user-select: none;
}
#cloud-sync-dot:hover { opacity: 1 !important; }
#cloud-sync-dot.syncing { animation: cloud-blink 0.9s ease-in-out infinite; }
@keyframes cloud-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.2; }
}

/* ── SLOT SELECTOR: cloud sync timestamp ─────────────────────── */
.ss-stat-cloud { border-top: 1px solid rgba(0,242,255,0.08); margin-top: 3px; padding-top: 3px; }
.ss-cloud-ok   { color: #22c55e !important; }

/* ── SLOT SELECTOR: cloud sync buttons ───────────────────────── */
.ss-cloud-btn {
    color: #00f2ff !important;
    border-color: rgba(0,242,255,0.25) !important;
}
.ss-cloud-btn:hover { background: rgba(0,242,255,0.08) !important; }
.ss-sync-sep { color: #374151; font-size: 10px; align-self: center; }

/* ================================================================
   MOBILE RESPONSIVE (≤ 640px)
   ================================================================ */
@media (max-width: 640px) {

    /* ── Header: compact single-row strip ────────────────────── */
    header.fixed {
        padding: 0.35rem 0.6rem !important;
        gap: 0.4rem !important;
        flex-wrap: nowrap !important;
    }
    /* Left pill: show only logo + cash */
    header .pointer-events-auto.bg-panel {
        padding: 0.4rem 0.6rem !important;
        gap: 0.5rem !important;
        border-radius: 0.85rem !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
    }
    /* Hide verbose stats from header on mobile; access them via Hub */
    header .flex-col.w-20,           /* Reputazione */
    header .flex-col.w-32,           /* Stanchezza CEO */
    header .h-8.w-\[1px\].mx-1,     /* dividers */
    header .flex.items-center.gap-2  /* Weather */
    { display: none !important; }

    header .flex-col.w-24 { width: auto !important; }
    header #tb-cash { font-size: 0.85rem !important; }
    /* Logo text */
    header h1 { font-size: 0.6rem !important; }
    header .text-3xl { font-size: 1.2rem !important; }
    header p.text-\[9px\] { display: none !important; }
    /* Right pill: time only */
    header .flex.items-center.gap-3.pointer-events-auto.bg-panel { padding: 0.35rem 0.6rem !important; gap: 0.4rem !important; border-radius: 0.85rem !important; }
    header #tb-tc { font-size: 0.75rem !important; }
    header #tb-time { font-size: 1rem !important; }

    /* ── Left sidebar → bottom nav bar ──────────────────────── */
    nav.fixed {
        left: 0 !important; right: 0 !important;
        bottom: 0 !important; top: auto !important;
        transform: none !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 0.3rem 0.25rem env(safe-area-inset-bottom, 0px) !important;
        background: rgba(6,6,18,0.97) !important;
        border-top: 1px solid rgba(0,242,255,0.15) !important;
        border-left: none !important; border-right: none !important;
        border-radius: 0 !important;
        gap: 0.25rem !important;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.7) !important;
        width: 100% !important;
    }
    nav.fixed .nav-btn {
        width: 44px !important; height: 44px !important;
        border-radius: 10px !important;
        font-size: 1.15rem !important;
    }
    nav.fixed .nav-btn:hover { transform: none !important; }
    nav.fixed .hub-divider { display: none !important; }
    /* Disable desktop tooltips on mobile */
    nav.fixed .nav-btn[data-title]:hover::after { display: none !important; }

    /* ── Main panel → bottom drawer ─────────────────────────── */
    #main-panel {
        right: 0 !important; left: 0 !important;
        bottom: 62px !important;  /* above bottom nav */
        top: auto !important;
        width: 100% !important;
        max-height: 58vh !important;
        border-radius: 1.25rem 1.25rem 0 0 !important;
        border-bottom: none !important;
    }
    #main-panel.hidden-mobile { display: none !important; }

    /* Panel peek tab hidden on mobile (drawer handles it) */
    #panel-peek-tab { display: none !important; }

    /* ── Logout button: smaller, repositioned ────────────────── */
    #logout-btn {
        top: 6px !important; right: 6px !important;
        font-size: 9px !important;
        padding: 4px 7px !important;
    }

    /* ── Live map overlay: hidden on mobile ──────────────────── */
    #live-map-overlay { display: none !important; }

    /* ── Touch-friendly interactive elements ─────────────────── */
    .btn-blue, .btn-gold, button.btn-blue, button.btn-gold {
        min-height: 40px !important;
    }
    /* Inertia scrolling */
    .overflow-y-auto, #tab-container {
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }

    /* ── Hub modal: full-screen on mobile ────────────────────── */
    .hub-inner {
        max-width: 100% !important;
        max-height: 90vh !important;
        border-radius: 1.25rem 1.25rem 0 0 !important;
    }
    .hub-modal { align-items: flex-end !important; }
    .hub-grid { grid-template-columns: repeat(3, 1fr) !important; }

    /* ── Auth overlay form: readable on small screens ─────────── */
    .auth-card { padding: 1.5rem 1rem !important; max-width: 95vw !important; }
}

/* ═══════════════════════════════════════════════════════════════
   OFFICINA / WORKSHOP — Repair button in fleet cards
   ═══════════════════════════════════════════════════════════════ */
.workshop-repair-btn {
    font-size: 7px;
    font-family: 'Orbitron', monospace;
    padding: 1px 5px;
    border-radius: 5px;
    border: 1px solid rgba(245,158,11,0.4);
    background: rgba(245,158,11,0.08);
    color: #f59e0b;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.workshop-repair-btn:hover {
    background: rgba(245,158,11,0.20);
    color: #fcd34d;
}

/* ═══════════════════════════════════════════════════════════════
   PRICING STRATEGY PANEL — Marketing tab
   ═══════════════════════════════════════════════════════════════ */
.pricing-strategy-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.pricing-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.pricing-btn:hover {
    border-color: rgba(212,175,55,0.35);
    background: rgba(212,175,55,0.06);
    transform: translateY(-1px);
}
.pricing-btn-active {
    border-color: rgba(212,175,55,0.6) !important;
    background: rgba(212,175,55,0.12) !important;
    box-shadow: 0 0 12px rgba(212,175,55,0.15);
}
.pricing-btn-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.pricing-btn-label {
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.pricing-btn-sub {
    font-size: 7px;
    color: rgba(255,255,255,0.4);
    text-align: center;
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════
   DRIVER ACADEMY — Course buttons in staff tab
   ═══════════════════════════════════════════════════════════════ */
.academy-course-btn {
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(168,85,247,0.20);
    background: rgba(168,85,247,0.06);
    color: #9ca3af;
    font-size: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1.5;
}
.academy-course-btn:hover {
    border-color: rgba(168,85,247,0.45);
    background: rgba(168,85,247,0.12);
    color: #e9d5ff;
}

/* ═══════════════════════════════════════════════════════════════
   MARKET TAB — Used car cards, auction timer
   ═══════════════════════════════════════════════════════════════ */
.market-listing {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.2s;
}
.market-listing:hover { border-color: rgba(212,175,55,0.25); }

.auction-card {
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 12px;
    padding: 14px;
    background: rgba(212,175,55,0.05);
    position: relative;
}
.auction-bid-btn {
    flex: 1;
    font-size: 8px;
    padding: 5px 4px;
    border-radius: 7px;
    border: 1px solid rgba(212,175,55,0.35);
    background: rgba(212,175,55,0.10);
    color: #d4af37;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}
.auction-bid-btn:hover { background: rgba(212,175,55,0.25); }

/* ═══════════════════════════════════════════════════════════════
   HUB CONQUEST — Territory cards
   ═══════════════════════════════════════════════════════════════ */
.hub-territory-card {
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.025);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
}
.hub-territory-card.owned {
    border-color: rgba(212,175,55,0.40);
    background: rgba(212,175,55,0.06);
}

/* ═══════════════════════════════════════════════════════════════
   CEO OF THE WEEK — Weekly stats banner
   ═══════════════════════════════════════════════════════════════ */
.ceo-week-banner {
    background: linear-gradient(135deg, rgba(212,175,55,0.12) 0%, rgba(168,85,247,0.08) 100%);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 12px;
    padding: 12px 14px;
}

/* ═══════════════════════════════════════════════════════════════
   HOLDING FINANZIARIA — Subsidiary cards
   ═══════════════════════════════════════════════════════════════ */
.subsidiary-card {
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.2s;
}
.subsidiary-card.owned {
    border-color: rgba(34,197,94,0.30);
    background: rgba(34,197,94,0.04);
}

/* ═══════════════════════════════════════════════════════════════
   $CEMP COMPANY STOCK — Price ticker & sparkline
   ═══════════════════════════════════════════════════════════════ */
.cemp-ticker {
    background: rgba(0,242,255,0.04);
    border: 1px solid rgba(0,242,255,0.15);
    border-radius: 10px;
    padding: 10px 12px;
}
.cemp-price-up   { color: #22c55e; }
.cemp-price-down { color: #ef4444; }
.sparkline-svg   { display: block; }

/* ═══════════════════════════════════════════════════════════════
   TIME-SAVER BOOSTERS — Rapid action buttons
   ═══════════════════════════════════════════════════════════════ */
.booster-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(168,85,247,0.06);
    border: 1px solid rgba(168,85,247,0.20);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.booster-btn:hover {
    background: rgba(168,85,247,0.14);
    border-color: rgba(168,85,247,0.40);
}

/* ── STELLAR & VOLT FLEET CARDS ─────────────────────────────── */
.fleet-card-luxury {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(212,175,55,0.15);
    background: #0a0a0f;
    min-height: 140px;
}
.fleet-card-photo {
    position: absolute;
    inset: 0;
    background-image: var(--card-img);
    background-size: cover;
    background-position: center 30%;
    opacity: 0.35;
    filter: saturate(0.8);
}
.fleet-card-glass {
    position: relative;
    z-index: 1;
    padding: 12px;
    background: linear-gradient(
        to right,
        rgba(10,10,15,0.92) 0%,
        rgba(10,10,15,0.75) 60%,
        rgba(10,10,15,0.30) 100%
    );
}
.fleet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.fleet-card-brand {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}
.fleet-card-tier {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #d4af37;
    border: 1px solid rgba(212,175,55,0.4);
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(212,175,55,0.08);
}
.fleet-card-electric .fleet-card-tier {
    color: #22c55e;
    border-color: rgba(34,197,94,0.4);
    background: rgba(34,197,94,0.08);
}
.fleet-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-bottom: 8px;
}
.fleet-stat-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.fleet-stat-label {
    font-size: 8px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-width: 32px;
}
.fleet-stat-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.fleet-stat-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.fleet-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.fleet-card-cover {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 16/5;
    background-image: url('assets/fleet/fleet-cover.png');
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(212,175,55,0.2);
}

/* ── APP BACKGROUND — sostituisce la mappa permanente ───────────────── */
.app-bg {
    background: linear-gradient(135deg, #080b12 0%, #0f1829 40%, #0a0e18 100%);
    background-attachment: fixed;
}

.app-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ── MOBILE DISPATCHER ──────────────────────────────────────────────── */
.mobile-dispatcher-root {
    position: fixed; inset: 0; z-index: 100;
    background: linear-gradient(135deg, #080b12 0%, #0f1829 60%, #0a0e18 100%);
    display: flex; flex-direction: column; overflow: hidden; font-family: inherit;
}
.mobile-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 16px 12px;
    background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
}
.mobile-header-left { display: flex; align-items: center; gap: 10px; }
.mobile-logo { font-size: 28px; }
.mobile-company-name { font-size: 15px; font-weight: 700; color: #fff; }
.mobile-tagline { font-size: 10px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; }
.mobile-header-right { display: flex; gap: 8px; }
.mobile-stat-pill {
    display: flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px; padding: 4px 10px;
    font-size: 12px; font-weight: 600; color: #fff;
}
.mobile-section-title {
    padding: 14px 16px 8px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: rgba(255,255,255,0.4);
}
.mobile-rides-list {
    flex: 1; overflow-y: auto; padding: 0 12px 12px;
    display: flex; flex-direction: column; gap: 10px;
}
.mobile-empty { text-align: center; color: rgba(255,255,255,0.3); font-size: 13px; padding: 40px 20px; }
.mob-ride-card {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.mob-ride-top { display: flex; justify-content: space-between; align-items: center; }
.mob-ride-tier {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    padding: 3px 8px; border-radius: 8px;
    background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
}
.mob-ride-earn { font-size: 16px; font-weight: 800; color: #4ade80; }
.mob-ride-route { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,0.85); }
.mob-route-arrow { color: rgba(255,255,255,0.3); }
.mob-ride-meta { display: flex; gap: 12px; font-size: 11px; color: rgba(255,255,255,0.45); }
.mob-vip { color: #fbbf24; font-weight: 700; }
.mob-ride-actions { display: flex; gap: 8px; margin-top: 4px; }
.mob-btn-reject, .mob-btn-accept {
    flex: 1; padding: 12px; border-radius: 12px;
    font-size: 14px; font-weight: 700; border: none; cursor: pointer;
}
.mob-btn-reject { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.mob-btn-accept { background: rgba(74,222,128,0.2); color: #4ade80; border: 1px solid rgba(74,222,128,0.4); }
.mob-btn-accept:active { background: rgba(74,222,128,0.4); transform: scale(0.97); }
.mob-btn-reject:active { background: rgba(239,68,68,0.3); transform: scale(0.97); }
.mobile-bottom-nav {
    display: flex; border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(8,11,18,0.95); backdrop-filter: blur(20px);
    padding-bottom: env(safe-area-inset-bottom, 8px);
}
.mob-nav-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 10px 4px 8px;
    background: none; border: none; cursor: pointer;
    font-size: 11px; color: rgba(255,255,255,0.4);
}
.mob-nav-btn span:first-child { font-size: 22px; }
.mob-nav-btn.active { color: #60a5fa; }

/* ═══════════════════════════════════════════════════════════
   INBOX CEO — EMAIL CLIENT UI
═══════════════════════════════════════════════════════════ */

.inbox-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid #21262d;
    padding-bottom: 0;
}

.inbox-tab-btn {
    padding: 5px 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px 6px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    cursor: pointer;
    color: #6b7280;
    background: transparent;
    transition: all 0.15s ease;
    position: relative;
    bottom: -1px;
}
.inbox-tab-btn:hover {
    color: #e6edf3;
    background: #21262d;
}
.inbox-tab-btn.active {
    color: #e6edf3;
    background: #161b22;
    border-color: #21262d;
    border-bottom-color: #161b22;
}
.inbox-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 700;
    margin-left: 4px;
    background: #ef4444;
    color: white;
}
.inbox-tab-badge.badge-gold { background: #d97706; }
.inbox-tab-badge.badge-purple { background: #7c3aed; }
.inbox-tab-badge.badge-blue { background: #2563eb; }

/* ── INBOX: conversione al tema scuro COMPLETATA (28/08/2026) ───────────────
   Playtest di Pietro: «In Le Mie Sedi>Inbox, l'UI e' cosi' luminosa che
   preferirei guardare il sole. Non si legge niente.»

   Aveva ragione, e la causa e' un cambio di tema lasciato a meta'. La storia:
   il commit 2211194 aveva convertito tutto a CHIARO («Fase 3»), poi 06e5763 ha
   riconvertito a SCURO («Bloomberg-terminal theme») — ma questo blocco e'
   rimasto ibrido: fondo BIANCO della fase chiara con testi e bordi SCURI della
   fase Bloomberg. Misurato nel browser: `#e6edf3` su `#ffffff` = contrasto
   1.18. Il nome del mittente e l'oggetto erano bianchi su bianco.

   Qui si finisce la conversione: i FONDI diventano scuri come i testi che gia'
   c'erano. Le pill colorate (`rgba(colore,0.15)` + testo saturo) tornano a
   funzionare da sole: quel disegno e' nato per un fondo scuro, su bianco si
   sbiadiva (il badge «CEO EVENT» aveva contrasto 1.00). */
.email-card {
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: border-color 0.15s ease;
}
.email-card:hover { border-color: #30363d; }
.email-card.email-urgent   { border-left: 3px solid #f97316; }
.email-card.email-red      { border-left: 3px solid #ef4444; }
.email-card.email-vip      { border-left: 3px solid #a855f7; }
.email-card.email-diamond  { border-left: 3px solid #eab308; }
.email-card.email-broker-pos { border-left: 3px solid #22c55e; }
.email-card.email-broker-neg { border-left: 3px solid #ef4444; }
.email-card.email-blue     { border-left: 3px solid #3b82f6; }
.email-card.email-gold     { border-left: 3px solid #d97706; }

.email-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}
.email-sender-block {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.email-sender-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.email-sender-name {
    font-size: 10px;
    font-weight: 700;
    color: #e6edf3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.email-sender-role {
    font-size: 8px;
    color: #8b949e;   /* schiarito: #6b7280 su #161b22 non si leggeva */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.email-type-badge {
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.badge-orange   { background: rgba(249,115,22,0.15); color: #f97316; border: 1px solid rgba(249,115,22,0.3); }
.badge-red-pill { background: rgba(239,68,68,0.15);  color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.badge-gold-pill{ background: rgba(217,119,6,0.15);  color: #d97706; border: 1px solid rgba(217,119,6,0.3); }
.badge-purple-pill{ background: rgba(168,85,247,0.15); color: #a855f7; border: 1px solid rgba(168,85,247,0.3); }
.badge-yellow-pill{ background: rgba(234,179,8,0.15); color: #eab308; border: 1px solid rgba(234,179,8,0.3); }
.badge-green-pill { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-blue-pill  { background: rgba(59,130,246,0.15); color: #3b82f6; border: 1px solid rgba(59,130,246,0.3); }

.email-timestamp {
    font-size: 8px;
    color: #8b949e;   /* schiarito: #4b5563 su #161b22 non si leggeva */
    margin-bottom: 4px;
}
.email-subject {
    font-size: 11px;
    font-weight: 700;
    color: #e6edf3;
    margin-bottom: 8px;
    line-height: 1.3;
}
.email-body {
    font-size: 9px;
    color: #adbac7;   /* schiarito: il pannello sotto e' ora #0d1117 */
    line-height: 1.6;
    white-space: pre-line;
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #0d1117;
    border-radius: 4px;
    border-left: 2px solid #21262d;
}
.email-signature {
    font-size: 8px;
    color: #8b949e;
    font-style: italic;
    margin-bottom: 10px;
    white-space: pre-line;
}
.email-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #21262d;
}
.email-expiry {
    font-size: 8px;
    margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════
   $WALL-ST FINANCE — BLOOMBERG AESTHETIC
═══════════════════════════════════════════════════════════ */

.finance-portfolio-dashboard {
    background: linear-gradient(135deg, rgba(0,20,0,0.6), rgba(0,10,20,0.6));
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
}
.finance-portfolio-title {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #4b5563;
    margin-bottom: 4px;
}
.finance-portfolio-total {
    font-size: 22px;
    font-weight: 900;
    color: #f0fdf4;
    font-family: 'Courier New', monospace;
    letter-spacing: -0.5px;
}
.finance-portfolio-pl {
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    font-family: 'Courier New', monospace;
}
.finance-portfolio-pl.positive { color: #22c55e; }
.finance-portfolio-pl.negative { color: #ef4444; }

.finance-alloc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 8px;
    font-family: 'Courier New', monospace;
}
.finance-alloc-label {
    color: #6b7280;
    width: 48px;
    flex-shrink: 0;
}
.finance-alloc-bar-wrap {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}
.finance-alloc-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}
.finance-alloc-bar.stocks { background: #22c55e; }
.finance-alloc-bar.broker { background: #3b82f6; }
.finance-alloc-value {
    color: #9ca3af;
    width: 72px;
    text-align: right;
}
.finance-alloc-pct {
    color: #4b5563;
    width: 28px;
    text-align: right;
}

.finance-section-header {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #d97706;
    border-bottom: 1px solid rgba(217,119,6,0.2);
    padding-bottom: 4px;
    margin: 14px 0 8px;
    font-family: 'Courier New', monospace;
}

.finance-ticker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 4px;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    transition: background 0.15s;
}
.finance-ticker-row:hover { background: rgba(255,255,255,0.04); }
.finance-ticker-symbol { color: #e5e7eb; font-weight: 700; width: 64px; }
.finance-ticker-price  { color: #f9fafb; font-weight: 600; width: 64px; text-align: right; }
.finance-ticker-change { width: 56px; text-align: right; font-size: 8px; font-weight: 600; }
.finance-ticker-change.up   { color: #22c55e; }
.finance-ticker-change.down { color: #ef4444; }
.finance-ticker-change.flat { color: #6b7280; }
.finance-ticker-shares { color: #6b7280; font-size: 8px; width: 48px; text-align: right; }

@keyframes flashUp   { 0%{ background: rgba(22,163,74,0.25);  } 100%{ background: transparent; } }
@keyframes flashDown { 0%{ background: rgba(220,38,38,0.25);  } 100%{ background: transparent; } }
.price-flash-up   { animation: flashUp   0.5s ease-out; }
.price-flash-down { animation: flashDown 0.5s ease-out; }

/* ═══════════════════════════════════════════════════════════
   MARKETING STRATEGY — DUAL BRAND SYSTEM
═══════════════════════════════════════════════════════════ */

.mkt-section-header {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #d97706;
    border-bottom: 1px solid rgba(217,119,6,0.2);
    padding-bottom: 4px;
    margin: 14px 0 10px;
}

.brand-gauge-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}
.brand-gauge {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 12px;
}
.brand-gauge-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-gauge-label.volume-label  { color: #3b82f6; }
.brand-gauge-label.prestige-label { color: #a855f7; }
.brand-gauge-value {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 6px;
}
.brand-gauge-value.vol-val  { color: #60a5fa; }
.brand-gauge-value.pres-val { color: #c084fc; }
.brand-gauge-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
.brand-gauge-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.brand-gauge-bar.volume-bar   { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.brand-gauge-bar.prestige-bar { background: linear-gradient(90deg, #7c3aed, #c084fc); }
.brand-gauge-effect {
    font-size: 8px;
    color: #e5e7eb;
    margin-top: 2px;
}
.brand-gauge-effect.active { color: #22c55e; }

.mkt-tier-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.mkt-tier-btn {
    padding: 4px 10px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    color: #9ca3af;
    background: transparent;
    transition: all 0.15s;
}
.mkt-tier-btn:hover { color: #e5e7eb; background: rgba(255,255,255,0.05); }
.mkt-tier-btn.active.tier-starter  { color: #22c55e; border-color: rgba(34,197,94,0.3);  background: rgba(34,197,94,0.08); }
.mkt-tier-btn.active.tier-growth   { color: #3b82f6; border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.08); }
.mkt-tier-btn.active.tier-empire   { color: #d97706; border-color: rgba(217,119,6,0.3);  background: rgba(217,119,6,0.08); }

.campaign-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: all 0.15s;
}
.campaign-card:hover:not(.campaign-locked) { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); }
.campaign-card.campaign-active   { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.06); }
.campaign-card.campaign-locked   { opacity: 0.5; cursor: not-allowed; }
.campaign-card.campaign-cooldown { border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.04); }
.campaign-card.tier-starter  { border-left: 3px solid #22c55e; }
.campaign-card.tier-growth   { border-left: 3px solid #3b82f6; }
.campaign-card.tier-empire   { border-left: 3px solid #d97706; }

.campaign-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}
.campaign-name {
    font-size: 11px;
    font-weight: 700;
    color: #f3f4f6;
    display: flex;
    align-items: center;
    gap: 6px;
}
.campaign-axis-badge {
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
}
.axis-volume   { background: rgba(59,130,246,0.15); color: #60a5fa; }
.axis-prestige { background: rgba(168,85,247,0.15); color: #c084fc; }
.axis-both     { background: rgba(217,119,6,0.15);  color: #fbbf24; }

.campaign-cost {
    font-size: 10px;
    font-weight: 700;
    color: #ef4444;
    white-space: nowrap;
}
.campaign-desc {
    font-size: 8px;
    color: #e5e7eb;
    margin-bottom: 6px;
    line-height: 1.5;
}
.campaign-strat {
    font-size: 8px;
    color: #9ca3af;
    line-height: 1.5;
    margin-bottom: 8px;
    font-style: italic;
    padding: 6px 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    border-left: 2px solid rgba(255,255,255,0.06);
}
.campaign-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.campaign-stat {
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.04);
    color: #9ca3af;
    white-space: nowrap;
}
.campaign-stat.stat-positive { color: #22c55e; }
.campaign-stat.stat-highlight { color: #fbbf24; }

.campaign-progress-wrap {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}
.campaign-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.campaign-lock-reason {
    font-size: 8px;
    color: #9ca3af;
    font-style: italic;
    margin-top: 4px;
}

.mkt-roi-box {
    background: rgba(0,20,0,0.4);
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 14px;
}
.mkt-roi-title {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 8px;
}
.mkt-roi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    margin-bottom: 4px;
}
.mkt-roi-label { color: #9ca3af; }
.mkt-roi-value { color: #22c55e; font-weight: 600; font-family: 'Courier New', monospace; }

/* ================================================================
   OPS ROOM — Dispatch Center Bloomberg Layout
   ================================================================ */

/* KPI Strip — light theme */
.ops-kpi-strip {
    display: flex;
    align-items: center;
    gap: 0;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-family: 'Roboto Mono', monospace;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.ops-kpi { display: flex; flex-direction: column; gap: 2px; padding: 0 20px; }
.ops-kpi:first-child { padding-left: 0; }
.ops-kpi-label { font-size: 10px; color: #6b8096; text-transform: uppercase; letter-spacing: 0.1em; }
.ops-kpi-value { font-size: 22px; font-weight: 700; line-height: 1; }
.ops-kpi-sub { font-size: 13px; color: #7a90a4; font-weight: 400; }
.ops-kpi-sep { width: 1px; align-self: stretch; background: rgba(0,0,0,0.10); margin: 0 4px; }

.ops-alert-pill {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.5);
    color: #ef4444;
    font-size: 11px; font-weight: 700;
    padding: 5px 12px; border-radius: 6px;
    font-family: 'Roboto Mono', monospace;
    animation: ops-blink 1s ease-in-out infinite;
}
@keyframes ops-blink { 0%,100%{opacity:1} 50%{opacity:0.5} }

.ops-action-btn {
    font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
    padding: 7px 16px; border-radius: 6px; cursor: pointer;
    border: none; font-family: 'Roboto Mono', monospace;
    transition: all 0.15s ease;
}
.ops-action-btn--blue {
    background: rgba(29,111,168,0.10); color: #1d6fa8;
    border: 1px solid rgba(29,111,168,0.30);
}
.ops-action-btn--blue:hover { background: rgba(29,111,168,0.20); }
.ops-action-btn--gold {
    background: var(--gold); color: #000;
}
.ops-action-btn--gold:hover { background: #eed575; }

/* Daily Summary Strip */
.ops-daily-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-family: monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    background: rgba(0,0,0,0.04);
    border-top: 1px solid var(--border);
    padding: 10px 14px;
    margin-top: 4px;
}
.ops-daily-label {
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ops-daily-sep { color: var(--text-dim); opacity: 0.4; }
.ops-daily-item { color: var(--text-muted); }

/* Main 2-column grid */
.ops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-height: 0;
}
@media (max-width: 800px) { .ops-grid { grid-template-columns: 1fr; } }

.ops-col {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 10px;
    display: flex; flex-direction: column;
    overflow: hidden;
    min-height: 400px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.ops-col-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0,0,0,0.04);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}
.ops-col-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: #5a7090;
    font-family: 'Roboto Mono', monospace;
}
.ops-col-badge {
    font-size: 11px; font-weight: 700;
    background: rgba(0,0,0,0.07);
    color: #5a7090;
    padding: 3px 10px; border-radius: 10px;
    font-family: 'Roboto Mono', monospace;
}
.ops-col-badge--active {
    background: rgba(184,134,11,0.12);
    color: #b8860b;
    border: 1px solid rgba(184,134,11,0.30);
}

/* Ride list */
.ops-ride-list {
    flex: 1; overflow-y: auto; padding: 8px;
    display: flex; flex-direction: column; gap: 6px;
}
.ops-empty-state {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 20px;
}
.ops-ride-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center; gap: 12px;
    padding: 12px 14px;
    background: #f8fafb;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    cursor: grab; transition: all 0.15s ease;
}
.ops-ride-card:hover {
    background: #eef5fb;
    border-color: rgba(29,111,168,0.30);
    box-shadow: 0 2px 8px rgba(29,111,168,0.08);
}
.ops-ride-card--contract {
    border-color: rgba(184,134,11,0.25);
    background: #fdfaf2;
}
.ops-ride-tier {
    font-size: 10px; font-weight: 700;
    padding: 4px 9px; border-radius: 5px;
    border: 1px solid;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
}
.ops-ride-route {
    font-size: 13px; font-weight: 600; color: #1a2744;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ops-ride-arrow { color: #8a9db0; margin: 0 5px; }
.ops-ride-price {
    font-size: 14px; font-weight: 700; color: #22c55e;
    font-family: 'Roboto Mono', monospace;
    text-align: right; white-space: nowrap;
}
.ops-ride-margin {
    display: block; font-size: 11px; font-weight: 600;
}

/* Driver list */
.ops-driver-list {
    flex: 1; overflow-y: auto; padding: 8px;
    display: flex; flex-direction: column; gap: 4px;
}
.ops-driver-row {
    display: grid;
    grid-template-columns: 10px 1fr auto auto;
    align-items: center; gap: 12px;
    padding: 12px 14px;
    background: #f8fafb;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    transition: background 0.15s ease;
}
.ops-driver-row:hover { background: #eef3f8; }
.ops-driver-status-dot {
    width: 9px; height: 9px; border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 7px currentColor;
}
.ops-driver-info { min-width: 0; }
.ops-driver-name {
    font-size: 13px; font-weight: 600; color: #1a2744;
    display: flex; align-items: center; gap: 6px;
}
.ops-driver-car { font-size: 11px; color: #6b8096; margin-top: 2px; }
.ops-driver-right { text-align: right; min-width: 90px; }
.ops-driver-status-label {
    font-size: 11px; font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.ops-driver-queue { font-size: 10px; color: #8a9db0; font-family: 'Roboto Mono', monospace; }
.ops-driver-bars {
    display: flex; flex-direction: column; gap: 4px;
    width: 80px; flex-shrink: 0;
}
.ops-bar-wrap {
    height: 5px; background: rgba(0,0,0,0.12); border-radius: 3px; overflow: hidden;
}
.ops-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.ops-mini-btn {
    font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
    padding: 3px 8px; border-radius: 4px; cursor: pointer;
    background: rgba(249,115,22,0.1);
    border: 1px solid rgba(249,115,22,0.35);
    color: #f97316;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.12s ease;
}
.ops-mini-btn:hover { background: rgba(249,115,22,0.2); }
.mkt-roi-value.negative { color: #ef4444; }

/* ════════════════════════════════════════════════════════════════
   CHAUFFEUR EMPIRE — DESIGN SYSTEM v2.0
   Reusable Bloomberg-terminal components for all tabs
   ════════════════════════════════════════════════════════════════ */

/* ── DS: Terminal Card ──────────────────────────────────────── */
.ds-card {
    background: var(--bg2);
    border: 1px solid var(--border-sub);
    border-radius: var(--r-lg);
    padding: var(--sp-xl);
    transition: border-color var(--ease-std), box-shadow var(--ease-std);
}
.ds-card:hover { border-color: rgba(0,0,0,0.22); box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
.ds-card--gold  { border-color: var(--border-gold); }
.ds-card--gold:hover { box-shadow: var(--glow-gold); }
.ds-card--alert { border-color: rgba(239,68,68,0.35); }
.ds-card--alert:hover { box-shadow: var(--glow-red); }

/* ── DS: Section Header (tab title + subtitle) ───────────────── */
.ds-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: var(--sp-xl);
    border-bottom: 1px solid var(--border-sub);
    padding-bottom: var(--sp-md);
}
.ds-header-left {}
.ds-eyebrow {
    font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: #27ae60; margin-bottom: 4px;
    font-family: var(--font-mono);
}
.ds-title {
    font-size: 20px; font-weight: 700;
    font-family: var(--font-display);
    color: var(--text); letter-spacing: 0.02em;
}
.ds-subtitle {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
.ds-header-actions { display: flex; gap: 8px; align-items: center; }

/* ── DS: KPI Strip ───────────────────────────────────────────── */
.ds-kpi-strip {
    display: flex; gap: 0;
    background: var(--bg2);
    border: 1px solid var(--border-sub);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: var(--sp-xl);
}
.ds-kpi {
    flex: 1; padding: 14px 16px;
    border-right: 1px solid var(--border-sub);
    min-width: 0;
}
.ds-kpi:last-child { border-right: none; }
.ds-kpi-label {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-muted);
    font-family: var(--font-mono); margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-kpi-val {
    font-size: 18px; font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text); white-space: nowrap;
}
.ds-kpi-val--blue  { color: var(--blue); }
.ds-kpi-val--gold  { color: var(--gold); }
.ds-kpi-val--green { color: var(--green); }
.ds-kpi-val--red   { color: var(--red); }
.ds-kpi-sub {
    font-size: 9px; color: var(--text-dim);
    font-family: var(--font-mono); margin-top: 2px;
}
.ds-kpi-delta { font-size: 9px; font-family: var(--font-mono); margin-top: 2px; }
.ds-kpi-delta.up   { color: var(--green); }
.ds-kpi-delta.down { color: var(--red); }

/* ── DS: Data Table ─────────────────────────────────────────── */
.ds-table-wrap {
    background: var(--bg2);
    border: 1px solid var(--border-sub);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.ds-table {
    width: 100%; border-collapse: collapse;
    font-family: var(--font-mono); font-size: 11px;
}
.ds-table thead tr {
    background: rgba(0,0,0,0.06);
    border-bottom: 1px solid var(--border-sub);
}
.ds-table th {
    padding: 8px 12px; text-align: left;
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted);
    white-space: nowrap;
}
.ds-table td {
    padding: 10px 12px; color: var(--text);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    vertical-align: middle;
}
.ds-table tbody tr:last-child td { border-bottom: none; }
.ds-table tbody tr:hover td { background: rgba(0,0,0,0.04); }
.ds-table .col-right { text-align: right; }
.ds-table .col-center { text-align: center; }

/* ── DS: Alert Pill ─────────────────────────────────────────── */
.ds-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 20px;
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    font-family: var(--font-mono); white-space: nowrap;
}
.ds-pill--blue   { background: var(--blue-dim);  color: var(--blue);  border: 1px solid rgba(0,242,255,0.25); }
.ds-pill--gold   { background: var(--gold-dim);  color: var(--gold);  border: 1px solid var(--gold-border); }
.ds-pill--green  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.ds-pill--red    { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(239,68,68,0.35); }
.ds-pill--orange { background: rgba(249,115,22,0.12); color: var(--orange); border: 1px solid rgba(249,115,22,0.3); }
.ds-pill--purple { background: rgba(168,85,247,0.12); color: var(--purple); border: 1px solid rgba(168,85,247,0.3); }
.ds-pill--red.blink { animation: ds-blink 0.9s infinite; }
@keyframes ds-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* ── DS: Button variants ────────────────────────────────────── */
.ds-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: var(--r-sm);
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.03em; text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer; border: 1px solid;
    transition: all var(--ease-std); white-space: nowrap;
}
.ds-btn--blue {
    background: var(--blue-dim); color: var(--blue);
    border-color: rgba(56,189,248,0.40);
}
.ds-btn--blue:hover { background: rgba(56,189,248,0.22); box-shadow: var(--glow-blue); }
.ds-btn--gold {
    background: var(--gold-dim); color: var(--gold);
    border-color: var(--gold-border);
}
.ds-btn--gold:hover { background: rgba(245,158,11,0.24); box-shadow: var(--glow-gold); }
.ds-btn--green {
    background: var(--green-dim); color: var(--green);
    border-color: rgba(74,222,128,0.40);
}
.ds-btn--green:hover { background: rgba(74,222,128,0.24); box-shadow: var(--glow-green); }
.ds-btn--red {
    background: var(--red-dim); color: var(--red);
    border-color: rgba(248,113,113,0.40);
}
.ds-btn--red:hover { background: rgba(248,113,113,0.24); box-shadow: var(--glow-red); }
.ds-btn--ghost {
    background: transparent; color: var(--text-muted);
    border-color: var(--border-sub);
}
.ds-btn--ghost:hover { color: var(--text); border-color: rgba(0,0,0,0.25); background: var(--surface); }
.ds-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── DS: Progress Bar ───────────────────────────────────────── */
.ds-progress {
    height: 6px; background: rgba(0,0,0,0.12);
    border-radius: 4px; overflow: hidden;
}
.ds-progress-fill {
    height: 100%; border-radius: 4px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #4ade80, #22c55e);
}
.ds-progress-fill--gold   { background: linear-gradient(90deg, var(--gold), #d97706); }
.ds-progress-fill--green  { background: linear-gradient(90deg, var(--green), #22c55e); }
.ds-progress-fill--red    { background: linear-gradient(90deg, var(--red),  #ef4444); }
.ds-progress-fill--orange { background: linear-gradient(90deg, var(--orange), #ea580c); }
.ds-progress-fill--blue   { background: linear-gradient(90deg, var(--blue), var(--blue2)); }

/* ── DS: Empty State ────────────────────────────────────────── */
.ds-empty {
    text-align: center; padding: 60px 20px;
    color: var(--text-muted);
}
.ds-empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.ds-empty-title { font-size: 14px; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }
.ds-empty-body  { font-size: 11px; color: var(--text-muted); }

/* ── DS: Notification Toast ─────────────────────────────────── */
.ds-toast {
    position: fixed; bottom: 32px; right: 20px; z-index: var(--z-toast);
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 18px; border-radius: var(--r-lg);
    min-width: 280px; max-width: 420px;
    background: rgba(5,5,20,0.98);
    border: 1px solid var(--border-sub);
    box-shadow: 0 8px 40px rgba(0,0,0,0.8);
    font-size: 12px; color: var(--text);
    animation: ds-toast-in 0.25s ease-out;
    font-family: var(--font-body);
}
.ds-toast--success { border-color: rgba(34,197,94,0.4);  box-shadow: var(--glow-green); }
.ds-toast--error   { border-color: rgba(239,68,68,0.4);  box-shadow: var(--glow-red); }
.ds-toast--warning { border-color: rgba(249,115,22,0.4); }
.ds-toast-icon     { font-size: 18px; flex-shrink: 0; margin-top: -1px; }
.ds-toast-body     {}
.ds-toast-title    { font-weight: 700; margin-bottom: 2px; }
.ds-toast-msg      { font-size: 11px; color: var(--text-muted); }
@keyframes ds-toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── DS: CEO Stress Indicator ───────────────────────────────── */
.ds-stress-bar {
    display: flex; align-items: center; gap: 10px;
}
.ds-stress-track {
    flex: 1; height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}
.ds-stress-fill {
    height: 100%; border-radius: 4px;
    transition: width 0.6s ease, background 0.6s ease;
}
.ds-stress-fill[data-level="low"]    { background: var(--green); }
.ds-stress-fill[data-level="medium"] { background: var(--orange); }
.ds-stress-fill[data-level="high"]   { background: var(--red); animation: ds-blink 1.2s infinite; }
.ds-stress-label {
    font-size: 10px; font-weight: 700; font-family: var(--font-mono);
    min-width: 36px; text-align: right;
}

/* ── DS: Notification Panel (urgent alerts) ──────────────────── */
.ds-alert-panel {
    position: fixed; top: 96px; right: 16px; z-index: var(--z-alert);
    display: flex; flex-direction: column; gap: 6px;
    pointer-events: none; max-width: 320px;
}
.ds-alert-item {
    pointer-events: all;
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px; border-radius: var(--r-md);
    background: rgba(5,5,20,0.97);
    border-left: 3px solid;
    box-shadow: 0 4px 20px rgba(0,0,0,0.7);
    font-size: 11px; cursor: pointer;
    animation: ds-alert-slide 0.2s ease-out;
    transition: opacity 0.3s ease;
}
.ds-alert-item:hover { opacity: 0.75; }
.ds-alert-item.type-danger  { border-color: var(--red);    color: var(--red); }
.ds-alert-item.type-warning { border-color: var(--orange); color: var(--orange); }
.ds-alert-item.type-info    { border-color: var(--blue);   color: var(--blue); }
.ds-alert-item.type-success { border-color: var(--green);  color: var(--green); }
.ds-alert-text { color: var(--text); font-size: 11px; }
@keyframes ds-alert-slide {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── DS: Grid Layout Helpers ─────────────────────────────────── */
.ds-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-xl); }
.ds-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-lg); }
.ds-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); }
@media (max-width: 900px) {
    .ds-grid-2, .ds-grid-3, .ds-grid-4 { grid-template-columns: 1fr; }
}

/* ── DS: Skeleton Loader ─────────────────────────────────────── */
.ds-skel {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: ds-skel-shimmer 1.5s infinite;
    border-radius: var(--r-sm);
}
@keyframes ds-skel-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* ── DS: Divider ─────────────────────────────────────────────── */
.ds-divider {
    height: 1px; background: var(--border-sub);
    margin: var(--sp-xl) 0;
}
.ds-divider--gold { background: var(--border-gold); }

/* ════════════════════════════════════════════════════════════════
   AESTHETIC UPGRADE v3
   Refactoring UI · UX Heuristics · iOS HIG · Hooked UX · UI/UX Pro Max
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Selection highlight (cyberpunk theme) ───────────────────── */
::selection { background: rgba(0,242,255,0.18); color: #ffffff; }

/* ── 2. DS Header: gradient border accent + title glow ──────────── */
.ds-header {
    position: relative;
    padding-top: var(--sp-md);
    border-bottom-color: transparent;
}
.ds-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, rgba(0,242,255,0.45) 0%, rgba(0,242,255,0.1) 35%, transparent 70%);
    pointer-events: none;
}
.ds-eyebrow {
    text-shadow: 0 0 10px rgba(0,242,255,0.55);
}
.ds-title {
    background: linear-gradient(130deg, #ffffff 25%, #b0f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 18px rgba(0,242,255,0.12));
}
.ds-subtitle { color: #6b7280; }

/* ── 3. KPI Strip: elevation + colored glow on values ──────────── */
.ds-kpi-strip {
    background: linear-gradient(135deg, rgba(8,8,24,0.97), rgba(6,6,18,0.99));
    box-shadow: 0 4px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
}
.ds-kpi { transition: background var(--ease-std); cursor: default; }
.ds-kpi:hover { background: rgba(255,255,255,0.02); }
.ds-kpi-val--blue  { text-shadow: 0 0 14px rgba(0,242,255,0.5); }
.ds-kpi-val--gold  { text-shadow: 0 0 14px rgba(212,175,55,0.5); }
.ds-kpi-val--green { text-shadow: 0 0 14px rgba(34,197,94,0.5); }
.ds-kpi-val--red   { text-shadow: 0 0 14px rgba(239,68,68,0.5); }

/* ── 4. DS Card: glass elevation + hover lift ───────────────────── */
.ds-card {
    box-shadow: 0 2px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: border-color var(--ease-std), box-shadow var(--ease-std), transform var(--ease-std);
}
.ds-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 36px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,242,255,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
}
.ds-card--gold:hover {
    box-shadow: 0 8px 36px rgba(0,0,0,0.55), 0 0 24px rgba(212,175,55,0.1), inset 0 1px 0 rgba(212,175,55,0.05);
}
.ds-card--alert { box-shadow: 0 2px 20px rgba(239,68,68,0.08), inset 0 1px 0 rgba(255,255,255,0.03); }

/* ── 5. DS Buttons: gradient bg + press effect ──────────────────── */
.ds-btn {
    border-radius: var(--r-md);
    position: relative; overflow: hidden;
    transition: all var(--ease-std);
}
.ds-btn:active:not(:disabled) { transform: translateY(1px) scale(0.98); }
.ds-btn--blue  { background: linear-gradient(135deg, rgba(0,242,255,0.14), rgba(0,242,255,0.05)); }
.ds-btn--gold  { background: linear-gradient(135deg, rgba(212,175,55,0.16), rgba(212,175,55,0.05)); }
.ds-btn--green { background: linear-gradient(135deg, rgba(34,197,94,0.14), rgba(34,197,94,0.05)); }
.ds-btn--red   { background: linear-gradient(135deg, rgba(239,68,68,0.14), rgba(239,68,68,0.05)); }
.ds-btn--blue:hover  { background: linear-gradient(135deg, rgba(0,242,255,0.22), rgba(0,242,255,0.1)); }
.ds-btn--gold:hover  { background: linear-gradient(135deg, rgba(212,175,55,0.24), rgba(212,175,55,0.1)); }
.ds-btn--green:hover { background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(34,197,94,0.1)); }
.ds-btn--red:hover   { background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(239,68,68,0.1)); }

/* ── 6. Progress bars: taller + glow fills ──────────────────────── */
.ds-progress { height: 7px; }
.ds-progress-fill          { box-shadow: 0 0 8px rgba(0,242,255,0.45); }
.ds-progress-fill--gold    { box-shadow: 0 0 8px rgba(212,175,55,0.5); }
.ds-progress-fill--green   { box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.ds-progress-fill--red     { box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.ds-progress-fill--orange  { box-shadow: 0 0 8px rgba(249,115,22,0.5); }
.ds-progress-fill--blue    { box-shadow: 0 0 8px rgba(0,242,255,0.45); }

/* ── 7. Alert items: improved glass panel ──────────────────────── */
.ds-alert-item {
    background: rgba(4,4,16,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 28px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.04);
}

/* ── 8. Toast: glass + glow + richer animation ──────────────────── */
.ds-toast {
    background: rgba(4,4,18,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 48px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.06);
}
.ds-toast--success { box-shadow: 0 8px 48px rgba(0,0,0,0.85), 0 0 24px rgba(34,197,94,0.12); }
.ds-toast--error   { box-shadow: 0 8px 48px rgba(0,0,0,0.85), 0 0 24px rgba(239,68,68,0.12); }
@keyframes ds-toast-in {
    from { opacity: 0; transform: translateX(24px) scale(0.97); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ── 9. Table: cyan header labels + row hover ───────────────────── */
.ds-table th { color: var(--blue); opacity: 0.75; }
.ds-table thead tr { border-bottom-color: rgba(0,242,255,0.12); }
.ds-table tbody tr:hover td { background: rgba(0,242,255,0.025); }
.ds-table-wrap { box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03); }

/* ── 10. Skeleton shimmer: cyan-tinted, richer ──────────────────── */
.ds-skel {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.03) 0%,
        rgba(0,242,255,0.055) 40%,
        rgba(255,255,255,0.08) 50%,
        rgba(0,242,255,0.055) 60%,
        rgba(255,255,255,0.03) 100%
    );
    background-size: 300% 100%;
}

/* ── Skeleton shimmer flat (eRepublik) — grigio neutro, zero neon ── */
@keyframes ceSkelShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ce-skel {
    background: linear-gradient(90deg, #161b22 0%, #1d2531 50%, #161b22 100%);
    background-size: 200% 100%;
    animation: ceSkelShimmer 1.3s ease-in-out infinite;
    border: 1px solid #21262d;
    border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) { .ce-skel { animation: none; } }

/* ── 11. Pill refinements: more padding + depth ─────────────────── */
.ds-pill { padding: 3px 10px; letter-spacing: 0.08em; }

/* ── 12. Top nav: gold text-shadow on active ────────────────────── */
.top-nav-btn.active { text-shadow: 0 0 10px rgba(212,175,55,0.55); }

/* ── 13. Dropdown: entrance animation ──────────────────────────── */
.nav-cat:hover .nav-drop { animation: navDropIn 0.14s ease-out; }
@keyframes navDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 14. HUD cards: elevation ───────────────────────────────────── */
.hud-card {
    box-shadow: 0 2px 14px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.03);
}
.hud-card:hover {
    box-shadow: 0 6px 28px rgba(0,0,0,0.5), 0 0 16px rgba(0,242,255,0.09), inset 0 1px 0 rgba(0,242,255,0.04);
}

/* ── 15. Hub module: depth ──────────────────────────────────────── */
.hub-module { box-shadow: 0 2px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04); }
.hub-module:hover {
    box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 20px rgba(212,175,55,0.07), inset 0 1px 0 rgba(212,175,55,0.05);
}
.hub-inner {
    box-shadow: 0 40px 100px rgba(0,0,0,0.82), 0 0 60px rgba(212,175,55,0.04), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ── 16. Fleet luxury cards: lift on hover ──────────────────────── */
.fleet-card-luxury {
    box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.fleet-card-luxury:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 20px rgba(212,175,55,0.07);
}

/* ── 17. Market listings: lift + gold hover ─────────────────────── */
.market-listing {
    box-shadow: 0 1px 8px rgba(0,0,0,0.3);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.market-listing:hover {
    border-color: rgba(212,175,55,0.28);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transform: translateY(-1px);
}
.auction-card { box-shadow: 0 4px 24px rgba(212,175,55,0.07), inset 0 1px 0 rgba(212,175,55,0.05); }

/* ── 18. Email cards: depth ─────────────────────────────────────── */
.email-card {
    box-shadow: 0 1px 2px rgba(31,39,51,0.07);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.email-card:hover { box-shadow: 0 3px 10px rgba(31,39,51,0.12); }

/* ── 19. Notification toast: glass ─────────────────────────────── */
.notif {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 16px rgba(0,242,255,0.07);
}

/* ── 20. Ops daily summary: cyan gradient accent ────────────────── */
.ops-daily-summary {
    background: linear-gradient(90deg, rgba(0,242,255,0.04) 0%, transparent 100%);
    border-top-color: rgba(0,242,255,0.12);
}
.ops-daily-label {
    color: rgba(0,242,255,0.75);
    text-shadow: 0 0 8px rgba(0,242,255,0.4);
}

/* ── 21. Ride progress bar: glow ────────────────────────────────── */
.ride-progress-fill { box-shadow: 0 0 8px var(--blue), 0 0 2px rgba(0,242,255,0.9); }

/* ── 22. XP bar: glow ───────────────────────────────────────────── */
.xp-bar-fill { box-shadow: 0 0 6px rgba(0,242,255,0.55); }

/* ── 23. Driver skill bars: glow ────────────────────────────────── */
.driver-skill-bar-fill { box-shadow: 0 0 4px currentColor; }

/* ── 24. Level badges: glow by tier ────────────────────────────── */
.lvl-pro    { box-shadow: 0 0 6px rgba(0,242,255,0.25); }
.lvl-expert { box-shadow: 0 0 6px rgba(180,100,255,0.28); }
.lvl-elite  { box-shadow: 0 0 8px rgba(212,175,55,0.35); }

/* ── 25. Daily reward modal: depth ─────────────────────────────── */
.dr-inner {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 0 80px rgba(212,175,55,0.16), 0 32px 64px rgba(0,0,0,0.7);
}
.dr-day-today { box-shadow: 0 0 14px rgba(212,175,55,0.22); }

/* ── 26. btn-blue / btn-gold legacy: press effect ──────────────── */
.btn-blue:active, .btn-gold:active { transform: translateY(1px) scale(0.98) !important; }

/* ── 27. Scrollbar: thinner + dimmer ────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: rgba(0,242,255,0.16); }
::-webkit-scrollbar-thumb:hover { background: rgba(0,242,255,0.38); }

/* ── 28. Finance stock cards: depth ────────────────────────────── */
.finance-stock-card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.03);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.finance-stock-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.45), 0 0 12px rgba(0,242,255,0.06);
}

/* ── 29. Lifestyle cards: gold depth ────────────────────────────── */
.ls-card {
    box-shadow: 0 4px 24px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}
.ls-card-owned { box-shadow: 0 0 28px rgba(212,175,55,0.1), inset 0 1px 0 rgba(212,175,55,0.06); }

/* ── 30. Save slot cards: hover glow ────────────────────────────── */
.ss-slot:hover {
    box-shadow: 0 10px 32px rgba(0,0,0,0.45), 0 0 20px rgba(212,175,55,0.08);
}
.ss-setup-card {
    box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 40px rgba(212,175,55,0.06), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── 31. Pricing buttons: active depth ──────────────────────────── */
.pricing-btn:active { transform: translateY(0) scale(0.97); }
.pricing-btn-active { box-shadow: 0 0 16px rgba(212,175,55,0.12); }

/* ── 32. Booster buttons: purple glow on hover ──────────────────── */
.booster-btn:hover { box-shadow: 0 4px 18px rgba(168,85,247,0.15); }

/* ── 33. Subsidiary/territory cards: owned state polish ─────────── */
.subsidiary-card.owned { box-shadow: 0 2px 16px rgba(34,197,94,0.08); }
.hub-territory-card.owned { box-shadow: 0 2px 16px rgba(212,175,55,0.08); }

/* ── 34. Hub glass card (login/company setup): elevated ─────────── */
.lp-glass-card {
    box-shadow: 0 12px 48px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.15);
}

/* ── 35. Feature cards landing page: glow top border on hover ───── */
.lp-feat-card:hover { box-shadow: 0 10px 40px rgba(212,175,55,0.14), 0 2px 8px rgba(0,0,0,0.4); }

/* ── 36. Ceo week banner: ambient ───────────────────────────────── */
.ceo-week-banner { box-shadow: 0 0 24px rgba(212,175,55,0.06), inset 0 1px 0 rgba(212,175,55,0.05); }

/* ── 37. Mapbox popup: deeper glass ────────────────────────────── */

/* ── 38. Academic course buttons: glow ──────────────────────────── */
.academy-course-btn:hover { box-shadow: 0 4px 16px rgba(168,85,247,0.12); }

/* ── 39. Cantiere marker: brighter ──────────────────────────────── */
.cantiere-marker { box-shadow: 0 0 10px rgba(245,158,11,0.8); }

/* ── 40. Remove scanline on light bg ─────────────────────────────── */
#main-panel::before { display: none; }

/* ════════════════════════════════════════════════════════════════
   MIDNIGHT EMPIRE THEME — dark glassmorphism
   ════════════════════════════════════════════════════════════════ */

/* ── Body & background ── */
body { background: #0a0c12 !important; }
body > .fixed.bg-gradient-to-b { opacity: 0.4 !important; }

/* ── Top-bar: dark glass with gold accent line ── */
#top-bar {
    background: rgba(8,11,18,0.92) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    backdrop-filter: blur(20px);
    position: relative;
    box-shadow: none !important;
}
#top-bar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
    opacity: 0.3;
}
#top-bar nav { background: rgba(0,0,0,0.25); border-top: 1px solid rgba(255,255,255,0.06); }

/* Top-bar stat pills */
#top-bar .bg-white\/10 { background: rgba(255,255,255,0.07) !important; }
#top-bar .text-gold, #top-bar [style*="color:#c9a227"] { color: var(--gold) !important; }
#top-bar .text-green-400 { color: #4ade80 !important; }

/* ── Sidebar: dark glass ── */
#sidebar-player {
    background: rgba(8,11,18,0.85) !important;
    border-right: 1px solid rgba(255,255,255,0.06) !important;
}
#sidebar-player .sidebar-group-head:hover { background: rgba(255,255,255,0.04) !important; }
#sidebar-player .text-white    { color: rgba(240,244,255,0.90) !important; }
#sidebar-player .text-gray-400 { color: rgba(240,244,255,0.40) !important; }
#sidebar-player .text-gray-500 { color: rgba(240,244,255,0.30) !important; }
#sidebar-player .text-green-400 { color: #4ade80 !important; }

/* Logo strip in sidebar */
#sidebar-player > div:first-child {
    background: rgba(0,0,0,0.3) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

/* ── Main panel: dark base ── */
#main-panel { background: #0a0c12 !important; }
#main-panel > div:first-child {
    background: rgba(255,255,255,0.03) !important;
    border-bottom-color: rgba(255,255,255,0.08) !important;
}
#main-panel #panel-title { color: var(--text) !important; }
#tab-container { color: var(--text); }

/* ── DS Components: dark glassmorphism ── */
.ds-card {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: none;
}
.ds-card:hover {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(212,175,55,0.22) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4) !important;
}
.ds-card--gold  { border-color: rgba(212,175,55,0.22) !important; }
.ds-card--gold:hover { box-shadow: var(--glow-gold) !important; }
.ds-card--alert { border-color: rgba(239,68,68,0.28) !important; }
.ds-card--alert:hover { box-shadow: var(--glow-red) !important; }

.ds-header { border-bottom-color: rgba(255,255,255,0.08) !important; }
.ds-title { color: var(--text) !important; }
.ds-subtitle { color: var(--text-muted) !important; }
.ds-eyebrow { color: var(--green) !important; }

.ds-kpi-strip {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: none;
}
.ds-kpi { border-right-color: rgba(255,255,255,0.06) !important; }
.ds-kpi-label { color: var(--text-muted) !important; }
.ds-kpi-val { color: var(--text) !important; }
.ds-kpi-sub { color: var(--text-dim) !important; }

.ds-table-wrap {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: none;
}
.ds-table thead tr { background: rgba(255,255,255,0.03) !important; border-bottom-color: rgba(255,255,255,0.08) !important; }
.ds-table th { color: var(--text-muted) !important; }
.ds-table td { color: var(--text) !important; border-bottom-color: rgba(255,255,255,0.05) !important; }
.ds-table tbody tr:hover td { background: rgba(255,255,255,0.03) !important; }

/* ── HUD Cards: dark ── */
.hud-card {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.hud-card:hover {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(34,197,94,0.25) !important;
    box-shadow: 0 0 16px rgba(34,197,94,0.08) !important;
}
.hud-card.active-card {
    border-color: rgba(34,197,94,0.35) !important;
    background: rgba(34,197,94,0.06) !important;
}

/* ── Notifications: dark ── */
.notif {
    background: rgba(14,17,26,0.97) !important;
    color: var(--text) !important;
    border-left-color: var(--green);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
}
.notif.error-notif { border-left-color: var(--red); }

/* ── News ticker: dark ── */
#news-ticker-wrap {
    background: rgba(8,11,18,0.95) !important;
    border-top-color: rgba(255,255,255,0.08) !important;
}
#news-ticker-track { color: rgba(240,244,255,0.55) !important; }
#news-ticker-track span::before { color: var(--green) !important; }

/* ── Nav top buttons ── */
.top-nav-btn { color: rgba(240,244,255,0.60); }
.top-nav-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.top-nav-btn.active { color: var(--text); border-bottom-color: var(--gold); background: rgba(212,175,55,0.08); }

.nav-drop {
    background: rgba(10,12,18,0.98);
    border-color: rgba(255,255,255,0.10);
    box-shadow: 0 16px 48px rgba(0,0,0,0.7);
}
.nav-drop-item { color: rgba(240,244,255,0.55); }
.nav-drop-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }

/* ── Logo/brand text ── */
.font-display { font-family: 'Orbitron', sans-serif !important; }

/* ── Scrollbars ── */
::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.2) !important; }
::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,0.35) !important; }

/* ================================================================
   SIDEBAR ACCORDION — dark nav
   ================================================================ */

#sidebar-player {
  scrollbar-width: thin;
  scrollbar-color: rgba(201,162,39,0.25) transparent;
}
#sidebar-player::-webkit-scrollbar { width: 3px; }
#sidebar-player::-webkit-scrollbar-track { background: transparent; }
#sidebar-player::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.25); border-radius: 2px; }

.sidebar-group-head {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.sidebar-group-head:hover { background: rgba(255,255,255,0.05); }
.sidebar-group-head.open   { background: rgba(255,255,255,0.04); }
.sidebar-group-head.open .sidebar-chev { transform: rotate(90deg); transition: transform 0.2s ease; color: rgba(201,162,39,0.7); }
.sidebar-chev { transition: transform 0.2s ease; }

.sidebar-item {
  display: block;
  padding: 5px 12px 5px 28px;
  font-size: 10px;
  color: rgba(240,244,255,0.50);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 2px solid transparent;
  position: relative;
}
.sidebar-item::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), rgba(212,175,55,0.18) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.04);
  color: rgba(240,244,255,0.85);
}
.sidebar-item:hover::before { opacity: 1; }
.sidebar-item.active {
  background: rgba(212,175,55,0.10);
  color: var(--gold);
  border-left: 2px solid var(--gold);
  padding-left: 26px;
  text-shadow: 0 0 12px rgba(212,175,55,0.3);
}

@media (max-width: 767px) {
  #sidebar-player {
    transform: translateX(-160px);
    transition: transform 0.25s ease;
    z-index: 55;
  }
  #main-panel {
    left: 0 !important;
  }
  #news-ticker-wrap  { left: 0 !important; }
  #live-map-overlay  { left: 16px !important; }
  #map-overlay       { left: 0 !important; }
}

/* ================================================================
   OPS (DISPATCH) TAB — dark theme overrides
   ================================================================ */
.ops-kpi-strip {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.ops-kpi-label { color: var(--text-muted) !important; }
.ops-kpi-sub   { color: var(--text-dim)   !important; }
.ops-kpi-sep   { background: rgba(255,255,255,0.08) !important; }
.ops-col {
    background: rgba(255,255,255,0.03) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: none !important;
}
.ops-col-header {
    background: rgba(0,0,0,0.30) !important;
    border-bottom-color: rgba(255,255,255,0.08) !important;
}
.ops-col-title  { color: var(--text-muted) !important; }
.ops-col-badge  { background: rgba(255,255,255,0.06) !important; color: var(--text-muted) !important; }
.ops-col-badge--active { background: rgba(212,175,55,0.12) !important; color: var(--gold) !important; border-color: rgba(212,175,55,0.30) !important; }
.ops-ride-card {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.ops-ride-card:hover {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(0,242,255,0.20) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
.ops-ride-card--contract {
    background: rgba(212,175,55,0.05) !important;
    border-color: rgba(212,175,55,0.20) !important;
}
.ops-ride-route  { color: var(--text)      !important; }
.ops-ride-arrow  { color: var(--text-dim)  !important; }
.ops-driver-row {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.ops-driver-row:hover { background: rgba(255,255,255,0.07) !important; }
.ops-driver-name  { color: var(--text)      !important; }
.ops-driver-car   { color: var(--text-dim)  !important; }
.ops-driver-queue { color: var(--text-dim)  !important; }
.ops-bar-wrap     { background: rgba(255,255,255,0.10) !important; }
.ops-alert-pill   { background: rgba(239,68,68,0.12) !important; border-color: rgba(239,68,68,0.25) !important; }
.ops-daily-summary {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.ops-daily-label { color: var(--text-muted) !important; }

/* ================================================================
   GLOBAL: elevate micro-font Tailwind classes in tab content
   eRepublik/eRevolution use 12-14px minimum — we match that.
   ================================================================ */
#tab-container .text-\[7px\]    { font-size: 9px  !important; }
#tab-container .text-\[8px\]    { font-size: 10px !important; }
#tab-container .text-\[9px\]    { font-size: 11px !important; }
#tab-container .text-\[9\.5px\] { font-size: 12px !important; }
#tab-container .text-\[10px\]   { font-size: 12px !important; }
#tab-container .text-\[10\.5px\]{ font-size: 13px !important; }
#tab-container .text-\[11px\]   { font-size: 13px !important; }
#tab-container .text-\[12px\]   { font-size: 14px !important; }
#tab-container .text-xs         { font-size: 12px !important; }

/* Section headers / labels in inline styles — override via attribute selector */
#tab-container [style*="font-size:7px"],
#tab-container [style*="font-size: 7px"]   { font-size: 9px  !important; }
#tab-container [style*="font-size:8px"],
#tab-container [style*="font-size: 8px"]   { font-size: 10px !important; }
#tab-container [style*="font-size:9px"],
#tab-container [style*="font-size: 9px"]   { font-size: 11px !important; }
#tab-container [style*="font-size:9.5px"],
#tab-container [style*="font-size: 9.5px"] { font-size: 12px !important; }
#tab-container [style*="font-size:10px"],
#tab-container [style*="font-size: 10px"]  { font-size: 12px !important; }
#tab-container [style*="font-size:10.5px"],
#tab-container [style*="font-size: 10.5px"]{ font-size: 13px !important; }
#tab-container [style*="font-size:11px"],
#tab-container [style*="font-size: 11px"]  { font-size: 13px !important; }
#tab-container [style*="font-size:12px"],
#tab-container [style*="font-size: 12px"]  { font-size: 14px !important; }

/* ================================================================
   HOME TAB
   ================================================================ */
.home-hero {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(135deg, rgba(212,175,55,0.07) 0%, transparent 60%);
}
.home-company-logo {
    width: 52px; height: 52px; border-radius: 12px;
    background: rgba(212,175,55,0.12);
    border: 1px solid rgba(212,175,55,0.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; flex-shrink: 0;
}
.home-company-name {
    font-size: 20px; font-weight: 700;
    color: var(--text);
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}
.home-company-sub {
    font-size: 11px; color: var(--text-muted);
    margin-top: 3px; display: flex; align-items: center; gap: 8px;
}
.home-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.06);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.home-kpi {
    background: var(--bg);
    padding: 14px 16px;
    display: flex; flex-direction: column; gap: 4px;
}
.home-kpi-label {
    font-size: 8px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--text-muted);
    font-family: var(--font-mono);
}
.home-kpi-val {
    font-size: 20px; font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1;
}
.home-kpi-sub {
    font-size: 10px; color: var(--text-dim);
}
.home-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
}
.home-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    overflow: hidden;
}
.home-section-head {
    padding: 10px 14px;
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--text-muted);
    font-family: var(--font-mono);
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; gap: 6px;
}
.home-section-body { padding: 12px 14px; }
.home-quick-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    margin-bottom: 6px;
    text-decoration: none; color: var(--text);
}
.home-quick-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(212,175,55,0.25);
    transform: translateX(3px);
}
.home-quick-btn-icon { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.home-quick-btn-label { font-size: 12px; font-weight: 600; }
.home-quick-btn-sub   { font-size: 10px; color: var(--text-muted); }
.home-alert-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 11px; color: var(--text-muted);
}
.home-alert-row:last-child { border-bottom: none; }
.home-alert-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.home-streak-bar {
    display: flex; gap: 4px; margin-top: 8px;
}
.home-streak-day {
    flex: 1; height: 6px; border-radius: 3px;
    background: rgba(255,255,255,0.08);
}
.home-streak-day.done { background: var(--gold); }
.home-streak-day.today { background: var(--green); box-shadow: 0 0 8px rgba(34,197,94,0.4); }


/* ══════════════════════════════════════════════════════════════
   CE MOTION SYSTEM
   ══════════════════════════════════════════════════════════════ */

/* ── Tab transition: cinematic blur + slide ─────────────────── */
@keyframes tabCinemaIn {
    from { opacity: 0; transform: translateY(8px); filter: blur(3px); }
    to   { opacity: 1; transform: translateY(0);   filter: blur(0);   }
}
.tab-fade-in { animation: tabCinemaIn 0.24s cubic-bezier(0.22,1,0.36,1) forwards; }

/* ── Button: ripple ─────────────────────────────────────────── */
.ds-btn, .ops-action-btn, .ce-ripple-target { position: relative; overflow: hidden; }
.ce-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    transform: scale(0);
    animation: ce-ripple-anim 0.55s cubic-bezier(0.36,0.07,0.19,0.97) forwards;
    pointer-events: none;
    z-index: 10;
}
@keyframes ce-ripple-anim {
    to { transform: scale(1); opacity: 0; }
}

/* ── Button: shimmer sweep on hover ─────────────────────────── */
.ds-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
    transform: skewX(-18deg);
    transition: left 0.5s ease;
    pointer-events: none;
}
.ds-btn:hover::after { left: 160%; }

/* ── KPI card: orbit glow dot ───────────────────────────────── */
.ce-kpi-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.22,1,0.36,1), box-shadow 0.28s ease;
}
.ce-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.65), 0 0 0 1px rgba(212,175,55,0.18) !important;
}
.ce-orbit {
    position: absolute;
    width: 90px; height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,175,55,0.30) 0%, transparent 70%);
    filter: blur(26px);
    pointer-events: none;
    z-index: 0;
    top: 0; left: 0;
    opacity: 0;
    transition: opacity 0.22s ease;
    will-change: transform, opacity;
}

/* KPI value underline accent ───────────────────────────────── */
.ce-kpi-value {
    position: relative;
    display: inline-block;
}
.ce-kpi-value::after {
    content: '';
    display: block;
    margin-top: 4px;
    width: 50%;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, currentColor, transparent);
    opacity: 0.45;
}

/* ── Progress bar with shimmer ──────────────────────────────── */
.ce-progress-bar {
    position: relative;
    height: 5px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.ce-progress-fill {
    height: 100%;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: width 0.9s cubic-bezier(0.22,1,0.36,1);
}
.ce-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.38) 50%, transparent 100%);
    animation: ce-shimmer 2.2s ease-in-out infinite;
    border-radius: 4px;
}
@keyframes ce-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ── Count-up flash ─────────────────────────────────────────── */
.ce-count-flash { animation: ce-num-flash 0.5s ease-out forwards; }
@keyframes ce-num-flash {
    0%   { filter: brightness(2.2) drop-shadow(0 0 8px currentColor); }
    100% { filter: none; }
}

/* ── Card glass: glassmorphism ──────────────────────────────── */
.ce-glass {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s cubic-bezier(0.22,1,0.36,1);
}
.ce-glass:hover {
    border-color: rgba(212,175,55,0.22);
    box-shadow: 0 10px 36px rgba(0,0,0,0.55);
    transform: translateY(-1px);
}

/* ── Animated gradient border (conic) ───────────────────────── */
@property --ce-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
.ce-border-glow {
    position: relative;
    border-radius: 13px;
}
.ce-border-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    background: conic-gradient(from var(--ce-angle), transparent 60%, rgba(212,175,55,0.55) 72%, transparent 84%);
    animation: ce-border-spin 3.5s linear infinite;
    z-index: 0;
    pointer-events: none;
}
@keyframes ce-border-spin { to { --ce-angle: 360deg; } }

/* ── Scroll-reveal ──────────────────────────────────────────── */
.ce-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.ce-reveal.ce-revealed { opacity: 1; transform: translateY(0); }

/* ── Panel header: gold scan line ───────────────────────────── */
.ce-panel-header {
    position: relative;
    overflow: hidden;
}
.ce-panel-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: -60%;
    width: 55%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.45), transparent);
    animation: ce-scan 3.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes ce-scan { 0% { left: -60%; } 100% { left: 110%; } }

/* ── Topbar: ambient scan line ──────────────────────────────── */
#top-bar::before {
    content: '';
    position: absolute;
    top: 0; left: -30%;
    width: 25%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.25), transparent);
    animation: ce-scan 8s linear infinite;
    z-index: 1;
    pointer-events: none;
}

/* ── Live badge: ring pulse ─────────────────────────────────── */
.ce-badge-live {
    animation: ce-live-ring 2.2s ease-in-out infinite;
}
@keyframes ce-live-ring {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50%      { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* ── Cloud sync dot: breathing glow ────────────────────────── */
#cloud-sync-dot {
    animation: ce-dot-breathe 2.8s ease-in-out infinite !important;
}
@keyframes ce-dot-breathe {
    0%,100% { box-shadow: 0 0 4px rgba(34,197,94,0.35); opacity: 0.7; }
    50%      { box-shadow: 0 0 14px rgba(34,197,94,0.85), 0 0 28px rgba(34,197,94,0.2); opacity: 1; }
}

/* ── Sidebar active dot ─────────────────────────────────────── */
.sidebar-item.active {
    position: relative;
}
.sidebar-item.active::after {
    content: '';
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 7px rgba(212,175,55,0.9);
    animation: ce-dot-breathe 2s ease-in-out infinite;
}

/* ── Sidebar group head: hover glow ─────────────────────────── */
.sidebar-group-head {
    transition: background 0.18s ease, color 0.18s ease !important;
}
.sidebar-group-head:hover {
    background: rgba(212,175,55,0.07) !important;
    color: rgba(240,244,255,0.9) !important;
}
.sidebar-group-head.open {
    color: var(--gold) !important;
    background: rgba(212,175,55,0.09) !important;
}

/* ── Table row hover ────────────────────────────────────────── */
.ce-table-row { transition: background 0.12s ease; }
.ce-table-row:hover { background: rgba(212,175,55,0.04) !important; }

/* ── Section stagger fade (animation-delay set inline) ──────── */
.ce-section-fade {
    animation: ce-section-in 0.32s cubic-bezier(0.22,1,0.36,1) backwards;
}
@keyframes ce-section-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Driver avatar: hover scale ─────────────────────────────── */
.ce-avatar {
    transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease;
}
.ce-avatar:hover {
    transform: scale(1.12);
    box-shadow: 0 0 12px rgba(212,175,55,0.35);
}

/* ── Notification row: slide-in on appear ───────────────────── */
.ce-notif-row {
    animation: ce-notif-in 0.22s ease-out backwards;
}
@keyframes ce-notif-in {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Card: ambient glow on gold cards ───────────────────────── */
.ds-card--gold {
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1) !important;
}
.ds-card--gold:hover {
    box-shadow: 0 0 32px rgba(212,175,55,0.12), 0 8px 32px rgba(0,0,0,0.5) !important;
    transform: translateY(-2px) !important;
}

/* ── DS toast: spring entrance ──────────────────────────────── */
@keyframes ds-toast-in {
    0%   { opacity: 0; transform: translateX(32px) scale(0.94); }
    60%  { transform: translateX(-4px) scale(1.01); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* ── Topbar stats: subtle pulse on value change ─────────────── */
.topbar-val-flash { animation: topbar-flash 0.35s ease-out; }
@keyframes topbar-flash {
    0%   { color: var(--gold); }
    100% { }
}

/* ── HQ Isometric Campus ── */
#hq-campus-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 20px auto;
}

#hq-campus {
    width: 100%;
    height: 560px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: default;
    background: radial-gradient(ellipse at 50% 30%, #1a1f2e 0%, #0a0c12 100%);
    border: 1px solid rgba(255,255,255,0.08);
}

#hq-campus svg {
    width: 100%;
    height: 100%;
}

.hq-tile-shape {
    transition: fill 0.15s, stroke 0.15s;
}

.hq-building {
    cursor: pointer;
    transition: filter 0.2s;
}
.hq-building:hover {
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(212,175,55,0.6));
}

.hq-building-locked {
    opacity: 0.35;
    cursor: not-allowed;
}

.hq-slot-available {
    cursor: pointer;
    transition: opacity 0.2s;
}
.hq-slot-available:hover {
    filter: drop-shadow(0 0 6px rgba(212,175,55,0.8));
}

.hq-slot-pulse {
    animation: hq-slot-pulse-anim 2s ease-in-out infinite;
}

.hq-building-wrapper:hover .hq-building-label {
    opacity: 1 !important;
}
.hq-building-wrapper:hover {
    transform: translate(-50%, -100%) scale(1.05);
}
@keyframes hq-slot-pulse-anim {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

@keyframes hq-build-in {
    0%   { transform: scaleY(0) translateY(40px); opacity: 0; }
    70%  { transform: scaleY(1.08) translateY(-4px); opacity: 1; }
    100% { transform: scaleY(1) translateY(0); opacity: 1; }
}
.hq-build-anim {
    transform-origin: bottom center;
    animation: hq-build-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hq-car {
    cursor: pointer;
    transition: filter 0.15s, transform 0.4s ease-out, opacity 0.4s;
}
.hq-car:hover {
    filter: brightness(1.4) drop-shadow(0 0 6px rgba(212,175,55,0.6));
}

/* Info panel laterale */
#hq-info-panel {
    position: absolute;
    right: 0; top: 0;
    width: 280px; height: 100%;
    background: rgba(10,12,18,0.95);
    border-left: 1px solid rgba(212,175,55,0.25);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
    padding: 20px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
#hq-info-panel.open {
    transform: translateX(0);
}

.hq-spotlight {
    stroke-linecap: round;
    animation: hq-spotlight-sweep 6s ease-in-out infinite alternate;
    transform-origin: 440px 80px; /* center coordinates relative to origin */
}
@keyframes hq-spotlight-sweep {
    0% { transform: rotate(-5deg); opacity: 0.2; }
    50% { opacity: 0.5; }
    100% { transform: rotate(5deg); opacity: 0.2; }
}

.hq-sparkle {
    animation: hq-sparkle-glow 1.5s ease-in-out infinite alternate;
}
@keyframes hq-sparkle-glow {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.hq-dust {
    animation: hq-dust-fade 0.8s ease-out forwards;
    pointer-events: none;
}
@keyframes hq-dust-fade {
    0% { transform: scale(0.2); opacity: 0.8; filter: blur(1px); }
    100% { transform: scale(1.5); opacity: 0; filter: blur(5px); }
}

.hq-info-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ── GLOBAL MICRO-INTERACTIONS (taste-skill + impeccable) ──────── */

/* Tactile press feedback on all buttons */
button:not([disabled]):active {
    transform: scale(0.97) !important;
    transition: transform 0.08s ease-out !important;
}
button {
    transition: background 0.12s, border-color 0.12s, color 0.12s,
                opacity 0.12s, transform 0.1s ease-out;
}

/* Gold focus ring on inputs */
input:not([type='range']):not([type='checkbox']):not([type='radio']):focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: rgba(212,175,55,0.45) !important;
    box-shadow: 0 0 0 2px rgba(212,175,55,0.08) !important;
}

/* Stagger fade-in for flat list rows */
@keyframes ce-fade-up {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ce-stagger > * {
    animation: ce-fade-up 0.18s ease-out both;
}
.ce-stagger > *:nth-child(1)   { animation-delay: 0ms; }
.ce-stagger > *:nth-child(2)   { animation-delay: 30ms; }
.ce-stagger > *:nth-child(3)   { animation-delay: 60ms; }
.ce-stagger > *:nth-child(4)   { animation-delay: 90ms; }
.ce-stagger > *:nth-child(5)   { animation-delay: 120ms; }
.ce-stagger > *:nth-child(6)   { animation-delay: 150ms; }
.ce-stagger > *:nth-child(7)   { animation-delay: 180ms; }
.ce-stagger > *:nth-child(n+8) { animation-delay: 210ms; }

/* Campaign tier: replace side-stripe (impeccable ban) with full tinted border */
.campaign-card.tier-starter { border-left: none !important; border: 1px solid rgba(34,197,94,0.30); }
.campaign-card.tier-growth  { border-left: none !important; border: 1px solid rgba(59,130,246,0.30); }
.campaign-card.tier-empire  { border-left: none !important; border: 1px solid rgba(217,119,6,0.30); }

/* ════════════════════════════════════════════════════════════════════
   eRepublik-Modern kit — "EM" design system (NUOVA DIREZIONE 2026-05-30)
   Tutto scopato sotto .em così NON tocca le tab dark esistenti finché
   non vengono convertite. Vedi DESIGN.md sezione "EM".
   ════════════════════════════════════════════════════════════════════ */
/* I TOKEN STANNO SU :root, NON SU .em.
   Erano dichiarati dentro `.em`, quindi `var(--em-gold)` funzionava solo per
   ciò che sta DENTRO il kit. Tutto quello che vive attaccato a <body> — i
   modali, il tutorial, le schermate a schermo intero — non li vedeva: il
   colore cadeva sull'ereditato e il pannello usciva senza colore. Misurato nel
   browser il 30/08 mentre si convertivano lo spotlight e le due schermate di
   zero-to-hero.js.
   Sono gli STESSI valori di prima, spostati di un livello: dentro `.em` non
   cambia niente (i figli continuano a ereditarli), e fuori adesso esistono.
   Restano una sola dichiarazione, così non possono divergere. */
:root{
  /* `--em-muted` e `--em-dim` erano #6b7280: un grigio medio nato per il tema
     CHIARO della Fase 3 e mai ritoccato quando il kit e' tornato scuro (commit
     06e5763). Su `--em-card` (#161b22) dava contrasto 3.58, sotto il minimo
     leggibile di 4.5 — ed e' il colore di etichette, sottotitoli e descrizioni,
     cioe' quasi tutto il testo secondario del gioco. Misurato nel browser il
     28/08/2026 su nove schede: la causa singola piu' diffusa di testo poco
     leggibile, ~150 punti. #8b949e porta il contrasto a 5.62 restando un grigio
     discreto, che non compete con `--em-ink` per l'attenzione. */
  --em-card:#161b22; --em-ink:#e6edf3; --em-muted:#8b949e; --em-dim:#8b949e;
  --em-line:#21262d; --em-line2:#21262d;
  /* Accenti schiariti per il fondo scuro (28/08/2026). Anche questi erano
     tarati sul tema CHIARO e su `--em-card` non arrivavano al minimo leggibile:
     blu 3.61, viola 3.57, verde scuro 3.87. Sono i colori di link, etichette di
     stato e descrizioni, quindi il difetto si vedeva in ogni scheda.
     I nuovi valori stanno fra 6.2 e 6.9 e restano riconoscibili come lo stesso
     colore, solo leggibili. Le varianti `-d` (scure) servono da fondo per le
     pill chiare e NON vanno schiarite: li' fanno da sfondo, non da testo. */
  --em-blue:#58a6ff; --em-blue-d:#245d9c; --em-green:#3fb950; --em-green-d:#1aa06a;
  --em-gold:#c79a2a; --em-amber:#e0922e; --em-violet:#a78bfa; --em-red:#f0776a;
  /* Fondo pagina e la linea piu' chiara dei bordi secondari. */
  --em-bg:#0d1117; --em-line3:#30363d;
  /* Fondi tenui e bordi delle pill SCURE. Il kit aveva solo le pill chiare
     (.em-pill--green e compagne, fondo #e7f6ee): un residuo del tema chiaro
     della Fase 3. Questi sono i valori che le schede scure gia' usavano
     scrivendoli a mano — qui prendono un nome, cosi' smettono di essere
     copiati e si possono cambiare da un punto solo. */
  --em-gold-soft:#1a1608;  --em-gold-hover:#352c15;
  --em-red-soft:#2d0d0d;   --em-red-edge:#5a1a1a;
  --em-green-soft:#1a2e1a; --em-green-edge:#3d5a3e; --em-green-hover:#223c22;
  --em-blue-soft:#151c2e;  --em-blue-edge:#4b5a8b;
  --em-row-on:#1a1d23;
  /* Le medaglie sono MATERIALI, non colori d'interfaccia: bronzo e argento non
     hanno un ruolo semantico nel kit, ma stanno qui lo stesso perche' un
     colore scritto a mano dentro un file di rendering e' un colore che
     diverge. L'oro e' lo stesso --em-gold del kit, non un secondo oro. */
  --em-tier-bronze:#cd7f32; --em-tier-silver:#b0b8c4;
  --em-tier-diamond:#7ec8e3; --em-tier-legend:#ff6b35;
}
.em{
  /* I token (--em-card, --em-ink, --em-gold…) stanno su :root qui sopra: una
     sola dichiarazione, visibile anche ai pannelli fuori dal kit. Qui restano
     solo le proprieta' che il kit impone al proprio contenuto. */
  font-family:'Inter',system-ui,sans-serif; color:var(--em-ink); font-size:12px;
}
/* light "sky + skyline" background for the Home content area */
.em-home{
  min-height:100%; padding:10px 14px 30px; overflow-y:auto;
  background:transparent;
}
.em-wrap{max-width:1120px;margin:0 auto}
.em-card{background:var(--em-card);border:1px solid var(--em-line);border-radius:7px;box-shadow:0 1px 2px rgba(31,39,51,.07);overflow:hidden}
.em-ch{display:flex;align-items:center;justify-content:space-between;padding:7px 11px;border-bottom:1px solid var(--em-line2)}
.em-ch .t{font-weight:800;font-size:12.5px}
.em-ch .a{font-size:10px;color:var(--em-green);font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.em-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:7px}
.em-kpi{background:var(--em-card);border:1px solid var(--em-line);border-radius:7px;padding:9px 11px;box-shadow:0 1px 2px rgba(31,39,51,.06)}
.em-kpi .l{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--em-dim)}
.em-kpi .v{font-size:21px;font-weight:800;line-height:1;margin-top:6px;font-variant-numeric:tabular-nums}
.em-kpi .s{font-size:10.5px;color:var(--em-muted);margin-top:5px}
.em-grid2{display:grid;grid-template-columns:1fr 300px;gap:7px;align-items:start}
.em-banner{border-radius:7px;background:linear-gradient(120deg,#243243,#19222e);padding:11px 14px;color:#fff;position:relative;overflow:hidden;display:flex;align-items:center;gap:12px;border:1px solid #16202b}
.em-banner::after{content:"";position:absolute;right:-26px;top:-44px;width:160px;height:160px;border-radius:50%;background:radial-gradient(circle,rgba(95,224,138,.16),transparent 70%)}
.em-banner .bt{font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#7fd6a0}
.em-banner h2{font-size:17px;font-weight:800;margin:1px 0 0}
.em-banner .pb{height:6px;border-radius:4px;background:rgba(255,255,255,.13);margin-top:7px;width:240px;overflow:hidden}
.em-banner .pb i{display:block;height:100%;background:linear-gradient(90deg,#5fe08a,#2bbf6a);border-radius:4px}
.em-banner .cd{margin-left:auto;text-align:center}
.em-banner .cd .n{font-size:18px;font-weight:800;font-variant-numeric:tabular-nums}
.em-banner .cd .l{font-size:8.5px;color:#9fb1c2;letter-spacing:.09em;text-transform:uppercase;margin-top:1px}
.em-lrow{display:flex;align-items:center;gap:9px;padding:6px 11px;border-bottom:1px solid var(--em-line2)}
.em-lrow:last-child{border-bottom:none}
.em-th{width:34px;height:34px;border-radius:7px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.em-th svg{width:18px;height:18px}
.em-lt{font-weight:700;font-size:12.5px;color:var(--em-ink)}
.em-lm{display:flex;align-items:center;gap:8px;color:var(--em-muted);font-size:10.5px;margin-top:2px}
.em-stars{color:var(--em-gold);letter-spacing:.5px;font-size:11px}
.em-bd{font-size:8.5px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;padding:2px 6px;border-radius:4px}
.em-price{font-weight:800;font-size:13px;color:var(--em-green)}
.em-bar{flex:1;height:5px;border-radius:3px;background:#21262d;overflow:hidden}
.em-bar i{display:block;height:100%;border-radius:3px}
.em-gbtn{background:linear-gradient(180deg,#22ab73,#15885a);color:#fff;font-weight:800;border:none;border-radius:7px;padding:8px 14px;box-shadow:0 2px 5px rgba(21,136,90,.26);font-size:12px;cursor:pointer}
.em-bbtn{background:#161b22;color:var(--em-blue);font-weight:800;border:1px solid #21262d;border-radius:7px;padding:7px 13px;font-size:11.5px;cursor:pointer}
.em-contract{margin:7px;border-radius:7px;background:linear-gradient(120deg,#2f74c0,#245d9c);color:#fff;padding:10px}
.em-contract .ct{font-weight:800;font-size:12.5px}.em-contract .cs{font-size:10.5px;opacity:.92;margin-top:1px}
.em-contract .cr{display:flex;align-items:center;gap:8px;margin-top:8px}
.em-contract .cc{background:rgba(0,0,0,.22);border-radius:5px;padding:3px 8px;font-weight:800}
.em-ev{display:flex;gap:9px;padding:7px 11px;border-top:1px solid var(--em-line2);align-items:flex-start}
.em-ev:first-of-type{border-top:none}
.em-evi{width:28px;height:28px;border-radius:7px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.em-evi svg{width:14px;height:14px}
.em-evt{font-weight:700;font-size:11.5px;color:var(--em-ink)}.em-evd{color:var(--em-muted);font-size:10.5px}
.em-empty{padding:22px;text-align:center;color:var(--em-muted);font-size:12px}
.em-link{color:var(--em-blue);font-weight:700;cursor:pointer}
.em-card button:active:not(:disabled),.em-gbtn:active,.em-bbtn:active{transform:scale(0.97)}

/* ── EM kit — shared helpers for FASE 3 tab roll-out ── */
.em-page{padding:10px 14px 34px;min-height:100%}
.em-sec{font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:var(--em-dim)}
.em-kpibar{display:flex;align-items:center;gap:0;flex-wrap:wrap;background:var(--em-card);border:1px solid var(--em-line);border-radius:7px;box-shadow:0 1px 2px rgba(31,39,51,.06);padding:4px 4px;margin-bottom:7px}
.em-kpibar .k{padding:7px 16px;flex:1;min-width:120px}
.em-kpibar .k+.k{border-left:1px solid var(--em-line2)}
.em-kpibar .k .l{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--em-dim)}
.em-kpibar .k .v{font-size:18px;font-weight:800;line-height:1;margin-top:5px;font-variant-numeric:tabular-nums;color:var(--em-ink)}
.em-tbl{width:100%;border-collapse:collapse}
.em-tbl th{padding:7px 12px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--em-dim);text-align:left;border-bottom:1px solid var(--em-line);white-space:nowrap;background:#0d1117}
.em-tbl th.r{text-align:right}
.em-tbl td{padding:8px 12px;font-size:11.5px;color:var(--em-ink);border-bottom:1px solid var(--em-line2);vertical-align:middle;white-space:nowrap}
.em-tbl td.r{text-align:right}
.em-tbl tbody tr:last-child td{border-bottom:none}
.em-tbl tbody tr:hover{background:#f5f8fb}
.em-ghbtn{background:#21262d;color:var(--em-muted);font-weight:700;border:1px solid var(--em-line);border-radius:6px;padding:6px 12px;font-size:11px;cursor:pointer}
.em-goldbtn{background:linear-gradient(180deg,#e3b441,#c79a2a);color:#fff;font-weight:800;border:none;border-radius:7px;padding:7px 13px;font-size:11.5px;cursor:pointer;box-shadow:0 2px 5px rgba(199,154,42,.24)}
.em-redbtn{background:#fff;color:var(--em-red);font-weight:800;border:1px solid #f0c4bd;border-radius:7px;padding:7px 13px;font-size:11.5px;cursor:pointer}
.em-pill{display:inline-block;font-size:9px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;padding:3px 8px;border-radius:5px}
.em-pill--green{background:#e7f6ee;color:var(--em-green-d)}
.em-pill--blue{background:#0d1a2a;color:var(--em-blue)}
.em-pill--gold{background:#fff3cf;color:var(--em-gold)}
.em-pill--red{background:#fde8e4;color:var(--em-red)}
.em-pill--gray{background:#21262d;color:var(--em-muted)}
.em-pill--violet{background:#ece4f7;color:var(--em-violet)}
.em-tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:7px}
.em-tab{background:var(--em-card);border:1px solid var(--em-line);border-radius:7px;padding:6px 13px;font-size:11.5px;font-weight:700;color:var(--em-muted);cursor:pointer}
.em-tab.on{background:linear-gradient(180deg,#2f74c0,#245d9c);color:#fff;border-color:#245d9c}
.em-prog{height:5px;border-radius:3px;background:#21262d;overflow:hidden}
.em-prog i{display:block;height:100%;border-radius:3px}
.em-card button.em-ghbtn:active,.em-goldbtn:active,.em-redbtn:active,.em-tab:active{transform:scale(0.97)}

/* ════════════════════════════════════════════════════════════════════
   SPOTLIGHT ANCORATO — il tutorial (tutorial.js). Direzione scelta da
   Vlad il 29/08/2026 fra i cinque mock-up: si illumina la cosa di cui
   si parla e la spiegazione le sta accanto, invece di un pop-up che
   dice «il tab Staff» lasciando al giocatore il compito di tradurlo in
   «quale bottone».

   Il buio NON e' un pannello sopra la pagina: e' l'ombra esterna
   dell'anello (`box-shadow` con spread enorme). Cosi' il foro segue il
   bersaglio da solo quando la pagina scorre o cambia misura, senza
   ridisegnare niente — era il difetto della versione a canvas, che
   dipingeva il buco una volta e poi restava indietro.

   I colori vengono dai token --em-*: la versione precedente aveva un
   oro suo (#d4af37) diverso da quello del gioco (--em-gold).
   ════════════════════════════════════════════════════════════════════ */
.ce-spot-scrim{
    position:fixed;inset:0;z-index:var(--z-spotlight);
    background:transparent;   /* il buio lo fa l'anello; questo intercetta i clic */
}
.ce-spot-scrim.senza-bersaglio{background:rgba(2,3,8,.82);backdrop-filter:blur(2px)}
.ce-spot-ring{
    position:fixed;z-index:calc(var(--z-spotlight) + 20);pointer-events:none;
    border:2px solid var(--em-gold);border-radius:9px;
    box-shadow:0 0 0 5px rgba(199,154,42,.16),
               0 0 44px rgba(199,154,42,.28),
               0 0 0 9999px rgba(2,3,8,.82);
    transition:top .18s ease,left .18s ease,width .18s ease,height .18s ease;
}
.ce-spot-bolla{
    position:fixed;z-index:calc(var(--z-spotlight) + 30);
    width:min(346px,calc(100vw - 28px));
    background:var(--em-card);border:1px solid rgba(199,154,42,.42);
    border-radius:11px;padding:15px 17px;
    box-shadow:0 18px 48px rgba(0,0,0,.6);
}
.ce-spot-bolla .freccia{
    position:absolute;width:14px;height:14px;background:var(--em-card);
    border:1px solid rgba(199,154,42,.42);transform:rotate(45deg);
}
/* La freccia mostra due lati soli: quelli rivolti verso il bersaglio. */
.ce-spot-bolla .freccia.da-sinistra{left:-8px;border-top:none;border-right:none}
.ce-spot-bolla .freccia.da-destra  {right:-8px;border-bottom:none;border-left:none}
.ce-spot-bolla .freccia.da-sopra   {top:-8px;border-bottom:none;border-right:none}
.ce-spot-bolla .freccia.da-sotto   {bottom:-8px;border-top:none;border-left:none}
.ce-spot-bolla .eti{
    font-size:9px;letter-spacing:.14em;text-transform:uppercase;
    color:var(--em-gold);margin-bottom:6px;font-weight:800;
}
.ce-spot-bolla h4{margin:0 0 7px;font-size:14.5px;font-weight:800;color:var(--em-ink);line-height:1.3}
.ce-spot-bolla p{margin:0 0 14px;font-size:12.5px;line-height:1.6;color:var(--em-muted)}
.ce-spot-bolla p strong,.ce-spot-bolla p b{color:var(--em-ink);font-weight:700}
.ce-spot-bolla p em{color:var(--em-gold);font-style:normal;font-weight:700}
.ce-spot-bolla .gate{font-size:11px;color:var(--em-gold);margin:-8px 0 13px}
.ce-spot-bolla .azioni{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ce-spot-bolla .ok{
    background:var(--em-gold);color:#0d1117;border:none;border-radius:6px;
    padding:8px 16px;font-size:11.5px;font-weight:800;cursor:pointer;
}
.ce-spot-bolla .ok:active{transform:scale(.97)}
.ce-spot-bolla .salta{background:none;border:none;color:var(--em-muted);font-size:11px;cursor:pointer;padding:6px 2px}
.ce-spot-bolla .salta:hover{color:var(--em-ink)}
.ce-spot-bolla .conta{margin-left:auto;font-size:10px;color:var(--em-dim);font-variant-numeric:tabular-nums}
/* Su schermo stretto la bolla si appoggia in basso: accanto non ci sta. */
@media (max-width:560px){
    .ce-spot-bolla{left:14px !important;right:14px !important;width:auto;
                   top:auto !important;bottom:14px}
    .ce-spot-bolla .freccia{display:none}
}

/* ════════════════════════════════════════════════════════════════════
   EM CHROME — telaio globale eRepublik-Modern (FASE 2, 2026-06-01)
   Topbar barra-risorse + nav orizzontale a categorie + sfondo cielo.
   Prefisso .emc-* per non collidere col content-kit .em-* (scoped .em).
   Attivato da class="em-shell" su #app-body.
   ════════════════════════════════════════════════════════════════════ */

/* sfondo garage — dark Bloomberg aesthetic
   Il velo sopra la foto era 0.55→0.45: troppo poco. Le schede hanno un fondo
   proprio, ma tutto cio' che sta FRA una scheda e l'altra — le etichette di
   sezione, i titoli, i separatori — finiva direttamente sulla fotografia del
   garage, con i suoi neon rossi e i riflessi chiari. Playtest di Pietro,
   28/08/2026: «un po' di UI e' transparente, se c'e' un effetto liquid glass
   sarebbe bello», cioe' l'ha letto come un effetto lasciato a meta'.
   Portato a 0.82→0.76: la foto resta come atmosfera e profondita', ma arretra
   dietro l'interfaccia invece di competerci. Togliere l'immagine sarebbe stato
   piu' semplice e avrebbe spento il gioco. */
#app-body.em-shell{
  background:
    url('assets/bg_garage.png') center center / cover fixed no-repeat !important;
  background-color:#0a0c12 !important;
  font-family:'Inter',system-ui,sans-serif;
}
/* Il velo sta su uno strato FISSO a se', non fra i livelli di sfondo del body.
   Motivo: `#app-body` ha altezza 0 (tutto il gioco e' in elementi `fixed`), e un
   gradiente nello sfondo del body si dipinge sull'area di posizionamento — che
   e' alta zero. L'immagine si vedeva lo stesso solo perche' e' `fixed`, il velo
   no. Il risultato era una foto quasi senza schermatura, con i neon del garage
   che passavano attraverso etichette e titoli.
   Qui il velo copre il viewport per davvero, e sta SOTTO tutto il contenuto. */
#app-body.em-shell::before{
  content:'' !important;
  display:block !important;
  position:fixed !important;
  inset:0 !important;
  background:linear-gradient(180deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.76) 100%) !important;
  pointer-events:none !important;
  z-index:0 !important;
}

/* nascondi la vecchia sidebar dark (DOM conservato per cmd-palette/active) */
.em-shell #sidebar-player{display:none !important;}

/* FASE 3: font Inter di default per tutte le tab nello shell light */
.em-shell #tab-container{font-family:'Inter',system-ui,sans-serif;}
/* FASE 3: centra il contenuto di ogni tab nella larghezza della chrome (1130),
   così le tab convertite via remap (senza .em-wrap) restano allineate alla barra.
   Le tab che usano già .em/.em-wrap restano centrate ugualmente. */
.em-shell #tab-container > *{max-width:1158px;margin-left:auto;margin-right:auto;}
.em-shell #tab-container > .em{max-width:none;}

/* ── CHROME WRAPPER (topbar + nav, unico blocco fisso) ── */
.em-shell #em-chrome{
  position:fixed;top:0;left:0;right:0;z-index:50;
  padding-bottom:6px;pointer-events:none;
}
.em-shell #em-chrome > *{pointer-events:auto;}
/* garantisce il posizionamento del pannello a prescindere da Tailwind .fixed */
.em-shell #main-panel{position:fixed;background:transparent !important;}
/* il contenuto delle tab "galleggia" sul cielo (centro), i lati mostrano lo sfondo */

/* ── TOPBAR (barra-risorse, card bianca centrata su cielo) ── */
.em-shell #top-bar{
  position:static;display:flex;justify-content:center;align-items:flex-start;
  padding:7px 12px 0;background:transparent !important;border:none !important;box-shadow:none !important;
  backdrop-filter:none !important;-webkit-backdrop-filter:none !important;
}
.em-shell #top-bar::before,.em-shell #top-bar::after{display:none !important;}
.emc-topbar{
  width:100%;max-width:1130px;display:flex;align-items:center;gap:9px;
  background:#fff;border:1px solid #21262d;border-radius:7px;padding:5px 10px;
  box-shadow:0 1px 3px rgba(31,39,51,.12);font-size:11.5px;color:#46515f;
}
.emc-brand{display:flex;align-items:center;gap:7px;font-weight:800;font-size:13px;cursor:pointer;flex-shrink:0}
.emc-bm{width:24px;height:24px;border-radius:6px;background:linear-gradient(135deg,#2f74c0,#1aa06a);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:11px}
.emc-bn{white-space:nowrap}
.emc-meta{display:flex;gap:8px;color:#6b7280;font-size:11px;align-items:center;flex-shrink:0}
.emc-meta .emc-d{width:1px;height:12px;background:#21262d}
.emc-chips{margin-left:auto;display:flex;gap:5px;align-items:center}
.emc-chip{display:flex;align-items:center;gap:5px;background:#f3f5f9;border:1px solid #21262d;border-radius:7px;padding:4px 8px 4px 5px;font-weight:700;font-size:11.5px;color:#15885a;cursor:default;font-variant-numeric:tabular-nums}
.emc-chip[onclick]{cursor:pointer}
.emc-ico{width:19px;height:19px;border-radius:5px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:11px}
.emc-eb{width:60px;height:6px;border-radius:4px;background:#21262d;overflow:hidden}
.emc-eb i{display:block;height:100%;background:linear-gradient(90deg,#3fbf6f,#1aa06a);transition:width .3s}
.emc-eplus{width:17px;height:17px;border-radius:5px;border:none;background:linear-gradient(180deg,#3fbf6f,#1aa06a);color:#fff;font-size:13px;font-weight:900;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;margin-left:2px;box-shadow:0 1px 2px rgba(21,136,90,.35)}
.emc-eplus:hover{filter:brightness(1.08)}
.emc-eplus:active{transform:scale(0.92)}
.emc-iconbtn{color:#8a95a2;font-size:14px;background:none;border:none;cursor:pointer;padding:2px 4px;flex-shrink:0}
.emc-iconbtn:hover{color:#e6edf3}

/* ── NAV ORIZZONTALE (categorie + dropdown) ── */
.em-shell #em-nav{
  position:static;display:flex;justify-content:center;padding:5px 12px 0;
}
.emc-nav{width:100%;max-width:1130px;display:flex;gap:4px}
.emc-tab{
  position:relative;display:flex;align-items:center;justify-content:center;gap:6px;
  padding:7px 13px;border-radius:7px;background:#fff;border:1px solid #21262d;
  color:#46515f;font-weight:700;font-size:12.5px;box-shadow:0 1px 2px rgba(31,39,51,.06);
  cursor:pointer;white-space:nowrap;font-family:'Inter',system-ui,sans-serif;
}
.emc-tab.fill{flex:1}
.emc-tab .emc-ti{font-size:14px;line-height:1}
.emc-tab.active{background:linear-gradient(180deg,#3a80cb,#2f74c0);color:#fff;border-color:#245d9c}
.emc-tab .emc-cnt{position:absolute;top:-5px;right:-5px;background:#db5746;color:#fff;font-size:9.5px;font-weight:800;border-radius:8px;min-width:16px;text-align:center;padding:0 4px;border:2px solid #e4eaee}
/* dropdown */
.emc-menu{
  position:absolute;top:calc(100% + 4px);left:0;min-width:200px;z-index:55;
  background:#fff;border:1px solid #21262d;border-radius:7px;box-shadow:0 6px 20px rgba(31,39,51,.18);
  padding:5px;display:none;flex-direction:column;gap:1px;
}
.emc-tab:hover > .emc-menu{display:flex}
.emc-menu::before{content:"";position:absolute;bottom:100%;left:0;right:0;height:6px}
.emc-menu a{
  display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:5px;
  color:#1a2744;font-weight:600;font-size:12px;text-decoration:none;white-space:nowrap;
}
.emc-menu a:hover{background:#eef4fb;color:#2f74c0}
.emc-menu a.active{background:#0d1a2a;color:#58a6ff}
.emc-tab:active{transform:none}

/* ══════════════════════════════════════════════════════════════════
   MOBILE / RESPONSIVE — em-shell chrome (tablet ≤ 900px, phone ≤ 600px)
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Topbar: comprimi le chip meno importanti */
  .emc-meta { display:none !important; }
  .emc-chip[data-hide-mobile] { display:none !important; }
  .emc-topbar { padding:4px 8px; gap:6px; }
  .emc-brand .emc-bn { font-size:12px; }

  /* Nav: scroll orizzontale, niente wrapping */
  .emc-nav { padding:4px 8px 0; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .emc-nav::-webkit-scrollbar { display:none; }
  .emc-tab { padding:6px 10px; font-size:11.5px; flex-shrink:0; }
  .emc-tab .emc-ti { font-size:12px; }
  /* Dropdown menu: apre verso il basso, largezza fissa */
  .emc-menu { min-width:160px; }

  /* Contenuto: layout a 2 colonne → 1 colonna, niente sidebar laterale */
  .em-grid2 { grid-template-columns:1fr !important; }
  .em-kpis  { grid-template-columns:repeat(2,1fr) !important; }
}

@media (max-width: 600px) {
  /* Phone: nascondi label categorie, mostra solo icona */
  .emc-tab span:not(.emc-ti):not(.emc-cnt) { display:none; }
  .emc-tab { padding:6px 9px; min-width:36px; justify-content:center; }
  .emc-chips .emc-chip:nth-child(n+4) { display:none !important; } /* max 3 chip */
  .emc-chip { padding:3px 6px 3px 4px; font-size:11px; }
  .emc-eb { width:44px; }
  /* Main panel offset ridotto su phone (em-chrome.js può comunque sovrascrivere
     con l'altezza reale misurata della chrome) */
  .em-shell #main-panel { top:120px !important; }
  /* Contenuto: KPI a colonna singola, padding ridotto, niente overflow orizzontale */
  .em-kpis { grid-template-columns:1fr 1fr !important; }
  .em-page, .em-wrap { padding-left:8px !important; padding-right:8px !important; }
  #main-panel { left:0 !important; }
}

/* Sfondo: su iOS background-attachment:fixed non funziona bene → scroll */
@media (max-width: 768px) {
  #app-body.em-shell {
    background-attachment: scroll !important;
    background-size: cover !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   ZERO-TO-HERO — TEMA SOPRAVVIVENZA (Corse < 10)
   Vedi zero-to-hero.js. Sotto le 10 corse: niente chrome, solo guida manuale.
   ════════════════════════════════════════════════════════════════════════════ */
body.theme-survival {
  background: #050508 !important; /* Nero/Blu abissale */
}
body.theme-survival #sidebar-player,
body.theme-survival #em-nav,
body.theme-survival .em-kpibar,
body.theme-survival .em-card .em-ch .a,
body.theme-survival #hub-modal {
  display: none !important;
}
/* Complemento per il full-screen: nascondo topbar/ticker e azzero l'offset del pannello */
body.theme-survival #top-bar,
body.theme-survival #news-ticker-wrap {
  display: none !important;
}
body.theme-survival #main-panel {
  left: 0 !important;
  top: 0 !important;
}

/* ── LE DUE SCHERMATE DELLA SOPRAVVIVENZA ──────────────────────────────────
   «IL FONDO DEL BARILE» e «SVEGLIATI, SCHIAVO» sono le prime due cose che un
   giocatore nuovo vede, ed erano rimaste al design iniziale: rosso acceso,
   oro #d4af37 (diverso da --em-gold), bordi bianchi da 2px, un bottone da
   24px che pulsa. Vlad, 29/08: «non c'entra niente col design del gioco».
   Riscritte col kit .em e i token: restano dure e teatrali — e' il tono
   giusto per un debito con uno strozzino — ma sono lo stesso gioco. */
#manual-drive-container {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 78vh; padding: 24px 16px; text-align: center;
}
.z2h-scheda {
  width: min(520px, 100%); background: var(--em-card);
  border: 1px solid var(--em-line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6); text-align: left;
}
.z2h-testa {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  border-bottom: 1px solid var(--em-line); background: rgba(255, 255, 255, .02);
}
.z2h-testa .tit {
  font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--em-red);
}
.z2h-testa .stato {
  margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--em-amber);
  border: 1px solid rgba(224, 146, 46, .4); border-radius: 4px; padding: 3px 8px;
}
.z2h-corpo { padding: 18px 20px 6px; }
.z2h-voce {
  border-left: 2px solid var(--em-gold); padding: 2px 0 2px 14px; margin-bottom: 16px;
  font-size: 13px; line-height: 1.65; color: var(--em-ink);
}
.z2h-voce .firma { display: block; margin-top: 8px; font-size: 11px; font-weight: 800; color: var(--em-gold); }
.z2h-dati {
  display: flex; border-top: 1px solid var(--em-line); border-bottom: 1px solid var(--em-line);
  margin-bottom: 18px;
}
.z2h-dati .d { flex: 1; padding: 11px 0; border-right: 1px solid var(--em-line); }
.z2h-dati .d:last-child { border-right: none; }
.z2h-dati .l {
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--em-dim);
}
.z2h-dati .v { font-size: 17px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.z2h-dati .barra { padding: 0 12px; margin-top: 8px; }
.z2h-pie { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 9px; }
.z2h-guida {
  background: var(--em-gold); color: #0d1117; border: none; border-radius: 8px;
  padding: 14px 20px; font-size: 14px; font-weight: 800; cursor: pointer; width: 100%;
}
.z2h-guida .sub { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 600; opacity: .75; }
.z2h-guida:active { transform: scale(.98); }
.z2h-guida:disabled { background: var(--em-line); color: var(--em-dim); cursor: not-allowed; }
.z2h-dormi {
  background: transparent; border: 1px solid var(--em-line); color: var(--em-muted);
  border-radius: 8px; padding: 10px 18px; font-size: 12px; font-weight: 700; cursor: pointer; width: 100%;
}
.z2h-dormi:hover { color: var(--em-ink); border-color: var(--em-blue-d); }

/* «SVEGLIATI, SCHIAVO» — la rivelazione alla sesta corsa. */
.z2h-rivelazione {
  position: fixed; inset: 0; z-index: var(--z-takeover);
  background: rgba(2, 3, 8, .96); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.z2h-rivelazione .scheda {
  max-width: 540px; width: 100%; background: var(--em-card);
  border: 1px solid rgba(199, 154, 42, .42); border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
}
.z2h-rivelazione .eti {
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--em-gold);
  padding: 11px 24px 0; font-weight: 800;
}
.z2h-rivelazione h1 {
  margin: 8px 0 14px; padding: 0 24px; font-size: 24px; font-weight: 900;
  letter-spacing: .06em; color: var(--em-ink);
}
.z2h-rivelazione p {
  margin: 0 0 18px; padding: 0 24px; font-size: 13.5px; line-height: 1.7; color: var(--em-muted);
}
.z2h-rivelazione p strong { color: var(--em-ink); font-weight: 700; }
.z2h-rivelazione .cifra { color: var(--em-green); font-weight: 800; }
.z2h-rivelazione .azioni { padding: 0 24px 22px; }
.z2h-rivelazione .ok {
  background: var(--em-gold); color: #0d1117; border: none; border-radius: 8px;
  padding: 13px 22px; font-size: 13.5px; font-weight: 800; cursor: pointer; width: 100%;
}
.z2h-rivelazione .ok:active { transform: scale(.98); }

}


/* ── Notifiche: sopra il tracker degli obiettivi, non addosso ────────────────
   Fino al 28/08/2026 il contenitore era `fixed bottom-8 left-1/2` — cioe' la
   STESSA posizione di `#obj-tracker` (fisso in basso al centro, bottom:14px).
   I due si coprivano a vicenda. Playtest di Pietro: «Notifiche di acquisto
   vanno override sul tutorial/primi passi in basso».

   Ora le notifiche partono sopra l'ingombro del tracker (14px di distacco +
   ~40px di altezza + respiro) e hanno uno z-index superiore al suo, cosi' un
   avviso non finisce mai nascosto sotto la barra degli obiettivi. */
#notifications {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 76px;
    z-index: 1600;                      /* sopra --z-sticky (1500) del tracker */
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: min(680px, calc(100vw - 24px));
}
@media (max-width: 640px) {
    /* Su mobile il tracker scende a bottom:10px: le notifiche lo seguono. */
    #notifications { bottom: 68px; }
}
