@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
/* ─── App Styles Entry Point ─────────────────────────────────── */
/* All styles are split into focused modules inside src/styles/. */
/* ─── Design Tokens ───────────────────────────────────────────── */
:root {
  --bg-dark: #08080b;
  --bg-surface: #0e0e13;
  --bg-glass: rgba(16, 16, 22, 0.6);
  --bg-glass-hover: rgba(22, 22, 30, 0.7);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-hover: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(20px);

  --text-primary: #f0f0f5;
  --text-secondary: #6b7280;
  --text-tertiary: #4b5563;
  --text-accent: #38bdf8;

  --profit: #10b981;
  --profit-dim: rgba(16, 185, 129, 0.15);
  --loss: #ef4444;
  --loss-dim: rgba(239, 68, 68, 0.15);

  --accent-blue: #38bdf8;
  --accent-blue-dim: rgba(56, 189, 248, 0.12);
  --accent-purple: #a78bfa;
  --accent-purple-dim: rgba(167, 139, 250, 0.12);
  --accent-amber: #fbbf24;
  --accent-amber-dim: rgba(251, 191, 36, 0.12);
  --accent-red: #f87171;
  --accent-red-dim: rgba(248, 113, 113, 0.12);

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;

  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.15);
  --shadow-glow-blue: 0 0 20px rgba(56, 189, 248, 0.15);
}
body.light-theme {
  --bg-dark: #f6f8fa;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-hover: rgba(240, 243, 246, 0.95);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-hover: rgba(0, 0, 0, 0.15);

  --text-primary: #1f2328;
  --text-secondary: #57606a;
  --text-tertiary: #8c959f;
  --text-accent: #0969da;

  --profit: #1a7f37;
  --profit-dim: rgba(26, 127, 55, 0.1);
  --loss: #cf222e;
  --loss-dim: rgba(207, 34, 46, 0.1);

  --accent-blue: #0969da;
  --accent-blue-dim: rgba(9, 105, 218, 0.1);
  --accent-purple: #8250df;
  --accent-purple-dim: rgba(130, 80, 223, 0.1);
  --accent-amber: #9a6700;
  --accent-amber-dim: rgba(154, 103, 0, 0.1);
  --accent-red: #cf222e;
  --accent-red-dim: rgba(207, 34, 46, 0.1);
  
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow-blue: 0 0 20px rgba(9, 105, 218, 0.12);
  --shadow-glow-green: 0 0 20px rgba(26, 127, 55, 0.12);
}
body.light-theme .app-layout {
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(9, 105, 218, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(26, 127, 55, 0.03) 0%, transparent 50%);
}
body.light-theme .global-header {
  background: rgba(255, 255, 255, 0.92);
}
body.light-theme .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.92);
}
body.light-theme .modal-content {
  background: rgba(255, 255, 255, 0.96);
}
body.light-theme .notification-drawer {
  background: rgba(255, 255, 255, 0.98) !important;
}
body.light-theme .mobile-menu-overlay {
  background: #f6f8fa !important;
}
body.light-theme .mobile-menu-item {
  background: rgba(0, 0, 0, 0.03);
}
body.light-theme .mobile-menu-item.active {
  color: #fff;
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}
body.light-theme .user-dropdown {
  background: rgba(255, 255, 255, 0.98) !important;
}
body.light-theme ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}
/* ─── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#root {
  min-height: 100dvh;
}
/* Design tokens + light-theme variables + reset/base */
/* ─── Layout ──────────────────────────────────────────────────── */
.app-layout {
  --sidebar-width: 360px;
  display: grid;
  grid-template-columns: var(--sidebar-width) 4px 1fr;
  min-height: 100dvh;
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}
.app-layout.sidebar-hidden {
  grid-template-columns: 1fr;
}
.sidebar-resizer {
  width: 4px;
  cursor: col-resize;
  background: transparent;
  transition: background 0.15s ease;
  position: relative;
  z-index: 10;
}
.sidebar-resizer:hover,
.sidebar-resizer.dragging {
  background: var(--accent-blue);
  opacity: 0.5;
}
.main-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  overflow-y: auto;
  height: calc(100dvh - var(--header-height));
  max-height: calc(100dvh - var(--header-height));
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: 1rem;
}
.mobile-bottom-nav {
  display: none;
}
@media (max-width: 1024px) {
  :root {
    --mobile-nav-height: 56px;
  }
  .app-layout {
    grid-template-columns: 1fr;
    /* No padding-bottom here — main-content handles its own height */
  }
  .sidebar-resizer {
    display: none;
  }

  /* main-content on mobile must account for the fixed bottom nav */
  .main-content {
    height: calc(100dvh - var(--header-height) - var(--mobile-nav-height));
    max-height: calc(100dvh - var(--header-height) - var(--mobile-nav-height));
    padding-bottom: 1rem;
  }

  /* When user picks a tab, only the matching panel is visible.
     If an agent is selected, the detail view takes over (has-detail). */
  /* Mobile visibility logic */
  .app-layout.view-agents:not(.has-detail) .main-content { display: none; }
  .app-layout.view-agents:not(.has-detail) aside { display: flex; border-right: none; width: 100%; }
  
  /* For all other global tabs, always show main-content (Dashboard) */
  .app-layout:not(.view-agents) .main-content { display: flex; width: 100%; }
  .app-layout:not(.view-agents) aside { display: none; }

  /* When an agent is selected, show details and hide sidebar */
  /* Extra padding-bottom for the mobile detail tab nav (56px) */
  .app-layout.has-detail aside { display: none; }
  .app-layout.has-detail .main-content { display: flex; width: 100%; padding-bottom: 120px; }

  /* Detail Sections Toggling on Mobile */
  .app-layout.has-detail .detail-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .app-layout.has-detail .detail-section-perf,
  .app-layout.has-detail .detail-section-holdings,
  .app-layout.has-detail .detail-section-trades,
  .app-layout.has-detail .detail-section-chat {
    display: none;
  }

  .app-layout.has-detail .detail-grid.mobile-tab-perf .detail-section-perf { display: flex; }
  .app-layout.has-detail .detail-grid.mobile-tab-holdings .detail-section-holdings { display: block; }
  .app-layout.has-detail .detail-grid.mobile-tab-trades .detail-section-trades { display: block; }
  .app-layout.has-detail .detail-grid.mobile-tab-chat .detail-section-chat { display: flex; height: calc(100dvh - 200px); }

  .dashboard-mobile-leaderboard .news-section { display: none; }
  .dashboard-mobile-news .leaderboard-section { display: none; }

  .mobile-bottom-nav {
    display: grid;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    height: 56px;
    background: rgba(14, 14, 19, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-glass);
    z-index: 50;
  }
  .mobile-bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: 0;
    color: var(--text-tertiary);
    font-size: 0.65rem;
    cursor: pointer;
    padding: 4px 0;
  }
  .mobile-bottom-nav-btn.active {
    color: var(--accent-blue);
  }
}
/* ─── Global Header ─────────────────────────────────────────── */
:root {
  --header-height: 64px;
}
.global-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(14, 14, 19, 0.95);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-glass);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}
.header-inner {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-brand {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #fff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}
.header-nav {
  display: flex;
  gap: 0.5rem;
}
.header-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}
.header-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.header-tab-btn.active {
  color: #fff;
  background: var(--accent-blue-dim);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
@media (max-width: 1300px) {
  .header-tab-btn span {
    display: none;
  }
  .header-left, .header-right {
    gap: 0.75rem;
  }
}
.header-icon-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-glass-hover);
}
.header-icon-btn.logout:hover {
  color: var(--loss);
  border-color: rgba(239, 68, 68, 0.2);
}
.user-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 0.75rem;
  border-radius: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.user-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-glass-hover);
  color: var(--text-primary);
}
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}
.user-dropdown {
  border-radius: var(--radius-md) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
  border-color: var(--border-glass-hover) !important;
}
.dropdown-item {
  width: 100%;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.dropdown-item svg {
  color: var(--text-tertiary);
}
.dropdown-item:hover svg {
  color: var(--accent-blue);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 140;
  background: transparent;
  cursor: default;
}
.mobile-header-actions {
  display: none;
}
.app-layout {
  padding-top: var(--header-height);
}
@media (max-width: 1024px) {
  /* Hide nav tabs, desktop header toggles, and user profile dropdown on mobile */
  .header-nav {
    display: none;
  }
  .header-toggles-container {
    display: none !important;
  }
  .header-actions .user-profile-container {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-glass-hover);
  }
  .mobile-header-actions {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
  }
  .mobile-header-actions .notification-bell-btn {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
.mobile-menu-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: #08080b !important; /* Force fully solid dark background */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000; /* Ensure it stays on top */
  padding: 1.5rem;
  overflow-y: auto;
  animation: fadeIn 0.2s ease-out;
}
.mobile-menu-section-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0.5rem 0 0.5rem 0.5rem;
}
.mobile-notification-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 0.8rem 1.1rem !important;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}
.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-menu-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 0.75rem;
  text-align: left;
  transition: all 0.2s ease;
}
.mobile-menu-item.active {
  color: #fff;
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}
.mobile-menu-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 1rem 0;
}
/* ─── Dashboard Tabs ─────────────────────────────────────────── */
.tab-btn {
  transition: all 0.2s ease;
  color: var(--text-secondary);
}
.tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-primary) !important;
}
.tab-btn.active {
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}
.timeframe-btn {
  transition: all 0.2s ease;
}
.timeframe-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}
.timeframe-btn.active {
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}
/* ─── Model Manager Layout ──────────────────────────────────── */
.models-container {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  padding: 1.25rem;
}
.models-sidebar {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
@media (max-width: 1024px) {
  .models-container {
    flex-direction: column;
  }
  .models-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
  .models-sidebar:not(.mobile-visible) {
    display: none !important;
  }
  .mobile-filter-toggle-btn {
    display: flex !important;
  }
}
/* Theses Page Responsive Grid */
.theses-page-grid {
  display: grid;
  grid-template-columns: minmax(280px, 350px) 1fr;
  gap: 1.25rem;
  flex: 1;
  min-height: 500px;
}
.theses-mobile-back {
  display: none;
}
@media (max-width: 1024px) {
  .theses-page-grid {
    grid-template-columns: 1fr !important;
  }
  
  .theses-sidebar {
    display: flex !important;
    flex-direction: column;
  }
  
  .theses-content {
    display: flex !important;
    flex-direction: column;
  }

  .theses-page-grid.viewing-details .theses-sidebar {
    display: none !important;
  }
  
  .theses-page-grid:not(.viewing-details) .theses-content {
    display: none !important;
  }
  
  .theses-mobile-back {
    display: flex !important;
  }
}
/* ─── Brand Subtitle Visiblity (Mobile Only) ─────────────────── */
.brand-subtitle {
  display: none !important;
}
@media (max-width: 1024px) {
  .brand-subtitle {
    display: inline !important;
  }
}
/* ─── Header Filter & Mode Buttons ────────────────────────────── */
.header-filter-btn {
  padding: 0.35rem 0.65rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 28px;
}
.header-filter-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.header-filter-btn.active.longterm {
  color: #4ade80 !important;
  background: rgba(16, 185, 129, 0.15) !important;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.25) !important;
}
.header-filter-btn.active.conservative {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.15) !important;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.25) !important;
}
.header-filter-btn.active.moderate {
  color: #fb923c !important;
  background: rgba(249, 115, 22, 0.15) !important;
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.25) !important;
}
.header-filter-btn.active.aggressive {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.25) !important;
}
.header-mode-btn {
  padding: 0.35rem 0.65rem;
  border: none;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: 28px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.header-mode-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.header-mode-btn.active.live {
  color: #fff !important;
  background: rgba(239, 68, 68, 0.85) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}
.header-mode-btn.active.paper {
  color: #fff !important;
  background: rgba(56, 189, 248, 0.7) !important;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3) !important;
}
/* Always Visible Theme Switcher next to Bell */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}
.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-glass-hover);
  transform: translateY(-1px);
}
@media (max-width: 1024px) {
  .theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
  }
}
/* Mobile Navigation Grid Tiles (4 in a row) */
.mobile-menu-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.mobile-menu-tile {
  padding: 0.65rem 0.2rem;
  border: 1px solid var(--border-glass);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}
.mobile-menu-tile:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.mobile-menu-tile.active {
  color: #fff !important;
  background: rgba(56, 189, 248, 0.15) !important;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.25) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}
/* App layout, global header, sidebar, responsive rules */
/* ─── Glass Panel ─────────────────────────────────────────────── */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: border-color 0.3s ease, transform 0.2s ease;
}
.glass-panel:hover {
  border-color: var(--border-glass-hover);
}
.market-outlook-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-glass);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.market-outlook-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.2);
}
.market-outlook-card p {
  position: relative;
  z-index: 1;
}
.portfolio-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
}
@media (min-width: 1200px) {
  .portfolio-grid-layout {
    grid-template-columns: repeat(4, 1fr);
  }
  .span-1 { grid-column: span 1; }
  .span-2 { grid-column: span 2; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
}
/* ─── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--header-height) - var(--mobile-nav-height, 0px));
  overflow: hidden;
}
.sidebar-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border-glass);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-brand svg {
  color: var(--accent-blue);
  -webkit-text-fill-color: initial;
}
.sidebar-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.agent-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.agent-list::-webkit-scrollbar {
  width: 4px;
}
.agent-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
.agent-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  position: relative;
}
.agent-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
}
.agent-card.active {
  background: var(--accent-blue-dim);
  border-color: rgba(56, 189, 248, 0.2);
}
.agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.agent-card-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.agent-card-pnl {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
.agent-card-pnl.up { color: var(--profit); }
.agent-card-pnl.down { color: var(--loss); }
.agent-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  font-size: 0.95rem;
  line-height: 1;
}
.risk-badge.sm {
  font-size: 0.8rem;
  padding: 0.05rem 0.3rem;
}
.risk-badge.conservative {
  background: var(--profit-dim);
  color: var(--profit);
}
.risk-badge.moderate {
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
}
.risk-badge.aggressive {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border-glass);
}
.btn-create-agent {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(56, 189, 248, 0.3);
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}
.btn-create-agent:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: var(--shadow-glow-blue);
}
/* ─── Header Strip ────────────────────────────────────────────── */
.agent-detail-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
  min-height: 0;
}
.header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.header-agent-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-agent-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.header-stats {
  display: flex;
  gap: 2rem;
}
.header-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.header-stat-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.header-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
.header-stat-value.up {
  color: var(--profit);
  text-shadow: 0 0 24px rgba(16, 185, 129, 0.2);
}
.header-stat-value.down {
  color: var(--loss);
  text-shadow: 0 0 24px rgba(239, 68, 68, 0.2);
}
/* ─── Detail Layout (wide screens: left column = perf+holdings, right = chat) ── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}
@media (min-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .detail-grid .detail-left {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
  }
  .detail-grid .detail-right.detail-section-chat {
    display: none;
  }
}
.portfolio-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 1000px) {
  .portfolio-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .portfolio-row {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 1024px) {
  .detail-grid .detail-left {
    max-height: calc(100dvh - 180px);
    overflow-y: auto;
    padding-right: 0.5rem;
  }
  .detail-grid .detail-left::-webkit-scrollbar {
    width: 4px;
  }
  .detail-grid .detail-left::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
  }
}
.chart-panel, .holdings-panel, .trades-panel {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
}
.chart-panel {
  min-height: 300px;
}
.chart-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.chart-panel-title svg {
  color: var(--accent-blue);
}
/* ─── Portfolio Panel ─────────────────────────────────────────── */
.portfolio-panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 380px;
  overflow-y: auto;
}
@media (max-width: 1024px) {
  .portfolio-panel {
    max-height: none;
    overflow-y: visible;
  }
}
.portfolio-panel::-webkit-scrollbar {
  width: 4px;
}
.portfolio-panel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.section-title svg {
  width: 16px;
  height: 16px;
}
.holdings-table, .trades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.holdings-table th, .trades-table th {
  text-align: left;
  color: var(--text-tertiary);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border-glass);
}
.holdings-table td, .trades-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.holdings-table tr:hover, .trades-table tr:hover {
  background: rgba(255,255,255,0.02);
}
.ticker-cell {
  font-weight: 600;
  color: var(--text-accent);
}
.side-buy {
  color: var(--profit);
  font-weight: 600;
}
.side-sell {
  color: var(--loss);
  font-weight: 600;
}
/* ─── Chat Panel ──────────────────────────────────────────────── */
.chat-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  flex: 1;
  min-height: 280px;
  max-height: 400px;
}
.chat-expand-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  border-radius: 0.35rem;
  transition: all 0.2s ease;
}
.chat-expand-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}
.chat-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.chat-messages::-webkit-scrollbar {
  width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
.chat-bubble {
  max-width: 85%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  line-height: 1.55;
  animation: chatFadeIn 0.3s ease-out;
}
.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(56, 189, 248, 0.04) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--text-primary);
  border-radius: 14px;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.05);
}
.chat-bubble.assistant {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border-glass-hover);
  color: var(--text-primary);
  border-radius: 14px;
  border-bottom-left-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.chat-bubble.system {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.04) 0%, transparent 100%);
  border: 1px solid rgba(167, 139, 250, 0.08);
  border-left: 3px solid rgba(167, 139, 250, 0.5);
  color: var(--accent-purple);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: left;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.chat-bubble-time {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
  display: block;
}
.chat-input-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-glass);
  background: rgba(8, 8, 11, 0.5);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus {
  border-color: rgba(56, 189, 248, 0.3);
}
.chat-input::placeholder {
  color: var(--text-tertiary);
}
.btn-send {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: linear-gradient(135deg, rgba(56,189,248,0.15) 0%, rgba(56,189,248,0.05) 100%);
  color: var(--accent-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.82rem;
  transition: all 0.2s;
}
.btn-send:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.2);
  box-shadow: var(--shadow-glow-blue);
}
.btn-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-trigger {
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, 0.2);
  background: var(--profit-dim);
  color: var(--profit);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.78rem;
  transition: all 0.2s;
}
.btn-trigger:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.2);
  box-shadow: var(--shadow-glow-green);
}
.btn-trigger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-load-more {
  align-self: center;
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-size: 0.72rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.5rem;
}
.btn-load-more:hover {
  border-color: var(--border-glass-hover);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}
.btn-load-more:disabled {
  opacity: 0.5;
  cursor: default;
}
/* ─── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.2s ease-out;
}
.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-xl);
  padding: 0; /* Let header/body/footer handle padding */
  width: 90%;
  max-width: 440px;
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--border-glass);
  overflow: hidden;
  position: relative;
}
.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  background: linear-gradient(to bottom, rgba(255,255,255,0.02), transparent);
}
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-glass);
  background: rgba(0,0,0,0.2);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-input, .form-select, input[type="text"], input[type="password"], select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.form-input:focus, .form-select:focus, input:focus, select:focus {
  border-color: var(--accent-blue);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1), inset 0 2px 4px rgba(0,0,0,0.2);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}
.form-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #0284c7 100%);
  color: #08080b;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3);
  filter: brightness(1.1);
}
.btn-secondary {
  background: var(--border-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: var(--border-glass-hover);
  color: var(--text-primary);
}
.btn-primary:active, .btn-secondary:active {
  transform: translateY(0);
}
/* ─── Pulse Dot ───────────────────────────────────────────────── */
/* ─── Pulse Dot ───────────────────────────────────────────────── */
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.pulse-dot.active {
  background: var(--profit);
  box-shadow: 0 0 8px var(--profit);
  animation: pulse 2s infinite ease-in-out;
}
.pulse-dot.idle {
  background: var(--text-tertiary);
  opacity: 0.4;
}
/* ─── Empty State ─────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  gap: 1rem;
  color: var(--text-tertiary);
  text-align: center;
}
.empty-state svg {
  opacity: 0.3;
}
.empty-state-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.empty-state-desc {
  font-size: 0.85rem;
  max-width: 300px;
}
/* ─── Delete Button ───────────────────────────────────────────── */
.btn-delete-agent {
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.btn-delete-agent:hover {
  background: var(--loss-dim);
  color: var(--loss);
  border-color: rgba(239, 68, 68, 0.2);
}
/* ─── Animations ──────────────────────────────────────────────── */
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--profit); }
  100% { transform: scale(0.95); opacity: 0.7; }
}
@keyframes chatFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* ─── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-glass);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
/* ─── Streaming Cursor ────────────────────────────────────────── */
.cursor-blink {
  animation: blink 0.8s step-end infinite;
  color: var(--accent-blue);
  font-weight: 300;
}
@keyframes blink {
  50% { opacity: 0; }
}
/* ─── Leaderboard Mobile ───────────────────────────────────────── */
.leaderboard-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.leaderboard-table {
  min-width: 900px;
}
@media (max-width: 1024px) {
  .leaderboard-table {
    min-width: 800px;
  }
}
@media (max-width: 768px) {
  .leaderboard-table {
    min-width: 100% !important;
  }
  .leaderboard-table th:nth-child(4),
  .leaderboard-table td:nth-child(4),
  .leaderboard-table th:nth-child(5),
  .leaderboard-table td:nth-child(5) {
    display: none !important;
  }
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 450px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
.market-watch-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
/* ─── Custom Selects ────────────────────────────────────────────── */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}
.custom-select-wrapper .form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem !important; /* Make room for the caret */
  cursor: pointer;
}
.custom-select-wrapper .select-caret {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color 0.2s ease;
}
.custom-select-wrapper:hover .select-caret {
  color: var(--text-secondary);
}
/* ─── Dashboard Header & Toggles ─────────────────────────────── */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}
.dashboard-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.toggle-group {
  display: flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-glass);
}
.timeframe-btn {
  padding: 0.3rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 0.35rem;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.timeframe-btn.active {
  background: var(--accent-blue);
  color: white;
}
@media (max-width: 1024px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .dashboard-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
  }
  
  .toggle-group {
    width: 100%;
    justify-content: space-between;
  }
  
  .timeframe-btn {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.2rem;
  }
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* ─── Execution Timetable ─────────────────────────────────────── */
.timetable-slot {
  position: relative;
}
.timetable-slot.drag-over {
  border-color: var(--accent-blue) !important;
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.1);
}
.agent-pill {
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.agent-pill:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--accent-blue-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.agent-pill:active {
  cursor: grabbing;
}
.hour-pill {
  transition: all 0.15s ease;
}
.hour-pill:hover {
  border-color: var(--accent-blue) !important;
  background: rgba(56, 189, 248, 0.05) !important;
}
.hour-pill.active {
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}
/* ─── Leaderboard ─────────────────────────────────────────────── */
.leaderboard-table th {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.leaderboard-table tr {
  transition: background 0.15s ease;
}
.leaderboard-table tbody tr:hover:not(.total-row) {
  background: rgba(255, 255, 255, 0.02);
}
.total-row {
  background: rgba(56, 189, 248, 0.06);
  border-bottom: 2px solid rgba(56, 189, 248, 0.15);
}
/* ─── Animations ──────────────────────────────────────────────── */
@keyframes pulse-soft {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}
.pulse-active {
  animation: pulse-soft 2s infinite ease-in-out;
}
/* ─── Mobile Detail Nav ───────────────────────────────────────── */
.mobile-detail-nav {
  display: none;
}
@media (max-width: 1024px) {
  .app-layout.has-detail .mobile-detail-nav {
    display: grid;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    grid-template-columns: repeat(4, 1fr);
    height: 64px;
    background: rgba(14, 14, 19, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-glass);
    z-index: 100;
  }

  .mobile-detail-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.65rem;
    font-weight: 600;
  }

  .mobile-detail-nav button.active {
    color: var(--accent-blue);
    background: rgba(56, 189, 248, 0.05);
  }

  .mobile-detail-nav button svg {
    opacity: 0.6;
    transition: all 0.2s ease;
  }

  .mobile-detail-nav button.active svg {
    opacity: 1;
    transform: translateY(-2px);
  }
}
/* ─── User Dropdown ───────────────────────────────────────────── */
.user-dropdown {
  background: rgba(14, 14, 19, 0.98) !important;
  border: 1px solid var(--border-glass-hover) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
}
.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.85rem;
  font-weight: 500;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--loss);
}
/* ─── Relocated Force Eval Button ─────────────────────────────── */
.header-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-hover);
  color: var(--text-secondary);
}
.btn-header-chat {
  height: 30px;
  padding: 0 0.75rem;
  border-radius: 0.4rem;
  background: var(--accent-purple-dim);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: var(--accent-purple);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.btn-header-chat:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.2);
}
.btn-force-eval {
  height: 30px;
  padding: 0 0.75rem;
  border-radius: 0.4rem;
  background: var(--accent-blue-dim);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.btn-force-eval:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}
.btn-force-eval.running {
  opacity: 0.7;
  cursor: wait;
}
.btn-force-eval .spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: rr-spin 0.8s linear infinite;
}
@keyframes rr-spin {
  to { transform: rotate(360deg); }
}
/* ─── Activity Feed Styles ────────────────────────────────────── */
.activity-item {
  transition: all 0.2s ease;
}
.activity-item:hover {
  background: rgba(255, 255, 255, 0.01);
  padding-left: 4px !important;
}
.mini-trades-list::-webkit-scrollbar {
  width: 4px;
}
.mini-trades-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
@media (max-width: 1024px) {
  .header-strip {
    flex-direction: column;
    align-items: flex-start !important;
  }
  .header-stats {
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
  }
  /* Let the agent name + action buttons (Edit/Backtest/Clone/Chat/Force Eval) wrap instead of
     overflowing off-screen. `min-width: 0` defeats the flex default (min-width:auto) that otherwise
     keeps the row at its content width and pushes the Chat/Force-Eval buttons past the viewport. */
  .header-agent-info {
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
  }
  .header-agent-info > div {
    min-width: 0;
    flex: 1 1 100%;
  }
}
/* Glass panel, modals, forms, buttons, animations, misc UI */
/* ─── Infinite Table Responsive Wrappers ──────────────────────── */
.infinite-table-container {
  padding: 1.25rem;
}
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive-wrapper table {
  min-width: 600px; /* Ensures table columns don't squash too much */
}
@media (max-width: 768px) {
  .infinite-table-container {
    padding: 0;
  }
}
/* ─── Infinite Table Responsive Wrappers ──────────────────────── */
.infinite-table-container {
  padding: 1.25rem;
}
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive-wrapper table {
  min-width: 600px; /* Ensures table columns don't squash too much */
}
@media (max-width: 768px) {
  .infinite-table-container {
    padding: 0;
  }
}
/* ─── Chat Drawer & Open Button ──────────────────────────────── */
.btn-open-chat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-blue);
  border-radius: 0.45rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-open-chat:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.6);
  color: #fff;
  box-shadow: var(--shadow-glow-blue);
  transform: translateY(-1px);
}
.chat-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1500;
  animation: fadeIn 0.22s ease-out;
}
.chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  max-width: 100vw;
  background: rgba(14, 14, 20, 0.94);
  backdrop-filter: blur(24px) saturate(160%);
  border-left: 1px solid var(--border-glass);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 1501;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}
.chat-drawer-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border-radius: 0.4rem;
  transition: all 0.2s;
}
.chat-drawer-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.chat-drawer-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-drawer-content .chat-panel {
  height: 100% !important;
  max-height: none !important;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@media (max-width: 1023px) {
  /* .btn-header-chat is kept visible on mobile (it wraps cleanly via the header-agent-info flex
     rules) so users have a clear chat entry point in the agent header, not only the bottom nav. */
  .btn-open-chat {
    display: none !important;
  }
}
/* ─── Performance Chart & Legend Responsive Layout ─── */
.performance-chart-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.performance-chart-wrapper {
  height: 280px;
  min-height: 200px;
  flex: 1;
  min-width: 0;
}
.performance-legend-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-glass);
  max-height: 65px;
  overflow-y: auto;
}
@media (min-width: 1024px) {
  .performance-chart-layout {
    flex-direction: row !important;
    align-items: center;
  }
  .performance-legend-wrapper {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    border-top: none !important;
    border-left: 1px solid var(--border-glass) !important;
    padding-top: 0 !important;
    padding-left: 0.75rem !important;
    margin-top: 0 !important;
    margin-left: 0.75rem !important;
    max-height: 280px !important;
    width: 200px !important;
    flex-shrink: 0 !important;
  }
}
/* ─── Bento Grid Layout ─────────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
}
@media (min-width: 640px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.bento-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  grid-column: span 1;
}
.bento-item:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
}
@media (min-width: 640px) {
  .bento-item.span-2 { grid-column: span 2; }
  .bento-item.span-3 { grid-column: span 2; }
  .bento-item.span-4 { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .bento-item.span-2 { grid-column: span 2; }
  .bento-item.span-3 { grid-column: span 3; }
  .bento-item.span-4 { grid-column: span 4; }
  .bento-item.row-2 { grid-row: span 2; }
}
/* Infinite table wrappers, chat drawer, bento grid, perf charts */
/* ─── Table Header Controls Alignment ───────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-dark);
  padding: 0 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-glass);
  height: 36px;
  box-sizing: border-box;
}
.search-bar input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: var(--text-primary) !important;
  outline: none !important;
  font-size: 0.85rem !important;
  height: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.toggle-group {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px;
  border-radius: 0.65rem;
  border: 1px solid var(--border-glass);
  height: 36px;
  box-sizing: border-box;
  align-items: center;
  gap: 2px;
}
body.light-theme .toggle-group {
  background: rgba(0, 0, 0, 0.02);
}
.toggle-group button {
  height: 100%;
  padding: 0 0.8rem;
  border: none !important;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
}
.toggle-group button:hover {
  color: var(--text-primary);
}
.toggle-group button.active {
  background: var(--accent-blue) !important;
  color: white !important;
}
.toggle-group button.active-neutral {
  background: var(--text-primary) !important;
  color: var(--bg-surface) !important;
}
.toggle-group button.active-success {
  background: rgba(34, 197, 94, 0.85) !important;
  color: white !important;
}
.toggle-group button.active-failed {
  background: rgba(239, 68, 68, 0.85) !important;
  color: white !important;
}
.toggle-group button.active-purple {
  background: rgba(168, 85, 247, 0.85) !important;
  color: white !important;
}
.header-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  height: 36px;
  box-sizing: border-box;
  outline: none;
}
body.light-theme .header-select {
  background: var(--bg-surface);
  color: var(--text-secondary);
}
body.light-theme .header-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.header-icon-btn {
  height: 36px;
  width: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.35);
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}
.header-icon-btn:hover {
  background: rgba(56, 189, 248, 0.15);
}
.btn-header {
  height: 36px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 1rem !important;
  font-size: 0.75rem !important;
}
/* ─── PWA Update Banner ───────────────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* Table header controls: search-bar, toggle-group, btn-header */
/* ─── UX Overlays & Animations ────────────────────────────────── */

/* ─── Custom Toasts ───────────────────────────────────────────── */
.ux-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 99999;
  max-width: 400px;
  width: calc(100% - 48px);
}

.ux-toast {
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-left: 4px solid var(--accent-blue);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.2s, opacity 0.2s;
}

.ux-toast.toast-success {
  border-left-color: var(--profit);
}

.ux-toast.toast-error {
  border-left-color: var(--loss);
}

.ux-toast.toast-warning {
  border-left-color: var(--accent-amber);
}

.ux-toast.toast-fadeout {
  animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ux-toast-content {
  flex: 1;
}

.ux-toast-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.ux-toast-message {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.ux-toast-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.ux-toast-close:hover {
  color: var(--text-primary);
}

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

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

/* ─── Custom Modal Dialogs ────────────────────────────────────── */
.ux-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  animation: dialogFadeIn 0.2s ease-out forwards;
}

.ux-dialog-content {
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: calc(100% - 32px);
  max-width: 480px;
  animation: dialogScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ux-dialog-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ux-dialog-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ux-dialog-icon.icon-confirm {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.ux-dialog-icon.icon-prompt {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
}

.ux-dialog-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ux-dialog-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ux-dialog-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-top: 8px;
}

.ux-dialog-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.2);
}

.ux-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.ux-btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.ux-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.ux-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glass-hover);
}

.ux-btn-confirm {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: var(--shadow-glow-blue);
}

.ux-btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
}

.ux-btn-prompt {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.ux-btn-prompt:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(167, 139, 250, 0.35);
}

@keyframes dialogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialogScaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── Skeleton Loaders ────────────────────────────────────────── */
.ux-skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.02) 75%
  );
  background-size: 200% 100%;
  animation: uxShimmer 1.5s infinite linear;
}

body.light-theme .ux-skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.04) 25%,
    rgba(0, 0, 0, 0.08) 50%,
    rgba(0, 0, 0, 0.04) 75%
  );
  background-size: 200% 100%;
}

.ux-skeleton-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ux-skeleton-block {
  border-radius: var(--radius-sm);
}

@keyframes uxShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Responsive Bottom Mobile Navigation ────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(14, 14, 19, 0.85);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glass);
  z-index: 1000;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
}

.mobile-bottom-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.6rem;
  font-family: var(--font-main);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, transform 0.15s;
  padding: 6px;
  border-radius: var(--radius-sm);
  flex: 1;
}

.mobile-bottom-nav-btn:active {
  transform: scale(0.95);
}

.mobile-bottom-nav-btn.active {
  color: var(--accent-blue);
}

@media (max-width: 768px) {
  /* Hide desktop navigation */
  .header-nav {
    display: none !important;
  }

  /* Show mobile bottom nav */
  .mobile-bottom-nav {
    display: flex !important;
  }

  /* Adjust main app container padding for the bottom bar */
  .app-layout {
    padding-bottom: 72px !important;
  }
}
/*$vite$:1*/