/* ==========================================================================
   Bybit V5 Spot Pro — Design System & Stylesheet
   ========================================================================== */

:root {
  --bg-main: #0B0E14;
  --bg-sidebar: #0F131C;
  --bg-card: rgba(18, 22, 31, 0.75);
  --bg-card-hover: rgba(24, 30, 42, 0.85);
  --bg-input: #151A24;
  --bg-input-focus: #1A2230;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(247, 166, 0, 0.5);
  --border-card: rgba(255, 255, 255, 0.05);

  --accent-gold: #F7A600;
  --accent-gold-hover: #FFB71A;
  --accent-gold-glow: rgba(247, 166, 0, 0.25);

  --color-green: #0ECB81;
  --color-green-glow: rgba(14, 203, 129, 0.2);
  --color-red: #F6465D;
  --color-red-glow: rgba(246, 70, 93, 0.2);
  --color-cyan: #00D4FF;
  --color-purple: #9D7BFF;
  
  --text-primary: #FFFFFF;
  --text-secondary: #8B94A5;
  --text-muted: #596375;

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

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 20px rgba(247, 166, 0, 0.15);

  /* ═══ Liquid Glass — переиспользуемый эффект «жидкого стекла» ═══ */
  --glass-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.03),
      inset 1.8px 3px 0px -2px rgba(255, 255, 255, 0.27),
      inset -2px -2px 0px -2px rgba(255, 255, 255, 0.24),
      inset -3px -8px 1px -6px rgba(255, 255, 255, 0.18),
      inset -0.3px -1px 4px 0px rgba(0, 0, 0, 0.24),
      inset -1.5px 2.5px 0px -2px rgba(0, 0, 0, 0.4),
      inset 0px 3px 4px -2px rgba(0, 0, 0, 0.4),
      inset 2px -6.5px 1px -4px rgba(0, 0, 0, 0.2),
      0px 1px 5px 0px rgba(0, 0, 0, 0.2),
      0px 6px 16px 0px rgba(0, 0, 0, 0.16);

  --glass-shadow-active:
      inset 0 0 0 1px rgba(255, 255, 255, 0.03),
      inset 1px 1px 0 0 rgba(255, 255, 255, 0.15),
      inset -1px -1px 0 0 rgba(255, 255, 255, 0.1),
      0 2px 4px rgba(0, 0, 0, 0.15);

  --glass-shadow-indicator:
      inset 0 0 0 1px #ffffff08,
      inset 2px 1px 0 -1px #ffffff45,
      inset -1.5px -1px 0 -1px #ffffff3d,
      inset -2px -6px 1px -5px #ffffff2e,
      inset -1px 2px 3px -1px #0006,
      inset 0 -4px 1px -2px #0003,
      0 3px 6px #00000029;
}

/* Классы Liquid Glass */
.glass {
  box-shadow: var(--glass-shadow);
}
.glass-active {
  box-shadow: var(--glass-shadow-active);
}
.glass-indicator {
  box-shadow: var(--glass-shadow-indicator);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dark-theme {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ==========================================================================
   Light Mode (Белая тема — Премиальный стеклянный неоморфизм)
   ========================================================================== */
body.light-theme {
  --bg-main: #F4F7FB;
  --bg-sidebar: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-input: #FFFFFF;
  --bg-input-focus: #F8FAFC;
  
  --border-color: rgba(0, 0, 0, 0.08);
  --border-active: rgba(247, 166, 0, 0.7);
  --border-card: rgba(255, 255, 255, 0.9);

  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;

  --color-green: #059669;
  --color-red: #E11D48;
  --color-cyan: #0284C7;
  --accent-gold: #D97706;

  /* Стеклянные тени для белой темы */
  --glass-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.95),
      inset 1.8px 3px 0px -2px rgba(255, 255, 255, 1),
      inset -2px -2px 0px -2px rgba(0, 0, 0, 0.03),
      inset 0px 2px 4px -2px rgba(0, 0, 0, 0.04),
      0px 6px 24px 0px rgba(0, 0, 0, 0.05),
      0px 1px 4px 0px rgba(0, 0, 0, 0.03);

  --glass-shadow-active:
      inset 0 0 0 1px rgba(255, 255, 255, 0.95),
      inset 1px 1px 2px 0 rgba(0, 0, 0, 0.05),
      0 2px 6px rgba(0, 0, 0, 0.05);

  --glass-shadow-indicator:
      inset 0 0 0 1px #ffffff,
      inset 2px 1px 0 -1px #ffffff,
      0 3px 8px rgba(0, 0, 0, 0.08);

  background-color: #F4F7FB;
  background-image: 
    radial-gradient(at 0% 0%, rgba(2, 132, 199, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(217, 119, 6, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(5, 150, 105, 0.05) 0px, transparent 50%);
  color: #0F172A;
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

body.light-theme .top-nav {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

body.light-theme .sidebar {
  background: rgba(255, 255, 255, 0.88);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .glass,
body.light-theme .glass-card,
body.light-theme .metric-card,
body.light-theme .card,
body.light-theme .bot-status-banner,
body.light-theme .chart-header-bar {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--glass-shadow);
}

body.light-theme .card-value {
  color: #0F172A;
}

body.light-theme .card-title {
  color: #64748B;
}

body.light-theme .card-header-left h3 {
  color: #0F172A;
}

body.light-theme .data-table {
  background: transparent;
}

body.light-theme .data-table th {
  background: rgba(241, 245, 249, 0.85);
  color: #475569;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .data-table td {
  color: #1E293B;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .data-table tbody tr:hover {
  background: rgba(2, 132, 199, 0.04);
}

body.light-theme .data-table td strong {
  color: #0F172A !important;
}

body.light-theme .brand-title {
  background: linear-gradient(90deg, #0F172A 0%, #1E293B 50%, #0284C7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .brand-title .highlight {
  background: linear-gradient(90deg, #0284C7 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .tag-badge {
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .sub-nav-bar {
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .sub-nav-btn {
  color: #64748B;
}

body.light-theme .sub-nav-btn.active {
  background: #FFFFFF;
  color: #D97706;
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-theme .nav-item {
  color: #64748B;
}
body.light-theme .nav-item.active {
  background: rgba(217, 119, 6, 0.12);
  color: #D97706;
}

body.light-theme .custom-select,
body.light-theme .custom-input,
body.light-theme .custom-select-compact {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

body.light-theme .btn-icon {
  background: #FFFFFF;
  color: #475569;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
body.light-theme .btn-icon:hover {
  color: #0F172A;
  border-color: #0284C7;
}

body.light-theme .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #334155;
}

body.light-theme .table-container {
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .quick-equity-pill {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.25);
  color: #0F172A;
}

body.light-theme #donutCenterValue {
  color: #0F172A !important;
}
body.light-theme #donutCenterCoin {
  color: #64748B !important;
}

body.light-theme .settings-section {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .settings-form-box {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .form-control label {
  color: #475569;
}

body.light-theme .form-control input {
  background: #F8FAFC;
  color: #0F172A;
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .form-control input:focus {
  background: #FFFFFF;
  border-color: #0284C7;
}

body.light-theme .cooldown-container {
  background: rgba(241, 245, 249, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .terminal-log-box {
  background: #0F172A;
  color: #E2E8F0;
}

body.light-theme .sentiment-block {
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
body.light-theme .sentiment-big-value,
body.light-theme .sentiment-mini-item .mini-value,
body.light-theme .sentiment-signal-text {
  color: #0F172A;
}
body.light-theme .sentiment-signal-block.signal-green {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(255, 255, 255, 0.9));
  border-color: rgba(5, 150, 105, 0.35);
}
body.light-theme .sentiment-signal-block.signal-red {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.12), rgba(255, 255, 255, 0.9));
  border-color: rgba(225, 29, 72, 0.35);
}
body.light-theme .sentiment-signal-block.signal-orange {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(255, 255, 255, 0.9));
  border-color: rgba(217, 119, 6, 0.35);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #232B3B;
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: #364259;
}

/* ==========================================================================
   Header Bar
   ========================================================================== */
.top-nav {
  min-height: 64px;
  background: rgba(15, 19, 28, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Header Bar & WOW Quantum Brand Logo 2.0
   ========================================================================== */
.top-nav {
  min-height: 64px;
  background: rgba(15, 19, 28, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.logo-wow-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon-3d {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.95) 0%, rgba(255, 107, 0, 0.9) 45%, rgba(121, 40, 202, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 0 20px rgba(247, 166, 0, 0.5),
    0 0 40px rgba(255, 107, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-glow-halo {
  position: absolute;
  inset: -6px;
  border-radius: 16px;
  background: radial-gradient(circle, rgba(247, 166, 0, 0.45) 0%, rgba(0, 212, 255, 0.2) 50%, transparent 75%);
  filter: blur(6px);
  animation: haloPulse 3s ease-in-out infinite alternate;
  pointer-events: none;
}

.logo-glow-core {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #FFF;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.7;
  animation: coreGlow 2.5s ease-in-out infinite alternate;
  pointer-events: none;
}

.logo-bolt {
  font-size: 1.25rem;
  color: #FFFFFF;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 24px rgba(247, 166, 0, 0.8);
  position: relative;
  z-index: 2;
  transform: scale(1);
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.logo-orbit-ring {
  position: absolute;
  inset: -4px;
  border-radius: 14px;
  border: 1.5px dashed rgba(0, 212, 255, 0.6);
  animation: ringRotate 8s linear infinite;
  pointer-events: none;
}

.logo-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #00D4FF;
  box-shadow: 0 0 8px #00D4FF;
  pointer-events: none;
}
.logo-particle.p1 {
  top: -2px;
  right: -2px;
  animation: floatParticle1 3s ease-in-out infinite alternate;
}
.logo-particle.p2 {
  bottom: -2px;
  left: -2px;
  background: #0ECB81;
  box-shadow: 0 0 8px #0ECB81;
  animation: floatParticle2 2.5s ease-in-out infinite alternate;
}

@keyframes haloPulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0.85; }
}

@keyframes coreGlow {
  0% { transform: scale(0.8); opacity: 0.4; }
  100% { transform: scale(1.3); opacity: 0.9; }
}

@keyframes ringRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes floatParticle1 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(4px, -4px); }
}
@keyframes floatParticle2 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-4px, 4px); }
}

.nav-brand:hover .logo-icon-3d {
  transform: scale(1.1) rotate(6deg);
  box-shadow: 
    0 0 28px rgba(247, 166, 0, 0.75),
    0 0 50px rgba(0, 212, 255, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.nav-brand:hover .logo-bolt {
  transform: scale(1.15);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title-main {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: 0.8px;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
}

.brand-title-glow {
  background: linear-gradient(135deg, #FFE600 0%, #F7A600 40%, #FF6B00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(247, 166, 0, 0.4);
  font-weight: 900;
  margin-left: 1px;
}

.badge-pro-luxury {
  font-family: var(--font-heading);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(121, 40, 202, 0.25));
  border: 1px solid rgba(0, 212, 255, 0.55);
  color: #00F0FF;
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.badge-pro-luxury .badge-sub {
  color: #F7A600;
  font-weight: 900;
}

.badge-pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00F0FF;
  box-shadow: 0 0 6px #00F0FF;
  animation: badgeDotBlink 1.5s infinite;
}

@keyframes badgeDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #8B94A5;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-dot-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0ECB81;
  box-shadow: 0 0 8px #0ECB81;
  animation: liveRadarPulse 2s infinite;
}

@keyframes liveRadarPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(14, 203, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(14, 203, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(14, 203, 129, 0); }
}

/* ==========================================================================
   Interactive Slot Allocation Matrix (35 Base + 3 Heavy VIP Slots)
   ========================================================================== */
.slot-matrix-panel {
  background: rgba(14, 18, 27, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.slot-matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.sm-title {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFF;
}

.sm-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.sm-badge.blue {
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #00D4FF;
}

.sm-badge.gold {
  background: rgba(247, 166, 0, 0.15);
  border: 1px solid rgba(247, 166, 0, 0.4);
  color: #F7A600;
}

.sm-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.sm-badge .gold-pulse {
  animation: goldPulse 1.5s infinite;
}

@keyframes goldPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(247, 166, 0, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(247, 166, 0, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(247, 166, 0, 0); }
}

.btn-toggle-matrix {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8B94A5;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-toggle-matrix:hover {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.slot-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
  transition: max-height 0.3s ease;
}

.slot-matrix-grid.is-collapsed {
  display: none;
}

.slot-cell {
  background: rgba(18, 22, 31, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  min-height: 52px;
  box-sizing: border-box;
}

.slot-cell:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.slot-cell.is-vip {
  border-color: rgba(247, 166, 0, 0.35);
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.08), rgba(18, 22, 31, 0.9));
}

.slot-cell.is-vip:hover {
  border-color: #F7A600;
  box-shadow: 0 0 14px rgba(247, 166, 0, 0.3);
}

.slot-cell.is-empty {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  cursor: default;
}

.slot-cell.is-empty.is-vip {
  border: 1px dashed rgba(247, 166, 0, 0.45);
  background: rgba(247, 166, 0, 0.04);
}

.slot-cell .slot-num {
  font-size: 0.6rem;
  color: #64748B;
  font-weight: 600;
  position: absolute;
  top: 2px;
  left: 4px;
}

.slot-cell.is-vip .slot-num {
  color: #F7A600;
}

.slot-cell .slot-coin {
  font-size: 0.78rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: 0.2px;
  margin-top: 4px;
}

.slot-cell .slot-pnl {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
}

.slot-cell .slot-empty-label {
  font-size: 0.65rem;
  color: #0ECB81;
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.slot-cell.is-vip .slot-empty-label {
  color: #F7A600;
}

/* Row Flash Animation upon Take-Profit */
@keyframes tpRowFlash {
  0% { background: rgba(14, 203, 129, 0.45); box-shadow: 0 0 20px rgba(14, 203, 129, 0.6); }
  50% { background: rgba(14, 203, 129, 0.2); }
  100% { background: transparent; }
}

.row-tp-celebration {
  animation: tpRowFlash 2.5s ease-out;
}

/* ==========================================================================
   Positions Interactive Filtering Toolbar & Controls
   ========================================================================== */
.positions-filter-toolbar {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos-filter-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pos-search-box {
  position: relative;
  min-width: 220px;
  max-width: 260px;
  flex-shrink: 0;
}

.pos-search-box .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #8B94A5;
  font-size: 0.82rem;
  pointer-events: none;
}

.pos-search-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 30px 7px 32px;
  background: rgba(15, 19, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #FFF;
  font-size: 0.82rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.pos-search-box input:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.25);
  background: rgba(15, 19, 28, 0.95);
}

.btn-clear-pos-search {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8B94A5;
  cursor: pointer;
  font-size: 0.76rem;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-clear-pos-search:hover {
  color: #FFF;
}

.pos-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-grow: 1;
}

.pos-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8B94A5;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pos-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.18);
}

.pos-pill-btn .pill-count {
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.68rem;
  font-weight: 700;
  color: #CBD5E1;
}

.pos-pill-btn.active {
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.2), rgba(255, 107, 0, 0.25));
  border-color: rgba(247, 166, 0, 0.6);
  color: #FFF;
  box-shadow: 0 0 12px rgba(247, 166, 0, 0.25);
}

.pos-pill-btn.active .pill-count {
  background: #F7A600;
  color: #000;
}

.pos-pill-btn.pill-near-tp.active {
  background: linear-gradient(135deg, rgba(14, 203, 129, 0.2), rgba(0, 212, 255, 0.2));
  border-color: #0ECB81;
  color: #FFF;
}
.pos-pill-btn.pill-near-tp.active .pill-count {
  background: #0ECB81;
  color: #000;
}

.pos-pill-btn.pill-deep-dip.active {
  background: linear-gradient(135deg, rgba(246, 70, 93, 0.25), rgba(255, 0, 128, 0.2));
  border-color: #F6465D;
  color: #FFF;
}
.pos-pill-btn.pill-deep-dip.active .pill-count {
  background: #F6465D;
  color: #FFF;
}

.pos-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pos-sort-wrap .sort-label {
  font-size: 0.74rem;
  color: #8B94A5;
  white-space: nowrap;
}

.pos-filter-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #8B94A5;
  flex-wrap: wrap;
  gap: 8px;
}

.pos-filter-summary-bar .summary-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pos-filter-summary-bar .sum-item b {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Ticker Tape */
.ticker-tape {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(21, 26, 36, 0.6);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  flex: 1 1 auto;
  max-width: 580px;
  min-width: 0;
}
.ticker-tape::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1350px) {
  .ticker-tape {
    display: none; /* Прячем ленту в шапке на экранах до 1350px, чтобы все кнопки и баланс всегда помещались на 100% */
  }
}

.tape-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.tape-item .sym {
  color: var(--text-secondary);
  font-weight: 600;
}

.tape-item .price {
  color: #FFF;
  font-weight: 600;
}

.tape-item .chg.up {
  color: var(--color-green);
}
.tape-item .chg.down {
  color: var(--color-red);
}

/* Header Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.api-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(14, 203, 129, 0.1);
  border: 1px solid rgba(14, 203, 129, 0.3);
  color: var(--color-green);
  white-space: nowrap;
  flex-shrink: 0;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-green);
  animation: pulseAnim 1.2s infinite;
  flex-shrink: 0;
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(14, 203, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(14, 203, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(14, 203, 129, 0); }
}

.flash-up {
  animation: flashGreen 0.6s ease-out;
}
.flash-down {
  animation: flashRed 0.6s ease-out;
}

@keyframes flashGreen {
  0% { background-color: rgba(14, 203, 129, 0.35); color: #0ECB81; }
  100% { background-color: transparent; }
}

@keyframes flashRed {
  0% { background-color: rgba(246, 70, 93, 0.35); color: #F6465D; }
  100% { background-color: transparent; }
}

.quick-equity-pill {
  background: rgba(247, 166, 0, 0.1);
  border: 1px solid rgba(247, 166, 0, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}

.quick-equity-pill .pill-label {
  font-size: 0.72rem;
  color: var(--accent-gold);
}

.quick-equity-pill .pill-value {
  font-weight: 700;
  color: #FFF;
  font-size: 0.88rem;
}

.refresh-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.custom-select-compact {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   Layout: Sidebar & Main Content
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

.sidebar {
  width: 240px;
  background: rgba(15, 19, 28, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 12px;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  box-sizing: border-box;
  z-index: 90;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #FFF;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(247, 166, 0, 0.15), rgba(247, 166, 0, 0.03));
  border-color: rgba(247, 166, 0, 0.3);
  color: var(--accent-gold);
  font-weight: 600;
}

.nav-item.active i {
  color: var(--accent-gold);
}

.nav-badge {
  margin-left: auto;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.account-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-pill i {
  color: var(--color-cyan);
  font-size: 1.1rem;
}

.acc-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #FFF;
}

.acc-fee {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.main-content {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  background: radial-gradient(circle at 80% 10%, rgba(247, 166, 0, 0.03) 0%, transparent 60%);
}

/* ==========================================================================
   Tab Panes
   ========================================================================== */
.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Cards, Glassmorphism & UI Components
   ========================================================================== */
.glass-card {
  background: rgba(18, 22, 31, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card {
  padding: 18px 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header-left h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFF;
}

.highlight-icon {
  color: var(--accent-gold);
  font-size: 1.2rem;
}

.tag-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tag-badge.green {
  background: rgba(14, 203, 129, 0.15);
  color: var(--color-green);
  border: 1px solid rgba(14, 203, 129, 0.3);
}

.tag-badge.red {
  background: rgba(246, 70, 93, 0.15);
  color: var(--color-red);
  border: 1px solid rgba(246, 70, 93, 0.3);
}

.tag-badge.cyan {
  background: rgba(0, 212, 255, 0.15);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.tag-badge.orange {
  background: rgba(247, 166, 0, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(247, 166, 0, 0.35);
}

/* Metric Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 1300px) {
  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

.metric-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  min-height: 118px;
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  background: rgba(18, 22, 31, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--glass-shadow), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.metric-card .card-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  opacity: 0.85;
  box-shadow: var(--glass-shadow);
}

.card-icon.gold { background: rgba(247, 166, 0, 0.15); color: var(--accent-gold); border: 1px solid rgba(247, 166, 0, 0.25); }
.card-icon.green { background: rgba(14, 203, 129, 0.15); color: var(--color-green); border: 1px solid rgba(14, 203, 129, 0.25); }
.card-icon.cyan, .card-icon.blue { background: rgba(0, 212, 255, 0.15); color: var(--color-cyan); border: 1px solid rgba(0, 212, 255, 0.25); }
.card-icon.purple { background: rgba(157, 123, 255, 0.15); color: var(--color-purple); border: 1px solid rgba(157, 123, 255, 0.25); }

.metric-card .card-data {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 2px;
}

.card-title {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 600;
  max-width: calc(100% - 36px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.card-value-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  margin: 3px 0;
  flex-wrap: wrap;
}

.card-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: -0.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.card-value .limit {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.card-pnl-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 2px;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.card-sub-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.text-cyan {
  color: #00D4FF !important;
  font-weight: 600;
}

.card-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
}

.text-green { color: var(--color-green) !important; }
.text-red { color: var(--color-red) !important; }

/* Content Split 2 */
.content-split-2 {
  display: flex;
  gap: 24px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }

.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

/* ==========================================================================
   Market Sentiment Widget (Liquid Glass)
   ========================================================================== */
.sentiment-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1.15fr;
  gap: 16px;
}

.sentiment-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sentiment-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.sentiment-score-mini {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.sentiment-gauge-wrap {
  width: 100%;
  padding-top: 4px;
}

.sentiment-gauge {
  height: 8px;
  background: linear-gradient(90deg, #F6465D 0%, #F59E0B 28%, #F7A600 50%, #00D4FF 75%, #0ECB81 100%);
  border-radius: 6px;
  position: relative;
  overflow: visible;
  margin: 6px 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.gauge-pin {
  position: absolute;
  top: -5px;
  left: 50%;
  height: 18px;
  width: 18px;
  background: #FFFFFF;
  border: 3.5px solid #F59E0B;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
  transition: left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease;
  z-index: 2;
  cursor: pointer;
}

.gauge-pin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: #12161F;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.sentiment-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.sentiment-value-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.sentiment-big-value {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: -0.5px;
}

.sentiment-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.sentiment-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sentiment-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.sentiment-mini-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sentiment-mini-item .mini-label {
  font-size: 0.66rem;
  color: var(--text-muted);
}

.sentiment-mini-item .mini-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFF;
}

.sentiment-signal-block {
  text-align: center;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 203, 129, 0.3);
  background: linear-gradient(135deg, rgba(14, 203, 129, 0.08), rgba(0, 0, 0, 0.2));
  transition: all 0.3s ease;
  min-height: 110px;
}

.sentiment-signal-block.signal-green {
  border-color: rgba(14, 203, 129, 0.4);
  background: linear-gradient(135deg, rgba(14, 203, 129, 0.12), rgba(18, 22, 31, 0.6));
  box-shadow: 0 0 20px rgba(14, 203, 129, 0.15);
}

.sentiment-signal-block.signal-red {
  border-color: rgba(246, 70, 93, 0.4);
  background: linear-gradient(135deg, rgba(246, 70, 93, 0.12), rgba(18, 22, 31, 0.6));
  box-shadow: 0 0 20px rgba(246, 70, 93, 0.15);
}

.sentiment-signal-block.signal-orange {
  border-color: rgba(247, 166, 0, 0.4);
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.12), rgba(18, 22, 31, 0.6));
  box-shadow: 0 0 20px rgba(247, 166, 0, 0.15);
}

.sentiment-signal-icon {
  font-size: 1.8rem;
  margin-bottom: 2px;
  color: var(--color-green);
  transition: transform 0.3s ease;
}

.sentiment-signal-text {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: #FFF;
}

.sentiment-signal-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (max-width: 900px) {
  .sentiment-grid {
    grid-template-columns: 1fr;
  }
}

/* Interactive Sentiment Cards */
.interactive-card {
  cursor: pointer;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.interactive-card:hover {
  transform: translateY(-3px);
  border-color: rgba(247, 166, 0, 0.45);
  box-shadow: var(--glass-shadow), 0 10px 25px rgba(0, 0, 0, 0.45);
}

.sentiment-click-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.interactive-card:hover .sentiment-click-badge {
  background: rgba(247, 166, 0, 0.15);
  color: var(--accent-gold);
  border-color: rgba(247, 166, 0, 0.35);
}

/* ==========================================================================
   Liquid Glass Modals
   ========================================================================== */
.glass-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.glass-modal-content {
  background: rgba(18, 22, 31, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), var(--glass-shadow);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: modalPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.glass-modal-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-wrap h3 {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  color: #FFF;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: rgba(246, 70, 93, 0.2);
  color: #F6465D;
  border-color: rgba(246, 70, 93, 0.4);
}

.glass-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.glass-modal-footer {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-color);
}

.modal-hero-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--glass-shadow);
}

.hero-left {
  flex: 1;
}

.hero-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.hero-val-row {
  display: flex;
  align-items: baseline;
  margin: 4px 0 6px;
}

.hero-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: -0.5px;
}

.hero-max {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.hero-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.modal-section-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #FFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section-title i {
  color: var(--accent-gold);
}

/* History Grid */
.modal-history-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.history-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.history-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.history-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFF;
}

/* Methodology Grid */
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.method-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.method-pct {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.method-card strong {
  font-size: 0.8rem;
  color: #FFF;
}

.method-card p {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

/* Modal Tip Box */
.modal-tip-box {
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.08), rgba(0, 0, 0, 0.3));
  border: 1px solid rgba(247, 166, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-tip-box i {
  font-size: 1.2rem;
  color: var(--accent-gold);
  margin-top: 2px;
}

.modal-tip-box strong {
  display: block;
  font-size: 0.86rem;
  color: #FFF;
  margin-bottom: 2px;
}

.modal-tip-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* Modal 4Grid Metrics */
.modal-metrics-4grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.modal-metric-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mm-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.mm-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFF;
}

.mm-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* 24h Range Bar in Modal */
.modal-range-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.range-labels-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rl-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
}

.rl-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
}

.modal-range-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.range-fill-line {
  height: 100%;
  background: linear-gradient(90deg, #F6465D, #00D4FF, #0ECB81);
  border-radius: 4px;
}

.range-dot {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: #FFF;
  border: 3px solid #00D4FF;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: left 0.6s ease;
}

/* Strategy Breakdown in Modal 3 */
.modal-strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.strat-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  gap: 12px;
}

.strat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.strat-icon.gold { background: rgba(247, 166, 0, 0.15); color: var(--accent-gold); border: 1px solid rgba(247, 166, 0, 0.3); }
.strat-icon.green { background: rgba(14, 203, 129, 0.15); color: var(--color-green); border: 1px solid rgba(14, 203, 129, 0.3); }
.strat-icon.cyan { background: rgba(0, 212, 255, 0.15); color: var(--color-cyan); border: 1px solid rgba(0, 212, 255, 0.3); }
.strat-icon.purple { background: rgba(157, 123, 255, 0.15); color: var(--color-purple); border: 1px solid rgba(157, 123, 255, 0.3); }

.strat-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.strat-text strong {
  font-size: 0.84rem;
  color: #FFF;
}

.strat-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.modal-params-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mparam-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mp-k {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.mp-v {
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.modal-badge-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(14, 203, 129, 0.15);
  border: 1px solid rgba(14, 203, 129, 0.35);
  color: var(--color-green);
  white-space: nowrap;
}

/* Light Theme Support for Modals */
body.light-theme .glass-modal-content {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}
body.light-theme .modal-title-wrap h3,
body.light-theme .hero-number,
body.light-theme .history-val,
body.light-theme .method-card strong,
body.light-theme .modal-tip-box strong,
body.light-theme .modal-section-title,
body.light-theme .mm-val,
body.light-theme .strat-text strong {
  color: #0F172A;
}
body.light-theme .modal-hero-box,
body.light-theme .history-item,
body.light-theme .method-card,
body.light-theme .modal-metric-card,
body.light-theme .modal-range-card,
body.light-theme .strat-item,
body.light-theme .mparam-pill {
  background: rgba(248, 250, 252, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .hero-desc,
body.light-theme .modal-tip-box p {
  color: #475569;
}

@media (max-width: 768px) {
  .modal-history-grid,
  .methodology-grid,
  .modal-metrics-4grid,
  .modal-strategy-grid,
  .modal-params-row {
    grid-template-columns: 1fr;
  }
  .modal-hero-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Donut Card Horizontal Layout */
.donut-card-layout {
  display: flex;
  align-items: center;
  gap: 32px;
}

.donut-holdings-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.holding-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s ease;
}

.holding-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.holding-pill-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.holding-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.holding-coin-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFF;
}

.holding-pill-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.holding-usd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-green);
}

.holding-pct {
  font-size: 0.68rem;
  color: var(--text-muted);
}

body.light-theme .holding-pill {
  background: rgba(248, 250, 252, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .holding-coin-name {
  color: #0F172A;
}

.row-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .row-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .donut-card-layout {
    flex-direction: column;
    gap: 16px;
  }
}

/* Market Drop Mode Cards */
.market-mode-selector-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.mode-card {
  position: relative;
  display: flex;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mode-card input[type="radio"] {
  position: absolute;
  top: 18px;
  right: 18px;
  accent-color: var(--accent-gold);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.mode-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.mode-card.active {
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.1), rgba(18, 22, 31, 0.9));
  border-color: rgba(247, 166, 0, 0.5);
  box-shadow: 0 0 20px rgba(247, 166, 0, 0.15);
}

.mode-card-content {
  flex: 1;
  padding-right: 32px;
}

.mode-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.mode-card-header strong {
  font-size: 0.92rem;
  color: #FFF;
}

.mode-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.mode-icon.green { background: rgba(14, 203, 129, 0.15); color: var(--color-green); }
.mode-icon.red { background: rgba(246, 70, 93, 0.15); color: var(--color-red); }
.mode-icon.cyan { background: rgba(0, 212, 255, 0.15); color: var(--color-cyan); }

.mode-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

body.light-theme .mode-card {
  background: rgba(248, 250, 252, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .mode-card-header strong {
  color: #0F172A;
}
body.light-theme .mode-card-desc {
  color: #475569;
}
body.light-theme .mode-card.active {
  background: rgba(254, 243, 199, 0.8);
  border-color: #F59E0B;
}

/* Closed Trades Filter Pills */
.filter-pills-group {
  display: flex;
  gap: 8px;
}

.filter-pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFF;
}

.filter-pill-btn.active {
  background: rgba(247, 166, 0, 0.15);
  border-color: rgba(247, 166, 0, 0.5);
  color: var(--accent-gold);
  font-weight: 600;
}

.filter-pill-btn.green.active {
  background: rgba(14, 203, 129, 0.15);
  border-color: rgba(14, 203, 129, 0.5);
  color: #0ECB81;
}

.filter-pill-btn.red.active {
  background: rgba(246, 70, 93, 0.15);
  border-color: rgba(246, 70, 93, 0.5);
  color: #F6465D;
}

.trade-row-clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}

.trade-row-clickable:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

body.light-theme .filter-pill-btn {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}
body.light-theme .loss-reason-card {
  background: #FFF !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .loss-analysis-banner {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.9), #FFF) !important;
}

/* Quick Hot Pair Pills */
.quick-pair-pills-bar {
  scrollbar-width: none;
}
.quick-pair-pills-bar::-webkit-scrollbar {
  display: none;
}

.quick-pair-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quick-pair-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.quick-pair-btn.active {
  background: rgba(247, 166, 0, 0.18);
  border-color: rgba(247, 166, 0, 0.6);
  color: var(--accent-gold);
}

.chart-wrapper.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

body.light-theme .quick-pair-btn {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}
body.light-theme .quick-pair-btn.active {
  background: rgba(254, 243, 199, 0.9);
  border-color: #F59E0B;
  color: #B45309;
}

/* ==========================================================================
   Secure Login Screen Overlay
   ========================================================================= */
.login-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 30%, rgba(247, 166, 0, 0.1), rgba(7, 10, 16, 0.98) 70%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
  padding: 20px;
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(18, 22, 31, 0.95);
  border: 1px solid rgba(247, 166, 0, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(247, 166, 0, 0.12);
  border-radius: var(--radius-xl);
  padding: 30px 28px;
  animation: loginFadeIn 0.35s ease-out;
  margin: auto;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-glow {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.2), rgba(0, 212, 255, 0.15));
  border: 1px solid rgba(247, 166, 0, 0.4);
  color: #F7A600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 25px rgba(247, 166, 0, 0.3);
}

.login-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}

.login-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.auth-tab-btn:hover {
  color: #FFF;
}

.auth-tab-btn.active {
  background: rgba(247, 166, 0, 0.18);
  color: #F7A600;
  border: 1px solid rgba(247, 166, 0, 0.4);
  box-shadow: 0 0 12px rgba(247, 166, 0, 0.15);
}

.login-card.is-register {
  max-width: 540px;
}

.login-input-group {
  margin-bottom: 16px;
}

.login-input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap .input-icon {
  position: absolute;
  left: 14px;
  color: #8B94A5;
  font-size: 0.9rem;
  pointer-events: none;
}

.input-icon-wrap input {
  width: 100%;
  padding: 12px 42px 12px 38px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: #FFF;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.input-icon-wrap input:focus {
  border-color: #F7A600;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(247, 166, 0, 0.15);
  outline: none;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #8B94A5;
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
}

.btn-toggle-pwd:hover {
  color: #FFF;
}

.login-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.login-error-alert {
  background: rgba(246, 70, 93, 0.15);
  border: 1px solid rgba(246, 70, 93, 0.4);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #F6465D;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.72rem;
  color: #8B94A5;
}


/* ==========================================================================
   Data Tables
   ========================================================================= */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(14, 18, 27, 0.95);
  box-shadow: var(--glass-shadow);
  scroll-behavior: smooth;
}

.max-h-400 { max-height: 400px; }
.max-h-500 { max-height: 500px; }

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.84rem;
}

#quickPositionsTable {
  min-width: 960px;
}

#quickPositionsTable th:first-child,
#quickPositionsTable td:first-child {
  position: sticky;
  left: 0;
  background: #0E131F !important;
  z-index: 12;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.6);
}

.data-table th {
  background: #0E131F !important;
  padding: 10px 12px;
  color: #8B94A5;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #E2E8F0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.loading-td, .empty-td {
  text-align: center !important;
  padding: 32px !important;
  color: var(--text-muted) !important;
  font-family: var(--font-main) !important;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(247, 166, 0, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Status Badges */
.badge-signal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-signal.qualify {
  background: rgba(14, 203, 129, 0.2);
  color: var(--color-green);
  border: 1px solid rgba(14, 203, 129, 0.4);
}

.badge-signal.wait {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--accent-gold);
  color: #000;
}
.btn-primary:hover {
  background: var(--accent-gold-hover);
  box-shadow: 0 0 16px var(--accent-gold-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #FFF;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background: rgba(246, 70, 93, 0.15);
  color: var(--color-red);
  border-color: rgba(246, 70, 93, 0.3);
}
.btn-danger:hover {
  background: var(--color-red);
  color: #FFF;
}

.btn-success {
  background: var(--color-green);
  color: #000;
}
.btn-success:hover {
  background: #11E090;
  box-shadow: 0 0 16px var(--color-green-glow);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover {
  color: #FFF;
  border-color: var(--accent-gold);
}

.btn-bot-status {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-pill);
}

.btn-bot-status.running {
  background: rgba(14, 203, 129, 0.15);
  color: var(--color-green);
  border: 1px solid rgba(14, 203, 129, 0.4);
}

.btn-bot-status.stopped {
  background: rgba(246, 70, 93, 0.15);
  color: var(--color-red);
  border: 1px solid rgba(246, 70, 93, 0.4);
}

/* ==========================================================================
   Bot Banner & Strategy Section
   ========================================================================== */
.bot-status-banner {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-lg);
  background: rgba(18, 22, 31, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--glass-shadow);
  gap: 16px;
  flex-wrap: wrap;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.bot-badge-live {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-green);
  letter-spacing: 0.5px;
}

.banner-info {
  display: flex;
  gap: 18px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.banner-info b {
  color: #FFF;
  font-family: var(--font-mono);
  font-weight: 700;
}

.banner-right {
  display: flex;
  gap: 10px;
}

/* Header Filters */
.header-filters {
  display: flex;
  gap: 6px;
}

.filter-pill {
  font-size: 0.76rem;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.filter-pill.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold-glow);
}

/* Cooldowns Section */
.cooldown-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  background: rgba(8, 10, 15, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
  min-height: 80px;
  align-items: center;
}

.cooldown-pill {
  background: rgba(247, 166, 0, 0.12);
  border: 1px solid rgba(247, 166, 0, 0.3);
  color: var(--accent-gold);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(247, 166, 0, 0.15);
}

.empty-cooldown {
  color: var(--text-muted);
  font-size: 0.84rem;
  width: 100%;
  text-align: center;
}

/* Terminal Log */
.terminal-log-box {
  background: rgba(8, 10, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 16px;
  height: 220px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.log-line {
  color: #A0AEC0;
}
.log-line.entry { color: var(--color-green); font-weight: 600; }
.log-line.exit { color: var(--accent-gold); font-weight: 600; }
.log-line.error { color: var(--color-red); }

/* ==========================================================================
   Chart & Indicators
   ========================================================================== */
.chart-header-bar {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-select-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #FFF;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  cursor: pointer;
}

.timeframe-buttons {
  display: flex;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.tf-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}
.tf-btn.active {
  background: var(--accent-gold);
  color: #000;
}

.chart-indicators-legend {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.line-cyan { width: 12px; height: 3px; background: var(--color-cyan); border-radius: 2px; }
.line-gold { width: 12px; height: 3px; background: var(--accent-gold); border-radius: 2px; }
.line-purple { width: 12px; height: 3px; background: var(--color-purple); border-radius: 2px; }

.chart-wrapper {
  padding: 12px;
  height: 480px;
  display: flex;
  flex-direction: column;
}

.tv-chart-box {
  flex: 3;
  width: 100%;
}

.rsi-chart-box {
  flex: 1;
  width: 100%;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Subtabs Navigation (Segmented Liquid Glass Controller)
   ========================================================================== */
.sub-nav-bar {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(12, 16, 24, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  box-shadow: var(--glass-shadow);
  margin-bottom: 20px;
  overflow-x: auto;
}

.sub-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.sub-nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFF;
}

.sub-nav-btn.active {
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.22), rgba(247, 166, 0, 0.08));
  color: var(--accent-gold);
  border: 1px solid rgba(247, 166, 0, 0.4);
  box-shadow: var(--glass-shadow-indicator), 0 0 14px rgba(247, 166, 0, 0.2);
}

.subtab-pane {
  display: none;
}
.subtab-pane.active {
  display: block;
}

/* ==========================================================================
   Forms & Settings Layout
   ========================================================================== */
.settings-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.settings-main-col {
  padding: 24px;
}

.settings-side-col {
  padding: 24px;
}

.settings-form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-section {
  background: rgba(0, 0, 0, 0.22);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #FFF;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: var(--bg-input-focus);
  box-shadow: 0 0 10px rgba(247, 166, 0, 0.15);
}

.field-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Tags Input */
.tags-input-wrapper {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  transition: border-color 0.2s ease;
}

.tags-input-wrapper:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(247, 166, 0, 0.15);
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-item {
  background: rgba(247, 166, 0, 0.15);
  border: 1px solid rgba(247, 166, 0, 0.35);
  color: var(--accent-gold);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-item.deny {
  background: rgba(246, 70, 93, 0.15);
  border-color: rgba(246, 70, 93, 0.35);
  color: var(--color-red);
}

.tag-remove {
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.72rem;
}
.tag-remove:hover {
  opacity: 1;
}

.tags-text-input {
  flex: 1;
  min-width: 140px;
  background: transparent;
  border: none;
  color: #FFF;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 4px;
}
.tags-text-input:focus {
  outline: none;
}

/* Quick Percent Row */
.quick-percent-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.btn-pct {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pct:hover {
  background: rgba(247, 166, 0, 0.15);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

/* Manual Trade Box */
.manual-trade-box {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.side-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.side-btn {
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  opacity: 0.6;
}

.side-btn.buy.active {
  background: var(--color-green);
  color: #000;
  opacity: 1;
}

.side-btn.sell.active {
  background: var(--color-red);
  color: #FFF;
  opacity: 1;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: #181E29;
  border: 1px solid var(--border-color);
  color: #FFF;
  font-size: 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease-out;
}

.toast.success { border-color: var(--color-green); color: var(--color-green); }
.toast.error { border-color: var(--color-red); color: var(--color-red); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Mobile & Tablet Responsive Adaptation (iOS / Android / Tablets)
   ========================================================================== */

/* Tablets & Medium Screens (<= 1080px) */
@media (max-width: 1080px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .content-split-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Mobile & Tablet Responsive Design (State of the art mobile UX)
   ========================================================================== */

@media (max-width: 1024px) {
  .content-split-2 {
    flex-direction: column;
    gap: 16px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  /* Header */
  .top-nav {
    min-height: 56px;
    padding: 8px 12px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 999;
  }

  .nav-brand {
    gap: 8px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    display: none;
  }

  .ticker-tape {
    display: none;
  }

  .nav-actions {
    gap: 6px;
    display: flex;
    align-items: center;
  }

  .api-status-badge {
    display: none;
  }

  .quick-equity-pill {
    padding: 4px 8px;
    font-size: 0.74rem;
    background: rgba(14, 203, 129, 0.12);
    border-color: rgba(14, 203, 129, 0.25);
  }
  .quick-equity-pill .pill-label {
    display: none;
  }
  .quick-equity-pill .pill-value {
    font-size: 0.82rem;
  }

  .btn-bot-status {
    padding: 5px 10px;
    font-size: 0.74rem;
  }
  #botBtnText {
    display: none;
  }

  #autoRefreshInterval {
    display: none;
  }

  /* App Layout & Bottom Floating Glass Navigation Dock */
  .app-layout {
    flex-direction: column;
    min-height: auto;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 62px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(11, 14, 20, 0.88);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-right: none;
    z-index: 1000;
    flex-direction: row;
    align-items: center;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.7), var(--glass-shadow);
  }

  .sidebar-menu {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    gap: 4px;
  }

  .nav-item {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    font-size: 0.65rem;
    font-weight: 600;
    gap: 3px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    position: relative;
  }

  .nav-item i {
    font-size: 1.1rem;
    width: auto;
  }

  .nav-item span {
    font-size: 0.64rem;
    white-space: nowrap;
  }

  .nav-item .nav-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 18px);
    font-size: 0.58rem;
    padding: 1px 4px;
    min-width: 15px;
    height: 15px;
    line-height: 13px;
  }

  .nav-item.active {
    background: rgba(247, 166, 0, 0.14);
    color: var(--accent-gold);
    box-shadow: inset 0 0 0 1px rgba(247, 166, 0, 0.35);
  }

  .sidebar-footer {
    display: none;
  }

  /* Main Content Area */
  .main-content {
    padding: 12px;
    padding-bottom: 84px;
    overflow-x: hidden;
  }

  /* Metric Cards Grid on Mobile */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }

  .metrics-grid .metric-card:first-child {
    grid-column: 1 / -1;
  }

  .metric-card {
    padding: 12px 14px;
    min-height: 104px;
  }

  .metric-card .card-value {
    font-size: 1.15rem;
  }

  .metric-card .card-title {
    font-size: 0.72rem;
  }

  /* Status Banner */
  .bot-status-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 12px;
  }

  .banner-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .banner-info {
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.76rem;
  }

  .banner-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .banner-right .btn {
    width: 100%;
    justify-content: center;
    padding: 8px;
    font-size: 0.76rem;
  }

  /* Cards & Split Sections */
  .card {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .card-header-left {
    width: 100%;
    justify-content: space-between;
  }

  .search-input-wrap {
    width: 100% !important;
  }

  .content-split-2 {
    flex-direction: column;
    gap: 12px;
  }

  /* Sub Navigation Tabs */
  .sub-nav-bar {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 4px;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sub-nav-bar::-webkit-scrollbar {
    display: none;
  }

  .sub-nav-btn {
    padding: 7px 12px;
    font-size: 0.74rem;
    flex-shrink: 0;
  }

  /* Touch-friendly Tables */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    border-radius: var(--radius-sm);
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  /* Chart Controls */
  .chart-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .chart-select-group {
    width: 100%;
  }
  .chart-select-group .custom-select {
    width: 100%;
  }

  .chart-engine-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
  }

  .timeframe-buttons {
    width: 100%;
    overflow-x: auto;
    display: flex;
    justify-content: space-between;
    padding: 2px;
  }
  .tf-btn {
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .chart-indicators-legend {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    flex-wrap: wrap;
    gap: 6px;
  }

  #tvProWrapper,
  #tradingview_widget_container {
    height: 380px !important;
  }

  /* Settings Form */
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .quick-percent-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }

  .btn-pct {
    padding: 8px 4px;
    font-size: 0.72rem;
  }

  /* Toast for Mobile */
  .toast-container {
    bottom: 74px;
    left: 12px;
    right: 12px;
  }
  .toast {
    width: 100%;
  }
}

/* Extra Small Phones (<= 420px) */
@media (max-width: 420px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid .metric-card:first-child {
    grid-column: auto;
  }
  .brand-title {
    font-size: 0.96rem;
  }
}

/* ==========================================================================
   Ambient Custom Wallpaper & Video Background Engine
   ========================================================================== */
.custom-bg-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--bg-main);
}

.custom-bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
  transition: filter 0.3s ease;
  pointer-events: none;
}

.custom-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  transition: filter 0.3s ease;
  pointer-events: none;
}

/* Ambient Gradient Presets */
.custom-bg-wrapper.bg-gradient-cyberpunk_grid {
  background: 
    linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px),
    radial-gradient(ellipse at 80% 20%, rgba(121, 40, 202, 0.25), transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(0, 212, 255, 0.2), transparent 60%),
    #070A10;
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%, 100% 100%;
}

.custom-bg-wrapper.bg-gradient-deep_nebula {
  background: 
    radial-gradient(circle at 30% 40%, rgba(168, 85, 247, 0.3), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(14, 203, 129, 0.2), transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(0, 212, 255, 0.25), transparent 60%),
    #05080E;
}

.custom-bg-wrapper.bg-gradient-gold_stream {
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(247, 166, 0, 0.25), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 107, 0, 0.2), transparent 55%),
    #080A10;
}

/* Darkness & Readability Protection Overlay */
.custom-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-color: rgba(7, 10, 16, 0.75);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background-color 0.25s ease;
  pointer-events: none;
}

/* Ambient Glow Orbs */
.custom-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 2;
  pointer-events: none;
}
.custom-bg-glow.glow-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(247, 166, 0, 0.35), transparent 70%);
  animation: floatGlow1 12s ease-in-out infinite alternate;
}
.custom-bg-glow.glow-2 {
  width: 600px;
  height: 600px;
  bottom: -200px;
  left: -150px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.25), transparent 70%);
  animation: floatGlow2 14s ease-in-out infinite alternate;
}

@keyframes floatGlow1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, 80px) scale(1.15); }
}
@keyframes floatGlow2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, -60px) scale(1.2); }
}

/* Wallpaper Preset Grid & Cards */
.wallpaper-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.preset-card {
  border-radius: var(--radius-md);
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preset-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.preset-card.active {
  border-color: #F7A600;
  background: rgba(247, 166, 0, 0.12);
  box-shadow: 0 0 16px rgba(247, 166, 0, 0.35);
}

.preset-thumb {
  width: 100%;
  height: 60px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  position: relative;
  overflow: hidden;
}

.preset-thumb.preset-liquid-waves {
  background: linear-gradient(135deg, #0A1128, #1C2541, #3A86FF);
}
.preset-thumb.preset-cyberpunk {
  background: linear-gradient(135deg, #050505, #7928CA, #00D4FF);
}
.preset-thumb.preset-nebula {
  background: linear-gradient(135deg, #10002B, #240046, #7B2CBF, #00F0FF);
}
.preset-thumb.preset-gold {
  background: linear-gradient(135deg, #2A1800, #F7A600, #FF6B00);
}
.preset-thumb.preset-obsidian {
  background: #0D1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.preset-video-badge {
  color: #FFF;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  font-size: 1.4rem;
}

.preset-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.preset-info strong {
  font-size: 0.74rem;
  color: #FFF;
  white-space: nowrap;
}
.preset-info span {
  font-size: 0.64rem;
  color: #8B94A5;
}

.file-upload-dropzone {
  border: 2px dashed rgba(0, 212, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 18px 12px;
  text-align: center;
  background: rgba(0, 212, 255, 0.04);
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 4px;
}

.file-upload-dropzone:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: #00D4FF;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
}

/* ==========================================================================
   Fintech Terminal Pro — Luxury Polish, Micro-Interactions & Perfection
   ========================================================================== */

/* 1. Global High-DPI Anti-Aliasing & Text Rendering */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 2. Custom Slim Obsidian Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(11, 14, 20, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(247, 166, 0, 0.4);
}

/* 3. Metric Card Progress & Luxury Hover Glow */
.metric-card {
  position: relative;
  overflow: hidden;
}
.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: all 0.3s ease;
}
.metric-card:hover::before {
  background: linear-gradient(90deg, transparent, rgba(247, 166, 0, 0.6), transparent);
}

.metric-slot-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  margin-top: 6px;
  overflow: hidden;
  position: relative;
}
.metric-slot-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #0ECB81, #F7A600);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 4. Table Sticky Header & Hover Polish */
.table-container {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.data-table thead th {
  position: sticky;
  top: 0;
  background: #12161F;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #8B94A5;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.data-table tbody tr {
  transition: background-color 0.15s ease;
}
.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.035);
}
.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

/* 5. Live Price Flashes */
.flash-up {
  color: #0ECB81 !important;
  text-shadow: 0 0 10px rgba(14, 203, 129, 0.5);
  transition: color 0.1s ease;
}
.flash-down {
  color: #F6465D !important;
  text-shadow: 0 0 10px rgba(246, 70, 93, 0.5);
  transition: color 0.1s ease;
}

/* 6. Strategy Presets Visual Polish */
.strategy-presets-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.preset-strategy-btn {
  flex: 1 1 200px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 22, 31, 0.7);
  backdrop-filter: blur(12px);
  color: #FFF;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}
.preset-strategy-btn:hover {
  border-color: rgba(247, 166, 0, 0.4);
  background: rgba(247, 166, 0, 0.06);
  transform: translateY(-2px);
}
.preset-strategy-btn.active {
  border-color: #F7A600;
  background: rgba(247, 166, 0, 0.12);
  box-shadow: 0 0 20px rgba(247, 166, 0, 0.25);
}
.preset-strategy-btn .preset-name {
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preset-strategy-btn .preset-desc {
  font-size: 0.74rem;
  color: #8B94A5;
  line-height: 1.3;
}

/* 7. Action Button Micro-Interactions */
.btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary:hover {
  box-shadow: 0 0 16px rgba(247, 166, 0, 0.4);
}
.btn-danger:hover {
  box-shadow: 0 0 16px rgba(246, 70, 93, 0.4);
}
.btn-success:hover {
  box-shadow: 0 0 16px rgba(14, 203, 129, 0.4);
}

/* ==========================================================================
   Quantum AI Advisor & Portfolio Analyst Chat Styles
   ========================================================================== */
.ai-chat-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 110px);
  min-height: 540px;
  padding: 0 !important;
  overflow: hidden;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 19, 28, 0.6);
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ai-avatar-glow {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(121, 40, 202, 0.35));
  border: 1.5px solid rgba(0, 212, 255, 0.55);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #00D4FF;
}

.ai-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-title-row h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFF;
}
.ai-subtitle {
  font-size: 0.76rem;
  color: #8B94A5;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.ai-quick-prompts-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(11, 14, 20, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}
.ai-quick-prompts-bar::-webkit-scrollbar {
  display: none;
}

.quick-prompt-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.quick-prompts-list {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}
.ai-prompt-pill {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #C0C7D5;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-prompt-pill:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.4);
  color: #FFF;
  transform: translateY(-1px);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ai-message-row {
  display: flex;
  gap: 12px;
  max-width: 86%;
  animation: fadeIn 0.25s ease-out;
}
.ai-message-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.ai-message-row.ai {
  align-self: flex-start;
}

.ai-message-row .msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.ai-message-row.user .msg-avatar {
  background: linear-gradient(135deg, #F7A600, #FF6B00);
  color: #000;
  box-shadow: 0 0 10px rgba(247, 166, 0, 0.3);
}
.ai-message-row.ai .msg-avatar {
  background: linear-gradient(135deg, #00D4FF, #7928CA);
  color: #FFF;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.35);
}

.ai-message-row .msg-content {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  position: relative;
}
.ai-message-row.ai .msg-content {
  background: rgba(18, 22, 31, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
}
.ai-message-row.user .msg-content {
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.2), rgba(255, 107, 0, 0.12));
  border: 1px solid rgba(247, 166, 0, 0.4);
  color: #FFF;
}

.msg-sender {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-cyan);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.msg-model {
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #00D4FF;
}

.msg-text {
  word-break: break-word;
}
.msg-text p {
  margin-bottom: 8px;
}
.msg-text p:last-child {
  margin-bottom: 0;
}
.msg-text ul, .msg-text ol {
  margin: 6px 0 8px 18px;
}
.msg-text strong {
  color: #FFF;
  font-weight: 700;
}
.msg-text code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #F7A600;
}

.msg-time {
  font-size: 0.65rem;
  color: #64748B;
  text-align: right;
  margin-top: 6px;
}

.ai-typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
}
.ai-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00D4FF;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

.ai-chat-input-row {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 19, 28, 0.7);
}

.ai-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 10px 8px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ai-input-wrap:focus-within {
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
}

.ai-input-wrap textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: #FFF;
  font-family: var(--font-main);
  font-size: 0.92rem;
  resize: none;
  outline: none;
  max-height: 120px;
  min-height: 24px;
}

.btn-send-ai {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00D4FF, #0099FF);
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-send-ai:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.4);
}
.btn-send-ai:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ai-input-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  color: #64748B;
  margin-top: 6px;
  padding: 0 4px;
}

/* ==========================================================================
   Quantum Market Forecast & Technical Breakdown Panel
   ========================================================================== */
.market-forecast-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 19, 28, 0.65);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.market-forecast-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00D4FF, #7928CA, transparent);
}

.forecast-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.forecast-verdict-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFF;
  transition: all 0.3s ease;
}
.forecast-verdict-pill.green {
  background: rgba(14, 203, 129, 0.15);
  border-color: rgba(14, 203, 129, 0.4);
  color: #0ECB81;
  box-shadow: 0 0 16px rgba(14, 203, 129, 0.25);
}
.forecast-verdict-pill.red {
  background: rgba(246, 70, 93, 0.15);
  border-color: rgba(246, 70, 93, 0.4);
  color: #F6465D;
  box-shadow: 0 0 16px rgba(246, 70, 93, 0.25);
}
.forecast-verdict-pill.gold {
  background: rgba(247, 166, 0, 0.15);
  border-color: rgba(247, 166, 0, 0.4);
  color: #F7A600;
  box-shadow: 0 0 16px rgba(247, 166, 0, 0.25);
}

.verdict-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulseDot 1.5s infinite;
}

.confidence-gauge-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 110px;
}
.confidence-label {
  font-size: 0.72rem;
  color: #8B94A5;
}
.confidence-label b {
  color: #FFF;
}
.confidence-bar-bg {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.confidence-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #00D4FF, #0ECB81);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.forecast-target-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(18, 22, 31, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.forecast-target-card:hover {
  transform: translateY(-2px);
}
.forecast-target-card.green-border { border-top: 2px solid #0ECB81; }
.forecast-target-card.cyan-border { border-top: 2px solid #00D4FF; }
.forecast-target-card.gold-border { border-top: 2px solid #F7A600; }
.forecast-target-card.purple-border { border-top: 2px solid #A855F7; }

.target-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.target-label {
  font-size: 0.74rem;
  color: #8B94A5;
  display: flex;
  align-items: center;
  gap: 5px;
}
.target-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
.target-badge.green { background: rgba(14, 203, 129, 0.15); color: #0ECB81; }
.target-badge.cyan { background: rgba(0, 212, 255, 0.15); color: #00D4FF; }
.target-badge.gold { background: rgba(247, 166, 0, 0.15); color: #F7A600; }
.target-badge.purple { background: rgba(168, 85, 247, 0.15); color: #A855F7; }

.target-price {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 4px;
}
.target-sub {
  font-size: 0.7rem;
  color: #64748B;
}

.forecast-reason-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(18, 22, 31, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.reason-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.reason-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.reason-card-desc {
  font-size: 0.74rem;
  color: #94A3B8;
  line-height: 1.45;
}

/* ==========================================================================
   FUTURES 2X TERMINAL STYLES
   ========================================================================== */
.futures-hero-banner {
  background: linear-gradient(135deg, rgba(247, 166, 0, 0.08), rgba(168, 85, 247, 0.08), rgba(18, 22, 31, 0.7));
  border: 1px solid rgba(247, 166, 0, 0.3);
  box-shadow: 0 0 25px rgba(247, 166, 0, 0.08);
}

.futures-side-selector .side-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8B94A5;
  transition: all 0.25s ease;
  cursor: pointer;
}

.futures-side-selector .side-btn.buy.active {
  background: linear-gradient(135deg, rgba(14, 203, 129, 0.25), rgba(14, 203, 129, 0.1));
  border-color: #0ECB81;
  color: #0ECB81;
  box-shadow: 0 0 15px rgba(14, 203, 129, 0.2);
}

.futures-side-selector .side-btn.sell.active {
  background: linear-gradient(135deg, rgba(246, 70, 93, 0.25), rgba(246, 70, 93, 0.1));
  border-color: #F6465D;
  color: #F6465D;
  box-shadow: 0 0 15px rgba(246, 70, 93, 0.2);
}



