@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #080b11;
  --bg-secondary: #0f1522;
  --bg-tertiary: #172033;
  --bg-card: rgba(15, 21, 34, 0.82);
  --bg-card-hover: rgba(23, 32, 51, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --color-bull: #00e676;
  --color-bull-glow: rgba(0, 230, 118, 0.25);
  --color-bear: #ff3366;
  --color-bear-glow: rgba(255, 51, 102, 0.25);
  --color-accent: #00d2ff;
  --color-gold: #ffb703;
  --color-purple: #9d4edd;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.06);

  /* Market Accent Defaults (Crypto) */
  --market-accent: #f7931a;
  --market-accent-secondary: #00d2ff;
  --market-glow: rgba(247, 147, 26, 0.25);
  --chart-bg: #0d121c;
}

/* 1. CRYPTO THEME */
body[data-market="crypto"] {
  --market-accent: #f7931a;
  --market-accent-secondary: #00d2ff;
  --market-glow: rgba(247, 147, 26, 0.25);
  --bg-primary: #090c13;
  --bg-secondary: #101624;
  --chart-bg: #0c121e;
}

/* 2. STOCKS THEME */
body[data-market="stocks"] {
  --market-accent: #2563eb;
  --market-accent-secondary: #00e676;
  --market-glow: rgba(37, 99, 235, 0.3);
  --bg-primary: #060c18;
  --bg-secondary: #0b152b;
  --chart-bg: #091224;
}

/* 3. FOREX THEME */
body[data-market="forex"] {
  --market-accent: #10b981;
  --market-accent-secondary: #06b6d4;
  --market-glow: rgba(16, 185, 129, 0.25);
  --bg-primary: #04100e;
  --bg-secondary: #0a1f1b;
  --chart-bg: #071714;
}

/* 4. COMMODITIES THEME */
body[data-market="commodities"] {
  --market-accent: #eab308;
  --market-accent-secondary: #f97316;
  --market-glow: rgba(234, 179, 8, 0.25);
  --bg-primary: #120e06;
  --bg-secondary: #1f180a;
  --chart-bg: #171207;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: 10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--market-glow) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.4s ease;
}

/* Header */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 22, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--market-accent), var(--market-accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 0 16px var(--market-glow);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, var(--market-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.market-tabs {
  display: flex;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-full);
  gap: 4px;
  border: 1px solid var(--border-color);
}

.market-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.market-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.market-tab.active {
  background: var(--market-accent);
  color: #000;
  box-shadow: 0 2px 12px var(--market-glow);
}

.nav-user-area {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  position: relative;
}

/* ============================================================
   COMBINED PROFILE ICON & ROLE BADGE
   ============================================================ */
.user-profile-menu-container {
  position: relative;
}

.combined-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  padding: 0.22rem 0.65rem 0.22rem 0.28rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
  user-select: none;
  max-width: 240px;
  overflow: hidden;
}

.combined-profile-badge:hover,
.combined-profile-badge.active {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--market-accent);
  box-shadow: 0 0 14px var(--market-glow);
}

.profile-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-circle img,
#userAvatarIcon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

#userAvatarIcon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.role-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb703;
  border: 2px solid #0f172a;
  position: absolute;
  bottom: -1px;
  right: -1px;
  z-index: 2;
}

.profile-info-block {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  overflow: hidden;
}

.profile-user-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.profile-dropdown-arrow {
  font-size: 0.65rem;
  color: var(--text-dim);
  transition: transform 0.2s ease;
  margin-left: 0.15rem;
}

.combined-profile-badge.active .profile-dropdown-arrow {
  transform: rotate(180deg);
}

/* ============================================================
   GOOGLE APPS GRID LAUNCHER (WAFFLE 9-DOTS)
   ============================================================ */
.google-grid-container {
  position: relative;
}

.google-grid-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  position: relative;
  z-index: 5;
  user-select: none;
}

.google-grid-btn:hover,
.google-grid-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: scale(1.05);
}

.google-grid-btn.active {
  background: rgba(0, 210, 255, 0.15);
  color: #00d2ff;
  border-color: rgba(0, 210, 255, 0.45);
  box-shadow: 0 0 14px var(--market-glow);
}

.google-grid-icon {
  transition: transform 0.25s ease;
  pointer-events: none;
}

.google-grid-btn:hover .google-grid-icon {
  transform: rotate(90deg);
}

/* Notification Bell & Dropdown */
.notification-bell-container {
  position: relative;
  display: flex;
  align-items: center;
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ff3366;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px rgba(255, 51, 102, 0.7);
  border: 1.5px solid #080b11;
  animation: pulseBadge 1.8s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); box-shadow: 0 0 6px rgba(255, 51, 102, 0.6); }
  50% { transform: scale(1.15); box-shadow: 0 0 14px rgba(255, 51, 102, 0.9); }
  100% { transform: scale(1); box-shadow: 0 0 6px rgba(255, 51, 102, 0.6); }
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(10, 15, 26, 0.99) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1000;
  overflow: hidden;
  animation: navDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.notification-body {
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notification-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  transition: all 0.2s ease;
}

.notification-item.pending {
  border-color: rgba(255, 183, 3, 0.35);
  background: rgba(255, 183, 3, 0.04);
}

.notification-item.resolved {
  border-color: rgba(0, 230, 118, 0.3);
  background: rgba(0, 230, 118, 0.03);
}

.notification-footer {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

/* Google Grid Dropdown Menu */
.google-grid-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 350px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(10, 15, 26, 0.99) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1000;
  overflow: hidden;
  animation: navDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes navDropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.google-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.grid-header-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.grid-view-toggle {
  display: flex;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.view-toggle-btn.active {
  background: var(--market-accent);
  color: #040810;
}

/* Viewport Modes: Grid (3x3) vs List */
.google-grid-viewport {
  max-height: 420px;
  overflow-y: auto;
}

.google-grid-viewport.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  padding: 0.85rem;
}

.google-grid-viewport.mode-grid .grid-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.65rem 0.35rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  gap: 0.35rem;
  border: 1px solid transparent;
}

.google-grid-viewport.mode-grid .grid-app-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.google-grid-viewport.mode-grid .app-icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease;
}

.google-grid-viewport.mode-grid .grid-app-item:hover .app-icon-tile {
  transform: scale(1.1);
}

.google-grid-viewport.mode-grid .app-item-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.google-grid-viewport.mode-grid .app-item-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.google-grid-viewport.mode-grid .app-item-sub {
  display: none;
}

/* List Mode */
.google-grid-viewport.mode-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem;
}

.google-grid-viewport.mode-list .grid-app-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  gap: 0.75rem;
  border: 1px solid transparent;
}

.google-grid-viewport.mode-list .grid-app-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.google-grid-viewport.mode-list .app-icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.google-grid-viewport.mode-list .app-item-info {
  display: flex;
  flex-direction: column;
}

.google-grid-viewport.mode-list .app-item-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f1f5f9;
}

.google-grid-viewport.mode-list .app-item-sub {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
}

/* Vibrant App Icon Tiles */
.app-icon-tile.icon-customizer { background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(236, 72, 153, 0.1)); border: 1px solid rgba(236, 72, 153, 0.35); }
.app-icon-tile.icon-tour { background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(168, 85, 247, 0.1)); border: 1px solid rgba(168, 85, 247, 0.35); }
.app-icon-tile.icon-brokers { background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1)); border: 1px solid rgba(16, 185, 129, 0.35); }
.app-icon-tile.icon-admin { background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.1)); border: 1px solid rgba(245, 158, 11, 0.35); }
.app-icon-tile.icon-status { background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(14, 165, 233, 0.1)); border: 1px solid rgba(14, 165, 233, 0.35); }
.app-icon-tile.icon-deploy { background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(249, 115, 22, 0.1)); border: 1px solid rgba(249, 115, 22, 0.35); }
.app-icon-tile.icon-popout { background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(6, 182, 212, 0.1)); border: 1px solid rgba(6, 182, 212, 0.35); }
.app-icon-tile.icon-signals { background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.1)); border: 1px solid rgba(59, 130, 246, 0.35); }
.app-icon-tile.icon-ledger { background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.1)); border: 1px solid rgba(99, 102, 241, 0.35); }
.app-icon-tile.icon-pump { background: linear-gradient(135deg, rgba(20, 241, 149, 0.28), rgba(153, 69, 255, 0.22)); border: 1px solid rgba(20, 241, 149, 0.45); }
.app-icon-tile.icon-cryptocom { background: linear-gradient(135deg, rgba(0, 45, 114, 0.45), rgba(0, 130, 255, 0.25)); border: 1px solid rgba(56, 189, 248, 0.45); }

.google-grid-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

.grid-footer-link {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fda4af;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.grid-footer-link:hover {
  color: #ffffff;
}

.grid-version-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
}

/* ============================================================
   GOOGLE ACCOUNT PROFILE CARD DROPDOWN
   ============================================================ */
.profile-dropdown-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 310px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(10, 15, 26, 0.99) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1000;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: navDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.25) 0%, rgba(255, 183, 3, 0.1) 100%);
  border: 2px solid rgba(255, 183, 3, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(255, 183, 3, 0.2);
  overflow: hidden;
}

.profile-card-avatar-large img,
#cardAvatarIcon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.profile-card-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card-email {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card-role-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.profile-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-card-status-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-card-status-item .status-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.profile-card-status-item .status-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-card-status-item .status-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f1f5f9;
}

.profile-card-status-item .status-desc {
  font-size: 0.62rem;
  color: var(--text-dim);
}

.profile-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
}

.profile-card-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.profile-card-btn.logout {
  background: rgba(255, 51, 102, 0.1);
  border-color: rgba(255, 51, 102, 0.3);
  color: #fda4af;
}

.profile-card-btn.logout:hover {
  background: rgba(255, 51, 102, 0.2);
  border-color: rgba(255, 51, 102, 0.5);
  color: #ffffff;
}

/* Preserved Role Pills */
.role-pill {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  text-transform: uppercase;
}

.role-pill.admin { background: rgba(255, 183, 3, 0.2); color: #ffb703; border: 1px solid rgba(255, 183, 3, 0.4); }
.role-pill.analyst { background: rgba(157, 78, 221, 0.2); color: #c77dff; border: 1px solid rgba(157, 78, 221, 0.4); }
.role-pill.trader { background: rgba(0, 210, 255, 0.2); color: #00d2ff; border: 1px solid rgba(0, 210, 255, 0.4); }
.role-pill.viewer { background: rgba(148, 163, 184, 0.2); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.4); }

/* Main Layout Grid */
.dashboard-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  padding: 1rem 1.5rem;
  flex: 1;
  max-width: 1920px;
  margin: 0 auto;
  width: 100%;
  transition: grid-template-columns 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-layout.layout-wide {
  grid-template-columns: 1fr 580px;
}

.dashboard-layout.layout-ultra {
  grid-template-columns: 1fr 700px;
}

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

.dashboard-layout.layout-chart-popped {
  grid-template-columns: 1fr;
}

.control-bar {
  grid-column: 1 / -1;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.asset-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.select-dropdown, .form-input, .form-select {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.select-dropdown:focus, .form-input:focus, .form-select:focus {
  border-color: var(--market-accent);
}

.timeframe-group, .indicator-toggle-group {
  display: flex;
  background: var(--bg-tertiary);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.tf-btn, .ind-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.tf-btn:hover, .ind-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tf-btn.active, .ind-btn.active {
  background: var(--market-accent);
  color: #000;
  font-weight: 700;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-bull);
  background: rgba(0, 230, 118, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-bull);
  box-shadow: 0 0 10px var(--color-bull);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

/* Main Chart Stage */
.chart-container-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* News Feed Wire Banner across Chart Top */
.chart-news-wire {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(10, 15, 26, 0.94);
  border-bottom: 1px solid var(--border-color);
  padding: 0 0.85rem;
  height: 38px;
  position: relative;
  z-index: 4;
  overflow: hidden;
  backdrop-filter: blur(8px);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.news-wire-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 51, 102, 0.15);
  color: #ff3366;
  border: 1px solid rgba(255, 51, 102, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-wire-badge .live-dot {
  width: 6px;
  height: 6px;
  background-color: #ff3366;
  box-shadow: 0 0 8px #ff3366;
}

.news-ticker-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent);
}

.chart-news-wire.hidden {
  display: none !important;
}

.news-ticker-track {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  white-space: nowrap;
  will-change: transform;
  animation: newsTickerScroll 75s linear infinite;
}

.news-ticker-viewport:hover .news-ticker-track,
.news-ticker-track.paused {
  animation-play-state: paused;
}

@keyframes newsTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.news-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.news-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.news-entity {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.news-entity.bloomberg   { background: rgba(255, 136, 0, 0.2); color: #ff9922; border: 1px solid rgba(255, 136, 0, 0.4); }
.news-entity.reuters     { background: rgba(255, 85, 0, 0.2); color: #ff6e22; border: 1px solid rgba(255, 85, 0, 0.4); }
.news-entity.cnbc        { background: rgba(0, 149, 235, 0.2); color: #38bdf8; border: 1px solid rgba(0, 149, 235, 0.4); }
.news-entity.wsj         { background: rgba(148, 163, 184, 0.2); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.4); }
.news-entity.marketwatch { background: rgba(0, 230, 118, 0.18); color: #00e676; border: 1px solid rgba(0, 230, 118, 0.35); }
.news-entity.ft          { background: rgba(253, 117, 103, 0.2); color: #fda4af; border: 1px solid rgba(253, 117, 103, 0.4); }
.news-entity.barrons     { background: rgba(225, 29, 72, 0.2); color: #fb7185; border: 1px solid rgba(225, 29, 72, 0.4); }
.news-entity.ibd         { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.news-entity.benzinga    { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.news-entity.forbes      { background: rgba(234, 179, 8, 0.2); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.4); }

.news-symbol {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--market-accent);
  font-size: 0.72rem;
}

.news-headline {
  font-weight: 500;
}

.news-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 2px;
}

.news-wire-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.news-wire-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.news-wire-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

#toggleNewsWireBarBtn.active {
  background: rgba(0, 210, 255, 0.15);
  color: #00d2ff;
  border-color: rgba(0, 210, 255, 0.4);
}

/* Sidebar & Cards: Scrollable independent column with Sensei & Chat */
.bot-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: start;
  position: sticky;
  top: 66px;
  height: calc(100vh - 84px);
  max-height: calc(100vh - 84px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 210, 255, 0.35) rgba(10, 15, 26, 0.5);
}

.bot-sidebar::-webkit-scrollbar {
  width: 6px;
}

.bot-sidebar::-webkit-scrollbar-track {
  background: rgba(10, 15, 26, 0.5);
  border-radius: var(--radius-full);
}

.bot-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-full);
}

.bot-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 210, 255, 0.65);
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Signal Banner */
.signal-banner {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.12), var(--market-glow));
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.signal-banner.bearish {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.12), rgba(255, 183, 3, 0.08));
  border-color: rgba(255, 51, 102, 0.35);
}

.signal-banner.neutral {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.12), rgba(157, 78, 221, 0.08));
  border-color: rgba(255, 183, 3, 0.35);
}

.signal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.signal-type {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.signal-type.bullish { color: var(--color-bull); }
.signal-type.bearish { color: var(--color-bear); }
.signal-type.neutral { color: #f59e0b; }

.confidence-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--market-accent);
}

.edu-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.edu-item {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--market-accent);
}

.edu-item.positive { border-left-color: var(--color-bull); }
.edu-item.warning { border-left-color: #f59e0b; }
.edu-item.danger { border-left-color: var(--color-bear); }

.edu-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  font-size: 0.8rem;
}

.edu-desc {
  color: var(--text-muted);
  line-height: 1.35;
  font-size: 0.75rem;
}

.trade-targets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.target-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  text-align: center;
}

.target-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 2px;
}

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

.target-val.entry { color: var(--market-accent); }
.target-val.sl { color: var(--color-bear); }
.target-val.tp { color: var(--color-bull); }

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-bull {
  background: var(--color-bull);
  color: #041b0e;
  box-shadow: 0 4px 15px var(--color-bull-glow);
}

.btn-bear {
  background: var(--color-bear);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--color-bear-glow);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background: var(--market-accent);
  color: #000;
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Telegram Interactive Card */
.telegram-card {
  background: #17212b;
  border: 1px solid rgba(34, 158, 217, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tg-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #229ed9;
  font-weight: 700;
}

.tg-freq-badge-btn {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.35);
  color: #00e676;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 0.22rem 0.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  margin-left: auto;
  font-family: var(--font-sans);
}
.tg-freq-badge-btn:hover {
  background: rgba(0, 230, 118, 0.25);
  border-color: #00e676;
  transform: translateY(-1px);
}
.tg-freq-badge-btn.glance {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}
.tg-freq-badge-btn.glance:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}
.tg-freq-badge-btn.hourly {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.35);
  color: #facc15;
}
.tg-freq-badge-btn.hourly:hover {
  background: rgba(250, 204, 21, 0.25);
  border-color: #facc15;
}

.tg-news-box {
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.tg-news-box:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.1);
}

.tg-bubble {
  background: #242f3d;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #f1f5f9;
}

.tg-inline-keyboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tg-btn {
  background: #2b394a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.tg-btn:hover {
  background: #229ed9;
  color: #fff;
}

.tg-btn.buy { border-left: 3px solid var(--color-bull); }
.tg-btn.sell { border-left: 3px solid var(--color-bear); }

/* Chat Container */
.bot-chat-container {
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-right: 0.3rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 210, 255, 0.25) transparent;
}

.chat-bubble {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.8rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.chat-bubble.bot {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
}

.chat-bubble.user {
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: #e0f2fe;
  align-self: flex-end;
  max-width: 85%;
}

.chat-bubble .timestamp {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Bottom Panel: Positions & Ledger */
.bottom-panel {
  grid-column: 1 / -1;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.custom-table th {
  padding: 0.6rem 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
}

/* Status Badges & Time-Based Pills */
.status-badge {
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-badge.active { background: rgba(0, 230, 118, 0.15); color: var(--color-bull); border: 1px solid rgba(0, 230, 118, 0.3); }
.status-badge.expiring { background: rgba(255, 183, 3, 0.15); color: var(--color-gold); border: 1px solid rgba(255, 183, 3, 0.3); }
.status-badge.expired { background: rgba(255, 51, 102, 0.15); color: var(--color-bear); border: 1px solid rgba(255, 51, 102, 0.3); }
.status-badge.frozen { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.status-badge.open { background: rgba(0, 210, 255, 0.15); color: #00d2ff; }
.status-badge.won { background: rgba(0, 230, 118, 0.15); color: var(--color-bull); }
.status-badge.lost { background: rgba(255, 51, 102, 0.15); color: var(--color-bear); }

/* Market Permission Chips */
.market-perm-chip {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  margin-right: 2px;
  color: var(--text-muted);
}

/* ==========================================================================
   Modals & Robust Admin Center
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-card.wide {
  max-width: 960px;
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

.close-modal-btn:hover { color: #fff; }

/* Admin Center Tabs */
.admin-tabs {
  display: flex;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  border: 1px solid var(--border-color);
}

.admin-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.admin-tab-btn.active {
  background: var(--market-accent);
  color: #000;
}

.admin-tab-pane {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.admin-tab-pane.active {
  display: flex;
}

.invite-box {
  background: var(--bg-primary);
  border: 1px dashed var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.customizer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.color-picker-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  padding: 0.75rem;
  border-radius: var(--radius-md);
}

.color-input {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}

/* ============================================================
   MOBILE & TABLET RESPONSIVE SUITE — OPTION A (DOCKED TABS)
   Desktop (min-width: 1101px) is 100% untouched and preserved.
   ============================================================ */

/* Desktop hide guarantee */
.mobile-bottom-nav,
.mobile-chart-quick-bar {
  display: none !important;
}

@media (max-width: 1100px) {
  /* Show Mobile Bottom Navigation Dock */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(10, 15, 26, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.7);
  }

  .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px 0;
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
  }

  .mobile-nav-btn .mobile-nav-icon {
    font-size: 1.15rem;
    line-height: 1;
    transition: transform 0.2s ease;
  }

  .mobile-nav-btn .mobile-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3px;
  }

  .mobile-nav-btn:hover {
    color: #cbd5e1;
  }

  .mobile-nav-btn.active {
    color: var(--market-accent, #00d2ff);
  }

  .mobile-nav-btn.active .mobile-nav-icon {
    transform: scale(1.18);
    filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.6));
  }

  /* Floating Quick Long/Short Bar over Chart View */
  .mobile-chart-quick-bar {
    display: flex !important;
    position: absolute;
    bottom: 12px;
    left: 14px;
    right: 14px;
    gap: 10px;
    z-index: 15;
    pointer-events: auto;
  }

  .mobile-quick-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.6rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(14px);
    transition: all 0.15s ease;
  }

  .mobile-quick-btn.buy {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.92) 0%, rgba(0, 180, 90, 0.98) 100%);
    border: 1px solid rgba(0, 255, 130, 0.6);
    color: #040810;
  }

  .mobile-quick-btn.sell {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.92) 0%, rgba(200, 30, 75, 0.98) 100%);
    border: 1px solid rgba(255, 100, 140, 0.6);
    color: #ffffff;
  }

  .mobile-quick-btn:active {
    transform: scale(0.96);
  }

  /* Dashboard Layout on Mobile / Tablet */
  .dashboard-layout {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr !important;
    padding: 0.5rem 0.65rem calc(60px + 1rem) !important;
    gap: 0.65rem !important;
    min-height: calc(100vh - 60px);
  }

  .chart-column {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
  }

  .chart-column.keep-in-frame {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    max-height: none !important;
  }

  .bot-sidebar {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: visible;
    width: 100% !important;
    padding-right: 0 !important;
  }

  /* Sleek Navbar on Mobile / Tablet */
  .navbar {
    padding: 0.5rem 0.75rem !important;
    gap: 0.45rem !important;
    flex-wrap: wrap !important;
  }

  .brand {
    gap: 0.5rem;
  }

  .brand-text {
    font-size: 0.95rem !important;
  }

  .market-tabs {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0 !important;
    gap: 0.35rem !important;
    width: 100% !important;
    justify-content: flex-start !important;
    order: 3;
  }

  .market-tabs::-webkit-scrollbar {
    display: none;
  }

  .market-tab {
    padding: 0.28rem 0.65rem !important;
    font-size: 0.72rem !important;
    flex-shrink: 0 !important;
  }

  /* Sleek Control Bar on Mobile */
  .control-bar {
    padding: 0.45rem 0.65rem !important;
    gap: 0.4rem !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }

  .control-bar::-webkit-scrollbar {
    display: none;
  }

  .asset-selector {
    flex-shrink: 0;
  }

  .asset-selector label {
    display: none;
  }

  .timeframe-group {
    flex-shrink: 0;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .tf-btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.72rem !important;
  }

  /* Hide Desktop-only items on mobile to keep interface lightning-fast */
  #toggleKeepInFrameBtn,
  #cycleLayoutWidthBtn,
  #popoutChartBtn,
  #toggleNewsWireBarBtn,
  .live-badge {
    display: none !important;
  }

  /* -------------------------------------------------------------
     OPTION A: DOCKED TAB VIEW SWITCHING
     ------------------------------------------------------------- */

  /* 1. CHART VIEW (DEFAULT) */
  .dashboard-layout:not([data-mobile-view]),
  .dashboard-layout[data-mobile-view="chart"] {
    display: flex !important;
    flex-direction: column;
  }

  .dashboard-layout:not([data-mobile-view]) #mainChartCard,
  .dashboard-layout[data-mobile-view="chart"] #mainChartCard {
    display: flex !important;
    height: calc(100vh - 185px) !important;
    min-height: 380px !important;
    position: relative !important;
    width: 100% !important;
  }

  .dashboard-layout:not([data-mobile-view]) #advancedChartContainer,
  .dashboard-layout[data-mobile-view="chart"] #advancedChartContainer {
    height: 100% !important;
    min-height: 340px !important;
  }

  .dashboard-layout:not([data-mobile-view]) #deskSlotUnderChart,
  .dashboard-layout:not([data-mobile-view]) .bot-sidebar,
  .dashboard-layout[data-mobile-view="chart"] #deskSlotUnderChart,
  .dashboard-layout[data-mobile-view="chart"] .bot-sidebar {
    display: none !important;
  }

  /* 2. TRADE VIEW */
  .dashboard-layout[data-mobile-view="trade"] {
    display: flex !important;
    flex-direction: column;
  }

  .dashboard-layout[data-mobile-view="trade"] #mainChartCard,
  .dashboard-layout[data-mobile-view="trade"] .bot-sidebar {
    display: none !important;
  }

  .dashboard-layout[data-mobile-view="trade"] #deskSlotUnderChart {
    display: block !important;
    width: 100% !important;
  }

  .dashboard-layout[data-mobile-view="trade"] .desk-cockpit-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  /* 3. SENSEI AI MENTOR VIEW */
  .dashboard-layout[data-mobile-view="sensei"] {
    display: flex !important;
    flex-direction: column;
  }

  .dashboard-layout[data-mobile-view="sensei"] #mainChartCard,
  .dashboard-layout[data-mobile-view="sensei"] #deskSlotUnderChart {
    display: none !important;
  }

  .dashboard-layout[data-mobile-view="sensei"] .bot-sidebar {
    display: flex !important;
    flex-direction: column;
    height: calc(100vh - 180px) !important;
    max-height: none !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  .dashboard-layout[data-mobile-view="sensei"] #trendSignalCard,
  .dashboard-layout[data-mobile-view="sensei"] #alertWebhookCard {
    display: none !important;
  }

  .dashboard-layout[data-mobile-view="sensei"] #senseiMentorCard {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100% !important;
    padding: 0.85rem !important;
    overflow: hidden !important;
  }

  .dashboard-layout[data-mobile-view="sensei"] #botChatContainer {
    flex: 1 !important;
    min-height: 200px !important;
    max-height: none !important;
    overflow-y: auto !important;
  }

  /* 4. SIGNALS VIEW */
  .dashboard-layout[data-mobile-view="signals"] {
    display: flex !important;
    flex-direction: column;
  }

  .dashboard-layout[data-mobile-view="signals"] #mainChartCard,
  .dashboard-layout[data-mobile-view="signals"] #deskSlotUnderChart,
  .dashboard-layout[data-mobile-view="signals"] #senseiMentorCard {
    display: none !important;
  }

  .dashboard-layout[data-mobile-view="signals"] .bot-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
    height: calc(100vh - 180px) !important;
    max-height: none !important;
    overflow-y: auto !important;
    width: 100% !important;
  }

  .dashboard-layout[data-mobile-view="signals"] #trendSignalCard,
  .dashboard-layout[data-mobile-view="signals"] #alertWebhookCard {
    display: flex !important;
  }
}

/* Tablet Landscape Refinement (768px - 1100px) */
@media (min-width: 768px) and (max-width: 1100px) {
  .dashboard-layout[data-mobile-view="trade"] .desk-cockpit-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .dashboard-layout[data-mobile-view="trade"] .panel-actions {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   TRANSACTION & EXECUTION DESK (LIQUID GLASS STYLING)
   ============================================================ */
.transaction-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92) 0%, rgba(11, 16, 26, 0.96) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.transaction-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--market-accent), var(--market-accent-secondary), transparent);
  pointer-events: none;
}

.tx-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tx-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--text-main);
}

.tx-route-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(0, 210, 255, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(0, 210, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tx-dropdowns-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 0.5rem;
}

@media (max-width: 480px) {
  .tx-dropdowns-grid {
    grid-template-columns: 1fr;
  }
}

.tx-select-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tx-field-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.tx-select {
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.tx-select:hover, .tx-select:focus {
  border-color: var(--market-accent);
  box-shadow: 0 0 10px var(--market-glow);
  background: rgba(23, 32, 51, 0.95);
}

/* Share to Cost Calculator Box */
.calc-container {
  background: rgba(8, 12, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
}

.calc-box-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
}

.calc-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.7rem;
  transition: all 0.2s ease;
}

.calc-box:focus-within {
  border-color: var(--market-accent);
  box-shadow: 0 0 14px var(--market-glow);
  background: rgba(22, 30, 48, 0.95);
}

.calc-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
}

.calc-asset-unit {
  font-family: var(--font-mono);
  color: var(--market-accent);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
}

.calc-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.calc-prefix {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

.calc-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  outline: none;
}

.calc-input::placeholder {
  color: var(--text-dim);
  font-weight: 500;
}

.calc-box-subtext {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

.calc-swap-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.calc-swap-icon:hover {
  background: var(--market-accent);
  color: #040810;
  transform: rotate(180deg) scale(1.1);
  box-shadow: 0 0 12px var(--market-glow);
}

/* ============================================================
   BUBBLE-STYLE LIQUID GLASS BUTTONS
   ============================================================ */
.bubble-controls-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bubble-row-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.bubble-row-label span.note {
  color: var(--market-accent);
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: none;
}

.bubble-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

/* Base Liquid Glass Bubble */
.liquid-glass-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #e2e8f0;
  border-radius: var(--radius-full);
  cursor: pointer;
  user-select: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  
  /* Liquid Glass 3D Material */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0.09) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.5),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.45),
    0 4px 10px -2px rgba(0, 0, 0, 0.35);
}

/* Liquid Glossy Specular Reflection */
.liquid-glass-bubble::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 12%;
  right: 12%;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: var(--radius-full);
  pointer-events: none;
}

.liquid-glass-bubble:hover {
  transform: translateY(-2px) scale(1.04);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.75),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.5),
    0 6px 16px -2px var(--market-glow);
}

.liquid-glass-bubble:active, .liquid-glass-bubble.active {
  transform: translateY(1px) scale(0.96);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
  box-shadow: 
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Bubble Variant: Quick Steppers */
.liquid-glass-bubble.bubble-stepper {
  min-width: 42px;
  font-size: 0.74rem;
}

/* Bubble Variant: Portfolio Allocations (Gold Glow) */
.liquid-glass-bubble.bubble-pct {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.18) 0%, rgba(255, 183, 3, 0.04) 60%, rgba(255, 183, 3, 0.12) 100%);
  border-color: rgba(255, 183, 3, 0.35);
  color: #fef08a;
}

.liquid-glass-bubble.bubble-pct:hover {
  border-color: rgba(255, 183, 3, 0.65);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.8),
    0 6px 16px -2px rgba(255, 183, 3, 0.4);
}

.liquid-glass-bubble.bubble-pct.active {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.35) 0%, rgba(255, 183, 3, 0.2) 100%);
  color: #ffffff;
  border-color: #ffb703;
}

/* Bubble Variant: Sensei Risk Budgets (Cyan Glow) */
.liquid-glass-bubble.bubble-risk {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.18) 0%, rgba(0, 210, 255, 0.04) 60%, rgba(0, 210, 255, 0.12) 100%);
  border-color: rgba(0, 210, 255, 0.35);
  color: #67e8f9;
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
}

.liquid-glass-bubble.bubble-risk:hover {
  border-color: rgba(0, 210, 255, 0.65);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.8),
    0 6px 16px -2px rgba(0, 210, 255, 0.4);
}

.liquid-glass-bubble.bubble-risk.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.35) 0%, rgba(0, 210, 255, 0.2) 100%);
  color: #ffffff;
  border-color: #00d2ff;
}

/* Bubble Variant: Reset / Clear */
.liquid-glass-bubble.bubble-reset {
  background: rgba(255, 51, 102, 0.12);
  border-color: rgba(255, 51, 102, 0.3);
  color: #fda4af;
  min-width: 32px;
  padding: 0.35rem 0.55rem;
}

.liquid-glass-bubble.bubble-reset:hover {
  background: rgba(255, 51, 102, 0.25);
  border-color: rgba(255, 51, 102, 0.6);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

/* Bracket Metrics Box */
.tx-bracket-metrics {
  background: rgba(11, 16, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

@media (max-width: 500px) {
  .tx-bracket-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tx-metric-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: center;
}

.tx-metric-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tx-metric-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.tx-metric-value.bull { color: var(--color-bull); }
.tx-metric-value.bear { color: var(--color-bear); }
.tx-metric-value.accent { color: var(--color-accent); }
.tx-metric-value.gold { color: var(--color-gold); }

/* Liquid Glass Execution Action Buttons */
.tx-execute-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn-liquid-buy, .btn-liquid-sell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.btn-liquid-buy {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.25) 0%, rgba(0, 230, 118, 0.08) 50%, rgba(0, 230, 118, 0.18) 100%);
  border-color: rgba(0, 230, 118, 0.4);
  box-shadow: 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.5),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.4),
    0 6px 20px -4px var(--color-bull-glow);
}

.btn-liquid-buy::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 10%;
  right: 10%;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.btn-liquid-buy:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.38) 0%, rgba(0, 230, 118, 0.15) 100%);
  border-color: rgba(0, 230, 118, 0.7);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.75),
    0 10px 28px -4px rgba(0, 230, 118, 0.45);
}

.btn-liquid-buy:active {
  transform: translateY(1px) scale(0.98);
}

.btn-liquid-sell {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.25) 0%, rgba(255, 51, 102, 0.08) 50%, rgba(255, 51, 102, 0.18) 100%);
  border-color: rgba(255, 51, 102, 0.4);
  box-shadow: 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.5),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.4),
    0 6px 20px -4px var(--color-bear-glow);
}

.btn-liquid-sell::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 10%;
  right: 10%;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.btn-liquid-sell:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.38) 0%, rgba(255, 51, 102, 0.15) 100%);
  border-color: rgba(255, 51, 102, 0.7);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.75),
    0 10px 28px -4px rgba(255, 51, 102, 0.45);
}

.btn-liquid-sell:active {
  transform: translateY(1px) scale(0.98);
}

.btn-liquid-main-text {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-liquid-buy .btn-liquid-main-text { color: var(--color-bull); }
.btn-liquid-sell .btn-liquid-main-text { color: var(--color-bear); }

.btn-liquid-sub-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Detached Chart HUD Placeholder (when popped out) */
.detached-chart-hud {
  width: 100%;
  height: 602px;
  min-height: 590px;
  background: radial-gradient(circle at 50% 40%, rgba(0, 210, 255, 0.08) 0%, rgba(13, 18, 28, 0.98) 70%);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem;
  gap: 1.25rem;
  border: 1px dashed rgba(0, 210, 255, 0.3);
}

.detached-chart-icon-box {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-full);
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.25);
  animation: hudPulse 3s ease-in-out infinite;
}

@keyframes hudPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(0, 210, 255, 0.2); }
  50% { transform: scale(1.06); box-shadow: 0 0 45px rgba(0, 210, 255, 0.45); }
}

.detached-chart-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.detached-chart-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.5;
}

.detached-chart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ==========================================================================
   10. INTERACTIVE ONBOARDING TOUR & SPOT-CHECK FLASH QUIZ SYSTEM
   ========================================================================== */

/* Fullscreen Dimming Overlay with dynamic clip path */
.tour-backdrop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.86);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99980;
  pointer-events: auto;
  transition: clip-path 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Floating High-Tech Target Ring Indicator */
.tour-spotlight-ring {
  position: fixed;
  border-radius: 12px;
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.2), 0 0 35px rgba(0, 210, 255, 0.45);
  pointer-events: none;
  z-index: 99985;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  animation: spotlightGlowPulse 2.4s ease-in-out infinite;
}

@keyframes spotlightGlowPulse {
  0%, 100% { border-color: rgba(0, 210, 255, 0.9); box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.2), 0 0 30px rgba(0, 210, 255, 0.35); }
  50% { border-color: #6ee7b7; box-shadow: 0 0 0 6px rgba(110, 231, 183, 0.3), 0 0 45px rgba(110, 231, 183, 0.5); }
}

/* Floating Guided Tooltip Card */
.tour-tooltip-card {
  position: fixed;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: rgba(12, 17, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 40px rgba(0, 210, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99990;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.1rem;
  transition: top 0.32s cubic-bezier(0.16, 1, 0.3, 1), left 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  animation: tooltipEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tooltipEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header & Track Badging */
.tour-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tour-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tour-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tour-track-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(0, 210, 255, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(0, 210, 255, 0.25);
  width: fit-content;
}

.tour-step-counter {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.tour-btn-icon-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tour-btn-icon-close:hover {
  background: rgba(255, 51, 102, 0.2);
  color: var(--color-bear);
  border-color: rgba(255, 51, 102, 0.4);
}

/* Progress Bar */
.tour-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.tour-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), #6ee7b7);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
  transition: width 0.3s ease;
}

/* Tour Card Content */
.tour-card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tour-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Cognitive Balance Feature 1: TL;DR Takeaway Box for Attention-Challenged Users */
.tour-tldr-box {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.12), rgba(247, 147, 26, 0.08));
  border: 1px solid rgba(255, 183, 3, 0.3);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-size: 0.84rem;
  color: #ffedd5;
  line-height: 1.45;
}

.tour-tldr-box strong {
  color: #fff;
}

/* Main description text */
.tour-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0;
}

/* Cognitive Balance Feature 2: Expandable Deep-Dive Accordion for Information-Driven Users */
.tour-deep-dive {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 0.82rem;
}

.tour-deep-dive summary {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  background: rgba(0, 210, 255, 0.04);
  transition: background 0.2s;
}

.tour-deep-dive summary:hover {
  background: rgba(0, 210, 255, 0.1);
}

.tour-deep-dive-content {
  padding: 0.8rem 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-sans);
}

/* Interactive Pop-up Flash Quiz Container */
.tour-quiz-container {
  background: rgba(17, 24, 39, 0.9);
  border: 1px dashed rgba(157, 78, 221, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
}

.tour-quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #c084fc;
}

.tour-quiz-question {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.tour-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tour-quiz-opt-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  color: #e2e8f0;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.tour-quiz-opt-btn:hover:not(:disabled) {
  background: rgba(157, 78, 221, 0.15);
  border-color: rgba(157, 78, 221, 0.4);
  transform: translateX(4px);
}

.tour-quiz-opt-btn.correct {
  background: rgba(0, 230, 118, 0.15) !important;
  border-color: var(--color-bull) !important;
  color: #86efac !important;
  font-weight: 700;
}

.tour-quiz-opt-btn.incorrect {
  background: rgba(255, 51, 102, 0.15) !important;
  border-color: var(--color-bear) !important;
  color: #fca5a5 !important;
}

.tour-quiz-feedback {
  margin-top: 0.35rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid;
}

.tour-quiz-feedback.correct {
  border-left-color: var(--color-bull);
  color: #86efac;
}

.tour-quiz-feedback.incorrect {
  border-left-color: var(--color-bear);
  color: #fca5a5;
}

/* Tour Footer Navigation & Controls */
.tour-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tour-footer-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Master Quiz Toggle Control */
.tour-quiz-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.tour-quiz-toggle-label input[type="checkbox"] {
  accent-color: #9d4edd;
  cursor: pointer;
}

.tour-footer-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tour-btn-prev,
.tour-btn-next,
.tour-btn-finish {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.tour-btn-prev {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.tour-btn-prev:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tour-btn-next {
  background: linear-gradient(135deg, var(--color-accent), #0077b6);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.3);
}

.tour-btn-next:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.tour-btn-finish {
  background: linear-gradient(135deg, var(--color-bull), #059669);
  border: none;
  color: #064e3b;
  box-shadow: 0 4px 14px rgba(0, 230, 118, 0.35);
}

.tour-btn-finish:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ==========================================================================
   Track Selection Launcher Modal
   ========================================================================== */
.tour-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.tour-select-modal {
  width: min(840px, 100%);
  background: rgba(13, 19, 31, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.07);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.tour-select-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.tour-select-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tour-select-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.onboarding-tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.1rem;
}

.onboarding-track-card {
  background: rgba(18, 26, 43, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.onboarding-track-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.25s ease;
}

.onboarding-track-card:hover {
  background: rgba(24, 34, 56, 0.9);
  border-color: rgba(0, 210, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.6);
}

.onboarding-track-card:hover::before {
  background: linear-gradient(90deg, var(--color-accent), #6ee7b7);
}

.track-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.track-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.track-info-box {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.track-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.track-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.track-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.track-highlights-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: #94a3b8;
}

.track-highlights-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.track-highlights-list li::before {
  content: '▸';
  color: var(--color-accent);
}

.track-start-btn {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--color-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.onboarding-track-card:hover .track-start-btn {
  background: var(--color-accent);
  color: #090c13;
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.35);
}

/* Tour Complete Trophy Modal */
.tour-complete-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 1.5rem;
}

.tour-complete-icon {
  font-size: 3rem;
  animation: bounceTrophy 1.5s ease infinite alternate;
}

@keyframes bounceTrophy {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.tour-scorecard-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.4rem;
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.tour-scorecard-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.tour-scorecard-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-bull);
}

/* ============================================================
   UNIFIED IN-FRAME SYSTEM: CHART & EXECUTION DESK STACKED
   MIRRORS THE POP-OUT IN-FRAME DOCK SCROLL FUNCTIONALITY
   ============================================================ */
.chart-column {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  position: relative;
  align-self: start;
}

/* In-Frame Sticky Dock Lock: Both Chart and Desk stay pinned in frame when scrolling */
.chart-column.keep-in-frame {
  position: sticky;
  top: 66px;
  z-index: 25;
  height: calc(100vh - 84px);
  max-height: calc(100vh - 84px);
  display: flex;
  flex-direction: column;
}

/* In Pop-out Mode: Execution Desk sizes naturally */
.chart-column.keep-in-frame.popout-active,
.chart-column.keep-in-frame:has(.chart-popped-out) {
  height: auto;
  max-height: calc(100vh - 84px);
}

/* Chart Container Card: Flexes and fits stacked on page with Execution Desk */
.chart-container-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  flex: 1 1 auto;
  height: calc(100vh - 425px);
  min-height: 280px;
  max-height: 640px;
  transition: height 0.25s ease, min-height 0.25s ease;
}

.chart-container-card #advancedChartContainer {
  width: 100%;
  flex: 1 1 auto;
  height: 100%;
  min-height: 220px;
  display: block;
}

/* In Pop-out Mode: Execution Desk is housed inside chart card */
.chart-container-card.chart-popped-out {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: auto !important;
}

.chart-container-card.chart-popped-out.keep-in-frame {
  position: relative;
  top: auto;
}

/* Regular View: Execution Desk Row Under Chart (Fitted Cockpit) */
.desk-slot-under-chart {
  width: 100%;
  flex: 0 0 auto;
  position: relative;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.transaction-card.desk-same-size-layout {
  width: 100%;
  min-height: auto;
  height: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(9, 14, 24, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  gap: 0.45rem;
}

.transaction-card.desk-same-size-layout::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--market-accent), var(--market-accent-secondary), transparent);
  pointer-events: none;
}

.tx-cockpit-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  background: rgba(0, 210, 255, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: var(--radius-sm);
  margin-left: 0.45rem;
}

.tx-header-status {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tx-status-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.tx-status-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.tx-status-val {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-bull);
}

.desk-cockpit-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 0.9fr;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}

.cockpit-panel {
  background: rgba(11, 16, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.5rem;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.cockpit-panel .panel-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cockpit-panel .panel-title {
  color: var(--text-main);
}

.bubble-group {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.route-telemetry-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.route-telemetry-pill .telemetry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-bull);
  box-shadow: 0 0 6px var(--color-bull);
}

.desk-guardrail-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 210, 255, 0.06);
  border: 1px solid rgba(0, 210, 255, 0.2);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
}

.desk-guardrail-banner .guardrail-details {
  display: flex;
  flex-direction: column;
}

.guardrail-title {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

.guardrail-desc {
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* ============================================================
   STOP-LOSS CONFIGURATION & MANUAL/INCREMENTAL STEPPERS
   ============================================================ */
.sl-control-group {
  margin-top: 0.15rem;
}

.sl-stepper-box {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.5rem;
  transition: all 0.2s ease;
}

.sl-stepper-box:focus-within {
  border-color: var(--color-bear, #ff3366);
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.25);
  background: rgba(22, 30, 48, 0.95);
}

.sl-step-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1;
}

.sl-step-btn:hover {
  background: rgba(255, 51, 102, 0.25);
  border-color: var(--color-bear, #ff3366);
  color: #ff3366;
  transform: scale(1.08);
}

.sl-step-btn:active {
  transform: scale(0.92);
}

.sl-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.sl-prefix {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-bear, #ff3366);
}

.sl-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  outline: none;
  letter-spacing: -0.2px;
}

.sl-input::placeholder {
  color: var(--text-dim);
  font-weight: 500;
}

.sl-dir-toggle-btn {
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: #00d2ff;
  border-radius: var(--radius-sm);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sl-dir-toggle-btn:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: #00d2ff;
}

.sl-dir-toggle-btn.short {
  background: rgba(255, 51, 102, 0.12);
  border-color: rgba(255, 51, 102, 0.3);
  color: #ff3366;
}

.sl-dir-toggle-btn.short:hover {
  background: rgba(255, 51, 102, 0.25);
  border-color: #ff3366;
}

.bubble-cluster.sl-cluster {
  margin-top: 0.2rem;
}

.bubble-sl-pct {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.14) 0%, rgba(255, 51, 102, 0.04) 60%, rgba(255, 51, 102, 0.1) 100%);
  border-color: rgba(255, 51, 102, 0.3);
  color: #fca5a5;
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
}

.bubble-sl-pct:hover {
  border-color: rgba(255, 51, 102, 0.65);
  color: #ffffff;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 4px 12px rgba(255, 51, 102, 0.35);
}

.bubble-sl-pct.active {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.35) 0%, rgba(255, 51, 102, 0.2) 100%);
  color: #ffffff;
  border-color: #ff3366;
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

.bubble-sl-auto {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18) 0%, rgba(168, 85, 247, 0.05) 100%);
  border-color: rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
}

.bubble-sl-auto:hover {
  border-color: rgba(168, 85, 247, 0.65);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
}

.bubble-sl-auto.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35) 0%, rgba(168, 85, 247, 0.2) 100%);
  color: #ffffff;
  border-color: #a855f7;
}

.tx-metric-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.tx-metric-sub.bear { color: var(--color-bear, #ff3366); }
.tx-metric-sub.bull { color: var(--color-bull, #00e676); }
.tx-metric-sub.gold { color: var(--color-gold, #ffb703); }

/* Desk Active Trade Live Ratchet Banner */
.desk-active-trade-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.08) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px solid rgba(0, 230, 118, 0.25);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.desk-active-trade-banner .active-trade-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.desk-active-trade-banner .active-trade-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-micro-sl {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.18rem 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-micro-sl:hover {
  background: rgba(0, 210, 255, 0.25);
  border-color: #00d2ff;
  color: #00d2ff;
}

.btn-micro-be {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid rgba(255, 183, 3, 0.35);
  color: #ffb703;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-micro-be:hover {
  background: rgba(255, 183, 3, 0.3);
  border-color: #ffb703;
  color: #ffffff;
}

.btn-micro-close {
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid rgba(255, 51, 102, 0.4);
  color: #ff3366;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-micro-close:hover {
  background: rgba(255, 51, 102, 0.35);
  border-color: #ff3366;
  color: #ffffff;
}

/* In-Trade Active Position Stop-Loss Steppers in Ledger */
.active-sl-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.active-sl-steppers {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.active-sl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.12s;
}

.active-sl-btn:hover {
  background: rgba(0, 210, 255, 0.25);
  border-color: #00d2ff;
  color: #00d2ff;
}

.active-sl-btn.be-btn {
  background: rgba(255, 183, 3, 0.15);
  border-color: rgba(255, 183, 3, 0.35);
  color: #ffb703;
  font-size: 0.6rem;
  font-weight: 800;
}

.active-sl-btn.be-btn:hover {
  background: rgba(255, 183, 3, 0.3);
  border-color: #ffb703;
  color: #ffffff;
}

/* ============================================================
   CHART PLACEHOLDER SLOT & POP-OUT TARGET
   ============================================================ */
#mainChartCard.chart-popped-out {
  min-height: auto !important;
}

.chart-placeholder-slot {
  width: 100%;
  min-height: auto;
  background: radial-gradient(circle at 50% 20%, rgba(0, 210, 255, 0.06) 0%, rgba(10, 15, 26, 0.98) 75%);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.popout-detached-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(0, 210, 255, 0.25);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.popout-detached-header-strip .detached-watchlist-bar {
  margin-top: 0;
  max-width: none;
  justify-content: flex-start;
  flex: 1;
}

.detached-status-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.detached-live-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: #00d2ff;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.4);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  animation: hudPulse 2.5s infinite ease-in-out;
}

.detached-info-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.desk-placeholder-target {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.desk-placeholder-target .transaction-card {
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  min-height: auto;
  height: auto;
  padding: 0.65rem 1rem 0.85rem;
}

.desk-placeholder-target .transaction-card::before {
  display: none;
}

@media (max-width: 1200px) {
  .desk-cockpit-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .popout-detached-header-strip {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ============================================================
   TELEGRAM ALERT & WHATSAPP CHANNEL INTERACTIVE SYSTEM
   ============================================================ */
.channel-toggle-pills {
  display: flex;
  background: var(--bg-tertiary);
  padding: 2px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.channel-pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.24rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.channel-pill-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.channel-pill-btn.active {
  background: var(--market-accent);
  color: #040810;
}

.channel-pill-btn#channelBtnWhatsapp.active {
  background: #25d366;
  color: #040810;
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.35);
}

.channel-pill-btn#channelBtnDual.active {
  background: linear-gradient(135deg, #229ed9, #25d366);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.3);
}

/* WhatsApp Channel Card Styling */
.whatsapp-card {
  background: #0b141a;
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.whatsapp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #25d366, #128c7e, transparent);
  pointer-events: none;
}

.wa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 0.5rem;
}

.wa-header-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.wa-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 0 8px rgba(37, 211, 102, 0.4);
}

.wa-channel-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.wa-verified-badge {
  background: #25d366;
  color: #040810;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 900;
}

.wa-channel-subtext {
  font-size: 0.65rem;
  color: #8696a0;
}

.wa-bubble-container {
  display: flex;
  justify-content: flex-start;
}

.wa-bubble {
  background: #005c4b;
  color: #e9edef;
  border-radius: 8px 8px 8px 2px;
  padding: 0.75rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  position: relative;
  max-width: 100%;
  width: 100%;
}

.wa-msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 5px;
  font-size: 0.62rem;
  color: #8696a0;
  font-family: var(--font-mono);
}

.wa-ticks {
  color: #53bdeb;
  font-weight: 800;
}

.wa-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.wa-btn {
  background: #202c33;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e9edef;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.wa-btn:hover {
  background: #2a3942;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.wa-btn.buy {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.35);
}
.wa-btn.buy:hover {
  background: rgba(37, 211, 102, 0.28);
  border-color: rgba(37, 211, 102, 0.55);
}

.wa-btn.sell {
  background: rgba(255, 51, 102, 0.15);
  color: #ff3366;
  border-color: rgba(255, 51, 102, 0.35);
}
.wa-btn.sell:hover {
  background: rgba(255, 51, 102, 0.28);
  border-color: rgba(255, 51, 102, 0.55);
}

.wa-btn.dispatch {
  background: #00a884;
  color: #111b21;
  border-color: #00a884;
}
.wa-btn.dispatch:hover {
  background: #02b68f;
  box-shadow: 0 0 12px rgba(0, 168, 132, 0.4);
}

.wa-btn.webhook {
  background: rgba(0, 210, 255, 0.12);
  color: #00d2ff;
  border-color: rgba(0, 210, 255, 0.3);
}
.wa-btn.webhook:hover {
  background: rgba(0, 210, 255, 0.22);
}

.wa-config-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Quick Watchlist pill for detached HUD */
.detached-watchlist-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.85rem;
  max-width: 600px;
}

.detached-fav-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.detached-fav-chip:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: rgba(0, 210, 255, 0.4);
  transform: translateY(-1px);
}

.detached-fav-chip.active {
  background: var(--market-accent);
  color: #040810;
  border-color: var(--market-accent);
}

/* ============================================================
   SENSEI PREDICTIVE TRADE SCHEDULER & MARKET HISTORY DOCK
   ============================================================ */
.sensei-schedule-box {
  margin-top: 0.85rem;
  padding: 0.85rem;
  background: linear-gradient(135deg, rgba(20, 27, 45, 0.7) 0%, rgba(13, 19, 33, 0.9) 100%);
  border: 1px solid rgba(0, 210, 255, 0.22);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sensei-schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.45rem;
}

.sensei-schedule-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  font-size: 0.78rem;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.sensei-schedule-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sensei-history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.sensei-history-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.sensei-history-card:hover {
  background: rgba(0, 210, 255, 0.05);
  border-color: rgba(0, 210, 255, 0.3);
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.history-card-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.history-card-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.history-card-metric {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: #facc15;
}

.history-card-desc {
  font-size: 0.66rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.history-card-desc strong {
  color: #38bdf8;
  font-family: var(--font-mono);
}

.sensei-schedule-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.btn-sensei-schedule {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.04);
}

.btn-sensei-schedule.dip {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.12) 0%, rgba(234, 179, 8, 0.05) 100%);
  border-color: rgba(250, 204, 21, 0.35);
}

.btn-sensei-schedule.dip:hover {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22) 0%, rgba(234, 179, 8, 0.12) 100%);
  border-color: rgba(250, 204, 21, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.2);
}

.btn-sensei-schedule.trend {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.12) 0%, rgba(0, 168, 255, 0.05) 100%);
  border-color: rgba(0, 210, 255, 0.35);
}

.btn-sensei-schedule.trend:hover {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.22) 0%, rgba(0, 168, 255, 0.12) 100%);
  border-color: rgba(0, 210, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.2);
}

.btn-sensei-schedule .btn-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.btn-sensei-schedule .btn-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.btn-sensei-schedule .btn-main {
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.btn-sensei-schedule.dip .btn-main {
  color: #facc15;
}

.btn-sensei-schedule.trend .btn-main {
  color: #38bdf8;
}

.btn-sensei-schedule .btn-sub {
  font-size: 0.62rem;
  color: var(--text-dim);
}

/* ============================================================
   EXECUTION DESK: MODE TOGGLE & SCHEDULED DESK CONTROLS
   ============================================================ */
.tx-mode-toggle-group {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.tx-mode-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.18s ease;
}

.tx-mode-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.tx-mode-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25) 0%, rgba(0, 168, 255, 0.15) 100%);
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
}

.badge-mini-count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(250, 204, 21, 0.25);
  color: #facc15;
  border-radius: 10px;
  padding: 0.05rem 0.35rem;
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.scheduled-config-card {
  margin-top: 0.55rem;
  padding: 0.65rem;
  background: rgba(0, 210, 255, 0.04);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scheduled-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.config-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #00d2ff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scheduled-presets-strip {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.presets-label {
  font-size: 0.64rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.presets-pills {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.preset-pill:hover {
  background: rgba(0, 210, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.4);
  color: #ffffff;
}

.preset-pill.active {
  background: rgba(0, 210, 255, 0.2);
  border-color: #00d2ff;
  color: #00d2ff;
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.25);
}

.scheduled-trigger-input-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.trigger-label-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trigger-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.trigger-distance-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  color: #facc15;
}

.trigger-stepper-box {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
}

.btn-liquid-schedule {
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.25) 0%, rgba(202, 138, 4, 0.15) 100%);
  border: 1px solid rgba(250, 204, 21, 0.5);
  border-radius: var(--radius-md);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 18px rgba(250, 204, 21, 0.2);
}

.btn-liquid-schedule:hover {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.38) 0%, rgba(202, 138, 4, 0.25) 100%);
  border-color: #facc15;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(250, 204, 21, 0.35);
}

.btn-liquid-schedule .btn-liquid-main-text {
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #facc15;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-liquid-schedule .btn-liquid-sub-text {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
}

/* ============================================================
   ARMED SCHEDULED TRADES QUEUE DOCK (LIVE EXECUTION DESK RADAR)
   ============================================================ */
.scheduled-trades-dock {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.scheduled-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.scheduled-dock-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dock-title-text {
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.scheduled-dock-intel {
  font-size: 0.66rem;
  color: var(--text-dim);
}

.scheduled-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.scheduled-empty-state {
  text-align: center;
  padding: 1rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.scheduled-order-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid #facc15;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.scheduled-order-card.near-trigger {
  border-color: rgba(0, 230, 118, 0.5);
  border-left: 3px solid #00e676;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.2);
}

.scheduled-card-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.scheduled-card-row1 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.scheduled-sym-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.74rem;
  color: #ffffff;
}

.scheduled-strat-tag {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.scheduled-card-row2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.scheduled-trigger-highlight {
  font-weight: 800;
  color: #38bdf8;
}

.scheduled-card-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.scheduled-dist-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #facc15;
  text-align: right;
  min-width: 85px;
}

.scheduled-dist-pill.ready {
  background: rgba(0, 230, 118, 0.18);
  border-color: rgba(0, 230, 118, 0.45);
  color: #00e676;
}

.btn-scheduled-trigger-now {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.35);
  color: #00e676;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-scheduled-trigger-now:hover {
  background: #00e676;
  color: #040810;
}

.btn-scheduled-cancel {
  background: rgba(255, 51, 102, 0.12);
  border: 1px solid rgba(255, 51, 102, 0.3);
  color: #ff3366;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.28rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-scheduled-cancel:hover {
  background: #ff3366;
  color: #ffffff;
}

@media (max-width: 768px) {
  .scheduled-order-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .scheduled-card-right {
    width: 100%;
    justify-content: space-between;
  }
  .sensei-history-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Responsive Nav Dropdowns (Google Apps Grid, Profile Card, Notifications) */
@media (max-width: 640px) {
  .google-grid-dropdown,
  .profile-dropdown-card,
  .notification-dropdown {
    position: fixed !important;
    top: 56px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 70px) !important;
    overflow-y: auto !important;
    z-index: 100000 !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
  }
}




