/* ============================================================
   IHUB DEALS — Design System v6
   Premium Black/Gold — Mobile-First Professional
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Barlow+Condensed:wght@800;900&display=swap');

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
html { overflow-x: hidden; max-width: 100vw; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; background: #060606; color: #FFF; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
a { color: inherit; text-decoration: none; } ul, ol { list-style: none; } img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font: inherit; color: inherit; outline: none; border: none; background: none; -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(1,166,253,0.25); color: #000; }

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  /* IHUB Brand Colors */
  --ihub-blue: #01A6FD; --ihub-blue-dark: #005793; --ihub-red: #FD1A27;
  --ihub-blue-glow: rgba(1,166,253,0.15);
  --ihub-gradient: linear-gradient(135deg, #005793 0%, #01A6FD 100%);
  /* Gold for fine details only */
  --gold: #C5A059; --gold-light: #E7C686; --gold-dark: #A08040;
  --gold-glow: rgba(1,166,253,0.15);
  --gold-gradient: linear-gradient(135deg, #C5A059 0%, #E7C686 50%, #C5A059 100%);
  --bg: #060606; --bg-card: #0E0E12; --bg-input: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.06); --border-gold: rgba(1,166,253,0.2);
  --success: #01A6FD; --success-bg: rgba(1,166,253,0.1);
  --warning: #F59E0B; --warning-bg: rgba(245,158,11,0.1);
  --danger: #FD1A27; --danger-bg: rgba(253,26,39,0.1);
  --info: #01A6FD; --info-bg: rgba(1,166,253,0.1);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-full: 9999px;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.3); --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-gold: 0 4px 24px rgba(1,166,253,0.15); --shadow-gold-lg: 0 8px 40px rgba(1,166,253,0.2);
  --sidebar-w: 260px; --sidebar-cw: 56px; --topbar-h: 60px;
  --sidebar-gap: 12px; --sidebar-radius: 20px; --logo-h: 56px;
  --sidebar-bg: #FFFFFF;
  --sidebar-text: #64748B; --sidebar-text-hover: #1E293B;
  --sidebar-text-muted: #94A3B8; --sidebar-hover-bg: #F1F5F9;
  --sidebar-border: #E2E8F0;
  --text-primary: #FFFFFF;
  --text-secondary: #D4D4D4;
  --text-dimmed: #A0A0A0;
  --primary: var(--ihub-blue);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --sidebar-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

::-webkit-scrollbar { width: 5px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; } ::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   AUTH GUARD
   ============================================================ */
.app-layout:not(.authenticated) .app-content { visibility: hidden; }
.app-layout:not(.authenticated) .sidebar-nav { visibility: hidden; }

/* ============================================================
   LAYOUT — Mobile First
   ============================================================ */
.app-layout { display: flex; min-height: 100vh; opacity: 0; transition: opacity 0.2s; }
.app-layout.authenticated { opacity: 1; }
.app-main { flex: 1; min-width: 0; margin-left: 0; min-height: 100vh; transition: margin-left 0.28s var(--sidebar-ease); padding-top: var(--topbar-h); overflow-x: hidden; width: 100%; max-width: 100vw; }
.app-content { padding: 16px 14px; padding-bottom: calc(32px + var(--safe-bottom)); max-width: 1400px; margin: 0 auto; width: 100%; }
.subnav { display: none !important; }

/* ============================================================
   TOPBAR — Glass Premium
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: rgba(6,6,6,0.88);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; z-index: 105;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 0 rgba(1,166,253,0.06);
  overflow: hidden;
}
/* Camada 1: linha base dual-tone (azul + dourado champagne) */
.topbar::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent 6%,
    rgba(1,166,253,0.28) 30%,
    rgba(197,160,89,0.42) 50%,
    rgba(1,166,253,0.28) 70%,
    transparent 94%);
  pointer-events: none;
}
/* Camada 2: cometa azul + dourado deslizando infinitamente sobre a linha base */
.topbar::before {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 28%; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(1,166,253,0.0) 10%,
    rgba(1,166,253,0.55) 38%,
    rgba(232,201,122,0.95) 52%,
    rgba(197,160,89,0.65) 64%,
    transparent 100%);
  filter: blur(0.4px) drop-shadow(0 0 6px rgba(1,166,253,0.55)) drop-shadow(0 0 4px rgba(197,160,89,0.65));
  animation: topbarComet 9s cubic-bezier(0.55, 0.05, 0.45, 1) infinite;
  pointer-events: none;
  will-change: transform, opacity;
}
@keyframes topbarComet {
  0%   { transform: translateX(-30%); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateX(360%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar::before { animation: none; opacity: 0; }
}
.topbar-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; overflow: hidden; }
.topbar-hamburger {
  display: flex; align-items: center; justify-content: center;
  color: #999; width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
  transition: all 0.2s;
}
.topbar-hamburger:hover { color: var(--primary); background: rgba(255,255,255,0.04); }
.topbar-hamburger:active { transform: scale(0.92); }
.topbar-hamburger svg { width: 22px; height: 22px; }

.topbar-breadcrumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; min-width: 0; color: #888; }
.topbar-breadcrumb a { color: #888; transition: color 0.2s; }
.topbar-breadcrumb a:hover { color: var(--primary); }
.topbar-breadcrumb .separator { color: #333; margin: 0 4px; }
.topbar-breadcrumb .current { color: #CCC; font-weight: 600; }

.topbar-progress { display: none; align-items: center; gap: 8px; font-size: 11px; color: #B0B0B0; }
.topbar-progress-bar { width: 100px; height: 3px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.topbar-progress-fill { height: 100%; background: var(--gold-gradient); border-radius: var(--radius-full); }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Theme Toggle Switch */
.theme-switch { font-size: 14px; position: relative; display: inline-block; width: 3.5em; height: 2em; flex-shrink: 0; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-switch .theme-slider { --background: #1a1a2e; position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--background); transition: .5s; border-radius: 30px; border: 1px solid rgba(255,255,255,0.08); }
.theme-switch .theme-slider:before { position: absolute; content: ""; height: 1.4em; width: 1.4em; border-radius: 50%; left: 10%; bottom: 15%; box-shadow: inset 8px -4px 0px 0px #01A6FD; background: var(--background); transition: .5s; }
.theme-switch input:checked + .theme-slider { background-color: #28096b; }
.theme-switch input:checked + .theme-slider:before { transform: translateX(100%); box-shadow: inset 15px -4px 0px 15px #01A6FD; }
.theme-switch:hover .theme-slider { border-color: rgba(1,166,253,0.3); }

.topbar-notification { position: relative; color: #888; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s; }
.topbar-notification:hover { color: var(--primary); background: rgba(255,255,255,0.06); }
.topbar-notification-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; background: var(--primary); border-radius: 50%; border: 2px solid rgba(6,6,6,0.95); }
.topbar-avatar { width: 36px; height: 36px; border-radius: var(--radius-full); background: linear-gradient(135deg, #005793 0%, #01A6FD 100%); color: #FFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.topbar-avatar:hover { box-shadow: var(--shadow-gold); }
.topbar-partner-badge { display: none; }
.notif-panel { animation: slideDown 0.2s var(--ease); }
.notif-panel.open { display: block !important; }
.topbar-logo-icon, .topbar-logo-text { display: none; }

/* Topbar logo */
.topbar-logo {
  display: flex !important; align-items: center; gap: 10px; white-space: nowrap; flex-shrink: 0;
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.topbar-logo .logo-icon { display: flex; flex-direction: column; gap: 1.5px; flex-shrink: 0; }
.topbar-logo .logo-icon span { display: block; width: 10px; height: 3.5px; border-radius: 1px; }
.topbar-logo .logo-icon span:first-child { background: #01A6FD; }
.topbar-logo .logo-icon span:nth-child(2) { background: #FFF; }
.topbar-logo .logo-icon span:last-child { background: #666; }
.topbar-logo .logo-text { display: flex; align-items: center; line-height: 1; white-space: nowrap; }
.topbar-logo .logo-text .logo-ihub { color: #FFF; font-family: 'Barlow Condensed', Impact, sans-serif; font-weight: 900; font-size: clamp(1.125rem, 2vw + 0.5rem, 1.375rem); letter-spacing: 0.5px; }
.topbar-logo .logo-text .logo-separator { width: 2px; height: 14px; background: var(--primary); border-radius: 2px; margin: 0 6px; opacity: 0.5; }
.topbar-logo .logo-text .logo-deals { font-size: 9px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--primary); }

/* ============================================================
   SIDEBAR — Premium Floating
   ============================================================ */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh;
  width: var(--sidebar-w);
  /* Dark glass — override light-sidebar variables locally */
  --sidebar-text: rgba(255,255,255,0.38);
  --sidebar-text-hover: rgba(255,255,255,0.88);
  --sidebar-text-muted: rgba(255,255,255,0.22);
  --sidebar-hover-bg: rgba(255,255,255,0.05);
  --sidebar-border: rgba(255,255,255,0.07);
  background: rgba(8,8,12,0.70);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-radius: 0;
  border: 2px solid rgba(1, 166, 253, 0.4); /* Dual-tone como .btn-primary */
  border-left: none;
  border-right: 3px solid #C5A059; /* Acento dourado champagne */
  box-shadow:
    0 10px 60px rgba(0, 0, 0, 0.9),
    0 0 45px rgba(1, 166, 253, 0.20),
    0 0 28px rgba(197, 160, 89, 0.18), /* Glow dourado pareando com o azul */
    inset 0 0 20px rgba(1, 166, 253, 0.05),
    inset -1px 0 0 rgba(197, 160, 89, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: 100; display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(-100%);
  transition: all 0.4s var(--sidebar-ease); /* Transição mais suave */
  will-change: transform, width, height, border-radius;
}

.sidebar.is-open-mobile { transform: translateX(0); transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1); }
.sidebar.collapsed { 
  width: var(--sidebar-cw); 
}
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) {
  height: auto;
  max-height: 85vh;
  top: 50%;
  transform: translateY(-50%) translateX(16px);
  border-radius: 40px;
  border: 2px solid rgba(1, 166, 253, 0.4); /* Selo dual-tone — azul */
  border-right: 3px solid #C5A059; /* Acento dourado champagne */
  box-shadow:
    0 20px 80px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(1, 166, 253, 0.28),
    0 0 32px rgba(197, 160, 89, 0.22), /* Glow dourado pareando com o azul */
    inset 0 0 20px rgba(1, 166, 253, 0.1),
    inset -1px 0 0 rgba(197, 160, 89, 0.30);
  margin-left: 0;
}
.sidebar.collapsed.is-hovered, .sidebar.collapsed.is-pinned {
  width: var(--sidebar-w);
  height: 100vh;
  top: 0;
  transform: translateY(0) translateX(0);
  border-radius: 0;
}

/* ============================================================
   MOBILE (<768px) — Hide floating collapsed pill
   On mobile, only show the sidebar when opened via hamburger
   (.is-open-mobile). The desktop floating icon pill must stay
   off-screen to avoid stealing space from page content.
   ============================================================ */
@media (max-width: 767.98px) {
  .sidebar.collapsed:not(.is-open-mobile),
  .sidebar.collapsed.is-hovered:not(.is-open-mobile),
  .sidebar.collapsed.is-pinned:not(.is-open-mobile) {
    transform: translateX(-100%) !important;
    height: 100vh !important;
    max-height: none !important;
    top: 0 !important;
    border-radius: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

/* ============================================================
   MOBILE GLASS DRAWER — Premium Dark Glassmorphism
   When .is-open-mobile is active, the sidebar becomes a
   full-expansion dark glass drawer. All collapsed rules are
   neutralized via :not(.is-open-mobile) above.
   ============================================================ */

/* --- Base: solid dark background, no blur artifacts --- */
.sidebar.is-open-mobile {
  z-index: 110 !important;
  padding-top: var(--topbar-h) !important;
  background: #0A0A0E !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-right: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 0 !important;
  box-shadow: 4px 0 40px rgba(0,0,0,0.6) !important;
}
.sidebar.is-open-mobile.collapsed {
  width: min(280px, 80vw) !important;
}

/* --- Hide logo and pin on mobile (topbar already shows brand) --- */
.sidebar.is-open-mobile .sidebar-logo { display: none !important; }
.sidebar.is-open-mobile .sidebar-pin-area { display: none !important; }

/* --- Section labels --- */
.sidebar.is-open-mobile .sidebar-section-label {
  display: block !important;
  opacity: 1 !important; height: auto !important;
  padding: 20px 20px 6px !important; margin: 0 !important;
  pointer-events: auto !important; overflow: visible !important;
  color: rgba(255,255,255,0.25) !important;
  font-size: 10px !important; letter-spacing: 1.5px !important;
  font-weight: 600 !important; text-transform: uppercase !important;
}

/* --- sidebar-top: expand Dashboard link --- */
.sidebar.is-open-mobile .sidebar-top {
  padding: 12px 0 4px !important;
  align-items: stretch !important;
}

/* --- All links: clean flat style --- */
.sidebar.is-open-mobile .sidebar-link,
.sidebar.is-open-mobile .sidebar-top .sidebar-link {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 20px !important;
  margin: 0 !important;
  width: auto !important; height: 48px !important;
  min-height: 48px !important;
  border-radius: 0 !important;
  gap: 14px !important;
  overflow: hidden !important;
  color: rgba(255,255,255,0.55) !important;
  font-size: 14px !important; font-weight: 500 !important;
  transition: all 0.15s ease !important;
  background: transparent !important;
  box-shadow: none !important;
}
.sidebar.is-open-mobile .sidebar-link svg,
.sidebar.is-open-mobile .sidebar-top .sidebar-link svg {
  width: 20px !important; height: 20px !important;
  stroke: rgba(255,255,255,0.3) !important;
  flex-shrink: 0 !important;
}
.sidebar.is-open-mobile .sidebar-link span,
.sidebar.is-open-mobile .sidebar-top .sidebar-link span {
  display: inline !important; opacity: 1 !important;
  width: auto !important; height: auto !important;
  margin: 0 !important; padding: 0 !important;
  font-size: 14px !important;
}

/* --- Hover: subtle highlight --- */
.sidebar.is-open-mobile .sidebar-link:hover,
.sidebar.is-open-mobile .sidebar-link:active {
  background: rgba(255,255,255,0.04) !important;
  color: rgba(255,255,255,0.85) !important;
}
.sidebar.is-open-mobile .sidebar-link:hover svg,
.sidebar.is-open-mobile .sidebar-link:active svg {
  stroke: rgba(255,255,255,0.6) !important;
}

/* --- Active item: gold left accent, no gradient blob --- */
.sidebar.is-open-mobile .sidebar-link.active {
  color: var(--primary) !important;
  background: rgba(1,166,253,0.06) !important;
  font-weight: 600 !important;
  box-shadow: inset 3px 0 0 var(--primary) !important;
  border-radius: 0 !important;
}
.sidebar.is-open-mobile .sidebar-link.active svg {
  stroke: var(--primary) !important;
}

/* --- Submenu chevron --- */
.sidebar.is-open-mobile .sidebar-link .submenu-chevron {
  display: flex !important; width: 14px !important; height: 14px !important;
  margin-left: auto !important; opacity: 0.3 !important;
}

/* --- Submenus: clean indent --- */
.sidebar.is-open-mobile .sidebar-submenu { display: block !important; max-height: none !important; }
.sidebar.is-open-mobile .sidebar-submenu:not(.open) { max-height: 0 !important; display: block !important; }
.sidebar.is-open-mobile .sidebar-submenu a {
  color: rgba(255,255,255,0.4) !important;
  padding: 0 20px 0 54px !important;
  height: 40px !important;
  display: flex !important; align-items: center !important;
  font-size: 13px !important;
}
.sidebar.is-open-mobile .sidebar-submenu a:hover { color: rgba(255,255,255,0.8) !important; background: rgba(255,255,255,0.03) !important; }
.sidebar.is-open-mobile .sidebar-submenu a.active { color: var(--primary) !important; font-weight: 600 !important; }

/* --- Footer: compact user info --- */
.sidebar.is-open-mobile .sidebar-footer {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 14px 20px !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
  background: transparent !important;
}
.sidebar.is-open-mobile .sidebar-footer:hover {
  background: rgba(255,255,255,0.03) !important;
}
.sidebar.is-open-mobile .sidebar-user-info,
.sidebar.is-open-mobile .sidebar-footer-info {
  display: block !important; opacity: 1 !important;
  width: auto !important; flex: 1 !important;
  overflow: hidden !important;
}
.sidebar.is-open-mobile .sidebar-footer-name,
.sidebar.is-open-mobile .sidebar-user-name {
  color: rgba(255,255,255,0.8) !important; font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap !important; overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.sidebar.is-open-mobile .sidebar-footer-role,
.sidebar.is-open-mobile .sidebar-user-role {
  color: rgba(255,255,255,0.35) !important; font-size: 11px !important;
  font-weight: 500 !important;
}
.sidebar.is-open-mobile .sidebar-footer-avatar,
.sidebar.is-open-mobile .sidebar-avatar {
  background: rgba(1,166,253,0.15) !important;
  color: var(--primary) !important;
}
.sidebar.is-open-mobile .sidebar-status { display: block !important; }

/* --- Logout button --- */
.sidebar.is-open-mobile .sidebar-logout {
  display: flex !important;
  width: 40px !important; height: 40px !important;
  color: rgba(255,255,255,0.3) !important;
  border-radius: 10px !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}
.sidebar.is-open-mobile .sidebar-logout svg { width: 18px !important; height: 18px !important; }
.sidebar.is-open-mobile .sidebar-logout:hover {
  color: var(--danger) !important;
  background: var(--danger-bg) !important;
}

/* --- Pin area: hidden on mobile --- */
.sidebar.is-open-mobile .sidebar-pin-area { display: none !important; }

/* Sidebar overlay (mobile) — opacity-only fade so rapid open/close stays smooth */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  z-index: 99;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s var(--sidebar-ease), visibility 0s linear 0.3s;
}
.sidebar-overlay.active {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 0.3s var(--sidebar-ease), visibility 0s linear 0s;
}

/* ---- sidebar-top ---- */
.sidebar-top { flex-shrink: 0; padding: 16px 0 8px; display: flex; flex-direction: column; align-items: center; }
.sidebar-top .sidebar-link { margin: 0 8px; }
/* Expanded: Dashboard link stretches like nav links */
.sidebar.collapsed.is-hovered .sidebar-top,
.sidebar.collapsed.is-pinned .sidebar-top,
.sidebar:not(.collapsed) .sidebar-top { align-items: stretch; }
.sidebar-pin-area { display: flex; align-items: center; justify-content: flex-end; padding: 4px 12px 0; flex-shrink: 0; width: 100%; opacity: 0; pointer-events: none; height: 0; overflow: hidden; transition: opacity 0.15s var(--sidebar-ease), height 0.15s var(--sidebar-ease); }
.sidebar.collapsed.is-hovered .sidebar-pin-area, .sidebar.collapsed.is-pinned .sidebar-pin-area, .sidebar:not(.collapsed) .sidebar-pin-area { opacity: 1; pointer-events: auto; height: 28px; }
.sidebar-pin-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; color: rgba(255,255,255,0.22); transition: all 0.2s var(--sidebar-ease); cursor: pointer; }
.sidebar-pin-btn:hover { color: rgba(255,255,255,0.65); background: rgba(255,255,255,0.06); }
.sidebar.is-pinned .sidebar-pin-btn { color: var(--primary); }
.sidebar-pin-btn svg { width: 16px; height: 16px; transition: transform 0.25s var(--sidebar-ease); }
.sidebar.is-pinned .sidebar-pin-btn svg { transform: rotate(45deg); }

/* ---- sidebar-logo ---- */
.sidebar-logo { display: flex; align-items: center; justify-content: center; padding: 16px 14px 8px; flex-shrink: 0; min-height: 56px; white-space: nowrap; overflow: hidden; }
.sidebar-logo .logo-text { display: flex; align-items: center; gap: 0; line-height: 1; transition: opacity 0.15s var(--sidebar-ease); }
.sidebar-logo .logo-i { color: var(--primary); font-family: 'Barlow Condensed', Impact, sans-serif; font-weight: 900; font-size: 24px; letter-spacing: 0.5px; }
.sidebar-logo .logo-hub { color: rgba(255,255,255,0.82); font-family: 'Barlow Condensed', Impact, sans-serif; font-weight: 900; font-size: 24px; letter-spacing: 0.5px; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-logo .logo-hub { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-logo { padding: 16px 0 8px; justify-content: center; }

/* ---- sidebar-nav ---- */
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 4px 0; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.sidebar-section-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,0.18); padding: 14px 20px 6px; white-space: nowrap; overflow: hidden; flex-shrink: 0; opacity: 1; transition: opacity 0.15s var(--sidebar-ease), height 0.28s var(--sidebar-ease), padding 0.28s var(--sidebar-ease); }
.sidebar-link { display: flex; align-items: center; gap: 14px; padding: 9px 20px; margin: 1px 8px; color: var(--sidebar-text); font-size: 13.5px; font-weight: 500; border-radius: 12px; transition: all 0.25s var(--sidebar-ease); white-space: nowrap; overflow: hidden; position: relative; flex-shrink: 0; min-height: 38px; }
.sidebar-link svg { width: 20px; height: 20px; flex-shrink: 0; stroke: rgba(255,255,255,0.28); transition: all 0.25s; }
.sidebar-link span { display: inline; overflow: hidden; white-space: nowrap; opacity: 1; transition: opacity 0.15s var(--sidebar-ease); }
.sidebar-link:hover { color: var(--sidebar-text-hover); background: var(--sidebar-hover-bg); }
.sidebar-link:hover svg { stroke: var(--primary); filter: drop-shadow(0 0 6px rgba(1,166,253,0.4)); }
.sidebar-link.active { color: var(--primary); background: rgba(1,166,253,0.10); font-weight: 700; box-shadow: 0 0 18px rgba(1,166,253,0.12), inset 0 0 16px rgba(1,166,253,0.04); border-radius: var(--radius-full); font-size: 14px; border: 1px solid rgba(1,166,253,0.20); }
.sidebar-link.active svg { stroke: var(--primary); filter: drop-shadow(0 0 5px rgba(1,166,253,0.5)); }
.sidebar-link:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.sidebar:not(.collapsed) .sidebar-top .sidebar-link,
.sidebar.collapsed.is-hovered .sidebar-top .sidebar-link,
.sidebar.collapsed.is-pinned .sidebar-top .sidebar-link { justify-content: center; }
.sidebar-link .submenu-chevron { margin-left: auto; width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.25s var(--sidebar-ease), opacity 0.3s var(--sidebar-ease), width 0.3s var(--sidebar-ease), height 0.3s var(--sidebar-ease), margin 0.3s var(--sidebar-ease); opacity: 0.4; }
.sidebar-link.submenu-open .submenu-chevron { transform: rotate(90deg); opacity: 0.8; }
.sidebar-submenu { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--sidebar-ease); flex-shrink: 0; }
.sidebar-submenu.open { max-height: 300px; margin: 4px 14px 6px 34px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,0.10); }
.sidebar-submenu a { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 12px; margin: 2px 0; border-radius: 8px; color: rgba(255,255,255,0.42); font-size: 13px; font-weight: 500; transition: all 0.18s var(--sidebar-ease); white-space: nowrap; }
.sidebar-submenu a::before { content: ''; position: absolute; left: -12px; top: 50%; width: 6px; height: 1px; background: rgba(255,255,255,0.14); transition: all 0.2s var(--sidebar-ease); }
.sidebar-submenu a:hover { color: rgba(255,255,255,0.88); background: rgba(255,255,255,0.04); }
.sidebar-submenu a:hover::before { width: 8px; background: rgba(1,166,253,0.55); }
.sidebar-submenu a.active { color: var(--primary); font-weight: 600; background: rgba(1,166,253,0.08); }
.sidebar-submenu a.active::before { width: 8px; height: 2px; background: var(--primary); box-shadow: 0 0 6px rgba(1,166,253,0.65); }

/* ---- sidebar-footer ---- */
/* ---- sidebar-footer ---- */
.sidebar-footer { display: flex; padding: 14px 14px; border-top: 1px solid rgba(255,255,255,0.07); align-items: center; gap: 12px; text-decoration: none; transition: background 0.2s; overflow: hidden; flex-shrink: 0; margin-top: auto; }
.sidebar-footer:hover { background: rgba(255,255,255,0.03); }
.sidebar-avatar, .sidebar-footer-avatar { display: flex; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #005793 0%, #01A6FD 100%); color: #FFF; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex-shrink: 0; animation: avatarGoldPulse 3s ease-in-out infinite; }
.sidebar-user-info, .sidebar-footer-info { display: block; overflow: hidden; flex: 1; opacity: 1; transition: opacity 0.15s var(--sidebar-ease); }
.sidebar-user-name, .sidebar-footer-name { display: block; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role, .sidebar-footer-role { display: block; font-size: 11px; color: rgba(255,255,255,0.3); }
.sidebar-status { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.sidebar-logout { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; color: rgba(255,255,255,0.25); transition: all 0.2s; }
.sidebar-logout svg { width: 18px; height: 18px; }
.sidebar-logout:hover { color: var(--danger); background: var(--danger-bg); }

.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-nav {
  flex: none;
  padding-bottom: 10px;
}
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-footer {
  margin-top: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 0;
}

/* ============================================================
   COLLAPSED — Icon centering
   CRITICAL: :not(.is-open-mobile) prevents collapsed rules
   from overriding the mobile drawer expanded state
   ============================================================ */
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-link span { display: none !important; width: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-link .submenu-chevron { opacity: 0 !important; width: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; pointer-events: none; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-link,
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-link.has-submenu { display: flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; margin: 1px auto !important; width: 38px !important; height: 38px !important; min-height: 38px !important; border-radius: 10px !important; gap: 0 !important; overflow: visible !important; }
/* Active collapsed: gold glow squircle */
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-link.active { width: 42px !important; height: 42px !important; border-radius: 14px !important; background: rgba(1,166,253,0.14) !important; border: 1px solid rgba(1,166,253,0.28) !important; box-shadow: 0 0 20px rgba(1,166,253,0.22), 0 4px 16px rgba(0,0,0,0.4) !important; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-top { padding: 14px 0 6px; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-top .sidebar-link,
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-top .sidebar-link.has-submenu { width: 40px !important; height: 40px !important; min-height: 40px !important; margin: 0 auto !important; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-top .sidebar-link.active { width: 44px !important; height: 44px !important; border-radius: 14px !important; box-shadow: 0 4px 20px rgba(1,166,253,0.4) !important; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-section-label { opacity: 0; height: 0; padding: 0; margin: 0; pointer-events: none; overflow: hidden; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-submenu { display: none !important; max-height: 0 !important; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-user-info,
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-footer-info { opacity: 0; width: 0; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-status,
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-logout { display: none; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-footer { display: flex; align-items: center; justify-content: center; padding: 16px 0; border-top: none; gap: 0; flex-direction: column; }
.sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) .sidebar-pin-area { opacity: 0; height: 0; padding: 0; pointer-events: none; overflow: hidden; }

/* ============================================================
   NOTIFICATION DRAWER
   ============================================================ */
.notif-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 200; }
.notif-overlay.open { display: block; }
.notif-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 100vw; max-width: 100vw; background: #0C0C10; border-left: 1px solid var(--border); z-index: 210; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s var(--sidebar-ease); box-shadow: -8px 0 40px rgba(0,0,0,0.4); }
.notif-drawer.open { transform: translateX(0); }
.notif-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.notif-drawer-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: #FFF; }
.notif-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; background: var(--ihub-gradient); color: #000; border-radius: var(--radius-full); font-size: 11px; font-weight: 800; }
.notif-drawer-close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; color: var(--primary); background: rgba(1,166,253,0.08); border: 1px solid rgba(1,166,253,0.22); box-shadow: 0 0 14px rgba(1,166,253,0.10), inset 0 0 10px rgba(1,166,253,0.04); transition: all 0.25s var(--sidebar-ease); cursor: pointer; }
.notif-drawer-close svg { stroke: var(--primary); transition: transform 0.25s var(--sidebar-ease); }
.notif-drawer-close:hover { background: rgba(1,166,253,0.16); border-color: rgba(1,166,253,0.40); box-shadow: 0 0 20px rgba(1,166,253,0.22), inset 0 0 12px rgba(1,166,253,0.08); transform: translateY(-1px); }
.notif-drawer-close:hover svg { transform: rotate(90deg); }
.notif-drawer-close:active { transform: translateY(0); }
.notif-drawer-body { flex: 1; overflow-y: auto; padding: 8px 0; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.notif-section-label { font-size: 11px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: 1.5px; padding: 16px 20px 8px; }
.notif-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 20px; cursor: pointer; transition: all 0.2s; position: relative; border-left: 3px solid transparent; opacity: 0.5; }
.notif-item:hover { background: rgba(255,255,255,0.04); opacity: 0.7; }
.notif-unread { background: rgba(1,166,253,0.08); border-left-color: var(--primary); opacity: 1; }
.notif-unread:hover { background: rgba(1,166,253,0.12); opacity: 1; }
.notif-unread .notif-title { color: #FFF; font-weight: 700; }
.notif-unread .notif-desc { color: #aaa; }
.notif-unread .notif-icon { box-shadow: 0 0 0 2px rgba(1,166,253,0.25); }
.notif-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; transition: box-shadow 0.2s; }
.notif-icon-money { background: rgba(1,166,253,0.12); color: var(--primary); }
.notif-icon-success { background: var(--success-bg); color: var(--success); }
.notif-icon-payout { background: var(--info-bg); color: var(--info); }
.notif-icon-info { background: rgba(255,255,255,0.06); color: #888; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: #999; margin-bottom: 3px; transition: color 0.2s; }
.notif-desc { font-size: 12px; color: #999; }
.notif-desc-success { color: var(--success); }
.notif-time { font-size: 11px; color: #999; margin-top: 4px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; box-shadow: 0 0 6px rgba(1,166,253,0.6); }
.notif-drawer-footer { padding: 12px 16px; border-top: 1px solid var(--border); flex-shrink: 0; }

/* Notification Tabs */
.notif-tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; padding: 0 12px; }
.notif-tab { flex: 1; padding: 10px 0; font-size: 12px; font-weight: 600; color: #999; text-align: center; border-bottom: 2px solid transparent; transition: all 0.2s; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; }
.notif-tab:hover { color: #aaa; }
.notif-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Notification Badge on Bell */
.notif-bell-badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--ihub-gradient); color: #000; border-radius: var(--radius-full); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; line-height: 1; pointer-events: none; box-shadow: 0 2px 8px rgba(1,166,253,0.4); }

/* Notification Loading & Empty */
.notif-loading, .notif-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 20px; color: #999; font-size: 13px; }
.notif-spinner { width: 24px; height: 24px; border: 2px solid #333; border-top-color: var(--primary); border-radius: 50%; animation: notifSpin 0.6s linear infinite; }
@keyframes notifSpin { to { transform: rotate(360deg); } }

/* Notification Toast */
.notif-toast { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: linear-gradient(135deg, rgba(1,166,253,0.15), rgba(15,15,20,0.95)); border: 1px solid rgba(1,166,253,0.3); border-radius: 12px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(1,166,253,0.1); transform: translateX(120%); opacity: 0; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s; }
.notif-toast.show { transform: translateX(0); opacity: 1; }
.notif-toast-icon { width: 32px; height: 32px; border-radius: 50%; background: rgba(1,166,253,0.15); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ============================================================
   PAGE STRUCTURE
   ============================================================ */
.page-header { margin-bottom: 20px; }
.page-title { font-size: clamp(1.25rem, 3vw + 0.5rem, 1.625rem); font-weight: 800; color: #FFF; line-height: 1.3; }
.page-subtitle { font-size: 13px; color: #777; margin-top: 4px; line-height: 1.4; }

/* ============================================================
   CARDS — Glass Premium
   ============================================================ */
.card {
  background: rgba(14,14,18,0.55);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0; padding: 20px;
  position: relative; transition: all 0.3s var(--ease);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
.card-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; color: #FFF; }
.section-title { font-size: 16px; font-weight: 700; color: #FFF; margin-bottom: 16px; }

.glass-card { background: rgba(14,14,18,0.55); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); border: 1px solid rgba(255,255,255,0.10); border-radius: 0; position: relative; transition: all 0.3s var(--ease); overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06); }
.glass-card::before { content: ''; position: absolute; top: -1px; left: 24px; right: 24px; height: 1px; background: linear-gradient(90deg, transparent, rgba(1,166,253,0.20), transparent); pointer-events: none; }
.glass-card:hover { border-color: rgba(255,255,255,0.16); box-shadow: 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08); }
.glass-card-hover:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 20px rgba(1,166,253,0.08); }

/* ============================================================
   METRICS — Responsive Grid
   ============================================================ */
.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.metric-card {
  padding: 20px; transition: all 0.3s var(--ease);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(14,14,18,0.55);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-radius: 0; position: relative; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
.metric-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--ihub-gradient); opacity: 0; transition: opacity 0.3s; }
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.16); }
.metric-card:hover::after { opacity: 1; }
.metric-label { font-size: 11px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; opacity: 0.6; }
.metric-label svg { width: 14px; height: 14px; opacity: 0.8; stroke: var(--primary); }
.metric-value { font-size: clamp(1.125rem, 3.5vw, 1.75rem); font-weight: 800; color: #FFF; line-height: 1; }
.metric-value.accent { color: var(--primary); }
.metric-sublabel { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-top: 8px; line-height: 1.35; letter-spacing: 0.1px; opacity: 0.85; }

/* ============================================================
   DEAL CARDS — Native App Feel
   ============================================================ */
.deals-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.deal-card {
  background: rgba(14,14,18,0.55);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0; padding: 18px; overflow: hidden;
  transition: all 0.3s var(--ease); position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
.deal-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--ihub-gradient); opacity: 0; transition: opacity 0.3s; }
.deal-card:hover { border-color: rgba(1,166,253,0.15); }
.deal-card:hover::before { opacity: 1; }
.deal-card-partner { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.deal-card-partner-logo { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #FFF; flex-shrink: 0; }
.deal-card-partner-name { font-size: 12px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: 0.5px; }
.deal-card-name { font-size: 15px; font-weight: 700; color: #FFF; margin-bottom: 10px; line-height: 1.3; }
.deal-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.deal-card-values { display: flex; gap: 16px; margin-bottom: 14px; }
.deal-card-value-item { flex: 1; min-width: 0; }
.deal-card-value-label { font-size: 10px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.deal-card-value-number { font-size: 16px; font-weight: 800; color: var(--primary); }

/* ============================================================
   WALLET — Financial Premium
   ============================================================ */
.wallet-balance {
  text-align: center; padding: 24px 16px; margin-bottom: 20px;
  background: rgba(14,14,18,0.55);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(1,166,253,0.18);
  border-radius: 0;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(1,166,253,0.08);
}
.wallet-balance::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gold-gradient); }
.wallet-balance-label { font-size: 11px; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
.wallet-balance-amount { font-size: clamp(1.75rem, 6vw, 2.5rem); font-weight: 800; color: #FFF; line-height: 1; }
.wallet-balance-currency { color: var(--primary); font-size: 0.6em; font-weight: 700; }
.wallet-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.wallet-card {
  background: rgba(14,14,18,0.55);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0; padding: 14px 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
.wallet-card-label { font-size: 10px; font-weight: 600; color: #777; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.wallet-card-value { font-size: 14px; font-weight: 700; color: #FFF; }

/* ============================================================
   BUTTONS — Touch Optimized
   ============================================================ */
.btn { -webkit-tap-highlight-color: transparent; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; background: #0C0C10; color: #FFF; font-weight: 700; font-size: 13px; border-radius: 14px; border: 2px solid rgba(1,166,253,0.4); border-bottom: 3px solid #C5A059; transition: all 0.25s var(--ease); white-space: nowrap; box-shadow: 0 0 12px rgba(1,166,253,0.08), 0 0 4px rgba(197,160,89,0.08); }
.btn-primary:hover { transform: translateY(-2px); border-color: rgba(1,166,253,0.7); box-shadow: 0 0 20px rgba(1,166,253,0.2), 0 0 8px rgba(197,160,89,0.15), 0 4px 20px rgba(0,0,0,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled, .btn-primary.disabled { opacity: 0.3; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; background: transparent; color: #CCC; font-weight: 600; font-size: 13px; border-radius: var(--radius-full); border: 1.5px solid rgba(255,255,255,0.1); transition: all 0.25s var(--ease); white-space: nowrap; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; background: transparent; color: #AAA; font-weight: 500; font-size: 13px; border-radius: var(--radius-full); transition: all 0.2s; }
.btn-ghost:hover { color: var(--primary); background: rgba(1,166,253,0.06); }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; background: var(--danger); color: #fff; font-weight: 600; font-size: 13px; border-radius: 0; transition: all 0.2s; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-sm { padding: 7px 16px; font-size: 12px; } .btn-lg { padding: 14px 32px; font-size: 15px; } .btn-block { width: 100%; }

/* ============================================================
   FORMS — Mobile Optimized
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #BBB; margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0; }
.form-hint { font-size: 12px; color: #999; margin-top: 4px; } .form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: #CCC; }
.form-checkbox input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.form-input { width: 100%; padding: 12px 16px; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: var(--radius-md); color: #FFF; font-size: 16px; transition: all 0.25s var(--ease); }
.form-input:focus { border-color: var(--primary); background: rgba(1,166,253,0.03); box-shadow: 0 0 0 3px rgba(1,166,253,0.08); }
.form-input::placeholder { color: #888; }
.form-select { width: 100%; padding: 12px 40px 12px 16px; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: var(--radius-md); color: #FFF; font-size: 16px; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; transition: all 0.25s var(--ease); }
.form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1,166,253,0.08); }
.form-select option { background: #111; color: #FFF; }
.glass-input, .input-group .glass-input { width: 100%; padding: 12px 16px 12px 48px; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: var(--radius-md); color: #FFF; font-size: 16px; transition: all 0.25s var(--ease); }
.glass-input:focus { border-color: var(--primary); background: rgba(1,166,253,0.03); box-shadow: 0 0 0 3px rgba(1,166,253,0.08); }
.glass-input::placeholder { color: #888; }
.glass-input-no-icon, .input-group .glass-input-no-icon { padding-left: 16px; }
.glass-select { width: 100%; max-width: 100%; padding: 12px 40px 12px 16px; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: var(--radius-md); color: #FFF; font-size: 16px; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; transition: all 0.25s var(--ease); text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }

/* ============================================================
   CUSTOM SELECT COMPONENT
   Lightweight dropdown replacement for native <select> elements.
   Rendered inside the DOM flow, respects overflow and viewport.
   Activated via [data-custom-select] attribute on the <select>.
   ============================================================ */
.cs-wrapper { position: relative; width: 100%; max-width: 100%; min-width: 0; }
.cs-wrapper > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; }
/* cs-trigger inherits its visual sizing (padding, border, font, background) from the
   computed style of the original <select> set inline by JS — these CSS rules are only
   for layout behavior (flex), interaction states, and positioning of the chevron.
   CRITICAL: aggressive reset of <button> browser defaults (appearance, font, line-height,
   min-height) so the trigger renders with EXACTLY the same size as the original <select>. */
.cs-trigger {
    /* Reset all browser button defaults */
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    margin: 0; outline: none; font: inherit; line-height: 1.4;
    min-height: 0; height: auto; vertical-align: baseline;
    /* Layout */
    display: flex; align-items: center; justify-content: flex-start; gap: 10px;
    width: 100%; max-width: 100%; min-width: 0;
    box-sizing: border-box; position: relative;
    cursor: pointer; text-align: left;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
    /* Cor e fundo reativos ao tema — substituem o snapshot inline antigo
       (buildCustomSelect) que congelava o trigger no estado do load. */
    color: var(--text-primary);
    background-color: var(--bg-input);
}
.cs-trigger::-moz-focus-inner { border: 0; padding: 0; }
.cs-trigger:hover { border-color: rgba(1,166,253,0.35) !important; }
.cs-wrapper.open .cs-trigger { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(1,166,253,0.08) !important; }
.cs-trigger-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 22px; }
.cs-trigger-chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; flex-shrink: 0; stroke: rgba(255,255,255,0.45); transition: transform 0.25s var(--sidebar-ease); pointer-events: none; }
.cs-wrapper.open .cs-trigger-chevron { transform: translateY(-50%) rotate(180deg); stroke: var(--primary); }
.cs-dropdown { position: fixed; max-height: 260px; overflow-y: auto; background: rgba(12,12,16,0.96); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(1,166,253,0.22); border-radius: var(--radius-md); box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(1,166,253,0.10); padding: 6px; z-index: 9999; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity 0.18s var(--sidebar-ease), transform 0.18s var(--sidebar-ease); }
.cs-dropdown.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cs-option { display: flex; align-items: center; padding: 10px 14px; border-radius: 8px; color: rgba(255,255,255,0.72); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-option:hover { background: rgba(1,166,253,0.08); color: #FFF; }
.cs-option.selected { background: rgba(1,166,253,0.16); color: var(--primary); font-weight: 700; box-shadow: inset 0 0 12px rgba(1,166,253,0.08); }
.cs-dropdown::-webkit-scrollbar { width: 6px; }
.cs-dropdown::-webkit-scrollbar-thumb { background: rgba(1,166,253,0.25); border-radius: 3px; }
html.light .cs-trigger { background: var(--bg-input); color: #0C0A09; border-color: rgba(0,0,0,0.08); }
html.light .cs-trigger-chevron { stroke: #78716C; }
html.light .cs-wrapper.open .cs-trigger-chevron { stroke: var(--primary); }
html.light .cs-dropdown { background: rgba(255,255,255,0.98); border-color: rgba(1,166,253,0.20); box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 30px rgba(1,166,253,0.08); }
html.light .cs-option { color: #44403C; }
html.light .cs-option:hover { background: rgba(1,166,253,0.06); color: #0C0A09; }
html.light .cs-option.selected { background: rgba(1,166,253,0.10); color: var(--primary); }
.glass-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1,166,253,0.08); }
.glass-select option { background: #111; color: #FFF; }
.input-group { position: relative; }
.input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #999; pointer-events: none; z-index: 2; }

/* ---- Filters Bar ---- */
.filters-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; align-items: stretch; }
.filter-tabs { display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; width: 100%; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 8px 14px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.42);
  background: transparent; border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-full); cursor: pointer; transition: all 0.2s;
  white-space: nowrap; flex-shrink: 0; box-shadow: none;
}
.filter-tab:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.16); }
.filter-tab.active { color: #000; background: var(--ihub-gradient); border-color: transparent; box-shadow: var(--shadow-gold); }
.filter-date {
  padding: 10px 14px; background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); color: #FFF; font-size: 13px;
  transition: all 0.25s var(--ease); flex: 1; min-width: 0;
}
.filter-date:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1,166,253,0.08); }
.filter-select {
  padding: 10px 36px 10px 14px; background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); color: #FFF; font-size: 13px;
  cursor: pointer; appearance: none; transition: all 0.25s var(--ease); flex: 1; min-width: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.filter-select:focus { border-color: var(--primary); }
.filter-select option { background: #111; color: #FFF; }

/* ============================================================
   TABLES — Adaptive
   ============================================================ */
.table-wrapper {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--bg-card); margin-bottom: 20px; max-width: 100%;
  position: relative;
}
.table-wrapper::after {
  content: ''; position: sticky; top: 0; right: 0; bottom: 0; width: 20px;
  background: linear-gradient(90deg, transparent, rgba(6,6,6,0.7));
  pointer-events: none; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  opacity: 1; transition: opacity 0.3s; float: right; margin-top: -100%; height: 100%;
}
.table-wrapper:not(.is-scrollable)::after, .table-wrapper.scrolled-end::after { opacity: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table thead th { background: rgba(255,255,255,0.02); color: #999; font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
.table tbody tr { transition: background 0.15s; border-bottom: 1px solid rgba(255,255,255,0.03); }
.table tbody tr:hover { background: rgba(1,166,253,0.03); }
.table tbody tr:active { background: rgba(1,166,253,0.06); }
.table tbody td { padding: 10px 12px; color: #CCC; white-space: nowrap; }
.table tfoot td { padding: 12px 14px; background: rgba(1,166,253,0.04); font-weight: 700; color: var(--primary); border-top: 1px solid var(--border); }
.text-right { text-align: right; } .text-center { text-align: center; } .font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }

/* ============================================================
   BADGES
   ============================================================ */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; }
.badge-primary { background: rgba(1,166,253,0.12); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: rgba(255,255,255,0.06); color: #999; }
.badge-exclusive { background: var(--ihub-gradient); color: #000; }
.badge-accent { background: rgba(1,166,253,0.1); color: var(--primary); }

/* ============================================================
   SALDO, FLASH, PAGINATION, MODAL, CONFIRM
   ============================================================ */
.saldo-card { padding: 24px; background: linear-gradient(145deg, rgba(1,166,253,0.08) 0%, rgba(1,166,253,0.02) 100%); border: 1px solid var(--border-gold); border-radius: var(--radius-xl); position: relative; overflow: hidden; }
.saldo-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gold-gradient); }
.saldo-label { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.saldo-value { font-size: clamp(1.5rem, 5vw, 2.25rem); font-weight: 800; color: var(--text-primary, #FFF); line-height: 1; margin-bottom: 20px; }
.saldo-action { display: block; width: 100%; padding: 12px; background: rgba(1,166,253,0.06); border: 1px solid var(--border-gold); border-radius: var(--radius-md); color: var(--primary); font-weight: 600; font-size: 13px; text-align: center; transition: all 0.25s var(--ease); }
.saldo-action:hover { background: rgba(1,166,253,0.12); }

.flash-message { padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; animation: fadeInUp 0.3s var(--ease); }
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(1,166,253,0.2); }
.flash-error { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.flash-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.flash-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(59,130,246,0.2); }
.flash-close { margin-left: auto; cursor: pointer; opacity: 0.7; } .flash-close:hover { opacity: 1; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 20px; flex-wrap: wrap; }
.pagination-btn { padding: 8px 14px; border-radius: var(--radius-full); font-size: 13px; font-weight: 500; color: #888; background: transparent; border: 1px solid var(--border); transition: all 0.2s; min-width: 40px; text-align: center; }
.pagination-btn:hover { border-color: var(--primary); color: var(--primary); }
.pagination-btn.active { background: var(--ihub-gradient); color: #000; border-color: transparent; font-weight: 700; }

.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 200; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop.active { display: flex; }
.modal { background: #0C0C10; border: 1px solid rgba(1,166,253,0.06); border-radius: var(--radius-xl); padding: 24px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); animation: slideDown 0.25s var(--ease); }
.modal-title { font-size: 18px; font-weight: 700; color: #FFF; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

.confirm-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(6px); z-index: 99999; align-items: center; justify-content: center; padding: 16px; }
.confirm-overlay.open { display: flex; }
.confirm-box { background: #0C0C10; border: 1px solid rgba(1,166,253,0.06); border-radius: var(--radius-xl); padding: 28px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); animation: slideDown 0.25s var(--ease); text-align: center; }
.confirm-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.confirm-icon.warn { background: var(--warning-bg); color: var(--warning); } .confirm-icon.danger { background: var(--danger-bg); color: var(--danger); } .confirm-icon.info { background: rgba(1,166,253,0.1); color: var(--primary); }
.confirm-title { font-size: 18px; font-weight: 700; color: #FFF; margin-bottom: 8px; }
.confirm-message { font-size: 14px; color: #999; line-height: 1.6; margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions button { flex: 1; padding: 12px 20px; border-radius: var(--radius-full); font-size: 14px; font-weight: 600; transition: all 0.2s; cursor: pointer; border: none; }
.confirm-cancel { background: transparent; border: 1px solid var(--border) !important; color: #CCC; } .confirm-cancel:hover { border-color: #666 !important; }
.confirm-ok { background: var(--danger); color: #fff; } .confirm-ok:hover { transform: translateY(-1px); } .confirm-ok.primary { background: var(--ihub-gradient); color: #000; }

/* ============================================================
   PROGRESS
   ============================================================ */
.progress-bar { width: 100%; height: 8px; background: rgba(255,255,255,0.06); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill { height: 100%; background: var(--ihub-gradient); border-radius: var(--radius-full); transition: width 0.5s var(--ease); }
.progress-bar-fill { height: 100%; background: var(--ihub-gradient); border-radius: var(--radius-full); transition: width 0.5s var(--ease); }
.progress-bar-fill.warning { background: linear-gradient(90deg, var(--warning) 0%, #F59E0B 100%); }
.progress-info { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; color: #888; }

/* ============================================================
   CHART & BAR CHART
   ============================================================ */
.chart-container { padding: 16px; }
.chart-header { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.chart-title { font-size: 15px; font-weight: 700; color: #FFF; display: flex; align-items: center; gap: 10px; }
.chart-legend { display: flex; gap: 12px; font-size: 11px; color: #777; flex-wrap: wrap; }
.chart-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.chart-y-labels { position: absolute; left: -50px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; color: #999; }
.chart-x-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 9px; color: #999; padding-left: 10px; overflow-x: auto; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 0 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bar-chart-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 24px; }
.bar-chart-bar { width: 100%; max-width: 32px; min-width: 12px; border-radius: 4px 4px 0 0; background: var(--ihub-gradient); transition: height 0.5s var(--ease); margin: 0 auto; }
.bar-chart-label { font-size: 9px; color: #999; white-space: nowrap; text-align: center; }

/* ============================================================
   BET SECTION (Dashboard partner tables)
   ============================================================ */
.bet-section { margin-bottom: 20px; }
.bet-section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 0 4px; }
.bet-section-logo { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; color: #FFF; flex-shrink: 0; }
.bet-section-name { font-size: 14px; font-weight: 700; color: #FFF; }

/* ============================================================
   TREE
   ============================================================ */
.tree ul { padding-left: 16px; border-left: 1px dashed rgba(1,166,253,0.1); margin-left: 8px; }
.tree li { padding: 4px 0; }
.tree-node { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-md); font-size: 12px; background: var(--bg-card); border: 1px solid var(--border); transition: all 0.2s; max-width: 100%; overflow: hidden; }
.tree-node:hover { border-color: var(--primary); }
.tree-node-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10px; flex-shrink: 0; }
.tree-node-name { font-weight: 600; color: #FFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.tree-node-commission { font-size: 11px; color: #888; white-space: nowrap; }

/* ============================================================
   MISC
   ============================================================ */
.empty-state { text-align: center; padding: 48px 16px; }
.empty-state-icon { color: #444; margin-bottom: 16px; } .empty-state-icon svg { width: 56px; height: 56px; margin: 0 auto; opacity: 0.3; }
.empty-state-title { font-size: 16px; font-weight: 600; color: #888; margin-bottom: 8px; }
.empty-state-text { font-size: 13px; color: #999; margin-bottom: 20px; }
.drop-zone { border: 2px dashed var(--border); border-radius: var(--radius-xl); padding: 32px 20px; text-align: center; transition: all 0.3s; cursor: pointer; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--primary); background: rgba(1,166,253,0.03); }
.drop-zone-icon { color: #999; margin-bottom: 12px; } .drop-zone-icon svg { width: 40px; height: 40px; margin: 0 auto; }
.drop-zone-text { font-size: 14px; color: #CCC; margin-bottom: 4px; } .drop-zone-hint { font-size: 12px; color: #999; }
.tracking-code { color: var(--primary); background: rgba(1,166,253,0.08); padding: 3px 10px; border-radius: var(--radius-full); font-size: 11px; font-family: 'Consolas', monospace; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.tracking-code:hover { background: rgba(1,166,253,0.15); }
.password-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #999; cursor: pointer; z-index: 3; padding: 4px; border-radius: var(--radius-sm); transition: color 0.2s; display: flex; }
.password-toggle:hover { color: var(--primary); }
.period-tab { padding: 8px 16px; font-size: 13px; font-weight: 600; color: #999; background: none; border: none; border-radius: var(--radius-full); cursor: pointer; transition: all 0.25s var(--ease); white-space: nowrap; }
.period-tab:hover { color: #FFF; background: rgba(255,255,255,0.04); }
.period-tab.active { color: #000; background: var(--ihub-gradient); box-shadow: var(--shadow-gold); }

/* ============================================================
   BANNER, TICKER, DATEPICKER, AUTH, BG
   ============================================================ */
.banner-carousel { position: relative; overflow: hidden; border-radius: var(--radius-xl); margin-bottom: 20px; }
.banner-track { display: flex; gap: 12px; transition: transform 0.5s var(--ease); }
.banner-slide { min-width: 100%; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 16/7; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: clamp(0.875rem, 2.5vw + 0.25rem, 1.125rem); }
.banner-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.6); border: 1px solid var(--border); color: #fff; display: flex; align-items: center; justify-content: center; z-index: 5; transition: all 0.2s; }
.banner-nav:hover { background: var(--primary); color: #000; } .banner-nav.prev { left: 8px; } .banner-nav.next { right: 8px; }

.brand-ticker { display: none !important; }
.brand-ticker::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(1,166,253,0.1), transparent); }
.brand-ticker-track { display: flex; align-items: center; gap: 40px; animation: tickerScroll 30s linear infinite; white-space: nowrap; }
.brand-ticker:hover .brand-ticker-track { animation-play-state: paused; }
.brand-ticker-item { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.15); letter-spacing: 2px; text-transform: uppercase; flex-shrink: 0; transition: color 0.2s; }
.brand-ticker-item:hover { color: var(--primary); }
.brand-ticker-dot { width: 3px; height: 3px; background: rgba(1,166,253,0.15); border-radius: 50%; flex-shrink: 0; }
.brand-ticker-fade-left { position: absolute; left: 0; top: 0; bottom: 0; width: 60px; background: linear-gradient(90deg, #040404, transparent); z-index: 2; pointer-events: none; }
.brand-ticker-fade-right { position: absolute; right: 0; top: 0; bottom: 0; width: 60px; background: linear-gradient(270deg, #040404, transparent); z-index: 2; pointer-events: none; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.date-picker-wrap { position: relative; display: inline-block; z-index: 50; width: 100%; }
.date-picker-input { width: 100%; min-width: 0; max-width: 100%; padding: 10px 14px 10px 40px; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: var(--radius-md); color: #FFF; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.25s var(--ease); user-select: none; }
.date-picker-input:hover { border-color: var(--primary); } .date-picker-input.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1,166,253,0.1); }
.date-picker-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #999; pointer-events: none; z-index: 2; transition: color 0.2s; }
.date-picker-wrap.is-open .date-picker-icon { color: var(--primary); }
.date-picker-dropdown { display: none; position: fixed; z-index: 9999; background: #0C0C10; border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 16px; width: calc(100vw - 16px); max-width: 320px; }
.date-picker-dropdown.open { display: block; animation: slideDown 0.2s var(--ease); }
.dp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dp-month-year { font-size: 15px; font-weight: 700; color: #FFF; }
.dp-nav-btn { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: #888; transition: all 0.2s; cursor: pointer; }
.dp-nav-btn:hover { color: var(--primary); background: rgba(1,166,253,0.06); }
.dp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.dp-weekday { text-align: center; font-size: 11px; font-weight: 600; color: #999; padding: 4px 0; }
.dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-day { text-align: center; font-size: 13px; font-weight: 500; padding: 8px 0; border-radius: var(--radius-sm); cursor: pointer; color: #CCC; transition: all 0.15s; }
.dp-day:hover { background: rgba(1,166,253,0.08); color: var(--primary); }
.dp-day.today { border: 1.5px solid var(--primary); color: var(--primary); font-weight: 700; }
.dp-day.selected { background: var(--ihub-gradient); color: #000; font-weight: 700; }
.dp-day.other-month { opacity: 0.2; }
.dp-footer { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dp-today-btn { font-size: 12px; font-weight: 600; color: var(--primary); cursor: pointer; padding: 4px 12px; border-radius: var(--radius-full); } .dp-today-btn:hover { background: rgba(1,166,253,0.08); }
.dp-clear-btn { font-size: 12px; color: #666; cursor: pointer; padding: 4px 12px; border-radius: var(--radius-full); } .dp-clear-btn:hover { background: var(--danger-bg); color: var(--danger); }

.auth-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px 14px; padding-bottom: calc(20px + var(--safe-bottom)); background: #060606; }
.auth-container { width: 100%; max-width: 1100px; display: flex; flex-direction: column; gap: 32px; align-items: center; }
.auth-form-col { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-hero-col { display: none; flex: 1; align-items: center; justify-content: center; }
.auth-card { padding: 28px 20px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-card); }
.auth-logo { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.auth-logo-text { font-size: 36px; font-weight: 900; display: flex; align-items: center; gap: 0; line-height: 1; }
.auth-logo-text .logo-ihub { color: #FFF; font-family: 'Barlow Condensed', Impact, sans-serif; font-weight: 900; font-size: clamp(2rem, 6vw + 0.5rem, 3rem); letter-spacing: 1px; }
.auth-logo-text .logo-separator { width: 3px; height: 28px; background: var(--primary); border-radius: 2px; margin: 0 8px; opacity: 0.5; }
.auth-logo-text .logo-deals { font-size: 14px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; color: var(--primary); }
.auth-subtitle { font-size: 14px; color: #888; margin-bottom: 28px; }

.hero-composition { position: relative; width: 100%; max-width: 560px; }
.hero-pc-frame { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: floatSlow 8s ease-in-out infinite; background: var(--bg-card); }
.hero-pc-toolbar { height: 28px; background: #080808; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.hero-pc-dot { width: 8px; height: 8px; border-radius: 50%; } .hero-pc-dot.red { background: #EF4444; } .hero-pc-dot.yellow { background: #F59E0B; } .hero-pc-dot.green { background: #01A6FD; }
.hero-pc-url { margin-left: 12px; font-size: 9px; color: #444; }
.hero-pc-screen { aspect-ratio: 16/10; background: #060606; display: flex; align-items: center; justify-content: center; }
.hero-phone-frame { position: absolute; bottom: -16px; right: -16px; width: 38%; border-radius: 24px; border: 3px solid #222; overflow: hidden; background: #000; box-shadow: var(--shadow-lg); animation: floatNormal 6s ease-in-out infinite; }
.hero-phone-screen { aspect-ratio: 9/16; background: #060606; display: flex; align-items: center; justify-content: center; }
.hero-glow-1 { position: absolute; width: 300px; height: 300px; background: rgba(1,166,253,0.04); border-radius: 50%; filter: blur(100px); top: -50px; left: -50px; }
.hero-glow-2 { position: absolute; width: 200px; height: 200px; background: rgba(1,166,253,0.03); border-radius: 50%; filter: blur(80px); bottom: -30px; right: -30px; }

.animated-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.animated-bg .grid-pattern { display: none; }
.animated-bg .orb { position: absolute; border-radius: 50%; }
.animated-bg .orb-1 { width: 700px; height: 700px; background: radial-gradient(circle, rgba(197,160,89,0.15) 0%, transparent 70%); top: -15%; left: -12%; filter: blur(90px); animation: orbDrift1 24s ease-in-out infinite alternate; }
.animated-bg .orb-2 { width: 800px; height: 800px; background: radial-gradient(circle, rgba(197,160,89,0.12) 0%, transparent 65%); bottom: -18%; right: -10%; filter: blur(100px); animation: orbDrift2 30s ease-in-out infinite alternate; }
.animated-bg .orb-3 { display: block; width: 500px; height: 500px; background: radial-gradient(circle, rgba(1,166,253,0.08) 0%, transparent 70%); top: 25%; right: 12%; filter: blur(130px); animation: orbDrift3 38s ease-in-out infinite alternate; }
.animated-bg .scanline { display: none; }

/* ============================================================
   UTILITY
   ============================================================ */
.text-primary-color { color: var(--primary); } .text-accent-color { color: var(--primary); } .text-accent { color: var(--primary); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); } .text-muted { color: #999; } .text-secondary { color: #999; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.flex { display: flex; } .flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .w-full { width: 100%; } .hidden { display: none !important; } .relative { position: relative; } .z-10 { z-index: 10; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floatNormal { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes floatSlow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.animate-fade-in-up { animation: fadeInUp 0.4s var(--ease) both; }
.animate-fade-in-right { animation: fadeInUp 0.5s var(--ease) both; }
.stagger-1 { animation-delay: 0.05s; } .stagger-2 { animation-delay: 0.1s; } .stagger-3 { animation-delay: 0.15s; } .stagger-4 { animation-delay: 0.2s; } .stagger-5 { animation-delay: 0.25s; }
@keyframes avatarGoldPulse { 0%, 100% { box-shadow: 0 2px 10px rgba(1,166,253,0.25); } 50% { box-shadow: 0 0 0 5px rgba(1,166,253,0.07), 0 2px 18px rgba(1,166,253,0.45); } }
@keyframes orbDrift1 { 0% { transform: translate(0, 0) scale(1); } 33% { transform: translate(6%, 4%) scale(1.05); } 66% { transform: translate(-4%, 8%) scale(0.97); } 100% { transform: translate(8%, -6%) scale(1.03); } }
@keyframes orbDrift2 { 0% { transform: translate(0, 0) scale(1); } 33% { transform: translate(-5%, -4%) scale(1.04); } 66% { transform: translate(6%, -8%) scale(0.96); } 100% { transform: translate(-7%, 5%) scale(1.06); } }
@keyframes orbDrift3 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-8%, 6%) scale(1.08); } 100% { transform: translate(5%, -5%) scale(0.95); } }

/* ============================================================
   PAGE TRANSITIONS — Elegant Navigation
   ============================================================ */

/* Exit animations */
@keyframes pageExitFade {
  0%   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-12px) scale(0.998); filter: blur(2px); }
}
@keyframes pageEnterReveal {
  0%   { opacity: 0; transform: translateY(20px) scale(0.998); filter: blur(3px); }
  40%  { filter: blur(1px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Gold progress line that sweeps across the top during navigation */
@keyframes transitionSweep {
  0%   { transform: scaleX(0); transform-origin: left; opacity: 1; }
  50%  { transform: scaleX(1); transform-origin: left; opacity: 1; }
  51%  { transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; opacity: 0.6; }
}

/* Subtle shimmer on the gold line */
@keyframes goldShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Transition overlay element */
.page-transition-bar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  height: 2px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}
.page-transition-bar.active {
  opacity: 1;
}
.page-transition-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--primary), var(--gold-light), var(--primary));
  background-size: 200% 100%;
  animation: transitionSweep 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards,
             goldShimmer 0.8s linear infinite;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 0 12px rgba(1,166,253,0.4), 0 0 4px rgba(1,166,253,0.6);
}

/* Content exit state */
.app-content.page-exit {
  animation: pageExitFade 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

/* Content enter state (replaces the old simple fadeInUp on load) */
.app-content.page-enter {
  animation: pageEnterReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger children inside content on page enter for a cascade effect */
.app-content.page-enter > * {
  animation: fadeInUp 0.45s var(--ease) both;
}
.app-content.page-enter > *:nth-child(1) { animation-delay: 0.04s; }
.app-content.page-enter > *:nth-child(2) { animation-delay: 0.09s; }
.app-content.page-enter > *:nth-child(3) { animation-delay: 0.14s; }
.app-content.page-enter > *:nth-child(4) { animation-delay: 0.19s; }
.app-content.page-enter > *:nth-child(5) { animation-delay: 0.24s; }
.app-content.page-enter > *:nth-child(6) { animation-delay: 0.28s; }
.app-content.page-enter > *:nth-child(n+7) { animation-delay: 0.32s; }

/* Sidebar link click ripple feedback */
.sidebar-link { overflow: hidden; }
.sidebar-link.nav-click-pulse,
.subnav-link.nav-click-pulse {
  animation: navPulse 0.3s var(--ease);
}
@keyframes navPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.97); background: rgba(1,166,253,0.08); }
  100% { transform: scale(1); }
}

/* ============================================================
   THEME TRANSITION — Only active during toggle (no flash on load)
   ============================================================ */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: background-color 0.4s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* ============================================================
   DARK THEME — Contrast Fixes (WCAG AA compliance)
   Bumps low-contrast text (#555/#666) to readable levels.
   ============================================================ */
.topbar-progress { color: #B0B0B0; }
.topbar-breadcrumb .separator { color: #4A4A4A; }
.form-input::placeholder { color: #6B6B6B; }
.glass-input::placeholder { color: #6B6B6B; }
.form-hint { color: #7A7A7A; }
.input-icon { color: #6B6B6B; }
.date-picker-icon { color: #6B6B6B; }
.dp-weekday { color: #6B6B6B; }
.chart-y-labels { color: #6B6B6B; }
.chart-x-labels { color: #6B6B6B; }
.bar-chart-label { color: #7A7A7A; }
.notif-section-label { color: #6B6B6B; }
.notif-time { color: #6B6B6B; }
.wallet-card-label { color: #8A8A8A; }
.deal-card-value-label { color: #929292; }
.empty-state-text { color: #7A7A7A; }
.drop-zone-hint { color: #7A7A7A; }

/* ============================================================
   LIGHT THEME — Premium Warm
   Gold brand (#C5A059) remains identical in both themes.
   Contrast targets: body text ≥ 7:1, secondary ≥ 4.5:1, muted ≥ 3:1
   ============================================================ */
html.light {
  --bg: #F9F7F4;
  --bg-card: #FFFFFF;
  --bg-input: rgba(1,166,253,0.03);
  --border: rgba(0,0,0,0.07);
  --border-gold: rgba(1,166,253,0.30);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.05), 0 0 0 1px rgba(1,166,253,0.06);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.08), 0 0 0 1px rgba(1,166,253,0.08);
  --shadow-gold: 0 4px 24px rgba(1,166,253,0.18);
  --shadow-gold-lg: 0 8px 40px rgba(1,166,253,0.25);
  --gold-glow: rgba(1,166,253,0.14);
  --success-bg: rgba(22,163,74,0.07);
  --warning-bg: rgba(217,119,6,0.07);
  --danger-bg: rgba(220,38,38,0.07);
  --info-bg: rgba(37,99,235,0.07);
  --text-primary: #0C0A09;
  --text-secondary: #1C1917;
  --text-dimmed: #57534E;
  --primary: var(--ihub-blue);
  --sidebar-bg: #FFFFFF;
  --sidebar-hover-bg: rgba(1,166,253,0.05);
  --sidebar-border: rgba(1,166,253,0.12);
}

/* ---- Light: Base ---- */
html.light body { background: var(--bg); color: #0C0A09; }
html.light ::selection { background: rgba(1,166,253,0.25); color: #0C0A09; }
html.light ::-webkit-scrollbar-track { background: var(--bg); }
html.light ::-webkit-scrollbar-thumb { background: rgba(1,166,253,0.25); border-radius: 10px; }
html.light ::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---- Light: Topbar ---- */
html.light .topbar {
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(1,166,253,0.10);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(1,166,253,0.04), 0 1px 0 rgba(197,160,89,0.10);
}
html.light .topbar::after {
  background: linear-gradient(90deg,
    transparent 6%,
    rgba(1,166,253,0.32) 30%,
    rgba(197,160,89,0.55) 50%,
    rgba(1,166,253,0.32) 70%,
    transparent 94%);
}
html.light .topbar::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(1,166,253,0.0) 10%,
    rgba(1,166,253,0.55) 38%,
    rgba(197,160,89,1) 52%,
    rgba(197,160,89,0.70) 64%,
    transparent 100%);
  filter: blur(0.4px) drop-shadow(0 0 6px rgba(1,166,253,0.45)) drop-shadow(0 0 5px rgba(197,160,89,0.75));
}
html.light .topbar-hamburger { color: #44403C; }
html.light .topbar-hamburger:hover { color: var(--primary); background: rgba(1,166,253,0.06); }
html.light .topbar-breadcrumb { color: #57534E; }
html.light .topbar-breadcrumb a { color: #57534E; }
html.light .topbar-breadcrumb a:hover { color: var(--primary); }
html.light .topbar-breadcrumb .separator { color: rgba(1,166,253,0.35); }
html.light .topbar-breadcrumb .current { color: #0C0A09; font-weight: 600; }
html.light .topbar-progress { color: #57534E; }
html.light .topbar-progress-bar { background: rgba(1,166,253,0.10); }
html.light .topbar-notification { color: #44403C; }
html.light .topbar-notification:hover { color: var(--primary); background: rgba(1,166,253,0.06); }
html.light .topbar-notification-dot { border-color: rgba(255,255,255,0.95); }
html.light .topbar-logo .logo-icon span:nth-child(2) { background: #0C0A09; }
html.light .topbar-logo .logo-icon span:last-child { background: #78716C; }
html.light .topbar-logo .logo-text .logo-ihub { color: #0C0A09; }
html.light .topbar-logo .logo-text .logo-separator { background: var(--primary); }
html.light .topbar-avatar { box-shadow: 0 2px 12px rgba(1,166,253,0.22); border: 1px solid rgba(1,166,253,0.15); }

/* ---- Light: Theme Switch ---- */
html.light .theme-switch .theme-slider { --background: rgba(1,166,253,0.15); border-color: rgba(1,166,253,0.25); }
html.light .theme-switch input:checked + .theme-slider { background-color: rgba(1,166,253,0.20); }
html.light .theme-switch:hover .theme-slider { border-color: var(--primary); box-shadow: 0 0 12px rgba(1,166,253,0.15); }

/* ---- Light: Sidebar Desktop ---- */
html.light .sidebar {
  background: rgba(255,255,255,0.92) !important;
  border: 2px solid rgba(1,166,253,0.30) !important;
  border-left: none !important;
  border-right: 3px solid #C5A059 !important;
  box-shadow:
    4px 0 30px rgba(0,0,0,0.04),
    0 0 24px rgba(1,166,253,0.12),
    0 0 16px rgba(197,160,89,0.18),
    inset -1px 0 0 rgba(197,160,89,0.30) !important;
  backdrop-filter: blur(20px) !important;
}
html.light .sidebar.collapsed:not(.is-hovered):not(.is-pinned):not(.is-open-mobile) {
  border: 2px solid rgba(1,166,253,0.35) !important;
  border-right: 3px solid #C5A059 !important;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.10),
    0 0 32px rgba(1,166,253,0.18),
    0 0 22px rgba(197,160,89,0.22),
    inset -1px 0 0 rgba(197,160,89,0.35) !important;
}
html.light .sidebar-logo .logo-i { color: var(--primary); }
html.light .sidebar-logo .logo-hub { color: #0C0A09; }
html.light .sidebar-section-label { color: var(--primary); font-weight: 600; letter-spacing: 0.5px; opacity: 0.7; }
html.light .sidebar-link { color: #44403C; }
html.light .sidebar-link svg { stroke: #78716C; }
html.light .sidebar-link:hover { color: #0C0A09; background: rgba(1,166,253,0.06); }
html.light .sidebar-link:hover svg { stroke: var(--primary); }
html.light .sidebar-link.active {
  color: #0C0A09; background: rgba(1,166,253,0.10);
  border-color: rgba(1,166,253,0.30);
  box-shadow: 0 2px 12px rgba(1,166,253,0.15);
}
html.light .sidebar-link.active svg { stroke: var(--primary); filter: none; }
html.light .sidebar-submenu.open { border-left-color: rgba(12,10,9,0.12); }
html.light .sidebar-submenu a { color: #57534E; }
html.light .sidebar-submenu a::before { background: rgba(12,10,9,0.18); }
html.light .sidebar-submenu a:hover { color: #0C0A09; background: rgba(12,10,9,0.04); }
html.light .sidebar-submenu a:hover::before { background: rgba(1,166,253,0.6); }
html.light .sidebar-submenu a.active { color: var(--primary); font-weight: 600; background: rgba(1,166,253,0.10); }
html.light .sidebar-submenu a.active::before { background: var(--primary); box-shadow: 0 0 6px rgba(1,166,253,0.5); }
html.light .sidebar-pin-btn { color: #A8A29E; }
html.light .sidebar-pin-btn:hover { color: var(--primary); background: rgba(1,166,253,0.06); }
html.light .sidebar.is-pinned .sidebar-pin-btn { color: var(--primary); }
html.light .sidebar-footer { border-top-color: rgba(1,166,253,0.10); }
html.light .sidebar-footer:hover { background: rgba(1,166,253,0.05); }
html.light .sidebar-user-name, html.light .sidebar-footer-name { color: #0C0A09; }
html.light .sidebar-user-role, html.light .sidebar-footer-role { color: #78716C; }
html.light .sidebar-avatar, html.light .sidebar-footer-avatar { animation: none; box-shadow: 0 2px 12px rgba(1,166,253,0.22); }
html.light .sidebar-status { box-shadow: 0 0 0 2px var(--bg-card); }
html.light .sidebar-logout { color: #78716C; }
html.light .sidebar-logout:hover { color: var(--danger); background: var(--danger-bg); }

/* ---- Light: Notification Drawer ---- */
html.light .notif-overlay { background: rgba(0,0,0,0.20); backdrop-filter: blur(8px); }
html.light .notif-drawer { background: #FEFEFE; border-left-color: rgba(1,166,253,0.10); box-shadow: -8px 0 48px rgba(0,0,0,0.08), -1px 0 0 rgba(1,166,253,0.08); }
html.light .notif-drawer-header { border-bottom-color: rgba(1,166,253,0.10); }
html.light .notif-drawer-title { color: #0C0A09; }
html.light .notif-drawer-close { color: var(--primary); background: rgba(1,166,253,0.08); border-color: rgba(1,166,253,0.25); }
html.light .notif-drawer-close svg { stroke: var(--primary); }
html.light .notif-drawer-close:hover { background: rgba(1,166,253,0.14); border-color: rgba(1,166,253,0.45); }
html.light .notif-drawer-body { scrollbar-color: rgba(1,166,253,0.25) transparent; }
html.light .notif-drawer-footer { border-top-color: rgba(1,166,253,0.10); }
html.light .notif-section-label { color: var(--primary); font-weight: 600; }
html.light .notif-item { opacity: 0.55; }
html.light .notif-item:hover { background: rgba(1,166,253,0.04); opacity: 0.75; }
html.light .notif-unread { background: rgba(1,166,253,0.08); border-left-color: var(--primary); opacity: 1; }
html.light .notif-unread:hover { background: rgba(1,166,253,0.12); }
html.light .notif-icon-info { background: rgba(1,166,253,0.08); color: var(--primary); }
html.light .notif-title { color: #78716C; }
html.light .notif-unread .notif-title { color: #0C0A09; font-weight: 700; }
html.light .notif-desc { color: #A8A29E; }
html.light .notif-unread .notif-desc { color: #44403C; }
html.light .notif-time { color: #78716C; }
html.light .notif-dot { box-shadow: 0 0 0 2px #FEFEFE; }
html.light .notif-tab { color: #78716C; border-bottom-color: transparent; }
html.light .notif-tab:hover { color: #44403C; }
html.light .notif-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
html.light .notif-spinner { border-color: rgba(1,166,253,0.15); border-top-color: var(--primary); }
html.light .notif-loading, html.light .notif-empty { color: #78716C; }
html.light .notif-bell-badge { box-shadow: 0 2px 10px rgba(1,166,253,0.35); }

/* ---- Light: Notification Toast ---- */
html.light .notif-toast {
  background: linear-gradient(135deg, rgba(255,255,255,0.97), rgba(255,255,255,0.93));
  border-color: rgba(1,166,253,0.25);
  color: #0C0A09;
  box-shadow: 0 8px 36px rgba(0,0,0,0.10), 0 0 0 1px rgba(1,166,253,0.12);
  backdrop-filter: blur(20px);
}
html.light .notif-toast-icon { background: rgba(1,166,253,0.10); color: var(--primary); }

/* ---- Light: Page Structure ---- */
html.light .page-title { color: #0C0A09; }
html.light .page-subtitle { color: #57534E; }

/* ---- Light: Cards ---- */
html.light .card {
  background: var(--bg-card);
  backdrop-filter: none;
  border-color: rgba(1,166,253,0.08);
  box-shadow: var(--shadow-card);
}
html.light .card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 0 0 1px rgba(1,166,253,0.12); }
html.light .card-header { border-bottom-color: rgba(1,166,253,0.08); }
html.light .card-title { color: #0C0A09; }
html.light .section-title { color: #0C0A09; }
html.light .glass-card {
  background: var(--bg-card);
  backdrop-filter: none;
  border-color: rgba(1,166,253,0.08);
  box-shadow: var(--shadow-card);
}
html.light .glass-card::before { background: linear-gradient(90deg, transparent, rgba(1,166,253,0.12), transparent); }
html.light .glass-card:hover { border-color: rgba(1,166,253,0.18); box-shadow: 0 6px 28px rgba(0,0,0,0.06), 0 0 0 1px rgba(1,166,253,0.12); }
html.light .glass-card-hover:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.07), 0 0 0 1px rgba(1,166,253,0.15); }

/* ---- Light: Metrics ---- */
html.light .metric-card {
  background: var(--bg-card);
  backdrop-filter: none;
  border-color: rgba(1,166,253,0.10);
  box-shadow: var(--shadow-card);
}
html.light .metric-card::after { background: var(--ihub-gradient); }
html.light .metric-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.06), 0 0 0 1px rgba(1,166,253,0.15); border-color: rgba(1,166,253,0.18); }
html.light .metric-label { color: var(--primary); opacity: 0.85; }
html.light .metric-label svg { stroke: var(--primary); }
html.light .metric-value { color: #0C0A09; }
html.light .metric-sublabel { color: #57534E; opacity: 1; }

/* ---- Light: Deal Cards ---- */
html.light .deal-card {
  background: var(--bg-card);
  backdrop-filter: none;
  border-color: rgba(1,166,253,0.08);
  box-shadow: var(--shadow-card);
}
html.light .deal-card:hover { border-color: rgba(1,166,253,0.22); box-shadow: 0 8px 28px rgba(0,0,0,0.06), 0 0 0 1px rgba(1,166,253,0.12); }
html.light .deal-card-partner-logo { color: #FFF; }
html.light .deal-card-partner-name { color: #57534E; }
html.light .deal-card-name { color: #0C0A09; }
html.light .deal-card-value-label { color: #57534E; }
html.light .deal-card-value-number { color: var(--primary); font-weight: 700; }

/* ---- Light: Wallet ---- */
html.light .wallet-balance {
  background: linear-gradient(145deg, rgba(1,166,253,0.04) 0%, var(--bg-card) 100%);
  backdrop-filter: none;
  border-color: rgba(1,166,253,0.20);
  box-shadow: var(--shadow-gold);
}
html.light .wallet-balance-label { color: var(--primary); }
html.light .wallet-balance-amount { color: #0C0A09; }
html.light .wallet-balance-currency { color: var(--primary); }
html.light .wallet-card {
  background: var(--bg-card);
  backdrop-filter: none;
  border-color: rgba(1,166,253,0.08);
  box-shadow: var(--shadow-card);
}
html.light .wallet-card-label { color: #57534E; }
html.light .wallet-card-value { color: #0C0A09; }
html.light .wallet-cards { gap: 10px; }

/* ---- Light: Saldo Card ---- */
html.light .saldo-card {
  background: linear-gradient(145deg, rgba(1,166,253,0.06) 0%, rgba(255,255,255,0.9) 100%);
  border-color: rgba(1,166,253,0.20);
  box-shadow: 0 2px 16px rgba(1,166,253,0.10);
}
html.light .saldo-label { color: var(--primary); }
html.light .saldo-value { color: #0C0A09; }
html.light .saldo-action { background: rgba(1,166,253,0.06); border-color: rgba(1,166,253,0.20); color: var(--primary); }
html.light .saldo-action:hover { background: rgba(1,166,253,0.12); box-shadow: 0 2px 8px rgba(1,166,253,0.15); }

/* ---- Light: Buttons ---- */
html.light .btn-primary { background: #FFF; color: #111; border: 2px solid #DDD; border-bottom: 3px solid #C5A059; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
html.light .btn-primary:hover { border-color: #01A6FD; box-shadow: 0 4px 16px rgba(1,166,253,0.12); transform: translateY(-1px); }
html.light .btn-outline { color: #1C1917; border-color: rgba(1,166,253,0.20); }
html.light .btn-outline:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 2px 12px rgba(1,166,253,0.12); }
html.light .btn-ghost { color: #44403C; }
html.light .btn-ghost:hover { color: var(--primary); background: rgba(1,166,253,0.06); }
html.light .btn-danger { box-shadow: 0 2px 10px rgba(220,38,38,0.15); }
html.light .confirm-cancel { color: #44403C; border-color: rgba(0,0,0,0.10) !important; }
html.light .confirm-cancel:hover { border-color: rgba(1,166,253,0.30) !important; color: #0C0A09; }

/* ---- Light: Forms ---- */
html.light .form-label { color: #1C1917; }
html.light .form-input { color: #0C0A09; background: var(--bg-input); border-color: rgba(0,0,0,0.08); }
html.light .form-input:focus { border-color: var(--primary); background: rgba(1,166,253,0.03); box-shadow: 0 0 0 3px rgba(1,166,253,0.10); }
html.light .form-input::placeholder { color: #A8A29E; }
html.light .form-checkbox { color: #1C1917; }
html.light .form-select { color: #0C0A09; background: var(--bg-input); border-color: rgba(0,0,0,0.08); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2301A6FD' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); }
html.light .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1,166,253,0.10); }
html.light .form-select option { background: #FFF; color: #0C0A09; }
html.light .glass-input { color: #0C0A09; background: var(--bg-input); border-color: rgba(0,0,0,0.08); }
html.light .glass-input:focus { border-color: var(--primary); background: rgba(1,166,253,0.03); box-shadow: 0 0 0 3px rgba(1,166,253,0.10); }
html.light .glass-input::placeholder { color: #A8A29E; }
html.light .glass-select { color: #0C0A09; background: var(--bg-input); border-color: rgba(0,0,0,0.08); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2301A6FD' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
html.light .glass-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1,166,253,0.10); }
html.light .glass-select option { background: #FFF; color: #0C0A09; }
html.light .input-icon { color: rgba(1,166,253,0.50); }
html.light .form-hint { color: #57534E; }
html.light .form-error { color: #DC2626; }

/* ---- Light: Filters ---- */
html.light .filter-tab { color: #78716C; background: transparent; border-color: rgba(0,0,0,0.10); box-shadow: none; }
html.light .filter-tab:hover { color: #0C0A09; border-color: rgba(1,166,253,0.30); background: rgba(1,166,253,0.04); }
html.light .filter-tab.active { color: #FFF; background: var(--ihub-gradient); border-color: transparent; box-shadow: 0 2px 12px rgba(1,166,253,0.30); }
html.light .filter-date { color: #0C0A09; background: var(--bg-input); border-color: rgba(0,0,0,0.08); }
html.light .filter-date:focus { border-color: var(--primary); }
html.light .filter-select { color: #0C0A09; background: var(--bg-input); border-color: rgba(0,0,0,0.08); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2301A6FD' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); }
html.light .filter-select:focus { border-color: var(--primary); }
html.light .filter-select option { background: #FFF; color: #0C0A09; }

/* ---- Light: Tables ---- */
html.light .table-wrapper { background: var(--bg-card); border-color: rgba(1,166,253,0.08); box-shadow: var(--shadow-card); }
html.light .table-wrapper::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.90)); }
html.light .table thead th { background: rgba(1,166,253,0.04); color: #57534E; border-bottom-color: rgba(1,166,253,0.10); }
html.light .table tbody tr { border-bottom-color: rgba(0,0,0,0.04); }
html.light .table tbody tr:hover { background: rgba(1,166,253,0.04); }
html.light .table tbody tr:active { background: rgba(1,166,253,0.07); }
html.light .table tbody td { color: #1C1917; }
html.light .table tfoot td { background: rgba(1,166,253,0.06); color: var(--primary); border-top-color: rgba(1,166,253,0.10); }

/* ---- Light: Badges ---- */
html.light .badge-primary { background: rgba(1,166,253,0.12); color: #005793; }
html.light .badge-muted { background: rgba(0,0,0,0.04); color: #44403C; }
html.light .badge-accent { background: rgba(1,166,253,0.10); color: var(--primary); }

/* ---- Light: Pagination ---- */
html.light .pagination-btn { color: #57534E; border-color: rgba(1,166,253,0.12); }
html.light .pagination-btn:hover { border-color: var(--primary); color: var(--primary); }
html.light .pagination-btn.active { box-shadow: 0 2px 10px rgba(1,166,253,0.22); }

/* ---- Light: Modal & Confirm ---- */
html.light .modal-backdrop { background: rgba(0,0,0,0.30); backdrop-filter: blur(8px); }
html.light .modal { background: #FFFFFF; border-color: rgba(1,166,253,0.10); box-shadow: 0 24px 64px rgba(0,0,0,0.12), 0 0 0 1px rgba(1,166,253,0.08); }
html.light .modal-title { color: #0C0A09; }
html.light .confirm-overlay { background: rgba(0,0,0,0.30); backdrop-filter: blur(8px); }
html.light .confirm-box { background: #FFFFFF; border-color: rgba(1,166,253,0.10); box-shadow: 0 24px 64px rgba(0,0,0,0.12), 0 0 0 1px rgba(1,166,253,0.08); }
html.light .confirm-title { color: #0C0A09; }
html.light .confirm-message { color: #44403C; }

/* ---- Light: Progress ---- */
html.light .progress-bar { background: rgba(1,166,253,0.08); }
html.light .progress-info { color: #57534E; }

/* ---- Light: Charts ---- */
html.light .chart-container { background: transparent; }
html.light .chart-title { color: #0C0A09; }
html.light .chart-legend { color: #57534E; }
html.light .chart-y-labels { color: #78716C; }
html.light .chart-x-labels { color: #78716C; }
html.light .bar-chart-label { color: #57534E; }

/* ---- Light: Bet Section ---- */
html.light .bet-section-name { color: #0C0A09; }
html.light .bet-section-logo { box-shadow: 0 2px 8px rgba(1,166,253,0.12); }

/* ---- Light: Tree ---- */
html.light .tree ul { border-left-color: rgba(1,166,253,0.22); }
html.light .tree-node { background: var(--bg-card); border-color: rgba(1,166,253,0.10); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
html.light .tree-node:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(1,166,253,0.12); }
html.light .tree-node-name { color: #0C0A09; }
html.light .tree-node-commission { color: var(--primary); }
html.light .tree-node-avatar { box-shadow: 0 2px 8px rgba(1,166,253,0.15); }

/* ---- Light: Misc ---- */
html.light .empty-state-title { color: #44403C; }
html.light .empty-state-text { color: #57534E; }
html.light .empty-state-icon { color: rgba(1,166,253,0.30); }
html.light .empty-state-icon svg { opacity: 0.6; }
html.light .drop-zone { border-color: rgba(1,166,253,0.18); background: rgba(1,166,253,0.02); }
html.light .drop-zone:hover, html.light .drop-zone.drag-over { border-color: var(--primary); background: rgba(1,166,253,0.04); }
html.light .drop-zone-icon { color: var(--primary); opacity: 0.6; }
html.light .drop-zone-text { color: #1C1917; }
html.light .drop-zone-hint { color: #57534E; }
html.light .password-toggle { color: #78716C; }
html.light .password-toggle:hover { color: var(--primary); }
html.light .period-tab { color: #44403C; }
html.light .period-tab:hover { color: #0C0A09; background: rgba(1,166,253,0.05); }
html.light .period-tab.active { color: #000; box-shadow: 0 2px 10px rgba(1,166,253,0.22); }
html.light .text-muted, html.light .text-secondary { color: #57534E; }
html.light .text-primary-color, html.light .text-accent-color, html.light .text-accent { color: var(--primary); }
html.light .tracking-code { background: rgba(1,166,253,0.08); color: var(--primary); }
html.light .tracking-code:hover { background: rgba(1,166,253,0.15); box-shadow: 0 2px 8px rgba(1,166,253,0.12); }

/* ---- Light: Datepicker ---- */
html.light .date-picker-input { color: #0C0A09; background: var(--bg-input); border-color: rgba(0,0,0,0.08); }
html.light .date-picker-input:hover { border-color: var(--primary); }
html.light .date-picker-icon { color: rgba(1,166,253,0.50); }
html.light .date-picker-wrap.is-open .date-picker-icon { color: var(--primary); }
html.light .date-picker-dropdown { background: #FFFFFF; border-color: rgba(1,166,253,0.10); box-shadow: 0 12px 44px rgba(0,0,0,0.10), 0 0 0 1px rgba(1,166,253,0.06); }
html.light .dp-header { border-bottom: none; }
html.light .dp-month-year { color: #0C0A09; }
html.light .dp-nav-btn { color: #57534E; }
html.light .dp-nav-btn:hover { color: var(--primary); background: rgba(1,166,253,0.06); }
html.light .dp-weekday { color: var(--primary); opacity: 0.6; }
html.light .dp-day { color: #1C1917; }
html.light .dp-day:hover { color: var(--primary); background: rgba(1,166,253,0.08); }
html.light .dp-day.today { border-color: var(--primary); color: var(--primary); }
html.light .dp-day.selected { color: #000; }
html.light .dp-day.other-month { opacity: 0.28; color: #A8A29E; }
html.light .dp-footer { border-top-color: rgba(1,166,253,0.08); }
html.light .dp-today-btn { color: var(--primary); }
html.light .dp-today-btn:hover { background: rgba(1,166,253,0.08); }
html.light .dp-clear-btn { color: #57534E; }
html.light .dp-clear-btn:hover { background: var(--danger-bg); color: var(--danger); }

/* ---- Light: Auth Pages ---- */
html.light .auth-page { background: var(--bg); }
html.light .auth-card { background: var(--bg-card); border-color: rgba(1,166,253,0.10); box-shadow: 0 8px 36px rgba(0,0,0,0.06), 0 0 0 1px rgba(1,166,253,0.06); }
html.light .auth-logo-text .logo-ihub { color: #0C0A09; }
html.light .auth-logo-text .logo-separator { background: var(--primary); }
html.light .auth-subtitle { color: #57534E; }
html.light .hero-pc-frame { border-color: rgba(1,166,253,0.10); box-shadow: 0 8px 36px rgba(0,0,0,0.07), 0 0 0 1px rgba(1,166,253,0.06); }
html.light .hero-pc-toolbar { background: rgba(1,166,253,0.06); }
html.light .hero-pc-screen { background: var(--bg); }
html.light .hero-phone-frame { border-color: rgba(1,166,253,0.15); }
html.light .hero-phone-screen { background: var(--bg); }
html.light .hero-glow-1, html.light .hero-glow-2 { opacity: 0.25; }

/* ---- Light: Animated Background ---- */
html.light .animated-bg .orb { opacity: 0.025; }

/* ---- Light: Brand Ticker ---- */
html.light .brand-ticker-item { color: rgba(0,0,0,0.08); }
html.light .brand-ticker-item:hover { color: var(--primary); }
html.light .brand-ticker-dot { background: rgba(1,166,253,0.15); }
html.light .brand-ticker-fade-left { background: linear-gradient(90deg, var(--bg), transparent); }
html.light .brand-ticker-fade-right { background: linear-gradient(270deg, var(--bg), transparent); }

/* ---- Light: Flash Messages ---- */
html.light .flash-success { background: rgba(22,163,74,0.07); color: #15803D; border-color: rgba(22,163,74,0.15); }
html.light .flash-error { background: rgba(220,38,38,0.07); color: #DC2626; border-color: rgba(220,38,38,0.15); }
html.light .flash-warning { background: rgba(217,119,6,0.07); color: #B45309; border-color: rgba(217,119,6,0.15); }
html.light .flash-info { background: rgba(37,99,235,0.07); color: #2563EB; border-color: rgba(37,99,235,0.15); }

/* ---- Light: Banner ---- */
html.light .banner-nav { background: rgba(255,255,255,0.88); border-color: rgba(1,166,253,0.12); color: #1C1917; }
html.light .banner-nav:hover { background: var(--ihub-gradient); color: #000; border-color: transparent; box-shadow: 0 4px 16px rgba(1,166,253,0.25); }

/* ---- Light: Page Transition Bar ---- */
html.light .page-transition-bar::before {
  box-shadow: 0 0 14px rgba(1,166,253,0.30), 0 0 5px rgba(1,166,253,0.40);
}

/* ---- Light: Sidebar Overlay (Mobile) ---- */
html.light .sidebar-overlay { background: rgba(0,0,0,0.22); backdrop-filter: blur(10px); }

/* ---- Light: Mobile Sidebar Drawer ---- */
html.light .sidebar.is-open-mobile {
  background: #FFFFFF !important;
  border-right: 1px solid rgba(1,166,253,0.10) !important;
  box-shadow: 4px 0 48px rgba(0,0,0,0.08), 1px 0 0 rgba(1,166,253,0.08) !important;
}
html.light .sidebar.is-open-mobile .sidebar-section-label {
  color: var(--primary) !important; opacity: 0.7 !important;
}
html.light .sidebar.is-open-mobile .sidebar-link {
  color: #44403C !important;
}
html.light .sidebar.is-open-mobile .sidebar-link svg {
  stroke: #78716C !important;
}
html.light .sidebar.is-open-mobile .sidebar-link:hover,
html.light .sidebar.is-open-mobile .sidebar-link:active {
  background: rgba(1,166,253,0.06) !important;
  color: #0C0A09 !important;
}
html.light .sidebar.is-open-mobile .sidebar-link:hover svg,
html.light .sidebar.is-open-mobile .sidebar-link:active svg {
  stroke: var(--primary) !important;
}
html.light .sidebar.is-open-mobile .sidebar-link.active {
  color: #000 !important;
  background: var(--ihub-gradient) !important;
  box-shadow: 0 2px 14px rgba(1,166,253,0.25) !important;
}
html.light .sidebar.is-open-mobile .sidebar-link.active svg {
  stroke: #000 !important;
}
html.light .sidebar.is-open-mobile .sidebar-submenu a {
  color: #44403C !important;
}
html.light .sidebar.is-open-mobile .sidebar-submenu a:hover {
  color: #0C0A09 !important;
  background: rgba(1,166,253,0.04) !important;
}
html.light .sidebar.is-open-mobile .sidebar-submenu a.active {
  color: var(--primary) !important;
}
html.light .sidebar.is-open-mobile .sidebar-footer {
  border-top-color: rgba(1,166,253,0.10) !important;
}
html.light .sidebar.is-open-mobile .sidebar-footer:hover {
  background: rgba(1,166,253,0.05) !important;
}
html.light .sidebar.is-open-mobile .sidebar-footer-name,
html.light .sidebar.is-open-mobile .sidebar-user-name {
  color: #0C0A09 !important;
}
html.light .sidebar.is-open-mobile .sidebar-footer-role,
html.light .sidebar.is-open-mobile .sidebar-user-role {
  color: #78716C !important;
}
html.light .sidebar.is-open-mobile .sidebar-footer-avatar,
html.light .sidebar.is-open-mobile .sidebar-avatar {
  background: var(--ihub-gradient) !important;
  color: #000 !important;
  animation: none !important;
}
html.light .sidebar.is-open-mobile .sidebar-logout {
  color: #78716C !important;
}
html.light .sidebar.is-open-mobile .sidebar-logout:hover {
  color: var(--danger) !important;
  background: var(--danger-bg) !important;
}

/* ---- Light: Notification Panel (inline old pattern) ---- */
html.light .notif-panel { background: #FFFFFF !important; border: 1px solid rgba(0,0,0,0.08) !important; box-shadow: 0 8px 32px rgba(0,0,0,0.10) !important; }

/* ---- Light: Inline color overrides for hardcoded dark-mode values ---- */
html.light [style*="color:#FFF"], html.light [style*="color: #FFF"],
html.light [style*="color:#fff"], html.light [style*="color: #fff"] { color: #1C1917 !important; }
html.light [style*="color:#CCC"], html.light [style*="color: #CCC"],
html.light [style*="color:#ccc"], html.light [style*="color: #ccc"] { color: #44403C !important; }
html.light [style*="color:#999"], html.light [style*="color: #999"] { color: #78716C !important; }
html.light [style*="color:#888"], html.light [style*="color: #888"] { color: #78716C !important; }
html.light [style*="color:#777"], html.light [style*="color: #777"] { color: #57534E !important; }
html.light [style*="color:#666"], html.light [style*="color: #666"] { color: #57534E !important; }
html.light [style*="color:#555"], html.light [style*="color: #555"] { color: #57534E !important; }
html.light [style*="color:#EEE"], html.light [style*="color: #EEE"],
html.light [style*="color:#eee"], html.light [style*="color: #eee"] { color: #1C1917 !important; }
html.light [style*="color:#DDD"], html.light [style*="color: #DDD"],
html.light [style*="color:#ddd"], html.light [style*="color: #ddd"] { color: #44403C !important; }
html.light [style*="color:#BBB"], html.light [style*="color: #BBB"],
html.light [style*="color:#bbb"], html.light [style*="color: #bbb"] { color: #44403C !important; }
html.light [style*="color:#AAA"], html.light [style*="color: #AAA"],
html.light [style*="color:#aaa"], html.light [style*="color: #aaa"] { color: #78716C !important; }

/* ---- Light: rgba white text in inline styles (JS-generated content) ---- */
html.light [style*="color:rgba(255,255,255,0.3)"],
html.light [style*="color:rgba(255,255,255,.3)"] { color: var(--text-dimmed) !important; }
html.light [style*="color:rgba(255,255,255,0.35)"] { color: var(--text-dimmed) !important; }
html.light [style*="color:rgba(255,255,255,0.4)"],
html.light [style*="color:rgba(255,255,255,.4)"] { color: #78716C !important; }
html.light [style*="color:rgba(255,255,255,0.5)"],
html.light [style*="color:rgba(255,255,255,.5)"] { color: #57534E !important; }
html.light [style*="color:rgba(255,255,255,0.6)"],
html.light [style*="color:rgba(255,255,255,.6)"] { color: #44403C !important; }
html.light [style*="color:rgba(255,255,255,0.7)"],
html.light [style*="color:rgba(255,255,255,.7)"],
html.light [style*="color:rgba(255,255,255,0.8)"],
html.light [style*="color:rgba(255,255,255,.8)"],
html.light [style*="color:rgba(255,255,255,0.9)"],
html.light [style*="color:rgba(255,255,255,.9)"] { color: #1C1917 !important; }

/* ---- Light: rgba white borders in inline styles ---- */
html.light [style*="border:1px solid rgba(255,255,255"],
html.light [style*="border-color:rgba(255,255,255"],
html.light [style*="border: 1px solid rgba(255,255,255"] { border-color: rgba(0,0,0,0.08) !important; }
html.light [style*="border:2px solid rgba(1,166,253,.2)"] { border-color: rgba(0,0,0,0.08) !important; border-top-color: var(--gold-dark) !important; }
html.light [style*="background:rgba(1,166,253,.04)"] { background: rgba(0,0,0,0.03) !important; }

/* ---- Light: Background overrides for inline dark backgrounds ---- */
html.light [style*="background:#0E0E12"], html.light [style*="background: #0E0E12"],
html.light [style*="background-color:#0E0E12"], html.light [style*="background-color: #0E0E12"] { background: var(--bg-card) !important; }
html.light [style*="background:#060606"], html.light [style*="background: #060606"] { background: var(--bg) !important; }
html.light [style*="background:#111"], html.light [style*="background: #111"],
html.light [style*="background:#0C0C10"], html.light [style*="background: #0C0C10"] { background: var(--bg-card) !important; }
html.light [style*="border-color:rgba(255,255,255"] { border-color: rgba(0,0,0,0.08) !important; }

/* ---- Light: Page-level !important overrides ---- */
/* These override inline <style> blocks in individual pages that use
   dark-mode colors with !important (metric-label, saldo-label, etc.) */
html.light .metric-label { color: var(--primary) !important; opacity: 0.8 !important; }
html.light .metric-label svg { stroke: var(--primary) !important; opacity: 0.7 !important; }
html.light .saldo-label { color: var(--primary) !important; opacity: 0.8 !important; }
html.light .saldo-value { color: #0C0A09 !important; }

/* Dashboard filter overrides */
html.light .dash-filters .date-picker-input { color: #1C1917 !important; background: rgba(1,166,253,0.03) !important; border-color: rgba(0,0,0,0.08) !important; }
html.light .dash-filters .date-picker-input:hover,
html.light .dash-filters .date-picker-input.active { border-color: var(--primary) !important; background: rgba(1,166,253,0.05) !important; color: #0C0A09 !important; }
html.light .dash-filters .date-picker-icon { color: var(--primary) !important; opacity: 0.6 !important; }
html.light .dash-filters .glass-select { color: #0C0A09 !important; background-color: rgba(1,166,253,0.03) !important; border-color: rgba(0,0,0,0.08) !important; font-size: 13px !important; font-weight: 500 !important; padding: 10px 36px 10px 14px !important; }
html.light .dash-filters .glass-select:hover,
html.light .dash-filters .glass-select:focus { border-color: var(--primary) !important; background: rgba(1,166,253,0.05) !important; color: #0C0A09 !important; }
html.light .dash-loading { color: #78716C !important; }
html.light .dash-loading .spinner { border-color: rgba(1,166,253,0.15) !important; border-top-color: var(--primary) !important; }

/* Filters section separator */
html.light .filters-section { border-top-color: rgba(1,166,253,0.08) !important; }

/* Logo: original colors and same size in both themes. On light mode add a
   crisp dark outline via drop-shadow so the white parts of the logo remain
   visible against light backgrounds — no resize, no background pill. */
html.light .topbar-logo img,
html.light .sidebar-logo img {
  filter:
    drop-shadow(0 0 1px #0C0C10)
    drop-shadow(0 0 1px #0C0C10)
    drop-shadow(0 1px 2px rgba(12,12,16,0.55));
}

/* ---- Light: var(--text-dimmed) and var(--text-primary) fallbacks ---- */
/* Pages that use undefined custom properties default to transparent;
   force readable values in light mode */
html.light [style*="color:var(--text-dimmed)"] { color: #57534E !important; }
html.light [style*="color:var(--text-primary)"] { color: #0C0A09 !important; }
html.light [style*="color: var(--text-dimmed)"] { color: #57534E !important; }
html.light [style*="color: var(--text-primary)"] { color: #0C0A09 !important; }
html.light [style*="stroke:var(--primary)"] { stroke: var(--primary) !important; }
html.light [style*="stroke: var(--primary)"] { stroke: var(--primary) !important; }

/* ============================================================
   LIGHT MODE — Force all inline SVG icons to primary blue
   Matches SVGs that inherit color (stroke="currentColor") so
   every icon uses the same blue as dark mode, without affecting
   icons that have an explicit semantic color (danger/success/warning).
   ============================================================ */
html.light svg[stroke="currentColor"] { stroke: var(--primary) !important; }
html.light svg[fill="currentColor"]:not([stroke]) { fill: var(--primary) !important; }

/* Exceptions: status/semantic colors must remain their own color */
html.light .flash-success svg,
html.light .notif-icon-success svg,
html.light .toast-success svg,
html.light [class*="success"] svg[stroke="currentColor"] { stroke: var(--success) !important; }

html.light .flash-error svg,
html.light .notif-icon-error svg,
html.light .toast-error svg,
html.light .btn-danger svg,
html.light [class*="danger"] svg[stroke="currentColor"],
html.light [class*="error"] svg[stroke="currentColor"] { stroke: var(--danger) !important; }

html.light .flash-warning svg,
html.light .notif-icon-warning svg,
html.light .toast-warning svg,
html.light [class*="warning"] svg[stroke="currentColor"] { stroke: #B45309 !important; }

/* Keep white icons on filled primary buttons (blue-on-blue would be invisible) */
html.light .btn-primary svg[stroke="currentColor"] { stroke: currentColor !important; }

/* ============================================================
   RESPONSIVE — Mobile-First Inline Style Overrides
   These rules neutralize hardcoded inline styles on mobile
   ============================================================ */
[style*="grid-template-columns: 2fr 1fr"],
[style*="grid-template-columns:2fr 1fr"],
[style*="grid-template-columns: 1fr 1fr"],
[style*="grid-template-columns:1fr 1fr"],
[style*="grid-template-columns:1fr 1fr 1fr"],
[style*="grid-template-columns: 1fr 1fr 1fr"],
[style*="grid-template-columns:repeat(3"],
[style*="grid-template-columns: repeat(3"],
[style*="grid-template-columns:repeat(5"],
[style*="grid-template-columns: repeat(5"] {
  grid-template-columns: 1fr !important;
}
[style*="min-width:200"], [style*="min-width:160"], [style*="min-width:180"],
[style*="min-width:220"], [style*="min-width:280"],
[style*="min-width: 200"], [style*="min-width: 160"], [style*="min-width: 180"],
[style*="min-width: 220"], [style*="min-width: 280"] { min-width: 0 !important; }
.glass-input[style*="min-width"], .glass-select[style*="min-width"],
.glass-input[style*="width:150"], .glass-input[style*="width:110"],
.btn-primary[style*="min-width"], .btn-lg[style*="min-width"] { min-width: 0 !important; width: 100% !important; }
[style*="font-size:24px"], [style*="font-size: 24px"] { font-size: clamp(1.25rem, 3vw + 0.5rem, 1.5rem) !important; }
[style*="max-width:260"] { max-width: 100% !important; }
.notif-panel { width: calc(100vw - 24px) !important; max-width: 100% !important; right: 12px !important; left: 12px !important; max-height: 70vh !important; }

/* ============================================================
   480px+ — Large Phones
   ============================================================ */
@media (min-width: 480px) {
  .app-content { padding: 20px 16px; padding-bottom: calc(40px + var(--safe-bottom)); }
  .metrics-grid { gap: 12px; }
  .metric-card { padding: 24px; border-radius: 0; }
  .wallet-cards { gap: 12px; }
  .wallet-card { padding: 16px 18px; }
  .wallet-card-value { font-size: 15px; }
  .deals-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
  .deal-card { padding: 22px; }
  .card { padding: 24px; }
  .form-input, .glass-input, .glass-select, .form-select { font-size: 14px; }
  .filters-bar .glass-input, .filters-bar .glass-select { flex: 1 1 auto; min-width: 140px; }
  .notif-drawer { width: 380px; max-width: 90vw; }
  .notif-panel { width: 320px !important; max-width: 90vw !important; right: 16px !important; left: auto !important; }
  .topbar { padding: 0 16px; }
  .glass-input[style*="min-width"], .glass-select[style*="min-width"],
  .btn-primary[style*="min-width"], .btn-lg[style*="min-width"] { min-width: revert !important; width: revert !important; }
  .bar-chart { height: 160px; }
}

/* ============================================================
   640px+ — Landscape / Small Tablet
   ============================================================ */
@media (min-width: 640px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .wallet-cards { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .banner-slide { min-width: calc(50% - 8px); }
  .auth-card { padding: 40px; }
  .chart-header { flex-direction: row; align-items: center; gap: 16px; }
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }
  [style*="grid-template-columns:repeat(3"], [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:1fr 1fr 1fr"], [style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns: repeat(3, 1fr) !important; }
  .date-picker-wrap { width: auto; }
  .date-picker-input { max-width: 200px; }
}

/* ============================================================
   768px+ — Tablet / Desktop
   ============================================================ */
@media (min-width: 768px) {
  .app-main { margin-left: calc(var(--sidebar-cw) + var(--sidebar-gap) * 2); }
  body.sidebar-pinned .app-main { margin-left: calc(var(--sidebar-w) + var(--sidebar-gap) * 2); }
  .app-content { padding: 28px 36px; padding-bottom: 64px; }

  .sidebar {
    top: calc(var(--topbar-h) + 28px); left: 24px;
    height: calc(100vh - var(--topbar-h) - 28px - var(--sidebar-gap) - 36px);
    border-radius: var(--sidebar-radius); transform: none;
    transition: width 0.28s var(--sidebar-ease); will-change: width;
  }
  .sidebar.collapsed { width: var(--sidebar-cw); }
  .sidebar.collapsed.is-hovered, .sidebar.collapsed.is-pinned {
    width: var(--sidebar-w);
    /* Reset mobile full-screen overrides — keep desktop floating position */
    top: calc(var(--topbar-h) + 28px);
    height: calc(100vh - var(--topbar-h) - 28px - var(--sidebar-gap) - 36px);
    border-radius: var(--sidebar-radius);
    transform: none;
  }

  .topbar { padding: 0 28px; }
  .topbar-hamburger { display: none; }
  .topbar-progress { display: flex; }
  .topbar-left { gap: 16px; }
  .topbar-right { gap: 12px; }
  .topbar-logo { position: static; transform: none; margin-right: 24px; }
  .topbar-avatar { width: 34px; height: 34px; }

  [style*="min-width:200"], [style*="min-width:160"], [style*="min-width:180"],
  [style*="min-width:220"], [style*="min-width:280"],
  [style*="min-width: 200"], [style*="min-width: 160"], [style*="min-width: 180"],
  [style*="min-width: 220"], [style*="min-width: 280"] { min-width: revert !important; }
  [style*="max-width:260"] { max-width: revert !important; }

  .metrics-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
  .metric-card { padding: 28px; }
  .wallet-cards { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
  .wallet-card { padding: 18px 22px; }
  .wallet-card-label { font-size: 11px; }
  .wallet-card-value { font-size: 16px; }
  .deals-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .deal-card { padding: 24px; }

  .table { font-size: 13px; }
  .table thead th { white-space: nowrap; padding: 14px 20px; font-size: 11px; }
  .table tbody td { white-space: nowrap; padding: 14px 20px; }
  .table tfoot td { padding: 14px 20px; }
  .table-wrapper { border-radius: var(--radius-xl); }

  .card { padding: 28px; }
  .chart-container { padding: 24px; }
  .bar-chart { height: 200px; gap: 8px; }
  .flash-message { padding: 14px 20px; }
  .modal { padding: 32px; }
  .badge { padding: 4px 12px; font-size: 11px; }

  .sidebar-pin-btn { width: 28px; height: 28px; }
  .topbar-notification { width: 36px; height: 36px; }
  .notif-drawer-close { width: 32px; height: 32px; }
  .dp-nav-btn { width: 32px; height: 32px; }
  .sidebar-logout { width: 32px; height: 32px; }

  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns:2fr 1fr"] { grid-template-columns: 2fr 1fr !important; }
}

/* ============================================================
   1024px+ — Desktop
   ============================================================ */
@media (min-width: 1024px) {
  .metrics-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .banner-slide { min-width: calc(33.333% - 11px); }
  .auth-hero-col { display: flex; }
  .auth-form-col { max-width: 45%; }
  .auth-container { flex-direction: row; gap: 80px; }
  .auth-card { padding: 44px; }
  [style*="grid-template-columns:repeat(5"],
  [style*="grid-template-columns: repeat(5"] { grid-template-columns: repeat(5, 1fr) !important; }
}

/* ============================================================
   ACCESSIBILITY & PRINT
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up, .animate-fade-in-right { animation-duration: 0.01ms !important; }
  .sidebar { transition-duration: 0.01ms !important; }
  .notif-drawer { transition-duration: 0.01ms !important; }
  .app-content.page-exit, .app-content.page-enter { animation-duration: 0.01ms !important; }
  .app-content.page-enter > * { animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
  .page-transition-bar::before { animation-duration: 0.01ms !important; }
}
@media print {
  .sidebar, .topbar, .brand-ticker, .animated-bg { display: none !important; }
  .app-main { margin-left: 0 !important; }
  .app-content { margin-top: 0 !important; padding: 0 !important; }
  body { background: #fff !important; color: #000 !important; }
}
