/* =========================================================================
   NIFTY SMARTAPI TRADING TERMINAL - MODERN GLASSMORPHIC DARK DESIGN SYSTEM
   ========================================================================= */

:root {
  --bg-core: #080b11;
  --bg-surface: #0e1420;
  --bg-card: rgba(19, 27, 43, 0.75);
  --bg-card-hover: rgba(26, 37, 58, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 242, 254, 0.35);

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

  --accent-cyan: #00f2fe;
  --accent-cyan-glow: rgba(0, 242, 254, 0.25);
  --bull-green: #00e676;
  --bull-green-glow: rgba(0, 230, 118, 0.25);
  --bear-red: #ff3366;
  --bear-red-glow: rgba(255, 51, 102, 0.25);
  --amber-gold: #ffb703;
  --amber-glow: rgba(255, 183, 3, 0.25);

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

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

  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-core);
  color: var(--text-main);
  font-family: var(--font-ui);
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 230, 118, 0.03) 0%, transparent 40%);
}

.font-mono {
  font-family: var(--font-mono);
}

/* =========================================================================
   TOP NAVBAR
   ========================================================================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(14, 20, 32, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  min-width: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--bull-green);
  box-shadow: 0 0 10px var(--bull-green);
}

.status-dot.pulsing {
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px var(--bull-green); }
  50% { opacity: 0.5; transform: scale(0.85); box-shadow: 0 0 4px var(--bull-green); }
}

.logo-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

.ist-clock-card {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.clock-label {
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.clock-date {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  margin-top: 1px;
}

.phase-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 600;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--accent-cyan);
}

.mode-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.mode-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.mode-pill.active {
  background: var(--accent-cyan);
  color: #000000;
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

/* Responsive Text Toggles */
.tab-txt-short, .mode-txt-short, .reload-txt-short {
  display: none;
}
.tab-txt-full, .mode-txt-full, .reload-txt-full {
  display: inline;
}

/* =========================================================================
   TOP NAVBAR NAVIGATION TABS & QUICK METRIC PILLS
   ========================================================================= */
.nav-tab-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 5px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.2px;
  position: relative;
  white-space: nowrap;
}

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

.nav-tab-btn.active {
  color: #080c14;
  background: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.45);
  font-weight: 800;
}

.nav-tab-btn .tab-icon {
  font-size: 13px;
}

.tab-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  display: inline-block;
  margin-left: 2px;
  animation: pulseGlow 1.5s infinite;
}

/* Spot Pill in Navbar */
.nav-spot-ticker {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  white-space: nowrap;
}

.nav-spot-tag {
  color: #787b86;
  font-weight: 800;
  font-size: 9px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
}

.nav-spot-val {
  font-weight: 800;
  color: #ffffff;
  font-size: 13px;
}

.nav-spot-chg.pos {
  color: var(--bull-green);
  font-weight: 700;
}

.nav-spot-chg.neg {
  color: var(--bear-red);
  font-weight: 700;
}

/* Funds & PnL Pills in Navbar */
.nav-funds-pill, .nav-pnl-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-funds-pill:hover, .nav-pnl-pill:hover {
  border-color: rgba(0, 242, 254, 0.4);
}

.funds-amt {
  color: #00e676;
  font-weight: 800;
}

.pnl-amt.pos {
  color: var(--bull-green);
  font-weight: 800;
}

.pnl-amt.neg {
  color: var(--bear-red);
  font-weight: 800;
}

.pnl-amt.zero {
  color: #94a3b8;
  font-weight: 800;
}

/* Terminal Slim Sub-Bar */
.terminal-sub-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 24px;
  background: #080c14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #787b86;
}

.sub-bar-left, .sub-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub-item b {
  color: #f1f5f9;
}

.sub-sep {
  color: rgba(255, 255, 255, 0.15);
}

.btn-sub-sync {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #00f2fe;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-sub-sync:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: #00f2fe;
}

/* Terminal Tab Views */
.terminal-tab-view {
  display: none;
  animation: fadeInTab 0.2s ease-in-out;
}

.terminal-tab-view.active {
  display: block;
}

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

/* Trade Studio Top HUD */
.trade-studio-hud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

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

/* Active Position Banner (Visible on all tabs when trade is running) */
.active-trade-global-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(8, 153, 129, 0.18), rgba(0, 242, 254, 0.12));
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  margin-bottom: 14px;
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.15);
  cursor: pointer;
  transition: all 0.15s ease;
}

.active-trade-global-strip:hover {
  border-color: rgba(0, 242, 254, 0.6);
  background: linear-gradient(90deg, rgba(8, 153, 129, 0.25), rgba(0, 242, 254, 0.18));
}

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0099ff 100%);
  color: #000000;
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-sync-total {
  background: linear-gradient(135deg, #00f2fe 0%, #00c6ff 50%, #00e676 100%);
  color: #031422;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-sync-total:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 242, 254, 0.6), 0 0 12px rgba(0, 230, 118, 0.4);
  filter: brightness(1.08);
}
.btn-sync-total:active {
  transform: translateY(0);
}
.btn-sync-total.syncing {
  filter: brightness(1.15);
  box-shadow: 0 0 28px rgba(0, 242, 254, 0.8);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: #ffffff;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

.btn-kill {
  background: linear-gradient(135deg, #ff1744 0%, #b71c1c 100%);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 16px var(--bear-red-glow);
}
.btn-kill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 51, 102, 0.5);
}

.btn-buy-ce {
  background: rgba(0, 230, 118, 0.15);
  color: var(--bull-green);
  border: 1px solid var(--bull-green);
}
.btn-buy-ce:hover {
  background: var(--bull-green);
  color: #000000;
  box-shadow: 0 4px 16px var(--bull-green-glow);
}

.btn-buy-pe {
  background: rgba(255, 51, 102, 0.15);
  color: var(--bear-red);
  border: 1px solid var(--bear-red);
}
.btn-buy-pe:hover {
  background: var(--bear-red);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--bear-red-glow);
}

.btn-warning {
  background: rgba(255, 183, 3, 0.15);
  color: var(--amber-gold);
  border: 1px solid var(--amber-gold);
}
.btn-warning:hover {
  background: var(--amber-gold);
  color: #000000;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

/* =========================================================================
   ANGEL ONE LIVE ACCOUNT & FUNDS STRIP
   ========================================================================= */
.account-funds-strip {
  background: linear-gradient(90deg, rgba(14, 20, 32, 0.95) 0%, rgba(20, 30, 48, 0.85) 100%);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  padding: 10px 24px;
  position: relative;
  z-index: 90;
}

.funds-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.account-profile-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(0, 230, 118, 0.15) 100%);
  border: 1px solid var(--border-active);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.client-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
}

.client-id {
  font-size: 12px;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.live-pill {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.live-pill.live-connected {
  background: rgba(0, 230, 118, 0.15);
  color: var(--bull-green);
  border: 1px solid var(--bull-green);
}

.live-pill.live-standby {
  background: rgba(255, 183, 3, 0.15);
  color: var(--amber-gold);
  border: 1px solid var(--amber-gold);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bull-green);
  box-shadow: 0 0 8px var(--bull-green);
  display: inline-block;
  animation: pulseGlow 1.5s infinite;
}

.pulse-dot.amber {
  background: var(--amber-gold);
  box-shadow: 0 0 8px var(--amber-gold);
}

.account-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-sub .sep {
  color: var(--text-dim);
}

.funds-metrics-group {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.funds-metric-item {
  display: flex;
  flex-direction: column;
}

.funds-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.funds-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.funds-val.val-cash {
  font-size: 18px;
  color: var(--bull-green);
  text-shadow: 0 0 12px var(--bull-green-glow);
}

.funds-val.val-zero {
  color: var(--amber-gold);
}

.funds-action-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sync {
  font-size: 12px;
  padding: 7px 14px;
}

.sync-icon-svg {
  transition: transform 0.4s ease;
}

.sync-icon-svg.rotating,
.btn-sync.rotating svg,
.btn-sync-total.syncing .sync-icon-svg,
.btn-sync-mini.syncing .sync-icon-svg {
  animation: spin 0.65s linear infinite;
}

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

.sync-status-chip {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.35);
  color: var(--bull-green);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.04em;
}

.chip-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bull-green);
  box-shadow: 0 0 8px var(--bull-green);
}

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

.btn-sync-mini {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 11px;
  padding: 3px 8px;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-sync-mini:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Toast Notifications */
.sync-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.sync-toast {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(16px);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.sync-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.sync-toast-success {
  background: rgba(6, 32, 24, 0.95);
  border: 1px solid var(--bull-green);
  color: #e6fffa;
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.25);
}

.sync-toast-warning {
  background: rgba(38, 28, 8, 0.95);
  border: 1px solid var(--amber-gold);
  color: #fff8e6;
  box-shadow: 0 0 20px rgba(255, 183, 3, 0.25);
}

.sync-toast-error {
  background: rgba(38, 10, 16, 0.95);
  border: 1px solid var(--bear-red);
  color: #ffe6ea;
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.25);
}

.toast-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.funds-status-note {
  font-size: 11px;
  font-family: var(--font-mono);
}

.tag-alert {
  background: rgba(255, 183, 3, 0.15);
  color: var(--amber-gold);
  border: 1px solid rgba(255, 183, 3, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.tag-success {
  background: rgba(0, 230, 118, 0.15);
  color: var(--bull-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* =========================================================================
   CARDS & LAYOUTS
   ========================================================================= */
.dashboard-body {
  padding: 20px 24px;
  max-width: 1600px;
  margin: 0 auto;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

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

.card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  min-width: 0;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-cyan);
}

.card-title-group h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
}

/* =========================================================================
   HERO METRICS GRID
   ========================================================================= */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  min-height: 155px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0;
}

.metric-value {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.metric-trend {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  gap: 4px;
}
.metric-trend.positive { color: var(--bull-green); }
.metric-trend.negative { color: var(--bear-red); }

.metric-sub-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
}
.metric-sub-row b { color: var(--text-muted); }

.pnl-breakdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
  color: var(--text-dim);
}
.pnl-breakdown b { color: var(--text-main); }

.circuit-progress {
  margin-top: 8px;
}
.progress-bar-bg {
  background: rgba(255, 255, 255, 0.06);
  height: 5px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 4px;
}
.progress-bar-fill {
  background: var(--bull-green);
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}
.circuit-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
}

/* Engine Toggle Card */
.engine-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
}

.engine-state-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.engine-state-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.trigger-summary {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.trigger-pill {
  flex: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  display: flex;
  justify-content: space-between;
}
.trigger-pill.buy-ce { background: rgba(0, 230, 118, 0.08); border: 1px solid rgba(0, 230, 118, 0.2); color: var(--bull-green); }
.trigger-pill.buy-pe { background: rgba(255, 51, 102, 0.08); border: 1px solid rgba(255, 51, 102, 0.2); color: var(--bear-red); }

.engine-sync-route {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
}
.route-label {
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.route-val {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}
.route-val.val-live {
  color: var(--bull-green);
}
.route-val.val-sim {
  color: var(--amber-gold);
}

/* Switch Widget */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.12);
  transition: .3s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 4px; bottom: 4px;
  background-color: #ffffff;
  transition: .3s;
}
input:checked + .slider {
  background-color: var(--bull-green);
  box-shadow: 0 0 12px var(--bull-green-glow);
}
input:checked + .slider:before {
  transform: translateX(22px);
}
.slider.round { border-radius: 26px; }
.slider.round:before { border-radius: 50%; }

/* Session Radar Card */
.session-radar-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.session-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-cyan);
}
.session-window {
  font-size: 12px;
  color: var(--text-muted);
}
.timeframe-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.tf-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}
.tf-label { font-size: 9px; color: var(--text-dim); }
.tf-val { font-size: 11px; font-weight: 700; color: #ffffff; }
.tf-arrow { color: var(--accent-cyan); font-weight: 700; }
.session-tactics {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* =========================================================================
   WORKSPACE GRID (LEFT / RIGHT)
   ========================================================================= */
.workspace-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1080px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.col-left, .col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}

/* =========================================================================
   ACTIVE POSITION CARD
   ========================================================================= */
.empty-position-state {
  text-align: center;
  padding: 30px 20px;
}

.scanner-ring {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(0, 242, 254, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spinRing 1.5s linear infinite;
}

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

.empty-pos-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.empty-pos-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Active Position View */
.pos-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.pos-contract-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: var(--bull-green);
  color: #000000;
  margin-bottom: 4px;
}

.pos-symbol {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.pos-time {
  font-size: 11px;
  color: var(--text-dim);
}

.pos-pnl-block {
  text-align: right;
}
.pos-pnl-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  display: block;
}
.pos-pnl-val {
  font-size: 24px;
  font-weight: 800;
}
.pos-pts-val {
  font-size: 12px;
  font-weight: 600;
  display: block;
}

.bracket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.bracket-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}
.bracket-lbl { font-size: 9px; font-weight: 700; color: var(--text-dim); }
.bracket-num { font-size: 15px; font-weight: 700; color: #ffffff; margin-top: 2px; }
.bracket-sub { font-size: 9px; color: var(--text-dim); margin-top: 2px; }

.bracket-box.highlight-sl { border-color: rgba(255, 51, 102, 0.4); }
.bracket-box.highlight-sl .bracket-num { color: var(--bear-red); }

.bracket-box.highlight-tp { border-color: rgba(0, 230, 118, 0.4); }
.bracket-box.highlight-tp .bracket-num { color: var(--bull-green); }

.bracket-box.highlight-tp2 { border-color: rgba(0, 242, 254, 0.4); }
.bracket-box.highlight-tp2 .bracket-num { color: var(--accent-cyan); }

.pos-action-footer {
  display: flex;
  justify-content: flex-end;
}
.pos-action-footer .btn { width: 100%; }

/* =========================================================================
   OPTION CHAIN TABLE
   ========================================================================= */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
  width: 100%;
  max-width: 100%;
}

.algo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: right;
}

.algo-table th, .algo-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.algo-table th {
  background: rgba(0, 0, 0, 0.4);
  font-weight: 700;
  color: var(--text-dim);
  font-size: 10px;
}

.header-call { text-align: center; color: var(--bull-green) !important; background: rgba(0, 230, 118, 0.06) !important; }
.header-put { text-align: center; color: var(--bear-red) !important; background: rgba(255, 51, 102, 0.06) !important; }
.header-strike { text-align: center; background: rgba(0, 242, 254, 0.06) !important; color: var(--accent-cyan) !important; }

.strike-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.strike-row.atm-strike {
  background: rgba(0, 242, 254, 0.07);
}

.strike-cell {
  text-align: center;
  font-weight: 800;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.25);
}

.val-green { color: var(--bull-green); }
.val-red { color: var(--bear-red); }

/* =========================================================================
   MANUAL EXECUTION DOCK (OPTION CHAIN STRIKE, LOTS & BUY/SELL CE/PE)
   ========================================================================= */
.manual-execution-dock {
  margin-top: 10px;
  background: rgba(10, 16, 26, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md, 8px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.dock-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.dock-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-dim, #94a3b8);
  text-transform: uppercase;
}

.dock-sub-lbl {
  font-size: 10.5px;
  color: var(--text-dim, #94a3b8);
}

.dock-select-strike {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--accent-cyan, #00e5ff);
  color: var(--accent-cyan, #00e5ff);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}
.dock-select-strike:focus {
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.dock-selected-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan, #00e5ff);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.dock-live-quotes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-quote-chip {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dock-quote-chip.ce {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--bull-green, #00e676);
}
.dock-quote-chip.pe {
  background: rgba(255, 23, 68, 0.12);
  border: 1px solid rgba(255, 23, 68, 0.3);
  color: var(--bear-red, #ff1744);
}

.lots-stepper-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  border-radius: 4px;
  overflow: hidden;
}

.btn-step {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-step:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lots-num-input {
  width: 38px;
  background: transparent;
  border: none;
  color: #ffffff;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  outline: none;
  -moz-appearance: textfield;
}
.lots-num-input::-webkit-outer-spin-button,
.lots-num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dock-qty-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-radius: 3px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.lots-tp1-input {
  width: 36px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  border-radius: 4px;
  color: #ffffff;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 4px;
}

/* Actions Row: 4 Instant Order Buttons */
.dock-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.btn-dock-action {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-mono);
}
.btn-dock-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}
.btn-dock-action:active {
  transform: translateY(0);
}

.dock-btn-main {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
}

.dock-action-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}
.tag-buy {
  background: #00e676;
  color: #000000;
}
.tag-sell {
  background: #ffab00;
  color: #000000;
}

.dock-btn-sym {
  font-size: 11px;
  letter-spacing: 0.2px;
}

.dock-btn-price {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 1px 0;
}

.dock-btn-desc {
  font-size: 9px;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Button Colors */
.btn-dock-buy-ce {
  border-color: rgba(0, 230, 118, 0.4);
  background: linear-gradient(180deg, rgba(0, 230, 118, 0.12) 0%, rgba(0, 230, 118, 0.04) 100%);
  color: #00e676;
}
.btn-dock-buy-ce:hover {
  border-color: #00e676;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.3);
}

.btn-dock-sell-ce {
  border-color: rgba(255, 171, 0, 0.4);
  background: linear-gradient(180deg, rgba(255, 171, 0, 0.12) 0%, rgba(255, 171, 0, 0.04) 100%);
  color: #ffab00;
}
.btn-dock-sell-ce:hover {
  border-color: #ffab00;
  box-shadow: 0 0 14px rgba(255, 171, 0, 0.3);
}

.btn-dock-buy-pe {
  border-color: rgba(255, 23, 68, 0.4);
  background: linear-gradient(180deg, rgba(255, 23, 68, 0.12) 0%, rgba(255, 23, 68, 0.04) 100%);
  color: #ff1744;
}
.btn-dock-buy-pe:hover {
  border-color: #ff1744;
  box-shadow: 0 0 14px rgba(255, 23, 68, 0.3);
}

.btn-dock-sell-pe {
  border-color: rgba(0, 229, 255, 0.4);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.12) 0%, rgba(0, 229, 255, 0.04) 100%);
  color: #00e5ff;
}
.btn-dock-sell-pe:hover {
  border-color: #00e5ff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.3);
}

/* Micro Action Buttons in Option Chain Table Cells */
.opt-price-action-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

.row-trade-btns {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.strike-row:hover .row-trade-btns {
  opacity: 1;
}

.btn-micro {
  width: 17px;
  height: 17px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
}
.btn-micro:hover {
  transform: scale(1.15);
  filter: brightness(1.25);
}
.btn-micro-buy {
  background: #00e676;
  color: #000000;
}
.btn-micro-sell {
  background: #ffab00;
  color: #000000;
}

.strike-row {
  cursor: pointer;
  transition: background 0.15s ease;
}
.strike-row:hover {
  background: rgba(56, 189, 248, 0.07);
}
.strike-row.row-strike-selected {
  background: rgba(0, 229, 255, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.4);
}

@media (max-width: 900px) {
  .dock-actions-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================================
   CONFIG TUNING DECK
   ========================================================================= */
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.form-group label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: var(--transition-fast);
}
.form-group input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
}

.form-full {
  grid-column: span 2;
  margin-top: 4px;
}

/* =========================================================================
   AUDIT & TELEMETRY STREAM
   ========================================================================= */
.log-card {
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.log-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.filter-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.terminal-log-box {
  flex: 1;
  background: #040609;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px;
  height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  line-height: 1.4;
}

.log-time {
  color: var(--text-dim);
  white-space: nowrap;
}

.log-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.log-badge.cat-signal { background: rgba(0, 242, 254, 0.15); color: var(--accent-cyan); border: 1px solid rgba(0, 242, 254, 0.3); }
.log-badge.cat-order { background: rgba(0, 230, 118, 0.15); color: var(--bull-green); border: 1px solid rgba(0, 230, 118, 0.3); }
.log-badge.cat-risk { background: rgba(255, 183, 3, 0.15); color: var(--amber-gold); border: 1px solid rgba(255, 183, 3, 0.3); }
.log-badge.cat-kill { background: rgba(255, 51, 102, 0.2); color: var(--bear-red); border: 1px solid rgba(255, 51, 102, 0.4); }
.log-badge.cat-system { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }

.log-text {
  color: #cbd5e1;
  word-break: break-word;
}

/* =========================================================================
   FRAMEWORK MATRIX LIST (RIGHT COLUMN)
   ========================================================================= */
.framework-matrix-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.framework-row {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: var(--transition-fast);
}
.framework-row.active-highlight {
  border-color: rgba(0, 242, 254, 0.4);
  background: rgba(0, 242, 254, 0.04);
}

.fr-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}
.fr-content {
  margin-top: 4px;
}
.fr-phase {
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
  display: block;
}
.fr-tf {
  font-size: 10px;
  color: var(--amber-gold);
  display: block;
}
.fr-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.framework-footer {
  margin-top: 14px;
}

/* =========================================================================
   MODALS
   ========================================================================= */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(4, 6, 9, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: #0f1624;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: modalEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-card.modal-large { max-width: 720px; }

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
}
.modal-close:hover { color: #ffffff; }

.modal-body {
  padding: 20px;
}
.modal-intro {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.modal-scrollable {
  max-height: 400px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
}

/* Badges */
.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.badge-accent { background: rgba(0, 242, 254, 0.15); color: var(--accent-cyan); }
.badge-gray { background: rgba(255, 255, 255, 0.08); color: var(--text-dim); }
.badge-bull-live {
  background: rgba(0, 230, 118, 0.15);
  color: var(--bull-green);
  border: 1px solid var(--bull-green);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.status-connected { background: rgba(0, 230, 118, 0.15); color: var(--bull-green); border: 1px solid var(--bull-green); }
.status-disconnected { background: rgba(255, 183, 3, 0.15); color: var(--amber-gold); border: 1px solid var(--amber-gold); }

/* =========================================================================
   TARGETED BREAKOUT RADAR STYLES
   ========================================================================= */
.targeted-radar-card {
  margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(19, 27, 43, 0.85) 0%, rgba(14, 20, 32, 0.95) 100%);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

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

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

.target-card {
  background: rgba(8, 11, 17, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.target-card.target-ce-card {
  border-left: 4px solid var(--bull-green);
}

.target-card.target-pe-card {
  border-left: 4px solid var(--bear-red);
}

.target-card.ready-pulse {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.25);
  animation: readyGlow 1.5s infinite alternate ease-in-out;
}

@keyframes readyGlow {
  from { box-shadow: 0 0 10px rgba(0, 242, 254, 0.2); }
  to { box-shadow: 0 0 25px rgba(0, 242, 254, 0.5); }
}

.target-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.target-chip {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 4px;
}

.chip-ce {
  background: rgba(0, 230, 118, 0.15);
  color: var(--bull-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.chip-pe {
  background: rgba(255, 51, 102, 0.15);
  color: var(--bear-red);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.target-symbol {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}

.target-readiness {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.target-readiness.ready {
  background: rgba(0, 242, 254, 0.2);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.target-readiness.active-trade {
  background: rgba(0, 230, 118, 0.2);
  color: var(--bull-green);
  border-color: var(--bull-green);
}

.target-readiness.anchored {
  background: rgba(0, 242, 254, 0.14);
  color: #00f2fe;
  border-color: rgba(0, 242, 254, 0.4);
}

.badge-pattern-locked {
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.35);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.badge-entry-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(0, 242, 254, 0.12);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.3);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dual-check-deck {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.check-item.check-passed {
  border-color: rgba(0, 230, 118, 0.3);
  background: rgba(0, 230, 118, 0.05);
}

.check-item.check-passed .check-icon {
  color: var(--bull-green);
  font-weight: bold;
}

.check-item.check-pending .check-icon {
  color: var(--text-dim);
}

.check-info {
  display: flex;
  flex-direction: column;
}

.check-label {
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 700;
}

.check-detail {
  font-size: 11px;
  color: var(--text-muted);
}
.check-detail b { color: #ffffff; }

.target-footer-stats {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
}
.target-footer-stats b { color: var(--accent-cyan); }

/* Option Chain Highlights */
.strike-row.targeted-ce-row {
  border-left: 3px solid var(--bull-green);
  background: rgba(0, 230, 118, 0.05);
}

.strike-row.targeted-pe-row {
  border-right: 3px solid var(--bear-red);
  background: rgba(255, 51, 102, 0.05);
}

.contract-target-badge {
  display: block;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 2px;
  margin-top: 2px;
  text-align: center;
}
.contract-target-badge.ce {
  background: rgba(0, 230, 118, 0.2);
  color: var(--bull-green);
  border: 1px solid var(--bull-green);
}
.contract-target-badge.pe {
  background: rgba(255, 51, 102, 0.2);
  color: var(--bear-red);
  border: 1px solid var(--bear-red);
}
.contract-target-badge.active-executed {
  background: var(--bull-green);
  color: #000000;
  animation: pulseGlow 1s infinite;
}

.matched-price-tag {
  font-size: 11px;
  color: var(--accent-cyan);
  margin-top: 4px;
}
.matched-price-tag b { color: #ffffff; }

/* Off-Market & Schedule Warning Styles */
.phase-chip.phase-closed {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
}
.phase-chip.phase-closed .chip-dot {
  background: #ef4444 !important;
  box-shadow: 0 0 8px #ef4444 !important;
}

.btn-disabled-live {
  opacity: 0.65;
  filter: grayscale(0.5);
  cursor: pointer;
  position: relative;
}
.btn-disabled-live:hover {
  filter: grayscale(0.2);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* TP1 Trailed SL & TP2 Target Progression */
.bracket-box.trailed-tp1-active {
  background: rgba(0, 230, 118, 0.12) !important;
  border-color: var(--bull-green) !important;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.35) !important;
  animation: pulseGreenGlow 2s infinite ease-in-out;
}

.bracket-box.tp1-achieved {
  background: rgba(0, 230, 118, 0.1) !important;
  border-color: rgba(0, 230, 118, 0.5) !important;
}

.bracket-box.tp2-waiting-pulse {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4) !important;
  animation: pulseCyanGlow 1.6s infinite ease-in-out;
}

@keyframes pulseGreenGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 230, 118, 0.25); }
  50% { box-shadow: 0 0 20px rgba(0, 230, 118, 0.5); }
}

@keyframes pulseCyanGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 242, 254, 0.3); border-color: rgba(0, 242, 254, 0.6); }
  50% { box-shadow: 0 0 22px rgba(0, 242, 254, 0.7); border-color: var(--accent-cyan); }
}

/* =========================================================================
   AI MARKET TREND & REAL-TIME NEWS RISK SENTINEL
   ========================================================================= */
.sentinel-card {
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(14, 20, 32, 0.85) 0%, rgba(20, 30, 48, 0.75) 100%);
  border: 1px solid rgba(0, 242, 254, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.sentinel-card .card-header-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sentinel-card .card-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.sentinel-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sentinel-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
}
.sentinel-timer b {
  color: var(--accent-cyan);
}

.timer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  display: inline-block;
}
.timer-dot.pulsing {
  animation: pulseCyanGlow 1.8s infinite ease-in-out;
}

.switch-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}
.switch-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.switch-slider {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  transition: 0.3s;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.3s;
}
.switch-container input:checked + .switch-slider {
  background-color: var(--bull-green);
  box-shadow: 0 0 10px var(--bull-green-glow);
}
.switch-container input:checked + .switch-slider:before {
  transform: translateX(18px);
}
.switch-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Sentinel Verdict Banner */
.sentinel-verdict-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.banner-safe {
  background: linear-gradient(90deg, rgba(0, 230, 118, 0.12) 0%, rgba(0, 230, 118, 0.03) 100%);
  border-color: rgba(0, 230, 118, 0.4);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.15);
}

.banner-hold {
  background: linear-gradient(90deg, rgba(255, 51, 102, 0.14) 0%, rgba(255, 51, 102, 0.04) 100%);
  border-color: rgba(255, 51, 102, 0.45);
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.18);
  animation: pulseRedBanner 3s infinite ease-in-out;
}

.banner-warning {
  background: linear-gradient(90deg, rgba(255, 183, 3, 0.14) 0%, rgba(255, 183, 3, 0.04) 100%);
  border-color: rgba(255, 183, 3, 0.45);
  box-shadow: 0 0 20px rgba(255, 183, 3, 0.18);
}

@keyframes pulseRedBanner {
  0%, 100% { border-color: rgba(255, 51, 102, 0.4); }
  50% { border-color: rgba(255, 51, 102, 0.8); }
}

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

.verdict-icon {
  font-size: 26px;
  line-height: 1;
}

.verdict-badge {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
}
.banner-safe .verdict-badge {
  color: var(--bull-green);
}
.banner-hold .verdict-badge {
  color: var(--bear-red);
}
.banner-warning .verdict-badge {
  color: var(--amber-gold);
}

.verdict-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.verdict-pills {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
}
.pill-approved {
  background: rgba(0, 230, 118, 0.18);
  border: 1px solid var(--bull-green);
  color: var(--bull-green);
}
.pill-held {
  background: rgba(255, 51, 102, 0.18);
  border: 1px solid var(--bear-red);
  color: #fca5a5;
}
.pill-neutral {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid var(--amber-gold);
  color: var(--amber-gold);
}

/* Sentinel 3-Column Grid */
.sentinel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.sentinel-col {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sentinel-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sentinel-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.s-label {
  color: var(--text-dim);
}

.s-val {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
}

.hold-reasons-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  min-height: 52px;
}

.hold-none {
  color: var(--bull-green);
  font-size: 11px;
  line-height: 1.4;
}

.hold-reason-badge {
  background: rgba(255, 51, 102, 0.12);
  border: 1px solid rgba(255, 51, 102, 0.35);
  color: #fda4af;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  line-height: 1.3;
}

/* Live News Headlines Strip */
.sentinel-news-strip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 11px;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.news-strip-badge {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.news-headlines-container {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.news-headlines-container::-webkit-scrollbar {
  height: 4px;
}
.news-headlines-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.headline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.pill-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}
.pill-tag.tag-bull {
  background: rgba(0, 230, 118, 0.25);
  color: var(--bull-green);
}
.pill-tag.tag-bear {
  background: rgba(255, 51, 102, 0.25);
  color: var(--bear-red);
}
.pill-tag.tag-crisis {
  background: rgba(255, 183, 3, 0.3);
  color: #fbbf24;
}

/* Gemini Sentinel Action Buttons & Micro-Elements */
.btn-sync-gemini {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(99, 102, 241, 0.22)) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px !important;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.12);
}
.btn-sync-gemini:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(99, 102, 241, 0.38)) !important;
  border-color: rgba(56, 189, 248, 0.85) !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}
.btn-sync-gemini.syncing {
  pointer-events: none;
  opacity: 0.8;
  animation: pulseSyncGlow 1.2s infinite ease-in-out;
}
.btn-sync-gemini.syncing .gemini-sparkle {
  display: inline-block;
  animation: spinSparkle 0.8s infinite linear;
}
@keyframes spinSparkle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes pulseSyncGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(6, 182, 212, 0.3); }
  50% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.7); }
}

.btn-chat-gemini {
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  color: #d8b4fe !important;
  font-weight: 700 !important;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px !important;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-chat-gemini:hover {
  background: rgba(168, 85, 247, 0.25) !important;
  border-color: rgba(168, 85, 247, 0.75) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
  transform: translateY(-1px);
}

.gemini-model-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.03em;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.12);
}

.btn-sentinel-chat-link {
  background: rgba(0, 242, 254, 0.09) !important;
  border: 1px solid rgba(0, 242, 254, 0.32) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 11px;
  padding: 5px 12px !important;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-sentinel-chat-link:hover {
  background: rgba(0, 242, 254, 0.22) !important;
  border-color: rgba(0, 242, 254, 0.75) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.4);
  transform: translateY(-1px);
}

.headline-link {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}
.headline-link:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.headline-source {
  color: var(--text-dim);
  font-size: 9px;
  opacity: 0.85;
}
.headline-chat-ask {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.headline-chat-ask:hover {
  background: rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.85);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

/* =========================================================================
   LOT SIZING & BOOKING CONTROLLER STYLES
   ========================================================================= */
.lots-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 10px;
}

.lots-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lots-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.lots-stepper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-step {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 22px;
  height: 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.btn-step:hover {
  background: rgba(0, 242, 254, 0.2);
  color: var(--accent-cyan);
}

.lots-input {
  width: 34px;
  height: 24px;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}
.lots-input::-webkit-outer-spin-button,
.lots-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.lots-qty-pill {
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.lots-sub-label {
  font-size: 11px;
  color: var(--text-dim);
}

/* Active Position Lots Deck */
.pos-lots-deck {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 12px;
}

.pos-lots-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.pos-lots-label {
  color: var(--text-dim);
  font-weight: 700;
}

.pos-lots-val {
  color: #ffffff;
  font-weight: 700;
}

.pos-booked-pill {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid var(--bull-green);
  color: var(--bull-green);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
}

.pos-partial-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pos-partial-lbl {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
}

.lots-input-sm {
  width: 40px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 11px;
  text-align: center;
}

/* =========================================================================
   MULTI-TIMEFRAME TRADE PERFORMANCE & HISTORY MATRIX
   ========================================================================= */
.history-matrix-card {
  margin-top: 24px;
  background: linear-gradient(135deg, rgba(14, 20, 32, 0.9) 0%, rgba(20, 28, 44, 0.8) 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.history-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-tab-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.history-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}
.history-tab-btn:hover {
  color: #ffffff;
}
.history-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #00b4d8 100%);
  color: #080b11;
  font-weight: 800;
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

/* History KPI Cards */
.history-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.history-kpi-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 2px 0;
}
.kpi-val.val-cyan { color: var(--accent-cyan); text-shadow: 0 0 10px var(--accent-cyan-glow); }
.kpi-val.val-gold { color: var(--amber-gold); text-shadow: 0 0 10px var(--amber-glow); }

.kpi-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* History Tables */
.history-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.history-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.history-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  white-space: nowrap;
}

.history-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.history-table tr.today-highlight {
  background: rgba(0, 242, 254, 0.04);
  border-left: 2px solid var(--accent-cyan);
}

.type-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.type-pill.type-ce {
  background: rgba(0, 230, 118, 0.2);
  color: var(--bull-green);
  border: 1px solid rgba(0, 230, 118, 0.4);
}
.type-pill.type-pe {
  background: rgba(255, 51, 102, 0.2);
  color: var(--bear-red);
  border: 1px solid rgba(255, 51, 102, 0.4);
}

.reason-tag {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.empty-history-note {
  padding: 30px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

/* =========================================================================
   LIVE REAL-TIME STREAMING & FILTER STYLES
   ========================================================================= */
.live-stream-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.12);
  color: var(--bull-green);
  border: 1px solid rgba(0, 230, 118, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.15);
}

.history-filter-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 3px;
}

.history-filter-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.history-filter-btn:hover {
  color: #ffffff;
}
.history-filter-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

/* Active Running Row in Today's Table */
.active-running-row {
  background: rgba(0, 242, 254, 0.08) !important;
  border-left: 3px solid var(--accent-cyan) !important;
  box-shadow: inset 0 0 16px rgba(0, 242, 254, 0.05);
}

.live-pulse-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 242, 254, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.5);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(0, 242, 254, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

.unrealized-tag {
  font-size: 8px;
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
  font-weight: 700;
}

.live-trail-tag {
  border-color: rgba(0, 242, 254, 0.3) !important;
  color: var(--accent-cyan) !important;
  background: rgba(0, 242, 254, 0.06) !important;
}

.btn-table-action {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: 700;
}

/* Sub-trades accordion in Daily, Weekly, Monthly */
.sub-trades-row td {
  padding: 0 !important;
  border-top: none !important;
  background: rgba(10, 16, 26, 0.85) !important;
}

.sub-trades-container {
  padding: 12px 16px;
  border-left: 3px solid var(--accent-cyan);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.sub-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 11px;
}

.sub-table th {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-dim) !important;
  font-size: 9px !important;
  padding: 6px 10px !important;
  letter-spacing: 0.05em;
}

.sub-table td {
  padding: 6px 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.btn-expand-trades {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-expand-trades:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: var(--accent-cyan);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.live-active-badge {
  background: rgba(0, 242, 254, 0.15) !important;
  color: var(--accent-cyan) !important;
  border-color: rgba(0, 242, 254, 0.5) !important;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3) !important;
}

/* =========================================================================
   NET REALIZED & UNREALIZED SEPARATED (ANGEL ONE VS PAPER) & CALENDAR STYLES
   ========================================================================= */
.pnl-card-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pnl-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pnl-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pnl-source-pill-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.pnl-source-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pnl-source-pill:hover {
  color: #ffffff;
}
.pnl-source-pill.active {
  background: rgba(0, 230, 118, 0.18);
  color: var(--bull-green);
  border-color: rgba(0, 230, 118, 0.4);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.2);
}
.pnl-source-pill.active#cardPnlSourcePaperBtn {
  background: rgba(0, 242, 254, 0.18);
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
}

.btn-calendar-view {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--accent-cyan);
  padding: 2px 8px;
  font-size: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-calendar-view:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

/* Card Calendar Quick Bar */
.pnl-calendar-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  gap: 6px;
}

.pnl-cal-tabs {
  display: flex;
  gap: 3px;
}

.pnl-cal-tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pnl-cal-tab:hover {
  color: #ffffff;
}
.pnl-cal-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.pnl-cal-date-picker {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pnl-nav-arrow {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  padding: 0 3px;
  line-height: 1;
}
.pnl-nav-arrow:hover {
  color: var(--accent-cyan);
}

.pnl-date-text {
  color: #e2e8f0;
  font-weight: 700;
  font-size: 9.5px;
  min-width: 75px;
  text-align: center;
}

.pnl-hidden-date-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.pnl-picker-trigger {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.pnl-picker-trigger:hover {
  opacity: 1;
}

/* Modal dedicated styles */
.pnl-calendar-modal-card {
  max-width: 980px !important;
  width: 95% !important;
}

.pnl-modal-source-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.pnl-modal-source-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.pnl-modal-source-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.pnl-modal-source-btn.active#modalSourceBtnLive {
  background: rgba(0, 230, 118, 0.15);
  border-color: var(--bull-green);
  color: var(--bull-green);
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.2);
}
.pnl-modal-source-btn.active#modalSourceBtnPaper {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
}

.pnl-modal-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.pnl-modal-cal-tabs {
  display: flex;
  gap: 6px;
}

.pnl-modal-cal-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pnl-modal-cal-tab:hover {
  color: #ffffff;
}
.pnl-modal-cal-tab.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
}

.pnl-modal-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pnl-modal-current-period {
  font-weight: 800;
  color: var(--accent-cyan);
  font-size: 12px;
  padding: 0 4px;
}

.pnl-modal-date-input {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  outline: none;
}
.pnl-modal-date-input:focus {
  border-color: var(--accent-cyan);
}

.pnl-modal-quick-jumps {
  display: flex;
  gap: 4px;
}

.pnl-modal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 860px) {
  .pnl-modal-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pnl-modal-kpi-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}
.pnl-modal-kpi-card.highlight-card {
  background: rgba(0, 242, 254, 0.05);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: inset 0 0 14px rgba(0, 242, 254, 0.05);
}

.pnl-modal-kpi-card .kpi-label {
  font-size: 9.5px;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.pnl-modal-kpi-card .kpi-val {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
}
.pnl-modal-kpi-card .kpi-sub {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}

.pnl-modal-breakdown-wrapper {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  max-height: 380px;
  overflow-y: auto;
}

/* =========================================================================
   TACTICAL STRATEGY & AI SIGNALS CONTROLS
   ========================================================================= */

.strategy-mode-pill-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.strategy-mode-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.strategy-mode-pill:hover {
  color: #ffffff;
}
.strategy-mode-pill.active#btnStratModeAuto {
  background: rgba(0, 242, 254, 0.16);
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}
.strategy-mode-pill.active#btnStratModeManual {
  background: rgba(255, 171, 0, 0.16);
  color: var(--accent-gold);
  border-color: rgba(255, 171, 0, 0.4);
  box-shadow: 0 0 10px rgba(255, 171, 0, 0.2);
}

/* AI Signals Real-Time Intelligence Banner */
.ai-signal-banner {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.08) 0%, rgba(13, 22, 38, 0.8) 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  transition: all 0.3s ease;
}

.ai-signal-banner.signal-ce {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.1) 0%, rgba(13, 28, 22, 0.85) 100%);
  border-color: rgba(0, 230, 118, 0.35);
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.1);
}

.ai-signal-banner.signal-pe {
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.1) 0%, rgba(32, 14, 18, 0.85) 100%);
  border-color: rgba(255, 82, 82, 0.35);
  box-shadow: 0 0 16px rgba(255, 82, 82, 0.1);
}

.ai-signal-banner.signal-hold {
  background: linear-gradient(135deg, rgba(255, 171, 0, 0.1) 0%, rgba(28, 22, 10, 0.85) 100%);
  border-color: rgba(255, 171, 0, 0.35);
  box-shadow: 0 0 16px rgba(255, 171, 0, 0.1);
}

.ai-signal-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.ai-signal-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-signal-confidence {
  font-size: 10px;
  color: var(--accent-cyan);
  font-weight: 700;
  background: rgba(0, 242, 254, 0.12);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(0, 242, 254, 0.25);
}

.ai-signal-mode-tag {
  font-size: 9.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-signal-rationale {
  font-size: 11px;
  color: #e2e8f0;
  line-height: 1.45;
  margin-bottom: 8px;
}

.ai-signal-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 10px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 6px;
}
.ai-signal-quick-stats span b {
  color: #ffffff;
}

/* Form Label Row with AI Hints */
.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.form-label-row label {
  margin-bottom: 0;
  font-size: 11px;
}

.ai-signal-hint {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px dashed rgba(0, 242, 254, 0.3);
  transition: all 0.2s ease;
}
.ai-signal-hint:hover {
  background: rgba(0, 242, 254, 0.25);
  color: #ffffff;
  border-style: solid;
}

/* Auto-Tuning inputs active glow */
.tactical-strategy-card.mode-auto input:not(:focus) {
  border-color: rgba(0, 242, 254, 0.25);
  background: rgba(0, 242, 254, 0.02);
}
.tactical-strategy-card.mode-manual input:not(:focus) {
  border-color: rgba(255, 171, 0, 0.25);
  background: rgba(255, 171, 0, 0.02);
}

/* =========================================================================
   AUTHENTIC ANGEL ONE TRADEONE CHART STUDIO (MATCHING SCREENSHOT)
   ========================================================================= */
.angel-tradeone-card {
  position: relative;
  background: #090d15;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1-Click Fullscreen / Chart Only Mode */
.angel-tradeone-card.fullscreen-mode {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #080b11 !important;
  display: flex !important;
  flex-direction: column !important;
}

.angel-tradeone-card.fullscreen-mode .ao-tradeone-workspace {
  flex: 1 !important;
  height: calc(100vh - 120px) !important;
}

.angel-tradeone-card.fullscreen-mode .ao-chart-canvas-wrapper {
  height: 100% !important;
}

.simple-chart-card.fullscreen-mode {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #080b11 !important;
  display: flex !important;
  flex-direction: column !important;
}

.simple-chart-card.fullscreen-mode .ao-tradeone-workspace {
  flex: 1 !important;
  height: calc(100vh - 120px) !important;
  min-height: calc(100vh - 120px) !important;
}

.simple-chart-card.fullscreen-mode .simple-chart-canvas-wrapper {
  height: calc(100vh - 120px) !important;
}

.simple-chart-card.fullscreen-mode .ao-watchlist-list {
  max-height: calc(100vh - 160px) !important;
}

/* Top Nav Strip */
.ao-top-nav-strip {
  background: #090d15;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ao-logo-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ao-brand-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ao-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.ao-tradeone-pill {
  background: #7000ff;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.ao-ticker-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

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

.ao-ticker-item .ticker-sym {
  color: #94a3b8;
  font-weight: 600;
}

.ao-ticker-item .ticker-price {
  color: #ffffff;
  font-weight: 700;
}

.ao-ticker-item .ticker-chg.pos {
  color: #00e676;
  font-weight: 600;
}

.ao-ticker-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.15);
}

.ao-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
}

.ao-nav-link {
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s;
}

.ao-nav-link:hover, .ao-nav-link.active {
  color: #ffffff;
  font-weight: 700;
}

.ao-nav-link.active {
  color: #00f2fe;
}

.ao-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ao-account-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 12px;
}

.ao-avatar-circle {
  background: #ff5722;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ao-client-code {
  font-size: 11px;
  color: #cbd5e1;
}

.btn-chart-fullscreen {
  background: linear-gradient(135deg, rgba(112, 0, 255, 0.3), rgba(0, 242, 254, 0.3));
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-chart-fullscreen:hover {
  background: linear-gradient(135deg, rgba(112, 0, 255, 0.6), rgba(0, 242, 254, 0.5));
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.35);
}

/* Level Tuner Strip */
.chart-level-tuner-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #080b11;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 14px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tuner-strip-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.level-tuner-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(14, 20, 32, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  min-width: 95px;
  flex: 1 1 105px;
}

.level-tuner-lbl {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.tuner-entry .level-tuner-lbl { color: var(--accent-cyan); }
.tuner-sl .level-tuner-lbl { color: var(--bear-red); }
.tuner-tp1 .level-tuner-lbl { color: var(--bull-green); }
.tuner-tp2 .level-tuner-lbl { color: #10b981; }

.stepper-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
}

.stepper-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.stepper-btn:hover {
  background: rgba(0, 242, 254, 0.2);
  color: var(--accent-cyan);
}

.stepper-wrap input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
  width: 72px;
  text-align: center;
  outline: none;
}

.level-offset-tag {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  align-self: flex-start;
}

.tag-entry { background: rgba(0, 242, 254, 0.12); color: var(--accent-cyan); }
.tag-sl { background: rgba(255, 51, 102, 0.12); color: var(--bear-red); }
.tag-tp { background: rgba(0, 230, 118, 0.12); color: var(--bull-green); }
.tag-tp2 { background: rgba(16, 185, 129, 0.12); color: #10b981; }

.tuner-metrics-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px;
  background: rgba(14, 20, 32, 0.5);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  min-width: 170px;
}

.tuner-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 9.5px;
}

.tuner-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.chart-level-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.chart-level-source-badge.manual {
  color: var(--amber-gold);
  background: rgba(255, 183, 3, 0.08);
  border-color: rgba(255, 183, 3, 0.25);
}

/* MAIN TRADEONE 3-COLUMN WORKSPACE */
.ao-tradeone-workspace {
  display: flex;
  min-height: 520px;
  background: #080b11;
  position: relative;
}

/* LEFT WATCHLIST SIDEBAR */
.ao-watchlist-sidebar {
  width: 220px;
  background: #0c1017;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s;
}

.ao-watchlist-sidebar.collapsed {
  width: 0;
  overflow: hidden;
  border-right: none;
}

.ao-watchlist-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ao-watchlist-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 11px;
}

.ao-wl-tab {
  color: #64748b;
  cursor: pointer;
  padding-bottom: 2px;
}

.ao-wl-tab.active {
  color: #00f2fe;
  font-weight: 700;
  border-bottom: 2px solid #00f2fe;
}

.ao-wl-add, .ao-wl-sort {
  color: #64748b;
  margin-left: auto;
  cursor: pointer;
  font-weight: 700;
}

.ao-wl-search-wrap {
  padding: 6px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
}

.ao-wl-search {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 10px;
  width: 100%;
  outline: none;
}

.ao-watchlist-list {
  flex: 1;
  overflow-y: auto;
  max-height: 640px;
}

.ao-wl-item {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ao-wl-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ao-wl-item.active {
  background: rgba(0, 242, 254, 0.08);
  border-left: 3px solid #00f2fe;
}

.ao-wl-item-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ao-wl-sym-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.ao-wl-sym-sub {
  font-size: 9px;
  color: #64748b;
}

.ao-wl-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.ao-wl-ltp {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.ao-wl-chg {
  font-size: 9px;
  font-weight: 600;
}

.ao-wl-chg.pos { color: #00e676; }
.ao-wl-chg.neg { color: #ff3366; }

.ao-wl-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 10px;
}

.ao-wl-footer-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.ao-wl-footer-btn:hover {
  color: #00f2fe;
}

/* CENTER CHART VIEWPORT */
.ao-chart-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #080b11;
  min-width: 0;
}

.ao-chart-subhead {
  padding: 6px 14px;
  background: #090d15;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ao-view-tabs {
  display: flex;
  gap: 4px;
}

.ao-view-tab {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.ao-view-tab.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.ao-scalper-mode-btn {
  background: rgba(112, 0, 255, 0.2);
  border: 1px solid #7000ff;
  color: #c48dfd;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.ao-scalper-mode-btn:hover, .ao-scalper-mode-btn.active {
  background: #7000ff;
  color: #fff;
  box-shadow: 0 0 10px rgba(112, 0, 255, 0.4);
}

/* Chart Toolbar */
.ao-chart-toolbar {
  padding: 6px 12px;
  background: #0a0e18;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ao-tf-cluster {
  display: flex;
  gap: 2px;
}

.ao-tf-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
}

.ao-tf-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.ao-tb-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.ao-tb-icon-btn {
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.ao-indicators-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.ao-indicators-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.ao-instant-orders-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #94a3b8;
}

.toggle-switch-sm {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 16px;
}

.toggle-switch-sm input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-sm {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: .3s;
  border-radius: 16px;
}

.slider-sm:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider-sm {
  background-color: #00e676;
}

input:checked + .slider-sm:before {
  transform: translateX(12px);
}

.ao-engine-switch {
  margin-left: auto;
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ao-engine-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
}

.ao-engine-btn.active {
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
}

/* Symbol Meta Strip */
.ao-symbol-meta-strip {
  padding: 6px 14px;
  background: #080b11;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ao-symbol-title {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
}

.ao-symbol-ohlc {
  font-size: 11px;
  display: flex;
  gap: 8px;
  color: #94a3b8;
}

.ao-vol-row {
  font-size: 10.5px;
  color: #64748b;
}

/* Canvas Wrapper with Drawing Toolbar */
.ao-chart-canvas-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 640px;
  background: #080b11;
}

.ao-tv-drawing-toolbar {
  width: 36px;
  background: #0a0e18;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 4px;
  flex-shrink: 0;
  z-index: 10;
}

.ao-tv-tool-btn {
  background: transparent;
  border: none;
  color: #64748b;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.ao-tv-tool-btn:hover, .ao-tv-tool-btn.active {
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
}

#angelTacticalChartCanvas {
  position: absolute;
  top: 0;
  left: 36px;
  right: 0;
  bottom: 0;
  width: calc(100% - 36px);
  height: 100%;
  display: block;
  cursor: crosshair;
}

.tradingview-widget-holder {
  position: absolute;
  top: 0;
  left: 36px;
  right: 0;
  bottom: 0;
  width: calc(100% - 36px);
  height: 100%;
  background: #080b11;
  z-index: 5;
}

.chart-hover-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(14, 20, 32, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 10.5px;
  line-height: 1.4;
  z-index: 20;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.chart-legend-overlay {
  position: absolute;
  top: 10px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 11, 17, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 10;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.legend-line {
  display: inline-block;
  width: 10px;
  height: 2px;
  border-radius: 1px;
}

.line-entry { background: var(--accent-cyan); box-shadow: 0 0 6px var(--accent-cyan); }
.line-sl { background: var(--bear-red); box-shadow: 0 0 6px var(--bear-red); }
.line-tp1 { background: var(--bull-green); box-shadow: 0 0 6px var(--bull-green); }
.line-tp2 { background: #10b981; box-shadow: 0 0 6px #10b981; }
.line-ltp { background: var(--amber-gold); box-shadow: 0 0 6px var(--amber-gold); }

/* Bottom Strip */
.ao-chart-bottom-strip {
  padding: 4px 12px;
  background: #0a0e18;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}

.ao-bottom-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ao-range-pills {
  display: flex;
  gap: 2px;
}

.ao-range-pill {
  color: #64748b;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
}

.ao-range-pill.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.ao-powered-badge {
  color: #64748b;
}

.ao-bottom-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ao-time-clock {
  color: #94a3b8;
}

.ao-scale-btn {
  color: #64748b;
  cursor: pointer;
  padding: 1px 4px;
}

.ao-scale-btn.active {
  color: #00f2fe;
}

.ao-tv-logo {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* RIGHT TOOLBAR */
.ao-right-tools-sidebar {
  width: 48px;
  background: #0a0e18;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 12px;
  flex-shrink: 0;
}

.ao-right-tool-btn {
  background: transparent;
  border: none;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 8px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  padding: 4px 0;
  transition: color 0.15s;
}

.ao-right-tool-btn:hover, .ao-right-tool-btn.active {
  color: #00f2fe;
}

@media (max-width: 900px) {
  .ao-watchlist-sidebar {
    display: none;
  }
  .ao-right-tools-sidebar {
    display: none;
  }
}

/* =========================================================================
   ANGEL ONE SIMPLE TACTICAL CHART (CLEAN, MODERN, SIMPLE)
   ========================================================================= */
.simple-chart-card {
  position: relative;
  background: #090d15;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  margin-top: 14px;
}

.simple-chart-header {
  padding: 12px 18px;
  background: #0d121c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.simple-chart-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.simple-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  animation: pulseGlow 1.8s infinite;
}

.simple-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

/* Quick Instrument Pills */
.simple-inst-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.simple-inst-pill {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.simple-inst-pill:hover {
  color: #ffffff;
}

.simple-inst-pill.active {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.4);
}

/* Timeframe Group */
.simple-tf-group {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.simple-tf-group .ao-tf-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.simple-tf-group .ao-tf-btn:hover {
  color: #fff;
}

.simple-tf-group .ao-tf-btn.active {
  background: #00f2fe;
  color: #080b11;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

/* OHLC Deck */
.simple-ohlc-deck {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.simple-ohlc-deck b {
  color: #ffffff;
}

.simple-ohlc-deck .val-red {
  color: var(--bear-red);
}

.simple-ohlc-deck .val-green {
  color: var(--bull-green);
}

/* Canvas Viewport */
.simple-chart-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 640px;
  background: #090d15;
  overflow: hidden;
  transition: height 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.simple-chart-canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Chart Height Selector & Fullscreen Button */
.chart-height-selector {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.ao-height-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ao-height-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.ao-height-btn.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: #00f2fe;
  color: #00f2fe;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.ao-height-btn.btn-fs {
  font-size: 11px;
  padding: 2px 8px;
}

/* Signal Filter Pill Group in Chart Header */
.chart-signal-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sig-filter-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-right: 2px;
}

.btn-sig-filter {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.btn-sig-filter:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-sig-filter.active {
  background: rgba(0, 242, 254, 0.16);
  color: var(--accent-cyan, #00f2fe);
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
  font-weight: 800;
}

.btn-sig-filter.filter-buy.active {
  background: rgba(0, 230, 118, 0.18);
  color: #00e676;
  border-color: rgba(0, 230, 118, 0.6);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.35);
}

.btn-sig-filter.filter-sell.active {
  background: rgba(255, 23, 68, 0.18);
  color: #ff1744;
  border-color: rgba(255, 23, 68, 0.6);
  box-shadow: 0 0 12px rgba(255, 23, 68, 0.35);
}

/* Simple Chart Legend */
.simple-chart-legend {
  position: absolute;
  top: 8px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 14, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 10;
  max-width: calc(100% - 20px);
}

/* Legend Overlay Filter Buttons */
.legend-filter-group {
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: auto;
}

.legend-filter-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  margin-right: 2px;
}

.legend-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.15s ease;
}

.legend-filter-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.legend-filter-btn.active {
  background: #00f2fe;
  color: #080c14;
  font-weight: 800;
  border-color: #00f2fe;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.35);
}

.legend-filter-btn.btn-buy.active {
  background: #00e676;
  color: #080c14;
  border-color: #00e676;
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.35);
}

.legend-filter-btn.btn-sell.active {
  background: #ff1744;
  color: #ffffff;
  border-color: #ff1744;
  box-shadow: 0 0 8px rgba(255, 23, 68, 0.35);
}

.legend-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

/* Tactical Execution Card Filter Highlights */
.tactical-exec-card.filter-highlight {
  border-color: rgba(0, 230, 118, 0.6) !important;
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.25) !important;
}

.tactical-exec-card.card-pe.filter-highlight {
  border-color: rgba(255, 23, 68, 0.6) !important;
  box-shadow: 0 0 16px rgba(255, 23, 68, 0.25) !important;
}

.tactical-exec-card.filter-dimmed {
  opacity: 0.55;
  filter: grayscale(35%);
  transition: all 0.25s ease;
}

/* Simple Bottom Bar */
.simple-chart-bottom-strip {
  padding: 6px 16px;
  background: #0a0e17;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #64748b;
}

.bottom-strip-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 6px #00e676;
}

/* Angel One TradeOne Quick Order Buttons */
.ao-tradeone-quick-order {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.ao-quick-order-btn {
  border: none;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ao-quick-buy {
  background: #089981;
  color: #ffffff;
}

.ao-quick-buy:hover {
  background: #067a68;
}

.ao-quick-sell {
  background: #f23645;
  color: #ffffff;
}

.ao-quick-sell:hover {
  background: #d32f3f;
}

.ao-quick-order-qty {
  background: #1e222d;
  color: #d1d4dc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* Angel One TradeOne Bottom Strip Controls */
.ao-chart-range-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 12px;
}

.ao-range-chip {
  padding: 2px 6px;
  border-radius: 3px;
  color: #787b86;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ao-range-chip:hover,
.ao-range-chip.active {
  color: #d1d4dc;
  background: rgba(255, 255, 255, 0.08);
}

.ao-tick-by-tick-badge {
  color: #787b86;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 10px;
}

.ao-scale-tools {
  margin-left: 10px;
  color: #787b86;
  font-size: 10px;
}

/* =========================================================================
   GOOGLE GEMINI AI BRANDING & CHATBOT STYLES
   ========================================================================= */

/* Gemini Badges & Sparkles */
.gemini-sparkle {
  color: #00f2fe;
  display: inline-block;
  filter: drop-shadow(0 0 6px #00f2fe);
  animation: sparkleTwinkle 2.5s infinite ease-in-out;
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 10px #38bdf8); }
}

.badge-gemini {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(99, 102, 241, 0.18));
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.btn-nav-gemini-key {
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 5px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(56, 189, 248, 0.08);
  transition: all 0.2s ease;
}

.btn-nav-gemini-key:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
}

/* Floating Action Button (FAB) */
.gemini-fab {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 99990 !important;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #091322 0%, #0c233c 50%, #03486e 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 30px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 242, 254, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.gemini-fab:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 242, 254, 0.45);
}

.gemini-fab-sparkle {
  font-size: 17px;
  color: #00f2fe;
  line-height: 1;
  filter: drop-shadow(0 0 6px #00f2fe);
}

.gemini-fab-label {
  letter-spacing: 0.3px;
}

.gemini-fab-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  animation: pulseGlow 2s infinite;
}

/* Gemini Chat Window Container */
.gemini-chat-container {
  position: fixed;
  inset: 0;
  z-index: 99999 !important;
  pointer-events: none;
}

.gemini-chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 99998 !important;
}

.gemini-chat-container.open .gemini-chat-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.gemini-chat-window {
  position: fixed;
  bottom: 24px;
  right: 28px;
  width: 490px;
  max-width: calc(100vw - 32px);
  height: 650px;
  max-height: calc(100vh - 48px);
  background: rgba(10, 14, 23, 0.98);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 45px rgba(0, 242, 254, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100000 !important;
}

.gemini-chat-container.open .gemini-chat-window {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.btn-gemini-share-link {
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px !important;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gemini-share-link:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: rgba(56, 189, 248, 0.8) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

/* Chat Header */
.gemini-chat-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(14, 22, 38, 0.95), rgba(8, 12, 20, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.gemini-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gemini-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 19px;
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.4);
  flex-shrink: 0;
}

.gemini-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gemini-title-row h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.gemini-model-badge {
  font-size: 9px;
  font-weight: 700;
  font-family: monospace;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

.gemini-quick-model-select {
  font-size: 10px;
  font-weight: 700;
  font-family: monospace;
  background: rgba(15, 23, 42, 0.9);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 5px;
  padding: 2px 6px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  max-width: 175px;
}

.gemini-quick-model-select:hover,
.gemini-quick-model-select:focus {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.gemini-quick-model-select option {
  background: #0f172a;
  color: #f8fafc;
}

.gemini-telemetry-badge {
  font-size: 10.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-family: monospace;
}

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

/* Live Context Strip */
.gemini-context-strip {
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #94a3b8;
  flex-wrap: wrap;
}

.gemini-context-strip b {
  color: #f1f5f9;
}

/* Quick Prompt Suggestion Chips */
.gemini-chips-container {
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.gemini-chips-container::-webkit-scrollbar {
  display: none;
}

.gemini-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #cbd5e1;
  font-size: 11px;
  padding: 4px 10px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.gemini-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  transform: translateY(-1px);
}

/* Message Log Area */
.gemini-messages-box {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.gemini-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  animation: msgPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.gemini-msg.user {
  align-self: flex-end;
}

.gemini-msg.gemini {
  align-self: flex-start;
}

.gemini-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  word-break: break-word;
}

.gemini-msg.user .gemini-bubble {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(79, 70, 229, 0.28));
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff;
  border-bottom-right-radius: 3px;
}

.gemini-msg.gemini .gemini-bubble {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-bottom-left-radius: 3px;
}

.gemini-msg-meta {
  font-size: 9.5px;
  color: #64748b;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
}

.gemini-msg.user .gemini-msg-meta {
  justify-content: flex-end;
}

/* Typography inside AI bubbles */
.gemini-bubble h3 {
  font-size: 12.5px;
  font-weight: 700;
  color: #38bdf8;
  margin: 0 0 6px 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  padding-bottom: 4px;
}

.gemini-bubble ul {
  margin: 6px 0;
  padding-left: 18px;
}

.gemini-bubble li {
  margin-bottom: 4px;
}

.gemini-bubble strong, .gemini-bubble b {
  color: #ffffff;
  font-weight: 700;
}

.gemini-bubble blockquote {
  margin: 8px 0 0 0;
  padding: 6px 10px;
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid #38bdf8;
  border-radius: 4px;
  font-size: 11px;
  color: #cbd5e1;
}

.gemini-bubble code {
  background: rgba(0, 0, 0, 0.4);
  color: #38bdf8;
  padding: 1px 4px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
}

/* Typing Indicator */
.gemini-typing-indicator {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
  font-family: monospace;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.gemini-typing-sparkle {
  color: #00f2fe;
  font-size: 12px;
}

.typing-dots {
  display: flex;
  align-items: center;
  gap: 3px;
}

.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* Chat Input Bar */
.gemini-input-bar {
  padding: 10px 14px;
  background: rgba(8, 11, 18, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gemini-input-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 12px;
  color: #ffffff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.gemini-input-bar input:focus {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(255, 255, 255, 0.07);
}

.gemini-input-bar button {
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* =========================================================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM (NEAT, CLEAN & ROBUST)
   Breakpoints: 1280px (Desktop), 1024px (Tablet Land), 768px (Tablet Port),
   600px (Mobile), 480px / 360px (Small Mobile)
   ========================================================================= */

/* --- 1. COMPACT DESKTOPS & STANDARD LAPTOPS (max-width: 1520px) --- */
@media (max-width: 1520px) {
  .navbar {
    padding: 7px 14px;
    gap: 8px 10px;
  }
  .logo-subtitle {
    display: none !important;
  }
  .tab-txt-full, .mode-txt-full, .reload-txt-full {
    display: none !important;
  }
  .tab-txt-short, .mode-txt-short, .reload-txt-short {
    display: inline !important;
  }
  .nav-left {
    gap: 8px;
    flex-shrink: 0;
  }
  .nav-spot-ticker {
    padding: 2px 7px;
    font-size: 10px;
    gap: 4px;
  }
  .nav-tab-group {
    padding: 2px 4px;
    gap: 3px;
    flex-shrink: 0;
  }
  .nav-tab-btn {
    padding: 4px 7px;
    font-size: 11px;
    gap: 4px;
  }
  .nav-right {
    gap: 5px;
    flex-shrink: 0;
  }
  .mode-pill {
    padding: 3px 7px;
    font-size: 9.5px;
  }
  .nav-funds-pill, .nav-pnl-pill {
    padding: 3px 6px;
    font-size: 10px;
    gap: 3px;
  }
  .btn-paper-reload-mini {
    padding: 1px 4px;
    font-size: 8.5px;
  }
  .logo-title {
    font-size: 14.5px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- 2. WHEN SCREEN CANNOT FIT SINGLE ROW (< 1260px): CLEAN TWO-TIER BAR --- */
@media (max-width: 1260px) and (min-width: 769px) {
  .navbar {
    flex-wrap: wrap !important;
    padding: 8px 12px;
    row-gap: 8px;
  }
  .nav-left {
    order: 1;
    flex: 0 0 auto;
    gap: 8px;
  }
  .nav-right {
    order: 2;
    flex: 0 0 auto;
    margin-left: auto;
    gap: 6px;
  }
  .nav-tab-group {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 4px 6px;
    margin-top: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
  }
  .nav-tab-btn {
    flex: 1;
    max-width: 180px;
    justify-content: center;
    padding: 5px 8px;
  }
  .logo-subtitle {
    display: none !important;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tactical-matrix-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- 3. MEDIUM TABLETS & IPADS (max-width: 1024px) --- */
@media (max-width: 1024px) {
  .navbar {
    padding: 8px 12px;
  }
  .dashboard-body {
    padding: 12px 12px;
  }
  .nav-tab-btn {
    padding: 5px 6px;
    font-size: 10px;
  }
  .account-funds-strip {
    padding: 10px 14px;
  }
  .funds-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .account-profile-block {
    justify-content: space-between;
    width: 100%;
  }
  .funds-metrics-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    text-align: center;
  }
  .funds-metric-item {
    align-items: center;
  }
  .funds-action-block {
    width: 100%;
    justify-content: space-between;
  }
  .funds-action-block .btn-sync {
    flex: 1;
    max-width: 260px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sentinel-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
  .targeted-grid {
    grid-template-columns: 1fr;
  }
  .simple-chart-canvas-wrapper {
    height: 380px;
  }
}

/* =========================================================================
   3. TABLETS PORTRAIT & SMARTPHONES RESPONSIVE SYSTEM (max-width: 768px)
   ========================================================================= */
@media (max-width: 768px) {
  /* Main Container Layout with Space for Bottom Navbar & Circular FAB */
  .dashboard-body {
    padding: 8px 8px 105px 8px !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Fixed Bottom Mobile App Navbar (Holds Balance, Settings, Kill Switch, and 3-Dash Menu) */
  .navbar {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 52px !important;
    z-index: 10000 !important;
    background: rgba(7, 11, 22, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(0, 242, 254, 0.28) !important;
    border-bottom: none !important;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.85) !important;
    padding: 6px 10px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
    overflow-x: hidden !important;
  }

  .nav-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-shrink: 0;
  }

  .logo-group {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .logo-title {
    font-size: 11.5px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    font-weight: 800;
  }

  .logo-subtitle {
    display: none !important;
  }

  .status-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
  }

  /* Quick Spot Ticker hidden from bottom navbar on mobile (displayed inside 3-dash drawer) */
  .nav-spot-ticker {
    display: none !important;
  }

  /* Original desktop tab bar inside .navbar is hidden on mobile (clean bottom bar) */
  .navbar .nav-tab-group {
    display: none !important;
  }

  /* Mobile Sticky Top Workspace Tabs Strip */
  .mobile-top-tabs {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 42px !important;
    z-index: 999 !important;
    background: rgba(10, 15, 26, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    padding: 3px 6px !important;
    gap: 3px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
  }

  .mob-tab-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    padding: 0 4px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
  }

  .mob-tab-pill.active {
    background: rgba(0, 242, 254, 0.14);
    border-color: rgba(0, 242, 254, 0.35);
    color: #00f2fe;
    font-weight: 800;
  }

  .mob-tab-pill .mob-tab-ico {
    font-size: 13px;
  }

  /* Right Navbar Controls: Balance, Settings, Kill Switch, and 3-Dash Hamburger */
  .nav-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }

  .nav-funds-pill {
    padding: 3px 7px;
    font-size: 10px;
    gap: 3px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.25);
  }

  .funds-lbl {
    display: none;
  }

  .btn-paper-reload-mini {
    padding: 1px 4px;
    font-size: 8.5px;
    margin-left: 2px;
  }

  .nav-pnl-pill {
    display: none !important;
  }

  /* Mode selector hidden from top navbar on mobile (seamlessly integrated inside 3-dash hamburger menu) */
  .mode-selector {
    display: none !important;
  }

  /* Hide desktop Gemini nav key button on mobile (Gemini is accessible via mobile circular FAB & drawer) */
  #btnNavGeminiKey,
  .btn-nav-gemini-key {
    display: none !important;
  }

  .btn-icon {
    width: 31px;
    height: 31px;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .btn-kill {
    width: 31px;
    height: 31px;
    padding: 5px;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .btn-kill span {
    display: none;
  }

  /* 3-Dash Hamburger Button visible in Navbar */
  .btn-hamburger {
    display: flex !important;
  }

  /* Terminal sub-bar hidden on mobile (Client details, market status, IST clock & sync all in 3-dash menu) */
  .terminal-sub-bar {
    display: none !important;
  }

  /* Active Trade Global Strip */
  .active-trade-global-strip {
    padding: 8px 12px;
    font-size: 10.5px;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  /* Cards & Common UI */
  .card {
    padding: 12px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
  }

  .card-header-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-title-group h2 {
    font-size: 12.5px;
  }

  /* Trade Studio HUD */
  .trade-studio-hud {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .bracket-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .bracket-box {
    padding: 8px;
  }

  .bracket-box:nth-child(5) {
    grid-column: span 2;
  }

  .bracket-lbl {
    font-size: 8.5px;
  }

  .bracket-num {
    font-size: 14px;
  }

  .bracket-sub {
    font-size: 9px;
  }

  .pos-lots-deck {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .pos-partial-actions {
    width: 100%;
    justify-content: space-between;
  }

  .pos-action-footer .btn {
    width: 100%;
    padding: 10px 12px;
    font-size: 11.5px;
  }

  /* Tactical Engine Card */
  .engine-control-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .engine-state-title {
    font-size: 13.5px;
  }

  .engine-state-desc {
    font-size: 10px;
  }

  .trigger-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .trigger-pill {
    padding: 6px 8px;
    font-size: 10.5px;
    justify-content: space-between;
  }

  .lots-control-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .lots-control-group {
    justify-content: space-between;
    width: 100%;
  }

  .engine-sync-route {
    font-size: 9.5px;
    padding: 6px 8px;
  }

  /* Tactical Chart Card */
  .simple-chart-canvas-wrapper {
    height: 340px;
  }

  .simple-chart-header {
    padding: 8px 10px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
  }

  .simple-chart-title-area {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .simple-title-row {
    overflow: hidden;
  }

  .simple-chart-title {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .simple-inst-pills {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 4px;
  }

  .simple-inst-pill {
    flex: 1;
    text-align: center;
    padding: 4px 6px;
    font-size: 10px;
  }

  .chart-signal-filter-group {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 4px;
  }

  .btn-sig-filter {
    flex: 1;
    justify-content: center;
    padding: 5px 6px;
    font-size: 9.5px;
  }

  .ao-tradeone-quick-order {
    width: 100%;
    display: flex;
    gap: 6px;
  }

  .ao-quick-order-btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 11px;
    justify-content: center;
  }

  .ao-quick-order-qty {
    padding: 0 8px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .simple-tf-group {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    display: flex;
    gap: 4px;
    padding-bottom: 2px;
  }

  .ao-tf-btn {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 10px;
  }

  .simple-ohlc-deck {
    font-size: 9.5px;
    gap: 4px 8px;
    flex-wrap: wrap;
  }

  .chart-level-tuner-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px 8px;
  }

  .tuner-strip-title {
    grid-column: span 2;
    font-size: 9.5px;
  }

  .level-tuner-item {
    min-width: 0;
    width: 100%;
    padding: 5px 6px;
  }

  .level-tuner-lbl {
    font-size: 9px;
  }

  .stepper-wrap input {
    font-size: 11px;
  }

  .tuner-metrics-block {
    grid-column: span 2;
    text-align: center;
    font-size: 10px;
  }

  .tuner-actions-group {
    grid-column: span 2;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
  }

  .tuner-actions-group .btn {
    flex: 1;
    padding: 7px 8px;
    font-size: 10px;
    justify-content: center;
  }

  .simple-chart-legend {
    max-width: 95%;
    font-size: 8.5px;
    padding: 2px 6px;
    gap: 4px;
    flex-wrap: wrap;
  }

  .chip-guide {
    display: none;
  }

  .simple-chart-bottom-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 6px 10px;
    font-size: 9.5px;
  }

  .bottom-strip-left, .bottom-strip-right {
    justify-content: space-between;
    width: 100%;
  }

  .ao-chart-range-pills {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Strategy Config Card */
  .tactical-strategy-card .card-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions-group {
    width: 100%;
    justify-content: space-between;
  }

  .strategy-mode-pill-group {
    width: 100%;
    display: flex;
  }

  .strategy-mode-pill {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    font-size: 10px;
  }

  .config-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-full {
    grid-column: span 1;
  }

  .form-full button {
    width: 100%;
    padding: 10px 12px;
  }

  /* Option Chain View */
  .targeted-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .target-card {
    padding: 10px 10px;
  }

  .target-symbol {
    font-size: 13.5px;
  }

  .check-detail {
    font-size: 10px;
  }

  .mobile-swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 10px;
    color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.06);
    border: 1px dashed rgba(0, 242, 254, 0.25);
    border-radius: 6px;
    padding: 5px 10px;
    margin-bottom: 8px;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
  }

  .algo-table {
    min-width: 580px;
    font-size: 10.5px;
  }

  .algo-table th, .algo-table td {
    padding: 5px 6px;
  }

  .header-strike, .strike-cell {
    background: rgba(14, 20, 32, 0.95);
  }

  /* Manual Execution Dock */
  .manual-execution-dock {
    padding: 10px;
    border-radius: 10px;
  }

  .dock-header-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .dock-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
  }

  .btn-dock-action {
    padding: 8px 10px;
    min-height: 52px;
  }

  .btn-dock-action .dock-btn-main {
    font-size: 11px;
  }

  .btn-dock-action .dock-btn-price {
    font-size: 13px;
  }

  .btn-dock-action .dock-btn-desc {
    display: none;
  }

  /* AI Sentinel View */
  .sentinel-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sentinel-header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .sentinel-verdict-banner {
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px;
  }

  .verdict-actions-right {
    width: 100%;
    justify-content: space-between;
  }

  .verdict-pills {
    width: 100%;
    justify-content: space-between;
  }

  .v-pill {
    flex: 1;
    text-align: center;
    font-size: 10px;
  }

  /* P&L & History View */
  .account-funds-strip {
    padding: 10px 12px;
  }

  .funds-metrics-group {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
  }

  .funds-metric-item {
    padding: 6px 8px;
  }

  .funds-label {
    font-size: 8.5px;
  }

  .funds-val {
    font-size: 13.5px;
  }

  .funds-val.val-cash {
    font-size: 14.5px;
  }

  .funds-action-block {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .funds-action-block .btn-sync {
    max-width: 100%;
    width: 100%;
    justify-content: center;
  }

  .history-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .history-kpi-card {
    padding: 8px 8px;
  }

  .kpi-label {
    font-size: 8.5px;
  }

  .kpi-val {
    font-size: 17px;
  }

  .history-header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .history-filter-group, .history-tab-group {
    width: 100%;
    display: flex;
  }

  .history-filter-btn, .history-tab-btn {
    flex: 1;
    text-align: center;
    padding: 5px 4px;
    font-size: 10px;
  }

  .history-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .history-table {
    min-width: 580px;
    font-size: 10.5px;
  }

  /* Gemini Floating Action Button (FAB) Mobile Optimization: Circular compact button above navbar */
  .gemini-fab {
    bottom: 58px !important;
    right: 12px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    z-index: 9998 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.75), 0 0 16px rgba(0, 242, 254, 0.35) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.6) !important;
  }

  .gemini-fab .gemini-fab-label {
    display: none !important;
  }

  .gemini-fab-sparkle {
    font-size: 20px !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  .gemini-fab-status-dot {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 6px !important;
    height: 6px !important;
  }

  .gemini-chat-window {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    max-width: 100vw;
    height: 82vh;
    max-height: 85vh;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    bottom: 0;
    right: 0;
    z-index: 1001;
  }

  .gemini-chat-header {
    padding: 10px 12px;
  }

  .gemini-title-row h3 {
    font-size: 12.5px;
  }

  .gemini-telemetry-badge {
    font-size: 9px;
  }

  .gemini-context-strip {
    padding: 6px 10px;
    font-size: 9px;
  }

  .gemini-bubble {
    font-size: 12px;
    padding: 8px 12px;
  }

  .gemini-input-bar {
    padding: 8px 10px;
  }

  .gemini-input-bar input {
    font-size: 11.5px;
    padding: 8px 10px;
  }

  .gemini-input-bar button {
    padding: 8px 12px;
    font-size: 11px;
  }

  /* Modals */
  .modal-card {
    max-width: 95vw;
    max-height: 88vh;
    margin: 10px auto;
    padding: 14px;
    border-radius: 14px;
  }

  .pnl-modal-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .pnl-modal-kpi-card:nth-child(5) {
    grid-column: span 2;
  }
}

/* =========================================================================
   4. SMARTPHONES & COMPACT SCREENS (max-width: 480px)
   ========================================================================= */
@media (max-width: 480px) {
  .navbar {
    padding: 6px 8px;
    height: 48px;
    gap: 4px;
  }

  .logo-title {
    font-size: 12px;
    letter-spacing: 0.01em;
  }

  .nav-right {
    gap: 4px;
  }

  .nav-funds-pill {
    padding: 3px 6px;
    font-size: 9.5px;
    gap: 3px;
  }

  .btn-icon {
    width: 29px;
    height: 29px;
    padding: 4px;
  }

  .btn-kill {
    width: 29px;
    height: 29px;
    padding: 4px;
  }

  .btn-hamburger {
    width: 29px;
    height: 29px;
  }

  .mobile-top-tabs {
    height: 38px;
    padding: 2px 4px;
    gap: 2px;
  }

  .mob-tab-pill {
    height: 28px;
    font-size: 9.5px;
    padding: 0 3px;
    gap: 3px;
  }

  .mob-tab-pill .mob-tab-ico {
    font-size: 11.5px;
  }
}

@media (max-width: 360px) {
  .navbar {
    padding: 4px 6px !important;
    height: 48px !important;
    gap: 3px !important;
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .logo-group {
    gap: 4px;
    min-width: 0;
  }

  .logo-title {
    font-size: 9.5px !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
  }

  .nav-right {
    gap: 3px !important;
  }

  .nav-funds-pill {
    padding: 2px 4px !important;
    font-size: 8px !important;
    gap: 2px !important;
  }

  .btn-paper-reload-mini {
    display: none !important;
  }

  .btn-icon, .btn-kill, .btn-hamburger {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    padding: 2px !important;
  }

  #btnNavGeminiKey,
  .btn-nav-gemini-key {
    display: none !important;
  }

  .mobile-top-tabs {
    height: 35px;
    padding: 2px 2px;
    gap: 1.5px;
  }

  .mob-tab-pill {
    height: 26px;
    font-size: 8.5px;
    padding: 0 2px;
    gap: 2px;
  }

  .mob-tab-pill .mob-tab-ico {
    font-size: 10px;
  }

  .dashboard-body {
    padding: 6px 6px 110px 6px !important;
  }

  .card {
    padding: 10px 8px;
    border-radius: 10px;
  }

  .simple-chart-canvas-wrapper {
    height: 310px;
  }

  .bracket-num {
    font-size: 13px;
  }

  .bracket-box {
    padding: 6px 7px;
  }

  .dock-header-strip {
    grid-template-columns: 1fr;
  }

  .history-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .history-kpi-card {
    padding: 6px;
  }

  .kpi-val {
    font-size: 15px;
  }
}

/* =========================================================================
   ANGEL ONE TRADEONE MARGIN GUARD & INSUFFICIENT FUNDS SYSTEM
   ========================================================================= */
.margin-guard-deck {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(13, 18, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.margin-guard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.margin-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.margin-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.margin-lot-rule {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.margin-status-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.margin-status-badge.badge-insufficient {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: pulseGlowRed 2s infinite;
}

.margin-status-badge.badge-sufficient {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Margin Stats Grid (1 Lot vs Trade Lots vs Available) */
.margin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.margin-stat-tile {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.2s;
}

.margin-stat-tile:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.margin-stat-tile .stat-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.margin-stat-tile .stat-val {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.margin-stat-tile .stat-sub {
  font-size: 9px;
  color: #64748b;
}

.stat-val.highlight-lot {
  color: #38bdf8;
}

.stat-val.highlight-req {
  color: #f59e0b;
}

.stat-val.highlight-avail {
  color: #34d399;
}

/* Angel One TradeOne Insufficient Margin Banner (Faithful Replication) */
.margin-warning-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, rgba(38, 24, 11, 0.95) 0%, rgba(29, 18, 8, 0.9) 100%);
  border: 1px solid #d97706;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
}

.margin-warning-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.margin-warning-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.margin-warning-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.margin-warning-title {
  font-size: 12px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.2px;
}

.margin-warning-desc {
  font-size: 11px;
  font-weight: 600;
  color: #fef08a;
  line-height: 1.35;
}

.btn-add-funds {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.6px;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.45);
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-add-funds:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.6);
}

/* Margin Success Banner */
.margin-success-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, rgba(6, 44, 30, 0.95) 0%, rgba(4, 30, 20, 0.9) 100%);
  border: 1px solid #059669;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
}

.margin-success-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.margin-success-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.margin-success-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.margin-success-title {
  font-size: 12px;
  font-weight: 800;
  color: #34d399;
}

.margin-success-desc {
  font-size: 11px;
  font-weight: 500;
  color: #a7f3d0;
}

.margin-success-chip {
  font-size: 9.5px;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  white-space: nowrap;
}

/* Quick Margin Preview under Chart Bar */
.ao-quick-margin-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10.5px;
}

.qmp-item {
  color: #94a3b8;
}

.qmp-item b {
  color: #ffffff;
}

.qmp-sep {
  color: #475569;
}

.qmp-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.qmp-badge.badge-warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.qmp-badge.badge-ok {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Option Chain Dock Margin Strip */
.dock-margin-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 8px;
  font-size: 11px;
  flex-wrap: wrap;
}

.dms-item {
  color: #94a3b8;
}

.dms-item b {
  color: #f1f5f9;
}

.dms-sep {
  color: #475569;
}

.dms-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.dms-badge.dms-shortfall {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.dms-badge.dms-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Margin Alert Modal (Angel One TradeOne Styling) */
.margin-alert-card {
  max-width: 540px;
  width: 92%;
  background: #0f1623;
  border: 1px solid #d97706;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 24px rgba(217, 119, 6, 0.25);
  border-radius: 12px;
}

.margin-modal-header {
  background: #19140d;
  border-bottom: 1px solid rgba(217, 119, 6, 0.3);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.margin-modal-icon {
  font-size: 20px;
}

.margin-modal-title {
  font-size: 14px;
  font-weight: 800;
  color: #fbbf24;
  margin: 0;
  letter-spacing: 0.4px;
}

.margin-modal-sub {
  font-size: 11px;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

.margin-modal-body {
  padding: 18px;
}

.margin-modal-contract {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
}

.margin-modal-contract .contract-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  margin-right: 8px;
}

.margin-modal-contract .contract-symbol {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.margin-modal-contract .contract-price {
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
  margin-right: 8px;
}

.margin-modal-contract .contract-lots {
  font-size: 11px;
  color: #94a3b8;
}

.margin-modal-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.breakdown-lbl {
  color: #94a3b8;
}

.breakdown-val {
  color: #ffffff;
}

.breakdown-val.highlight-red {
  color: #f87171;
}

.breakdown-val.highlight-avail {
  color: #34d399;
}

.breakdown-row.total-shortfall-row {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2px;
}

.breakdown-val.highlight-shortfall {
  font-size: 15px;
  font-weight: 800;
  color: #ef4444;
}

.margin-modal-note {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.45;
  margin-top: 12px;
  background: rgba(0, 242, 254, 0.05);
  border-left: 3px solid var(--accent-cyan);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
}

.margin-modal-footer {
  padding: 12px 18px;
  background: #090e18;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-deposit-action {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5) !important;
  border: none !important;
}

@keyframes pulseGlowRed {
  0%, 100% {
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.3);
  }
  50% {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
  }
}

@media (max-width: 768px) {
  .margin-stats-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .margin-warning-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-add-funds {
    width: 100%;
    text-align: center;
  }
  .dock-margin-strip {
    font-size: 9.5px;
    gap: 6px;
  }
}

/* =========================================================================
   PAPER TRADING RELOAD & PERSISTENT WALLET CONTROLS
   ========================================================================= */
.btn-paper-reload-mini {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-paper-reload-mini:hover {
  background: rgba(0, 242, 254, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
}

.btn-deck-reload {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-deck-reload:hover {
  background: #0284c7;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.5);
}

/* =========================================================================
   TACTICAL EXECUTION ENGINE: DUAL MATRIX & CHOSEN OPTION CHAIN STYLES
   ========================================================================= */
.tactical-chain-strip {
  background: rgba(10, 18, 30, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.chain-strip-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chain-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse-cyan 1.8s infinite;
}

@keyframes pulse-cyan {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(0, 242, 254, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

.chain-lbl {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chain-expiry-badge {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.45);
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

.chain-strip-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chain-picker-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.tactical-expiry-select {
  background: rgba(4, 11, 24, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tactical-expiry-select:hover, .tactical-expiry-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

/* Dual Tactical Matrix Grid */
.tactical-matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.tactical-exec-card {
  background: rgba(13, 22, 38, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.tactical-exec-card.card-ce {
  border: 1px solid rgba(0, 230, 118, 0.3);
  box-shadow: 0 4px 18px rgba(0, 230, 118, 0.06);
}

.tactical-exec-card.card-ce:hover {
  border-color: rgba(0, 230, 118, 0.6);
  box-shadow: 0 6px 24px rgba(0, 230, 118, 0.15);
  transform: translateY(-1px);
}

.tactical-exec-card.card-pe {
  border: 1px solid rgba(255, 23, 68, 0.3);
  box-shadow: 0 4px 18px rgba(255, 23, 68, 0.06);
}

.tactical-exec-card.card-pe:hover {
  border-color: rgba(255, 23, 68, 0.6);
  box-shadow: 0 6px 24px rgba(255, 23, 68, 0.15);
  transform: translateY(-1px);
}

.exec-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  flex-wrap: nowrap;
}

.exec-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.exec-dir-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.exec-dir-badge.badge-ce {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.5);
  color: #00e676;
}

.exec-dir-badge.badge-pe {
  background: rgba(255, 23, 68, 0.15);
  border: 1px solid rgba(255, 23, 68, 0.5);
  color: #ff1744;
}

.exec-contract-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.exec-contract-badge.badge-ce {
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: #e2e8f0;
}

.exec-contract-badge.badge-pe {
  background: rgba(255, 23, 68, 0.08);
  border: 1px solid rgba(255, 23, 68, 0.3);
  color: #e2e8f0;
}

.exec-readiness-chip {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip-pending {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.chip-hot {
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.6);
  color: #fb923c;
  animation: pulse-orange 1.5s infinite;
}

.chip-ready {
  background: rgba(0, 230, 118, 0.25);
  border: 1px solid #00e676;
  color: #00e676;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.5);
  animation: pulse-ready 1s infinite;
}

@keyframes pulse-ready {
  0% { transform: scale(0.98); }
  50% { transform: scale(1.03); }
  100% { transform: scale(0.98); }
}

/* Level Blocks */
.exec-level-block {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.level-block-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
}

.level-title {
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.level-condition {
  font-size: 11.5px;
  font-weight: 800;
}

.level-condition.color-ce { color: #00e676; }
.level-condition.color-pe { color: #ff1744; }

.level-sub-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.val-spot { color: #e2e8f0; font-weight: 700; }
.val-opt-ce { color: #34d399; font-weight: 800; }
.val-opt-pe { color: #f87171; font-weight: 800; }

.gap-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.gap-badge.gap-ce {
  background: rgba(0, 230, 118, 0.12);
  color: #34d399;
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.gap-badge.gap-pe {
  background: rgba(255, 23, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(255, 23, 68, 0.3);
}

.level-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.level-progress-bar.bar-ce {
  background: linear-gradient(90deg, #00b0ff, #00e676);
  height: 100%;
  border-radius: 2px;
  transition: width 0.35s ease;
}

.level-progress-bar.bar-pe {
  background: linear-gradient(90deg, #ff9100, #ff1744);
  height: 100%;
  border-radius: 2px;
  transition: width 0.35s ease;
}

/* Bracket Strip */
.exec-bracket-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.bracket-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.bracket-tile .b-lbl {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.bracket-tile .b-val {
  font-size: 11px;
  font-weight: 800;
}

.val-sl { color: #ef4444; }
.val-tp1 { color: #38bdf8; }
.val-tp2 { color: #10b981; }

/* Dual Checklist Strip */
.dual-check-strip {
  display: flex;
  gap: 6px;
}

.dual-check-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-dim);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dual-check-pill .check-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.2s ease;
}

.dual-check-pill.condition-met {
  background: rgba(0, 230, 118, 0.15);
  border-color: rgba(0, 230, 118, 0.5);
  color: #00e676;
}

.dual-check-pill.condition-met .check-dot {
  background: #00e676;
  box-shadow: 0 0 6px #00e676;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .tactical-matrix-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .tactical-chain-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .chain-strip-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* =========================================================================
   AUTO-WATCHLIST TAGS & WORKSPACE STYLES
   ========================================================================= */
.ao-tradeone-workspace {
  display: flex;
  min-height: 640px;
  background: #080b11;
  position: relative;
  border-radius: 0 0 10px 10px;
  transition: min-height 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ao-watchlist-sidebar {
  width: 240px;
  background: #0c1017;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.ao-watchlist-sidebar.collapsed {
  width: 36px !important;
  overflow: hidden;
}

.ao-watchlist-sidebar.collapsed .ao-watchlist-header,
.ao-watchlist-sidebar.collapsed .ao-watchlist-list,
.ao-watchlist-sidebar.collapsed .ao-wl-footer {
  display: none !important;
}

.ao-watchlist-sidebar.collapsed .ao-wl-collapsed-strip {
  display: flex !important;
}

.ao-wl-collapsed-strip {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px;
  gap: 12px;
  height: 100%;
}

.btn-wl-expand {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: #00f2fe;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
}

.wl-collapsed-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #64748b;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* Custom Sleek Scrollbar */
.ao-watchlist-list::-webkit-scrollbar {
  width: 4px;
}
.ao-watchlist-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.ao-watchlist-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.ao-watchlist-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 254, 0.4);
}

.ao-wl-item {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ao-wl-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ao-wl-item.active {
  background: rgba(0, 242, 254, 0.08);
  border-left: 3px solid #00f2fe;
}

.ao-wl-item.is-target {
  background: rgba(0, 242, 254, 0.03);
  border-left: 3px solid var(--accent-cyan);
}

.ao-wl-item.is-target:hover {
  background: rgba(0, 242, 254, 0.08);
}

.wl-item-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wl-item-row-top {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-item-sym {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
}

.wl-item-sub {
  font-size: 9px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  white-space: nowrap;
}

.wl-item-price {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
}

.wl-item-chg {
  font-size: 9px;
  font-weight: 600;
}

.wl-item-chg.pos { color: #00e676; }
.wl-item-chg.neg { color: #ff3366; }

.wl-target-tag {
  font-size: 7.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.wl-target-tag.tag-ce {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: #00e676;
}

.wl-target-tag.tag-pe {
  background: rgba(255, 23, 68, 0.15);
  border: 1px solid rgba(255, 23, 68, 0.4);
  color: #ff1744;
}

.wl-target-tag.tag-spot {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: var(--accent-cyan);
}

.btn-wl-collapse {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s ease;
}

.btn-wl-collapse:hover {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.ao-wl-footer {
  padding: 6px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--text-dim);
  background: #090d14;
}

.wl-footer-badge {
  color: var(--accent-cyan);
  font-weight: 700;
}

.wl-footer-pcr {
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .ao-tradeone-workspace {
    flex-direction: column;
  }
  .ao-watchlist-sidebar {
    width: 100%;
    max-height: 180px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* =========================================================================
   TACTICAL STRATEGY TARGET CONTRACT SELECTION & BUY/SELL ACTION CONTROLS
   ========================================================================= */
.tactical-contracts-panel {
  margin-bottom: 16px;
  width: 100%;
}

.tactical-contracts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 860px) {
  .tactical-contracts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.tactical-contract-box {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85), rgba(10, 15, 26, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.tactical-contract-box.box-ce {
  border-top: 3px solid #00e676;
}

.tactical-contract-box.box-ce:hover {
  border-color: rgba(0, 230, 118, 0.45);
  box-shadow: 0 6px 22px rgba(0, 230, 118, 0.12);
}

.tactical-contract-box.box-pe {
  border-top: 3px solid #ff1744;
}

.tactical-contract-box.box-pe:hover {
  border-color: rgba(255, 23, 68, 0.45);
  box-shadow: 0 6px 22px rgba(255, 23, 68, 0.12);
}

.tc-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tc-badge-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tc-leg-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.tc-leg-pill.pill-ce {
  background: rgba(0, 230, 118, 0.18);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.4);
}

.tc-leg-pill.pill-pe {
  background: rgba(255, 23, 68, 0.18);
  color: #ff1744;
  border: 1px solid rgba(255, 23, 68, 0.4);
}

.tc-contract-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.tc-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tc-live-ltp {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.tc-expiry-chip {
  font-size: 10.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tc-box-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tc-control-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tc-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tc-select-wrap {
  position: relative;
  width: 100%;
}

.tc-strike-select {
  width: 100%;
  background: #090e18;
  color: #f1f5f9;
  border: 1px solid rgba(0, 242, 254, 0.22);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.tc-strike-select:hover {
  border-color: rgba(0, 242, 254, 0.45);
}

.tc-strike-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.2);
}

.tc-action-btn-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

.strat-action-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.strat-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.strat-action-btn .tc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* Active State for BUY Buttons */
.strat-action-btn.btn-action-buy.active {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.25), rgba(0, 200, 83, 0.12)) !important;
  border-color: #00e676 !important;
  color: #00e676 !important;
  box-shadow: 0 2px 10px rgba(0, 230, 118, 0.25);
}

.strat-action-btn.btn-action-buy.active .tc-dot {
  background: #00e676;
  box-shadow: 0 0 6px #00e676;
}

/* Active State for SELL Buttons */
.strat-action-btn.btn-action-sell.active {
  background: linear-gradient(135deg, rgba(255, 23, 68, 0.25), rgba(213, 0, 0, 0.12)) !important;
  border-color: #ff1744 !important;
  color: #ff1744 !important;
  box-shadow: 0 2px 10px rgba(255, 23, 68, 0.25);
}

.strat-action-btn.btn-action-sell.active .tc-dot {
  background: #ff1744;
  box-shadow: 0 0 6px #ff1744;
}

@media (max-width: 480px) {
  .strat-action-btn {
    font-size: 10.5px;
    padding: 8px 6px;
  }
}

/* =========================================================================
   MOBILE 3-DASH HAMBURGER MENU & SLIDE-IN TELEMETRY DRAWER
   ========================================================================= */

/* Desktop: Hide Hamburger, Mobile Drawer, and Mobile Top Tabs on screens > 768px */
@media (min-width: 769px) {
  .btn-hamburger {
    display: none !important;
  }

  .mobile-drawer-backdrop {
    display: none !important;
  }

  .mobile-nav-drawer {
    display: none !important;
  }

  .mobile-top-tabs {
    display: none !important;
  }
}

/* Base Hamburger Button Styling (Visible ONLY on Mobile screens <= 768px) */
@media (max-width: 768px) {
  .btn-hamburger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 3.5px !important;
    width: 33px !important;
    height: 33px !important;
    padding: 0 !important;
    background: rgba(0, 242, 254, 0.12) !important;
    border: 1.5px solid #00f2fe !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    flex-shrink: 0 !important;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3) !important;
  }

  .btn-hamburger:hover,
  .btn-hamburger:focus {
    background: rgba(0, 242, 254, 0.25) !important;
    border-color: #00f2fe !important;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.5) !important;
  }

  .btn-hamburger:active {
    transform: scale(0.92) !important;
  }

  .btn-hamburger .hamburger-line {
    display: block !important;
    width: 17px !important;
    height: 2.2px !important;
    background: #00f2fe !important;
    border-radius: 2px !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 0 4px rgba(0, 242, 254, 0.6) !important;
  }

  .btn-hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(5.7px) rotate(45deg) !important;
  }

  .btn-hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0 !important;
  }

  .btn-hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-5.7px) rotate(-45deg) !important;
  }
}

/* =========================================================================
   DRAWER BACKDROP & CONTAINER
   ========================================================================= */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 15, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 88vw;
  height: 100%;
  height: 100dvh;
  background: #070b15;
  background: linear-gradient(180deg, #090e1c 0%, #060913 100%);
  border-left: 1px solid rgba(0, 242, 254, 0.22);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

body.drawer-open {
  overflow: hidden !important;
}

/* Drawer Header */
.mob-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(10, 16, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.mob-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mob-brand-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #f8fafc;
}

.mob-brand-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
}

.mob-drawer-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mob-drawer-close-btn:hover {
  background: rgba(255, 23, 68, 0.15);
  border-color: #ff1744;
  color: #ff5252;
}

/* Drawer Content Scrollable Body */
.mob-drawer-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 80px; /* space above bottom nav dock */
}

/* Drawer Cards */
.mob-drawer-card {
  background: rgba(13, 20, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mob-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.mob-card-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #00f2fe;
}

.mob-label {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Client Card */
.mob-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mob-account-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mob-account-col.text-right {
  text-align: right;
}

.mob-client-id {
  font-size: 13px;
  font-weight: 800;
  color: #00e676;
}

.mob-client-name {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
}

.mob-phase-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mob-phase-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  word-break: break-word;
}

.mob-phase-chip.phase-closed {
  background: rgba(255, 23, 68, 0.08);
  border-color: rgba(255, 23, 68, 0.3);
  color: #ff5252;
}

.mob-phase-chip.phase-live {
  background: rgba(0, 230, 118, 0.08);
  border-color: rgba(0, 230, 118, 0.3);
  color: #00e676;
}

/* Mode Switcher Inside Drawer */
.mob-active-mode-label {
  font-size: 9.5px;
  font-weight: 800;
  color: #38bdf8;
}

.mob-mode-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mob-mode-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  color: #94a3b8;
}

.mob-mode-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.mob-mode-btn.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: #00f2fe;
  color: #f8fafc;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
}

.mob-mode-btn.active#mobModeLiveBtn {
  background: rgba(0, 230, 118, 0.1);
  border-color: #00e676;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.18);
}

.mob-mode-btn .mode-icon {
  font-size: 16px;
}

.mob-mode-btn .mode-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.mob-mode-btn .mode-btn-title {
  font-size: 11px;
  font-weight: 800;
}

.mob-mode-btn .mode-btn-sub {
  font-size: 9px;
  color: #64748b;
}

.mob-mode-btn .mode-check-pill {
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #64748b;
}

.mob-mode-btn.active .mode-check-pill {
  background: #00f2fe;
  color: #040810;
}

.mob-mode-btn.active#mobModeLiveBtn .mode-check-pill {
  background: #00e676;
  color: #040810;
}

/* Capital & P&L Card */
.mob-reload-btn {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: #00f2fe;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
}

.mob-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mob-metric-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mob-metric-val {
  font-size: 13.5px;
  font-weight: 800;
}

.mob-metric-val.val-cash {
  color: #00e676;
}

.mob-metric-val.pos {
  color: #00e676;
}

.mob-metric-val.neg {
  color: #ff1744;
}

.mob-metric-val.zero {
  color: #94a3b8;
}

/* Market & Telemetry Card */
.mob-spot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mob-spot-price-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}

.mob-spot-num {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.mob-spot-delta {
  font-size: 11px;
  font-weight: 700;
}

.mob-spot-delta.pos {
  color: #00e676;
}

.mob-spot-delta.neg {
  color: #ff1744;
}

.mob-clock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.mob-time-text {
  font-size: 11.5px;
  color: #cbd5e1;
  margin-top: 2px;
}

.mob-time-text b {
  color: #00f2fe;
}

.mob-sync-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 6px;
  color: #00f2fe;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mob-sync-btn:hover {
  background: rgba(0, 242, 254, 0.2);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

.mob-sync-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  color: #64748b;
  padding-top: 2px;
}

/* Terminal Views Fast Jump List */
.mob-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mob-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  color: #94a3b8;
}

.mob-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

.mob-nav-item.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.4);
  color: #00f2fe;
}

.mob-nav-icon {
  font-size: 15px;
}

.mob-nav-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.mob-nav-title {
  font-size: 11px;
  font-weight: 700;
}

.mob-nav-sub {
  font-size: 8.5px;
  color: #64748b;
}

.mob-nav-arrow {
  font-size: 14px;
  color: #475569;
}

.mob-nav-item.active .mob-nav-arrow {
  color: #00f2fe;
}

/* Quick Action Links */
.mob-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mob-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
}

/* =========================================================================
   INSTITUTIONAL 7-PILLAR RISK FILTERS & DISCIPLINE BAR (RESPONSIVE)
   ========================================================================= */
.institutional-guard-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0 14px 0;
  width: 100%;
}

.guard-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(13, 20, 36, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
  min-height: 38px;
}

/* =========================================================================
   PRE-EXECUTION TACTICAL BRACKET SIZING BAR
   ========================================================================= */
.tactical-bracket-config-bar {
  background: rgba(10, 18, 32, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 9px;
  padding: 9px 12px;
  margin: 10px 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.bracket-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.b-cfg-title {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.b-cfg-hint {
  font-size: 9.5px;
  color: var(--text-dim);
}

.bracket-config-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.bracket-config-item {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bracket-config-item.cfg-sl { border-left: 3px solid #ef4444; }
.bracket-config-item.cfg-tp1 { border-left: 3px solid #38bdf8; }
.bracket-config-item.cfg-tp2 { border-left: 3px solid #10b981; }

.bracket-config-item .cfg-lbl {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bracket-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bracket-stepper .btn-step {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

.bracket-stepper .btn-step:hover {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
}

.bracket-pts-input {
  width: 44px;
  height: 22px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  border-radius: 4px;
  outline: none;
}

.bracket-pts-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 6px rgba(0, 242, 254, 0.4);
}

.unit-tag {
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 700;
}

/* =========================================================================
   REAL-TIME IN-FLIGHT BRACKET MODIFIER (POST-EXECUTION SL / TP)
   ========================================================================= */
.live-bracket-modifier {
  background: rgba(11, 20, 36, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.live-mod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.live-mod-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.live-mod-tag {
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-mod-hint {
  font-size: 9.5px;
  color: var(--text-dim);
}

.btn-trail-cost {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #10b981;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-trail-cost:hover {
  background: #10b981;
  color: #000000;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.live-mod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.live-mod-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.live-mod-box.mod-sl { border-top: 2px solid #ef4444; }
.live-mod-box.mod-tp1 { border-top: 2px solid #38bdf8; }
.live-mod-box.mod-tp2 { border-top: 2px solid #10b981; }

.live-mod-box .mod-lbl {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.mod-input-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mod-prefix {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.mod-input {
  flex: 1;
  min-width: 0;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 4px;
  outline: none;
}

.mod-input:focus {
  border-color: var(--accent-cyan);
}

.btn-mod-save {
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  color: #000;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-mod-save.btn-sl {
  background: #ef4444;
  color: #fff;
}
.btn-mod-save.btn-sl:hover {
  background: #dc2626;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.btn-mod-save.btn-tp1 {
  background: #38bdf8;
  color: #000;
}
.btn-mod-save.btn-tp1:hover {
  background: #0ea5e9;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.btn-mod-save.btn-tp2 {
  background: #10b981;
  color: #000;
}
.btn-mod-save.btn-tp2:hover {
  background: #059669;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.guard-pill:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.9);
}

.guard-icon {
  font-size: 14px;
  line-height: 1;
}

.guard-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.guard-value {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: right;
  white-space: nowrap;
}

.guard-value.chop {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.guard-value.active {
  color: #10b981;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.guard-value.locked {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.45);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.guard-value.live-ready {
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.14);
  border-color: rgba(0, 242, 254, 0.4);
}

.guard-value.trap {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.55);
  animation: pulseTrap 2s infinite;
}

@keyframes pulseTrap {
  0%, 100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 14px rgba(239, 68, 68, 0.6); }
}

.guard-value.paper {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.4);
}

/* =========================================================================
   GEMINI AI RESPONSIVE SIGNAL TABLE
   ========================================================================= */
.gemini-bubble .table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(10, 15, 28, 0.85);
  -webkit-overflow-scrolling: touch;
}

.gemini-bubble table.gemini-signal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.45;
  color: #e2e8f0;
}

.gemini-bubble table.gemini-signal-table th {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  text-align: left;
  white-space: nowrap;
}

.gemini-bubble table.gemini-signal-table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.gemini-bubble table.gemini-signal-table tr:last-child td {
  border-bottom: none;
}

.gemini-bubble table.gemini-signal-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.gemini-bubble table.gemini-signal-table tr:hover td {
  background: rgba(56, 189, 248, 0.08);
}

.gemini-bubble table.gemini-signal-table td:first-child {
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.gemini-chip.active-sparkle {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(168, 85, 247, 0.22)) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
}

/* =========================================================================
   RESPONSIVE MOBILE BREAKPOINTS FOR INSTITUTIONAL GUARD BAR
   ========================================================================= */
@media (max-width: 768px) {
  .institutional-guard-bar {
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 8px 0 12px 0;
  }

  .guard-pill {
    padding: 6px 10px;
  }

  .guard-label {
    font-size: 9px;
  }

  .guard-value {
    font-size: 9.5px;
    padding: 2px 6px;
  }

  .gemini-bubble table.gemini-signal-table {
    font-size: 10px;
  }

  .gemini-bubble table.gemini-signal-table th,
  .gemini-bubble table.gemini-signal-table td {
    padding: 6px 8px;
  }

  .bracket-config-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .live-mod-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .institutional-guard-bar {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .guard-pill {
    padding: 5px 8px;
  }

  .guard-label {
    font-size: 8.5px;
  }

  .guard-value {
    font-size: 9px;
    padding: 2px 5px;
  }

  .bracket-config-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}