/* ==========================================================================
   BARG CLUB — NEXT-GEN MOTORSPORT & TELEMETRY LAYOUT ENGINE (2026)
   High-Precision Glassmorphism · Dynamic Specular Lighting · Cockpit UX
   ========================================================================== */

/* ---------- 1. PRELOADER (RADIAL COCKPIT BOOT) ---------- */
#preloader {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 45%, rgba(24, 246, 162, 0.08), transparent 45%),
    radial-gradient(circle at 50% 50%, #06110c 0%, #020403 75%);
  z-index: var(--z-preloader);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 520ms var(--ease), visibility 520ms;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
#preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pre-ring {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(24, 246, 162, 0.08);
  border-top: 2px solid var(--emerald);
  border-right: 2px solid rgba(35, 217, 255, 0.4);
  border-radius: 50%;
  animation: telemetrySpin 950ms cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
  box-shadow: 
    0 0 35px var(--emerald-glow),
    inset 0 0 20px rgba(24, 246, 162, 0.15);
  position: relative;
}
.pre-ring::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: var(--cyan);
  animation: telemetrySpin 1.5s linear infinite reverse;
  opacity: 0.75;
}
@keyframes telemetrySpin {
  to { transform: rotate(360deg); }
}
.pre-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-shadow: 0 4px 18px rgba(0,0,0,0.8);
}
.pre-brand span {
  font-family: 'Teko', sans-serif;
  font-size: 1.85rem;
  color: var(--emerald);
  letter-spacing: 3px;
  text-shadow: 0 0 22px var(--emerald-glow);
}
.pre-sub {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   ★ 2. FIVEM-STYLE TELEMETRY HUD NOTIFICATIONS (MIDDLE-RIGHT COCKPIT DECK) ★
   Middle-Right Anchor · Spring Slide · Specular Aero Glass · Progress Drain
   ========================================================================== */

/* کانتینر اصلی نوتیفیکیشن‌ها: چسبیده به وسط دیواره سمت راست مانیتور */
#toast-wrap {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: var(--z-toast);
  width: min(calc(100vw - 32px), 380px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  overflow: visible;
  perspective: 1200px;
}

/* کارت شیشه‌ای اعلان تله‌متری FiveM */
.toast {
  position: relative;
  width: 100%;
  background: 
    radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 65%),
    linear-gradient(135deg, rgba(14, 24, 20, 0.96) 0%, rgba(5, 10, 8, 0.98) 100%);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 13px 15px 15px 15px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  pointer-events: all;
  overflow: hidden;
  user-select: none;
  /* انیمیشن جهش فنری از لبه فیزیکی سمت راست */
  animation: fivemMiddleRightIn 400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

/* خط باریک نوری لبه راست */
.toast::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

/* محفظه آیکون تله‌متری */
.toast-icon-wrap {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: transform var(--dur-2) var(--ease);
}
.toast:hover .toast-icon-wrap {
  transform: scale(1.08) rotate(-4deg);
}

/* متن و اطلاعات اعلان */
.toast-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}
.toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.toast-title {
  font-family: 'Teko', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1;
  text-transform: uppercase;
}
.toast-time {
  font-family: 'Teko', sans-serif;
  font-size: 0.74rem;
  color: var(--dim);
  letter-spacing: 0.5px;
  direction: ltr;
}
.toast-msg {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.45;
  word-break: break-word;
}

/* دکمه بستن اعلان */
.toast-dismiss {
  background: transparent;
  border: none;
  color: var(--dim);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.74rem;
  transition: color var(--dur-1), background var(--dur-1);
  flex-shrink: 0;
}
.toast-dismiss:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* نوار تخلیه زمان تله‌متری (Linear Progress Drain) */
.toast-progress {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}
.toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: right;
  animation: fivemProgressDrain var(--toast-duration, 3800ms) linear forwards;
}

@keyframes fivemProgressDrain {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ================== پالت‌های اختصاصی FiveM ================== */

/* ۱. وضعیت موفقیت (SUCCESS) */
.toast.success {
  border-color: rgba(24, 246, 162, 0.32);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85), 0 0 28px rgba(24, 246, 162, 0.14);
}
.toast.success::before {
  background: var(--emerald);
  box-shadow: 0 0 14px var(--emerald-glow);
}
.toast.success .toast-icon-wrap {
  color: var(--emerald);
  border-color: var(--emerald-line);
  box-shadow: 0 0 16px rgba(24, 246, 162, 0.25);
}
.toast.success .toast-title { color: var(--emerald); }
.toast.success .toast-progress-bar { background: var(--emerald); box-shadow: 0 0 8px var(--emerald-glow); }

/* ۲. وضعیت بحرانی و خطا (ERROR) */
.toast.error {
  border-color: rgba(255, 77, 109, 0.35);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85), 0 0 28px rgba(255, 77, 109, 0.16);
}
.toast.error::before {
  background: var(--danger);
  box-shadow: 0 0 14px var(--danger-glow);
}
.toast.error .toast-icon-wrap {
  color: var(--danger);
  border-color: var(--danger-line);
  box-shadow: 0 0 16px rgba(255, 77, 109, 0.28);
}
.toast.error .toast-title { color: var(--danger); }
.toast.error .toast-progress-bar { background: var(--danger); box-shadow: 0 0 8px var(--danger-glow); }

/* ۳. وضعیت اخطار و دوئل (WARNING) */
.toast.warning {
  border-color: rgba(214, 179, 106, 0.35);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85), 0 0 28px rgba(214, 179, 106, 0.14);
}
.toast.warning::before {
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold-glow);
}
.toast.warning .toast-icon-wrap {
  color: var(--gold);
  border-color: var(--gold-line);
  box-shadow: 0 0 16px rgba(214, 179, 106, 0.25);
}
.toast.warning .toast-title { color: var(--gold); }
.toast.warning .toast-progress-bar { background: var(--gold); box-shadow: 0 0 8px var(--gold-glow); }

/* ۴. وضعیت اطلاعات و تله‌متری (INFO) */
.toast.info {
  border-color: rgba(35, 217, 255, 0.35);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85), 0 0 28px rgba(35, 217, 255, 0.14);
}
.toast.info::before {
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
}
.toast.info .toast-icon-wrap {
  color: var(--cyan);
  border-color: var(--cyan-line);
  box-shadow: 0 0 16px rgba(35, 217, 255, 0.25);
}
.toast.info .toast-title { color: var(--cyan); }
.toast.info .toast-progress-bar { background: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow); }

/* ================== انیمیشن‌های دقیق ورود و خروج FiveM ================== */

/* ورود با اسلاید مستقیم از سمت راست مانیتور */
@keyframes fivemMiddleRightIn {
  0% {
    opacity: 0;
    transform: translateX(120%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* خروج با اسلاید نرم به دیواره راست مانیتور */
.toast.out {
  animation: fivemMiddleRightOut 260ms cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}
@keyframes fivemMiddleRightOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(120%) scale(0.95);
  }
}

/* ================== ریسپانسیو اختصاصی موبایل ================== */
@media (max-width: 639px) {
  #toast-wrap {
    top: auto;
    bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 10px);
    right: 14px;
    left: 14px;
    transform: none; /* حذف translateY در موبایل */
    width: auto;
    max-height: 50vh;
    flex-direction: column-reverse; /* پیام‌های جدید در بالای پیام‌های قبلی */
  }

  .toast {
    max-width: 100%;
    animation-name: fivemMobileBottomIn;
  }

  .toast.out {
    animation-name: fivemMobileBottomOut !important;
  }
}

@keyframes fivemMobileBottomIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fivemMobileBottomOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
}


/* ==========================================================================
   ★ 3. SYSTEM NOTIFICATION BANNERS (FIVEM COCKPIT DOCK) ★
   ========================================================================== */

.banner {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 14px);
  left: 20px;
  z-index: var(--z-banner);
  width: min(calc(100vw - 40px), 420px);
  background: 
    radial-gradient(circle at 0% 50%, rgba(255, 255, 255, 0.05), transparent 70%),
    linear-gradient(135deg, rgba(16, 26, 21, 0.98), rgba(6, 11, 9, 0.99));
  border: 1px solid var(--border-3);
  border-radius: 12px;
  padding: 13px 18px;
  display: none;
  align-items: center;
  gap: 13px;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  overflow: hidden;
  animation: bannerSlideIn 360ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.banner.show { display: flex; }

@media (min-width: 900px) {
  .banner {
    bottom: 28px;
    left: 28px;
  }
}

.banner i {
  font-size: 1.15rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
}
.banner span {
  flex: 1;
  min-width: 0;
  color: var(--text);
  line-height: 1.4;
}

#offline-banner {
  border-color: var(--danger-line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 77, 109, 0.2);
}
#offline-banner i {
  color: var(--danger);
  border-color: var(--danger-line);
  animation: beaconPulse 1.4s ease-in-out infinite;
}

#install-banner {
  border-color: var(--emerald-line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(24, 246, 162, 0.2);
}
#install-banner i {
  color: var(--emerald);
  border-color: var(--emerald-line);
}

#update-banner {
  border-color: var(--cyan-line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(35, 217, 255, 0.2);
}
#update-banner i {
  color: var(--cyan);
  border-color: var(--cyan-line);
}

.banner .banner-actions {
  margin-inline-start: auto;
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

@keyframes bannerSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes beaconPulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 6px var(--danger)); }
  50% { opacity: 0.4; filter: none; }
}



/* ---------- 4. APPLICATION SHELL & STRUCTURAL MESH ---------- */
.app-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 14px;
  padding-inline-start: max(14px, var(--safe-l));
  padding-inline-end: max(14px, var(--safe-r));
  min-width: 0;
}

/* ---------- 5. AERO-GRADE HEADER ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  padding-top: calc(var(--safe-t) + 8px);
  padding-bottom: 10px;
  background: linear-gradient(180deg, var(--bg-0) 65%, transparent);
}
.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: linear-gradient(135deg, rgba(13, 22, 18, 0.78), rgba(6, 11, 9, 0.82));
  border: 1px solid var(--border-2);
  border-radius: var(--r-3);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  box-shadow: 
    0 12px 40px rgba(0,0,0,0.65),
    inset 0 1px 0 rgba(255,255,255,0.07);
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.app-header-inner::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24,246,162,0.45), rgba(35,217,255,0.35), transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 1;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(24,246,162,0.18), rgba(35,217,255,0.12));
  border: 1px solid var(--emerald-line);
  border-radius: 12px;
  color: var(--emerald);
  font-size: 16px;
  box-shadow: 
    0 0 25px rgba(24,246,162,0.30),
    inset 0 1px 0 rgba(255,255,255,0.15);
  flex-shrink: 0;
  position: relative;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.brand-mark:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px var(--emerald-glow);
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 9px;
  border: 1px solid rgba(24,246,162,0.2);
  pointer-events: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}
.brand-text b {
  font-size: 0.94rem;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.brand-text span {
  font-family: 'Teko', sans-serif;
  font-size: 0.95rem;
  color: var(--emerald);
  letter-spacing: 2.5px;
  text-shadow: 0 0 14px rgba(24,246,162,0.4);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Live Telemetry Ping Chip */
.conn-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(24, 246, 162, 0.08);
  border: 1px solid var(--emerald-line);
  color: var(--emerald);
  box-shadow: inset 0 0 12px rgba(24,246,162,0.08);
  transition: all var(--dur-2) var(--ease);
  letter-spacing: 0.04em;
}
.conn-chip .dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
  animation: pulseBeacon 1.8s ease-in-out infinite;
}
@keyframes pulseBeacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}
.conn-chip.offline {
  background: rgba(255, 77, 109, 0.10);
  border-color: var(--danger-line);
  color: var(--danger);
  box-shadow: none;
}
.conn-chip.offline .dot { animation: none; }
.conn-chip .label { display: none; }
@media (min-width: 480px) { .conn-chip .label { display: inline; } }

/* ---------- 6. COCKPIT BUTTON SYSTEM ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  min-height: 42px;
  border-radius: var(--r-2);
  font-size: 0.81rem;
  font-weight: 800;
  border: 1px solid var(--border-2);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--text);
  transition: all var(--dur-2) var(--ease);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.18) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 650ms var(--ease-out);
  pointer-events: none;
}
.btn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.04));
  border-color: var(--border-3);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, #1af8a5 0%, #0db876 100%);
  border-color: rgba(24, 246, 162, 0.8);
  color: #03110a;
  box-shadow: 
    0 6px 24px rgba(24, 246, 162, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #2dfcb0 0%, #11cb83 100%);
  box-shadow: 
    0 8px 32px rgba(24, 246, 162, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-gold {
  background: linear-gradient(135deg, rgba(214,179,106,0.18), rgba(214,179,106,0.06));
  border-color: var(--gold-line);
  color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold);
  color: #171004;
  box-shadow: 0 8px 26px var(--gold-glow);
}
.btn-danger {
  background: linear-gradient(135deg, rgba(255,77,109,0.18), rgba(255,77,109,0.06));
  border-color: var(--danger-line);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 26px var(--danger-glow);
}
.btn-violet {
  background: linear-gradient(135deg, rgba(155,124,255,0.18), rgba(155,124,255,0.06));
  border-color: var(--violet-line);
  color: var(--violet);
}
.btn-violet:hover {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 8px 26px var(--violet-glow);
}
.btn-cyan {
  background: linear-gradient(135deg, rgba(35,217,255,0.18), rgba(35,217,255,0.06));
  border-color: var(--cyan-line);
  color: var(--cyan);
}
.btn-cyan:hover {
  background: var(--cyan);
  color: #021217;
  box-shadow: 0 8px 26px var(--cyan-glow);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-2);
}
.btn-icon { min-width: 42px; padding: 9px; }
.btn-block { width: 100%; margin-top: var(--sp-2); }
.btn-lg { padding: 13px 26px; min-height: 50px; font-size: 0.9rem; }

/* ---------- 7. DRIVER PILL & HUD AVATAR ---------- */
.user-pill {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 4px 5px 4px 14px;
  background: linear-gradient(135deg, rgba(17, 26, 22, 0.92), rgba(9, 14, 12, 0.95));
  border: 1px solid var(--border-2);
  border-radius: 999px;
  box-shadow: 
    0 4px 16px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.user-pill.show { display: flex; }
.user-pill .avatar-wrap {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--emerald-line);
  object-fit: cover;
  background: #000;
  display: block;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.6);
}
.avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(24,246,162,0.45);
}
.avatar-xs { width: 24px; height: 24px; }
.avatar-sm { width: 34px; height: 34px; }
.avatar-md { width: 46px; height: 46px; }
.avatar-lg { width: 76px; height: 76px; border-width: 2px; box-shadow: 0 0 30px var(--emerald-glow); }

.status-dot {
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid var(--bg-0);
  box-shadow: 0 0 10px rgba(24,246,162,0.8);
  animation: pulseBeacon 2s ease-in-out infinite;
}
.user-pill .user-name {
  display: none;
  font-size: 0.82rem;
  font-weight: 800;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur-1);
}
.user-pill .user-name:hover { color: var(--emerald); }
@media (min-width: 640px) { .user-pill .user-name { display: inline; } }
.user-pill .user-balance {
  display: none;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(214,179,106,0.12);
  border: 1px solid var(--gold-line);
  color: var(--gold);
  font-family: 'Teko', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
}
.user-pill .user-balance:hover {
  background: rgba(214,179,106,0.25);
  box-shadow: 0 0 16px var(--gold-glow);
}
@media (min-width: 480px) { .user-pill .user-balance { display: inline-flex; } }
.user-pill .logout-btn {
  padding: 5px;
  min-width: 32px;
  min-height: 32px;
  border: none;
  background: transparent;
  color: var(--danger);
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background var(--dur-1), transform var(--dur-1);
}
.user-pill .logout-btn:hover {
  background: var(--danger-soft);
  transform: rotate(90deg);
}

/* ---------- 8. TELEMETRY BADGES & CHIPS ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--r-1);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  line-height: 1.35;
  white-space: nowrap;
  transition: all var(--dur-2) var(--ease);
}
.chip-green  { background: var(--emerald-soft); border-color: var(--emerald-line); color: var(--emerald); }
.chip-gold   { background: var(--gold-soft);    border-color: var(--gold-line);    color: var(--gold); }
.chip-cyan   { background: var(--cyan-soft);    border-color: var(--cyan-line);    color: var(--cyan); }
.chip-danger { background: var(--danger-soft);  border-color: var(--danger-line);  color: var(--danger); }
.chip-violet { background: var(--violet-soft);  border-color: var(--violet-line);  color: var(--violet); }
.chip-pink   { background: var(--pink-soft);    border-color: var(--pink-line);    color: var(--pink); }
.chip-btn { cursor: pointer; }
.chip-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

/* ---------- 9. RACING SERVER STRIP ---------- */
.server-strip {
  display: none;
  gap: 8px;
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-1);
  overflow-x: auto;
  padding: 6px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.server-strip::-webkit-scrollbar { display: none; }
.server-strip.show { display: flex; }

.server-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(13, 20, 17, 0.8), rgba(6, 10, 8, 0.9));
  border: 1px solid var(--border-2);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--dur-2) var(--ease);
  scroll-snap-align: start;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.server-pill:hover {
  color: var(--text);
  border-color: var(--border-3);
  transform: translateY(-1px);
}
.server-pill:active { transform: scale(0.97); }
.server-pill.active {
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-2) 100%);
  border-color: var(--emerald);
  color: #03110a;
  box-shadow: 
    0 6px 22px rgba(24,246,162,0.38),
    inset 0 1px 0 rgba(255,255,255,0.35);
}
.server-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  flex-shrink: 0;
}
.server-pill .dot.live {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald-glow);
  animation: pulseBeacon 2s ease-in-out infinite;
}
.server-pill .dot.down { background: var(--danger); }
.server-pill.active .dot.live,
.server-pill.active .dot.down {
  background: #03110a;
  box-shadow: none;
  animation: none;
}
.server-pill .count {
  font-family: 'Teko', sans-serif;
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.9;
  margin-inline-start: 2px;
}
.server-pill .glyph { font-size: 0.78rem; opacity: 0.85; }
.server-pill .disabled-tag {
  font-size: 0.6rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0,0,0,0.35);
  font-weight: 800;
}
.server-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  margin-inline-start: 4px;
}

/* ---------- 10. WALLET STRIP (GOLD LUXURY VAULT) ---------- */
.wallet-strip {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-top: var(--sp-3);
  background: 
    radial-gradient(circle at 0% 50%, rgba(214,179,106,0.18), transparent 60%),
    linear-gradient(135deg, rgba(24, 33, 27, 0.85), rgba(11, 16, 13, 0.95));
  border: 1px solid var(--gold-line);
  border-radius: var(--r-3);
  box-shadow: 
    0 12px 36px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
  min-width: 0;
  animation: walletStripHUDIn 440ms var(--ease-out);
}
@keyframes walletStripHUDIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wallet-strip.show { display: flex; }
.wallet-strip::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214,179,106,0.65), transparent);
}
.wallet-strip-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(214,179,106,0.22), rgba(214,179,106,0.06));
  border: 1px solid var(--gold-line);
  border-radius: var(--r-2);
  color: var(--gold);
  font-size: 20px;
  box-shadow: 
    0 0 24px rgba(214,179,106,0.28),
    inset 0 1px 0 rgba(255,255,255,0.15);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.wallet-strip-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.wallet-strip-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.wallet-strip-value {
  font-family: 'Teko', sans-serif;
  font-size: 1.95rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  direction: ltr;
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-shadow: 0 0 20px var(--gold-glow);
}
.wallet-strip-value span {
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
  text-shadow: none;
}
.wallet-strip-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(214,179,106,0.14);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-2);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.8rem;
  transition: all var(--dur-2) var(--ease);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.wallet-strip-action:hover {
  background: var(--gold);
  color: #171004;
  box-shadow: 0 8px 24px var(--gold-glow);
  transform: translateY(-1px);
}
.wallet-strip-action:active { transform: scale(0.96); }
@media (max-width: 400px) {
  .wallet-strip-action span { display: none; }
  .wallet-strip-action { padding: 10px 13px; }
  .wallet-strip-icon { width: 42px; height: 42px; font-size: 17px; }
  .wallet-strip-value { font-size: 1.6rem; }
}

/* ---------- 11. GRAND EVENT HERO (FIA / TELEMETRY STAGE) ---------- */
.event-hero {
  display: none;
  position: relative;
  margin-bottom: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--r-4);
  background:
    radial-gradient(ellipse at 80% 0%, rgba(24, 246, 162, 0.14), transparent 60%),
    radial-gradient(ellipse at 10% 100%, rgba(35, 217, 255, 0.08), transparent 50%),
    linear-gradient(145deg, rgba(14, 23, 19, 0.85), rgba(7, 12, 10, 0.95));
  border: 1px solid var(--border-3);
  box-shadow: 
    0 24px 70px rgba(0,0,0,0.65),
    inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
  min-width: 0;
}
.event-hero.show { display: block; }
.event-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(255,255,255,0.015) 44px 45px),
    repeating-linear-gradient(0deg, transparent 0 44px, rgba(255,255,255,0.015) 44px 45px);
  pointer-events: none;
}
.event-hero.live::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--emerald), var(--cyan), transparent);
  animation: radarScan 3.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  box-shadow: 0 0 18px var(--emerald);
}
@keyframes radarScan {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.event-hero-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: var(--sp-2);
  min-width: 0;
}
.event-title {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.event-track {
  font-size: 0.77rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: var(--sp-3);
}
.event-track b { color: var(--text); font-weight: 700; }
.event-prizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.prize-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border-2);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.prize-pill b {
  font-family: 'Teko', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
}

.event-register {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  background: linear-gradient(135deg, rgba(0,0,0,0.45), rgba(0,0,0,0.25));
  border: 1px solid var(--border-2);
  border-radius: var(--r-3);
  min-width: 0;
}
.event-register-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.event-register-count {
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.event-register-count b {
  font-family: 'Teko', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
  color: var(--emerald);
  text-shadow: 0 0 16px rgba(24,246,162,0.45);
}
.event-register-count .sep { color: var(--muted); }
.event-register-count .cap {
  color: var(--text-2);
  font-family: 'Teko', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}
.event-register-sub { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.event-register-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 540px) {
  .event-register { flex-direction: column; align-items: stretch; }
  .event-register-actions { width: 100%; }
  .event-register-actions .btn { flex: 1; }
}

.event-participants-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  min-height: 28px;
}
.event-participant-avatars {
  display: flex;
  flex-direction: row-reverse;
}
.event-participant-avatars img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #060b09;
  margin-left: -9px;
  object-fit: cover;
  background: #000;
  transition: transform var(--dur-2) var(--ease);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.event-participant-avatars img:hover {
  transform: scale(1.22) translateY(-2px);
  z-index: 3;
}
.event-participants-more {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  margin-inline-start: 6px;
}
.event-you-badge {
  font-size: 0.7rem;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--emerald);
  color: #03110a;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 0 16px rgba(24,246,162,0.45);
}
.event-clock {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-2);
}
.event-clock .caption {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.event-clock .value {
  font-family: 'Teko', sans-serif;
  font-size: 2.85rem;
  line-height: 1;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 3px;
  text-shadow: 0 0 26px var(--gold-glow);
  direction: ltr;
}
.event-hero.live .event-clock .value {
  color: var(--emerald);
  text-shadow: 0 0 26px var(--emerald-glow);
}
@media (min-width: 640px) {
  .event-hero { padding: var(--sp-6) var(--sp-8); }
  .event-clock .value { font-size: 3.4rem; }
}

/* ---------- 12. TELEMETRY KPI TILES ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: var(--sp-3);
  min-width: 0;
}
@media (min-width: 720px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}
.kpi {
  background: linear-gradient(145deg, rgba(14, 22, 18, 0.75), rgba(7, 12, 10, 0.85));
  border: 1px solid var(--border-2);
  border-radius: var(--r-3);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  transition: all var(--dur-2) var(--ease);
  min-width: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 8px 24px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.kpi::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 45%;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.45;
}
.kpi:hover {
  transform: translateY(-3px);
  border-color: var(--border-3);
  box-shadow: 
    0 14px 34px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.09);
}
.kpi-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--r-2);
  font-size: 18px;
  position: relative;
}
.kpi-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid currentColor;
  opacity: 0.25;
}
.kpi-icon.green  { background: var(--emerald-soft); color: var(--emerald); box-shadow: 0 0 20px rgba(24,246,162,0.18); }
.kpi-icon.cyan   { background: var(--cyan-soft);    color: var(--cyan);    box-shadow: 0 0 20px rgba(35,217,255,0.18); }
.kpi-icon.gold   { background: var(--gold-soft);    color: var(--gold);    box-shadow: 0 0 20px rgba(214,179,106,0.18); }
.kpi-icon.red    { background: var(--danger-soft);  color: var(--danger);  box-shadow: 0 0 20px rgba(255,77,109,0.18); }
.kpi-icon.violet { background: var(--violet-soft);  color: var(--violet);  box-shadow: 0 0 20px rgba(155,124,255,0.18); }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-value {
  font-family: 'Teko', sans-serif;
  font-size: 1.95rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.5px;
  direction: ltr;
  transition: color var(--dur-2);
  text-shadow: 0 0 14px rgba(255,255,255,0.1);
}
.kpi-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 13. TOOLBAR & TELEMETRY NAV TABS ---------- */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-3);
  min-width: 0;
}
@media (min-width: 720px) {
  .toolbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.tab-bar {
  display: none;
  gap: 4px;
  padding: 5px;
  background: rgba(8, 14, 11, 0.72);
  border: 1px solid var(--border-2);
  border-radius: var(--r-3);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  min-width: 0;
}
.tab-bar::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .tab-bar { display: flex; } }

.tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 9px 16px;
  border-radius: var(--r-2);
  font-weight: 700;
  font-size: 0.81rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all var(--dur-2) var(--ease);
  white-space: nowrap;
  position: relative;
}
.tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}
.tab.active {
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-2) 100%);
  color: #03110a;
  box-shadow: 
    0 4px 16px rgba(24,246,162,0.35),
    inset 0 1px 0 rgba(255,255,255,0.32);
}
.tab .tab-badge {
  position: absolute;
  top: 4px;
  inset-inline-end: 6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 0 10px var(--danger-glow);
  line-height: 1;
}

/* Fast Telemetry Quick Search */
.search-box {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 720px) { .search-box { max-width: 330px; } }

.search-box input {
  width: 100%;
  background: linear-gradient(145deg, rgba(11, 18, 14, 0.8), rgba(7, 12, 10, 0.9));
  border: 1px solid var(--border-2);
  border-radius: var(--r-2);
  padding: 12px 40px 12px 38px;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--dur-2) var(--ease);
  min-height: 44px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.search-box input:focus {
  border-color: var(--emerald-line);
  box-shadow: 
    0 0 0 3px rgba(24,246,162,0.12),
    0 0 24px rgba(24,246,162,0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.search-box .icon-search,
.search-box .icon-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.84rem;
  color: var(--muted);
}
.search-box .icon-search {
  inset-inline-end: 14px;
  pointer-events: none;
}
.search-box .icon-clear {
  inset-inline-start: 8px;
  width: 30px;
  height: 30px;
  display: none;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  transition: background var(--dur-1);
}
.search-box .icon-clear:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.search-box .icon-clear.show { display: grid; }
.search-box .kbd-hint {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Teko', monospace;
  font-size: 0.74rem;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--dim);
  pointer-events: none;
  transition: opacity var(--dur-1);
}
.search-box input:focus ~ .kbd-hint,
.search-box input:not(:placeholder-shown) ~ .kbd-hint { opacity: 0; }
@media (max-width: 719px) {
  .search-box .kbd-hint { display: none; }
  .search-box input { padding-inline-start: 42px; }
}

/* ---------- 14. PANELS TRANSITION ---------- */
.panel { display: none; min-width: 0; }
.panel.active {
  display: block;
  animation: panelHUDIn 320ms var(--ease-out);
}
@keyframes panelHUDIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 15. PODIUM (METALLIC 3D CHAMPIONS DECK) ---------- */
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: var(--sp-5);
  padding: 8px 0;
  min-width: 0;
}
.podium-slot {
  background: linear-gradient(180deg, rgba(14, 22, 18, 0.75), rgba(7, 12, 10, 0.9));
  border: 1px solid var(--border-2);
  border-radius: var(--r-3);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: transform var(--dur-2) var(--ease);
  position: relative;
  overflow: hidden;
  animation: podiumHUDIn 580ms var(--ease-out) backwards;
  min-width: 0;
  box-shadow: 
    0 12px 30px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.podium-slot::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.6;
}
.podium-slot:hover { transform: translateY(-4px); }
.podium-slot.p1 {
  border-color: var(--gold-line);
  background: linear-gradient(180deg, rgba(214,179,106,0.16) 0%, rgba(13,20,16,0.92) 80%);
  box-shadow: 
    0 0 45px rgba(214,179,106,0.22),
    inset 0 1px 0 rgba(255,255,255,0.15);
  color: var(--gold);
  padding-block: 22px;
  animation-delay: 0ms;
}
.podium-slot.p2 {
  animation-delay: 80ms;
  border-color: rgba(203,213,225,0.3);
  color: #cbd5e1;
}
.podium-slot.p3 {
  animation-delay: 160ms;
  border-color: rgba(249,115,22,0.35);
  color: #f97316;
}
@keyframes podiumHUDIn {
  from { opacity: 0; transform: translateY(22px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.podium-rank {
  font-family: 'Teko', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.podium-slot.p1 .podium-rank {
  color: var(--gold);
  font-size: 1.45rem;
  text-shadow: 0 0 16px var(--gold-glow);
}
.podium-slot.p2 .podium-rank { color: #cbd5e1; }
.podium-slot.p3 .podium-rank { color: #f97316; }

.podium-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid currentColor;
  object-fit: cover;
  background: #000;
  box-shadow: 0 0 14px currentColor;
}
.podium-slot.p1 .podium-avatar {
  width: 66px;
  height: 66px;
  border-color: var(--gold);
  box-shadow: 0 0 30px var(--gold-glow);
}
.podium-slot.p2 .podium-avatar { border-color: #94a3b8; box-shadow: 0 0 14px rgba(203,213,225,0.4); }
.podium-slot.p3 .podium-avatar { border-color: #d97706; box-shadow: 0 0 14px rgba(249,115,22,0.4); }

.podium-name {
  font-size: 0.82rem;
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.podium-slot.p1 .podium-name { font-size: 0.96rem; font-weight: 900; }
.podium-time {
  font-family: 'Teko', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--cyan);
  line-height: 1;
  letter-spacing: 0.5px;
  direction: ltr;
  text-shadow: 0 0 14px rgba(35,217,255,0.4);
}
.podium-score {
  font-family: 'Teko', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  letter-spacing: 0.5px;
  direction: ltr;
  text-shadow: 0 0 14px var(--gold-glow);
}
.podium-slot.p1 .podium-time {
  color: var(--gold);
  font-size: 2.1rem;
  text-shadow: 0 0 20px var(--gold-glow);
}
.podium-slot.p1 .podium-score { color: var(--gold); font-size: 2.1rem; }
.podium-stage {
  font-size: 0.7rem;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .podium { gap: 16px; margin-bottom: var(--sp-6); }
  .podium-slot { padding: 20px 14px; }
  .podium-slot.p1 { padding-block: 28px; }
  .podium-avatar { width: 56px; height: 56px; }
  .podium-slot.p1 .podium-avatar { width: 74px; height: 74px; }
  .podium-name { font-size: 0.92rem; }
  .podium-slot.p1 .podium-name { font-size: 1.05rem; }
  .podium-time, .podium-score { font-size: 1.85rem; }
  .podium-slot.p1 .podium-time, .podium-slot.p1 .podium-score { font-size: 2.4rem; }
}

/* ---------- 16. LEADERBOARD DATA TABLES ---------- */
.table-view {
  display: none;
  background: linear-gradient(180deg, rgba(13, 22, 17, 0.78), rgba(7, 12, 10, 0.9));
  border: 1px solid var(--border-2);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: 
    0 16px 40px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.06);
  min-width: 0;
}
@media (min-width: 720px) { .table-view { display: block; } }
.table-view table { width: 100%; border-collapse: collapse; }
.table-view thead th {
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 15px 16px;
  text-align: start;
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.table-view tbody td {
  padding: 14px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
.table-view tbody tr:last-child td { border-bottom: none; }
.table-view tbody tr { transition: background var(--dur-1); }
.table-view tbody tr:hover td {
  background: rgba(24, 246, 162, 0.045);
}

.rank-cell { width: 62px; }
.rank {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-1);
  font-family: 'Teko', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid var(--border);
}
.rank.gold {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #171004;
  box-shadow: 0 0 20px var(--gold-glow);
  border-color: transparent;
}
.rank.silver {
  background: linear-gradient(135deg, #f1f5f9 0%, #64748b 100%);
  color: #0b1117;
  border-color: transparent;
}
.rank.bronze {
  background: linear-gradient(135deg, #fb923c 0%, #9a3412 100%);
  color: #fff;
  border-color: transparent;
}

.driver-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.driver-name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.time-val {
  font-family: 'Teko', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.5px;
  line-height: 1;
  direction: ltr;
  unicode-bidi: isolate;
  text-shadow: 0 0 14px rgba(35,217,255,0.4);
}
.score-val {
  font-family: 'Teko', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
  line-height: 1;
  direction: ltr;
  unicode-bidi: isolate;
  text-shadow: 0 0 14px var(--gold-glow);
}
.elo-val {
  font-family: 'Teko', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--violet);
  letter-spacing: 0.5px;
  line-height: 1;
  direction: ltr;
  unicode-bidi: isolate;
  text-shadow: 0 0 14px var(--violet-glow);
}

/* ---------- 17. MOBILE TELEMETRY CARDS ---------- */
.cards-mobile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
@media (min-width: 720px) { .cards-mobile { display: none; } }
.card {
  background: linear-gradient(145deg, rgba(14, 22, 18, 0.75), rgba(7, 12, 10, 0.85));
  border: 1px solid var(--border-2);
  border-radius: var(--r-2);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--dur-2) var(--ease);
  min-width: 0;
  max-width: 100%;
  box-shadow: 
    0 6px 20px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.card:active { transform: scale(0.99); }
.card.clickable { cursor: pointer; }
.card.clickable:hover {
  border-color: var(--emerald-line);
  box-shadow: 
    0 10px 30px rgba(0,0,0,0.45),
    0 0 0 1px rgba(24,246,162,0.14),
    inset 0 1px 0 rgba(255,255,255,0.07);
}
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.card-row.bordered {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ---------- 18. DRIVER CARDS GRID DECK ---------- */
.driver-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
}
@media (min-width: 640px) {
  .driver-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
}
.driver-card {
  background: linear-gradient(145deg, rgba(14, 23, 19, 0.8), rgba(7, 12, 10, 0.9));
  border: 1px solid var(--border-2);
  border-radius: var(--r-3);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
  min-width: 0;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 10px 28px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.driver-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24,246,162,0.4), transparent);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
}
.driver-card:hover {
  border-color: var(--emerald-line);
  transform: translateY(-3px);
  box-shadow: 
    0 18px 45px rgba(0,0,0,0.55),
    0 0 0 1px rgba(24,246,162,0.16),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.driver-card:hover::before { opacity: 1; }
.driver-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.driver-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.driver-info > div { min-width: 0; }
.driver-card .driver-name {
  font-weight: 800;
  font-size: 0.98rem;
}
.driver-card .driver-status {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}
.driver-card .driver-status.online {
  color: var(--emerald);
  text-shadow: 0 0 10px rgba(24,246,162,0.45);
}
.driver-stats {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 14px;
  border-top: 1px solid var(--border-2);
  font-size: 0.8rem;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.stat-row > span:first-child { color: var(--muted); flex-shrink: 0; }
.stat-row > span:last-child,
.stat-row > b {
  color: var(--text);
  font-weight: 700;
  text-align: left;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold);
}

.admin-driver-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.btn-driver-edit {
  flex: 1;
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-line);
  color: var(--cyan);
  padding: 9px;
  border-radius: var(--r-1);
  font-size: 0.77rem;
  font-weight: 800;
  transition: all var(--dur-1);
}
.btn-driver-edit:hover { background: var(--cyan); color: #021217; }
.btn-driver-del {
  flex: 1;
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  color: var(--danger);
  padding: 9px;
  border-radius: var(--r-1);
  font-size: 0.77rem;
  font-weight: 800;
  transition: all var(--dur-1);
}
.btn-driver-del:hover { background: var(--danger); color: #fff; }

/* ---------- 19. SKELETON HIGH-TECH LOADERS ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--r-1);
}
.skel-row {
  height: 22px;
  width: 100%;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(24, 246, 162, 0.08) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: telemetryShimmer 1.7s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes telemetryShimmer {
  to { transform: translateX(100%); }
}