/* ============================================================
   NeoTrade — Dark Trading Terminal Design System
   ============================================================ */

/* --- Google Fonts (fallback if offline) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  /* Background layers */
  --bg-base:        #060a14;
  --bg-surface:     #0c1222;
  --bg-elevated:    #111827;
  --bg-panel:       #0f1928;
  --bg-card:        #141f33;
  --bg-hover:       #1a2740;
  --bg-active:      #1e2e48;

  /* Brand Colors */
  --accent-blue:    #00c8ff;
  --accent-green:   #00e878;
  --accent-red:     #ff3b5c;
  --accent-gold:    #ffd700;
  --accent-purple:  #a78bfa;
  --accent-orange:  #ff9500;

  /* Text */
  --text-primary:   #e8edf7;
  --text-secondary: #8899bb;
  --text-muted:     #4a5878;
  --text-ce:        #00c8ff;
  --text-pe:        #ff3b5c;

  /* Borders */
  --border:         #1e2d48;
  --border-bright:  #2a3f63;
  --border-glow:    rgba(0, 200, 255, 0.25);

  /* Glow effects */
  --glow-blue:      0 0 20px rgba(0, 200, 255, 0.3);
  --glow-green:     0 0 20px rgba(0, 232, 120, 0.3);
  --glow-red:       0 0 20px rgba(255, 59, 92, 0.3);

  /* Dimensions */
  --topbar-h:       52px;
  --tabnav-h:       44px;
  --font-mono:      'JetBrains Mono', 'Courier New', monospace;
  --font-ui:        'Inter', system-ui, sans-serif;
  --radius-sm:      4px;
  --radius-md:      8px;
  --radius-lg:      12px;
  --radius-xl:      16px;
  --transition:     0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   LIGHT THEME DESIGN TOKENS (High-Contrast & Crisp Readability)
   ============================================================ */
[data-theme="light"] {
  /* Background layers */
  --bg-base:        #f1f5f9;
  --bg-surface:     #ffffff;
  --bg-elevated:    #f8fafc;
  --bg-panel:       #f8fafc;
  --bg-card:        #ffffff;
  --bg-hover:       #e2e8f0;
  --bg-active:      #cbd5e1;

  /* High-Contrast Brand Colors */
  --accent-blue:    #0284c7;
  --accent-green:   #15803d;
  --accent-red:     #dc2626;
  --accent-gold:    #b45309;
  --accent-purple:  #6d28d9;
  --accent-orange:  #c2410c;

  /* Deep High-Contrast Text */
  --text-primary:   #0f172a; /* Slate 900 for ultra-sharp reading */
  --text-secondary: #334155; /* Slate 700 */
  --text-muted:     #64748b; /* Slate 500 */
  --text-ce:        #0284c7;
  --text-pe:        #dc2626;

  /* Borders */
  --border:         #cbd5e1; /* Slate 300 for crisp visibility */
  --border-bright:  #94a3b8; /* Slate 400 */
  --border-glow:    rgba(2, 132, 199, 0.2);

  /* Glow effects */
  --glow-blue:      0 0 15px rgba(2, 132, 199, 0.15);
  --glow-green:     0 0 15px rgba(21, 128, 61, 0.15);
  --glow-red:       0 0 15px rgba(220, 38, 38, 0.15);
}

/* Light Theme Option Chain Table & Cards Styling */
[data-theme="light"] .oc-table {
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .oc-main-header th.ce-header {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
  font-weight: 800 !important;
}

[data-theme="light"] .oc-main-header th.pe-header {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
  font-weight: 800 !important;
}

[data-theme="light"] .oc-main-header th.strike-header {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .oc-sub-header th {
  background: #f8fafc !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .oc-table td {
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .oc-table td.itm-cell {
  background: #fef9c3 !important; /* Soft warm yellow ITM */
  border-bottom: 1px solid #fde047 !important;
}

[data-theme="light"] .oc-table td.itm-cell .ltp-val {
  color: #78350f !important; /* Dark amber ITM price */
  font-weight: 800 !important;
}

[data-theme="light"] .oc-table td.itm-cell .oi-val {
  color: #1e293b !important;
  font-weight: 600 !important;
}

[data-theme="light"] .oc-table td.otm-cell .ltp-val {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .oc-table td.otm-cell .oi-val {
  color: #475569 !important;
  font-weight: 500 !important;
}

[data-theme="light"] .strike-col {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 800 !important;
}

[data-theme="light"] .oc-table tbody tr.atm-row {
  background: #e0e7ff !important; /* Light indigo ATM */
  box-shadow: inset 0 1px 0 #6366f1, inset 0 -1px 0 #6366f1;
}

[data-theme="light"] .oc-table tbody tr.atm-row td {
  border-top: 1px solid #818cf8 !important;
  border-bottom: 1px solid #818cf8 !important;
}

[data-theme="light"] .oc-table tbody tr.atm-row td.atm-cell {
  background: #c7d2fe !important;
}

[data-theme="light"] .oc-table tbody tr.atm-row .ltp-val {
  color: #312e81 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .strike-col.atm-strike {
  background: #4f46e5 !important;
  color: #ffffff !important;
}

/* Light Theme Modals & Cards */
[data-theme="light"] .modal-overlay {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .modal-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .modal-header {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .modal-footer {
  border-top: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
}

[data-theme="light"] .input-ctrl,
[data-theme="light"] .select-ctrl {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .input-ctrl:focus,
[data-theme="light"] .select-ctrl:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2) !important;
}

[data-theme="light"] .btn-ghost {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-ghost:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .btn-secondary {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-secondary:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .btn-primary {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
}

[data-theme="light"] .stat-pill {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .stat-pill strong {
  color: #b45309 !important;
}

[data-theme="light"] .ticker-item {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .toast {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .toast-title {
  color: #0f172a !important;
}

[data-theme="light"] .toast-msg {
  color: #475569 !important;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   LOGIN MODAL
============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6, 10, 20, 0.9);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: min(400px, 90vw);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), var(--glow-blue);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .logo-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px var(--accent-blue));
  animation: pulse-glow 2s ease-in-out infinite;
}
.login-logo h1 {
  font-size: 28px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-logo p { color: var(--text-secondary); margin-top: 4px; font-size: 13px; }
.login-status {
  margin-bottom: 16px; text-align: center;
  min-height: 20px; font-size: 13px;
  color: var(--accent-green);
}
.login-hint { text-align: center; color: var(--text-muted); margin-top: 12px; font-size: 11px; }
.login-hint code { color: var(--text-secondary); font-family: var(--font-mono); }

/* ============================================================
   APP LAYOUT
============================================================ */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.hidden { display: none !important; }

/* ============================================================
/* ============================================================
   TOPBAR (Line 1: Logo, Center Tickers, Live Status & Profile)
============================================================ */
.topbar {
  height: 42px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  flex-shrink: 0;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-center-tickers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  padding: 0 4px;
  -webkit-overflow-scrolling: touch;
}

.topbar-center-tickers::-webkit-scrollbar {
  display: none;
}

.topbar-center-tickers .ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-center-tickers .ticker-item:hover {
  border-color: var(--border-bright);
}

.topbar-center-tickers .ticker-name {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.topbar-center-tickers .ticker-value {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-center-tickers .ticker-change {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.logo { display: flex; align-items: center; gap: 8px; cursor: default; }
.logo-icon { font-size: 20px; filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.45)); }
.logo-details { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text {
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-badge {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.14);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  width: fit-content;
  margin-top: 1px;
}
.connection-status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted);
  transition: background var(--transition);
}
.status-dot.connected { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); animation: blink 2s ease infinite; }
.status-dot.error { background: var(--accent-red); }
.clock { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }

/* ============================================================
   BOTTOM NAVIGATION BAR (Modern Mobile & Desktop Trading Nav)
============================================================ */
.tab-nav.bottom-nav {
  height: 52px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
  flex-shrink: 0;
  gap: 6px;
  box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 16px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-ui);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  flex: 1;
  max-width: 220px;
}

.tab-btn-icon {
  font-size: 15px;
  line-height: 1;
}

.tab-btn-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tab-btn.active {
  color: var(--accent-blue);
  background: rgba(0, 200, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(0, 200, 255, 0.3);
  font-weight: 700;
}

[data-theme="light"] .tab-btn.active {
  color: #0284c7 !important;
  background: #e0f2fe !important;
  box-shadow: inset 0 0 0 1px #bae6fd !important;
}

.badge {
  background: var(--accent-blue);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ============================================================
   PANEL & TOOLBAR
============================================================ */
.tab-content { flex: 1; overflow: hidden; position: relative; }
.panel {
  position: absolute; inset: 0;
  display: none; flex-direction: column; overflow: hidden;
}
.panel.active { display: flex; }

/* ============================================================
/* ============================================================
   LINE 2: CONTROLS (INSTRUMENT | EXPIRY | STRIKE RANGE | COLUMNS | MODE)
============================================================ */
.oc-row-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow: visible !important;
  position: relative;
  z-index: 100;
}

.oc-ctrl-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.oc-symbol-select-wrap {
  min-width: 130px;
  max-width: 220px;
  flex: 1.4;
}

.oc-range-select-wrap {
  width: 95px;
  flex-shrink: 0;
}

.oc-clean-select {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 100%;
  cursor: pointer;
  height: 28px;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .oc-row-controls {
    padding: 3px 6px;
    gap: 4px;
  }
  .oc-clean-select {
    font-size: 11px;
    padding: 2px 4px;
    height: 26px;
  }
  .oc-symbol-select-wrap {
    min-width: 115px;
  }
  .oc-range-select-wrap {
    width: 82px;
  }
}

.col-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-width: 210px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.col-dropdown-menu.hidden {
  display: none !important;
}

.col-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 3px 0;
  user-select: none;
}

.col-check-item input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent-blue);
  width: 14px;
  height: 14px;
}

/* ============================================================
   LINE 3: SUMMARY METRICS (Spot, Syn Fut, PCR, ATM)
============================================================ */
.oc-summary-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 3px 10px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.oc-summary-strip::-webkit-scrollbar {
  display: none;
}

.oc-summary-metrics {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.oc-metric-item {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
}

.oc-metric-item strong {
  font-family: var(--font-mono);
  font-weight: 700;
}

.oc-metric-divider {
  color: var(--border);
  font-size: 10px;
}

.btn-atm-jump {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-green);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.btn-atm-jump:hover {
  background: var(--accent-green);
  color: #ffffff;
  transform: scale(1.04);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.btn-atm-jump strong {
  font-family: var(--font-mono);
  font-weight: 800;
}

@keyframes atmJumpGlow {
  0% { background: rgba(59, 130, 246, 0.5) !important; outline: 2px solid var(--accent-blue) !important; }
  50% { background: rgba(234, 179, 8, 0.5) !important; outline: 2px solid var(--accent-gold) !important; }
  100% { background: transparent; outline: none; }
}

.flash-atm-jump {
  animation: atmJumpGlow 1.6s ease;
}

/* ============================================================
   FORM CONTROLS
============================================================ */
.select-ctrl, .input-ctrl {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px; font-family: var(--font-ui);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.select-ctrl:hover, .input-ctrl:hover { border-color: var(--accent-blue); }
.select-ctrl:focus, .input-ctrl:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(0,200,255,0.15); }
.select-sm { font-size: 11px; padding: 4px 8px; }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm);
  padding: 6px 16px; font-size: 12px; font-weight: 600;
  font-family: var(--font-ui); cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #0094ff 100%);
  color: var(--bg-base);
  box-shadow: 0 4px 16px rgba(0, 200, 255, 0.25);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 6px 24px rgba(0, 200, 255, 0.4); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-buy {
  background: linear-gradient(135deg, #00b84a 0%, var(--accent-green) 100%);
  color: var(--bg-base);
}
.btn-sell {
  background: linear-gradient(135deg, var(--accent-red) 0%, #ff6080 100%);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-xs {
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  line-height: 1.2;
  cursor: pointer;
  border: none;
}
.btn-xs:hover { filter: brightness(1.25); transform: scale(1.05); }
.btn-lg { width: 100%; padding: 12px 24px; font-size: 14px; }
.btn-spinner { animation: spin 0.8s linear infinite; }
.mt-16 { margin-top: 16px; }

/* ============================================================
   OPTION CHAIN
============================================================ */
.exchange-tabs {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.btn-ex-tab {
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-ex-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.btn-ex-tab.active {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 150, 255, 0.35);
}

.oc-container {
  flex: 1; overflow: auto;
  padding: 0;
  width: 100%;
}
.oc-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.oc-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-mono); font-size: 12px;
}
.oc-table thead th {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 8px 6px; text-align: right;
  border-bottom: 1px solid var(--border);
}
.oc-table .ce-header { background: rgba(0, 200, 255, 0.08); color: var(--text-ce); }
.oc-table .pe-header { background: rgba(255, 59, 92, 0.08); color: var(--text-pe); }
.oc-table .strike-header { background: var(--bg-elevated); color: var(--accent-gold); text-align: center; }
.col-ltp { min-width: 130px; }
.col-oi  { min-width: 70px; }
.col-oichg { min-width: 65px; }
.col-vol { min-width: 65px; }
.col-iv  { min-width: 48px; color: var(--text-secondary) !important; }

/* Column Visibility Dynamic Toggles */
.oc-table.hide-col-oi .col-oi { display: none !important; }
.oc-table.hide-col-oichg .col-oichg { display: none !important; }
.oc-table.hide-col-vol .col-vol { display: none !important; }
.oc-table.hide-col-iv .col-iv { display: none !important; }

.col-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  min-width: 220px;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}
.col-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-primary);
  padding: 4px 0;
  cursor: pointer;
  user-select: none;
}
.col-check-item input[type="checkbox"] {
  accent-color: var(--accent-blue);
  cursor: pointer;
}
.col-check-item:hover {
  color: var(--accent-blue);
}

.oc-table tbody tr {
  border-bottom: 1px solid rgba(30, 45, 72, 0.5);
  transition: background var(--transition);
}
.oc-table tbody tr:hover { background: var(--bg-hover); }
.oc-table tbody tr.atm-row { background: rgba(255, 215, 0, 0.06) !important; }
.oc-table tbody tr.atm-row .strike-col { color: var(--accent-gold) !important; }

.oc-table td {
  padding: 5px 6px; text-align: right;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

/* Base side styling */
.oc-table td.ce-side { background: rgba(0, 200, 255, 0.02); }
.oc-table td.pe-side { background: rgba(255, 59, 92, 0.02); }

/* In-The-Money (ITM) Highlighting */
.oc-table td.itm-cell {
  background: rgba(234, 179, 8, 0.09) !important; /* warm amber/gold ITM tint */
  border-bottom: 1px solid rgba(234, 179, 8, 0.14);
}
.oc-table td.itm-cell .ltp-val {
  color: #fef08a !important; /* bright soft yellow ITM price */
  font-weight: 600;
}
.oc-table td.itm-cell .oi-val {
  color: #e2e8f0;
}

/* Out-Of-The-Money (OTM) */
.oc-table td.otm-cell {
  background: transparent;
}
.oc-table td.otm-cell .ltp-val {
  color: var(--text-primary);
}

/* At-The-Money (ATM) Row & Cells */
.oc-table tbody tr.atm-row {
  background: rgba(99, 102, 241, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(129, 140, 248, 0.4), inset 0 -1px 0 rgba(129, 140, 248, 0.4);
}
.oc-table tbody tr.atm-row td {
  border-top: 1px solid rgba(129, 140, 248, 0.4) !important;
  border-bottom: 1px solid rgba(129, 140, 248, 0.4) !important;
}
.oc-table tbody tr.atm-row td.atm-cell {
  background: rgba(99, 102, 241, 0.22) !important;
}
.oc-table tbody tr.atm-row .ltp-val {
  color: #a5b4fc !important;
  font-weight: 700;
}

.strike-col.atm-strike {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  position: relative;
}
.atm-tag {
  display: inline-block;
  font-size: 9px;
  background: #fbbf24;
  color: #000;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

.oc-table .ltp-val { color: var(--text-primary); font-weight: 600; }
.oc-table .oi-val { color: var(--text-secondary); }
.oi-bar { background: var(--bg-base); border-radius: 2px; height: 3px; margin-top: 3px; }
.oi-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.oi-bar-fill.ce { background: var(--accent-blue); }
.oi-bar-fill.pe { background: var(--accent-red); }

/* Flash animations for price updates */
.flash-green { animation: flashGreen 0.4s ease; }
.flash-red   { animation: flashRed 0.4s ease; }

.text-up   { color: var(--accent-green) !important; }
.text-down { color: var(--accent-red) !important; }
.text-flat { color: var(--text-secondary) !important; }

.loading-cell {
  text-align: center !important; padding: 48px !important;
  color: var(--text-muted) !important;
  font-family: var(--font-ui) !important;
}

/* ============================================================
   STRATEGY BUILDER (SENSIBULL ENGINE)
============================================================ */
.sb-toolbar {
  padding: 8px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.sb-spot-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
}
.sb-dte-tag {
  font-size: 10px;
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.sb-3part-layout {
  display: grid;
  grid-template-columns: 390px 420px 1fr;
  height: calc(100vh - 125px);
  overflow: hidden;
  background: var(--bg-base);
  transition: grid-template-columns 0.25s ease;
}

/* When Option Chain is hidden, expand Parts 2 and 3 to cover entire area */
.sb-3part-layout.chain-hidden {
  grid-template-columns: 460px 1fr;
}
.sb-3part-layout.chain-hidden #sb-part-chain {
  display: none !important;
}

.sb-part {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 10px;
  border-right: 1px solid var(--border);
  background: var(--bg-base);
}
.sb-part:last-child {
  border-right: none;
}

.sb-part-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.sb-part-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.sb-part-subhead {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -4px;
}

.btn-hide-strip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-hide-strip:hover {
  background: var(--border-bright);
  color: var(--text-primary);
}

/* Part 1: Option Chain */
.sb-oc-picker-table-wrapper {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  max-height: calc(100vh - 210px);
}
.sb-picker-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
}
.sb-picker-table th {
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  padding: 6px 4px;
  color: var(--text-muted);
  font-size: 10px;
  border-bottom: 1px solid var(--border);
  z-index: 2;
  white-space: nowrap;
}
.sb-picker-table td {
  padding: 3px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  white-space: nowrap;
}
.sb-picker-table td.sb-itm-cell {
  background: rgba(234, 179, 8, 0.09) !important;
}
.sb-picker-table td.sb-otm-cell {
  background: transparent;
}
.sb-picker-table .btn-xs {
  padding: 1px 4px;
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 3px;
  cursor: pointer;
}
.sb-picker-table tr.sb-atm-row td {
  background: rgba(99, 102, 241, 0.22) !important;
  border-top: 1px solid rgba(129, 140, 248, 0.45) !important;
  border-bottom: 1px solid rgba(129, 140, 248, 0.45) !important;
}
.sb-picker-table tr.sb-atm-row .sb-strike-cell {
  background: rgba(99, 102, 241, 0.35) !important;
  color: #ffffff !important;
}
.atm-pill-xs {
  font-size: 8px;
  background: var(--accent-gold);
  color: #000;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 800;
  margin-left: 3px;
}

/* Part 2: Leg Cards */
.sb-legs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.sb-leg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color var(--transition);
}
.sb-leg-card.buy-card {
  border-left: 3.5px solid var(--accent-green);
}
.sb-leg-card.sell-card {
  border-left: 3.5px solid var(--accent-red);
}
.sb-leg-card:hover {
  border-color: var(--border-bright);
}
.sb-leg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.btn-action-badge {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
}
.btn-action-badge.buy {
  background: rgba(0, 232, 120, 0.15);
  color: var(--accent-green);
}
.btn-action-badge.sell {
  background: rgba(255, 59, 92, 0.15);
  color: var(--accent-red);
}

.sb-greeks-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.btn-icon-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
}
.btn-icon-del:hover {
  color: var(--accent-red);
  background: rgba(255, 59, 92, 0.1);
}

.sb-leg-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr 1.2fr;
  gap: 6px;
}
.sb-control-item label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.sb-input, .sb-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 5px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.sb-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
}
.btn-step {
  background: var(--bg-surface);
  border: none;
  color: var(--text-primary);
  font-weight: 700;
  width: 22px;
  height: 26px;
  cursor: pointer;
}
.btn-step:hover {
  background: var(--border-bright);
}
.sb-input-lots {
  flex: 1;
  width: 100%;
  border: none;
  background: transparent;
  text-align: center;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Part 3: Payoff & Metrics Dashboard */
.sb-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.sb-metric-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.metric-title {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.metric-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Greeks Ribbon */
.sb-greeks-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.greek-item span {
  color: var(--text-muted);
  margin-right: 4px;
}
.greek-item strong {
  color: var(--text-primary);
}

/* Payoff Chart Card */
.sb-chart-card {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.sb-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.badge-tag-expiry {
  font-size: 10px;
  color: var(--accent-green);
  background: rgba(0, 232, 120, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.badge-tag-target {
  font-size: 10px;
  color: #00c8ff;
  background: rgba(0, 200, 255, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.sb-chart-canvas-container {
  flex: 1;
  position: relative;
  min-height: 180px;
  width: 100%;
}
.sb-chart-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* What-If Simulation Bar */
.sb-simulation-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.sim-slider-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sim-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}
.sim-label-row strong {
  color: var(--accent-gold);
  font-family: var(--font-mono);
}
.sb-simulation-bar input[type="range"] {
  width: 100%;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

/* Action Footer */
.sb-action-footer {
  display: flex;
  gap: 10px;
}
.sb-action-footer .btn {
  flex: 1;
}

/* Responsive / Tablet & Mobile */
@media (max-width: 1200px) {
  .sb-3part-layout {
    grid-template-columns: 320px 380px 1fr;
  }
}
@media (max-width: 992px) {
  .sb-3part-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }
  .sb-part {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sb-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sb-simulation-bar {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   ORDER BOOK
============================================================ */
.ob-tabs {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  flex-shrink: 0;
}
.ob-tab {
  background: none; border: none; cursor: pointer;
  padding: 10px 14px;
  color: var(--text-muted); font-size: 12px; font-weight: 500; font-family: var(--font-ui);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.ob-tab:hover { color: var(--text-primary); }
.ob-tab.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }
.ob-tab-spacer { flex: 1; }

.ob-panel { display: none; flex: 1; overflow: auto; padding: 12px; }
.ob-panel.active { display: block; }

.data-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-mono); font-size: 12px;
}
.data-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 8px 10px; text-align: left;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.data-table td {
  padding: 7px 10px; color: var(--text-secondary);
  border-bottom: 1px solid rgba(30, 45, 72, 0.4);
}
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table .text-right { text-align: right; }

.status-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.status-badge.complete { background: rgba(0, 232, 120, 0.15); color: var(--accent-green); }
.status-badge.open {
  background: rgba(0, 200, 255, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(0, 200, 255, 0.3);
}
.status-badge.closed {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.btn-filter {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
}
.btn-filter:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.btn-filter.active {
  background: var(--accent-blue);
  color: var(--bg-base);
}
.btn-filter.active .badge {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}
.status-badge.open     { background: rgba(0, 200, 255, 0.15); color: var(--accent-blue); }
.status-badge.rejected { background: rgba(255, 59, 92, 0.15);  color: var(--accent-red); }
.status-badge.cancelled{ background: rgba(74, 88, 120, 0.3);  color: var(--text-muted); }

.action-badge {
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
}
.action-badge.buy  { background: rgba(0, 232, 120, 0.15); color: var(--accent-green); border: 1px solid rgba(0, 232, 120, 0.3); }
.action-badge.sell { background: rgba(255, 59, 92, 0.15);  color: var(--accent-red);   border: 1px solid rgba(255, 59, 92, 0.3); }

.positions-header { padding: 8px 0 12px; }
.pnl-summary { display: flex; gap: 24px; font-size: 13px; }
.pnl-value { font-family: var(--font-mono); font-weight: 600; }

/* ============================================================
   WATCHLIST
============================================================ */
.wl-toolbar {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  position: relative;
  flex-shrink: 0;
}
.wl-search-wrapper { position: relative; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; }
.wl-search {
  width: 100%; max-width: 400px;
  background: var(--bg-card); border: 1px solid var(--border-bright);
  color: var(--text-primary); border-radius: var(--radius-sm);
  padding: 7px 12px 7px 32px;
  font-size: 13px; font-family: var(--font-ui); outline: none;
}
.wl-search:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(0,200,255,0.15); }
.wl-search-results {
  position: absolute; top: 100%; left: 0; z-index: 50;
  background: var(--bg-card); border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  width: 360px; max-height: 240px; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  margin-top: 4px;
}
.wl-result-item {
  padding: 9px 14px; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.wl-result-item:last-child { border-bottom: none; }
.wl-result-item:hover { background: var(--bg-hover); }
.wl-result-sym { font-weight: 600; color: var(--text-primary); font-family: var(--font-mono); }
.wl-result-detail { color: var(--text-muted); font-size: 11px; }

.wl-list { flex: 1; overflow-y: auto; }
.wl-item {
  display: grid; grid-template-columns: 1fr 100px 80px 80px 36px;
  align-items: center; gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: default;
}
.wl-item:hover { background: var(--bg-hover); }
.wl-sym { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-primary); }
.wl-exchange { font-size: 10px; color: var(--text-muted); }
.wl-ltp { font-family: var(--font-mono); font-size: 14px; font-weight: 600; text-align: right; }
.wl-change { font-family: var(--font-mono); font-size: 12px; text-align: right; }
.wl-chg-pct { font-size: 11px; }
.wl-remove { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 14px; text-align: center; transition: color var(--transition); }
.wl-remove:hover { color: var(--accent-red); }
.wl-empty { padding: 48px; text-align: center; color: var(--text-muted); }

/* ============================================================
   ORDER MODAL & CONFIRMATION POPUPS
============================================================ */
.order-modal-card { width: min(420px, 94vw); padding: 0; border-radius: var(--radius-lg); }
.order-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.order-modal-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 16px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all var(--transition); }
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.order-modal-body { padding: 14px 16px; }
.order-modal-footer { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--bg-elevated); }
.order-modal-footer .btn { padding: 5px 12px; font-size: 11.5px; font-weight: 700; border-radius: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.form-group { display: flex; flex-direction: column; gap: 3px; }
.form-group label { font-size: 10.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.form-group .select-ctrl, .form-group .input-ctrl { width: 100%; padding: 4px 8px; font-size: 11.5px; }
.order-preview { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 6px; font-size: 11.5px; color: var(--text-secondary); }
.order-preview strong { color: var(--accent-gold); font-family: var(--font-mono); }

/* ============================================================
   TOAST NOTIFICATIONS (Compact & Subtle at Top-Right)
============================================================ */
.toast-container {
  position: fixed;
  top: 65px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 999999;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: rgba(18, 26, 44, 0.96);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  min-width: 180px;
  max-width: 280px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  animation: slideInRight 0.22s ease;
}
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error   { border-left: 3px solid var(--accent-red); }
.toast.info    { border-left: 3px solid var(--accent-blue); }
.toast-icon { font-size: 13px; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; font-size: 11px; color: var(--text-primary); }
.toast-msg   { font-size: 10.5px; color: var(--text-secondary); margin-top: 1px; }

/* ============================================================
   KEYFRAME ANIMATIONS
============================================================ */
@keyframes fadeIn       { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp      { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft  { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes blink     { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes pulse-glow { 0%, 100% { filter: drop-shadow(0 0 8px var(--accent-blue)); } 50% { filter: drop-shadow(0 0 24px var(--accent-blue)); } }
@keyframes flashGreen { 0%, 100% { background: transparent; } 30% { background: rgba(0, 232, 120, 0.2); } }
@keyframes flashRed   { 0%, 100% { background: transparent; } 30% { background: rgba(255, 59, 92, 0.2); } }

/* ============================================================
   RESPONSIVE TWEAKS
============================================================ */
@media (max-width: 900px) {
  .sb-layout { grid-template-columns: 1fr; }
  .sb-right { display: none; }
  .oc-stats { display: none; }
}

/* ============================================================
   BASKET ORDER SYSTEM (AlgoTest Style Manual Trade Basket)
============================================================ */
/* Floating Bottom Bar */
.basket-floating-bar {
  position: fixed;
  bottom: 64px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  padding: 4px 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  font-size: 11.5px;
}
.basket-floating-bar:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 8px 24px rgba(0, 200, 255, 0.25);
  transform: translateY(-1px);
}
.basket-floating-bar.drawer-open {
  display: none;
}
.basket-bar-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.basket-bar-count-badge {
  background: var(--accent-blue);
  color: #000;
  font-weight: 800;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 15px;
  text-align: center;
}
.basket-bar-net {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

/* Basket Collapsible Bottom Drawer */
.basket-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 380px;
  max-height: 80vh;
  background: var(--bg-card);
  border-top: 2px solid var(--border-bright);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.basket-drawer.open {
  transform: translateY(0);
}

/* Basket Drawer Header */
.basket-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.basket-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  max-width: 60%;
}
.basket-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.basket-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-bright);
}
.basket-tab.active {
  background: rgba(0, 200, 255, 0.12);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.basket-tab-badge {
  background: var(--bg-hover);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
}
.basket-tab.active .basket-tab-badge {
  background: var(--accent-blue);
  color: #000;
}
.basket-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Basket Quick Tools Toolbar */
.basket-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  flex-shrink: 0;
  gap: 10px;
  flex-wrap: wrap;
}
.basket-tools-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Basket Legs Table Body */
.basket-legs-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  min-height: 0;
}
.basket-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.basket-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.basket-leg-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition);
}
.basket-leg-row:hover {
  background: var(--bg-hover);
}
.basket-leg-row.success {
  background: rgba(0, 232, 120, 0.08);
}
.basket-leg-row.failed {
  background: rgba(255, 59, 92, 0.12);
}
.basket-leg-row td {
  padding: 6px 10px;
  vertical-align: middle;
}

/* Action Switcher Button */
.btn-action-badge {
  border: none;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-transform: uppercase;
  transition: all var(--transition);
}
.btn-action-badge.buy {
  background: rgba(0, 232, 120, 0.2);
  color: var(--accent-green);
  border: 1px solid rgba(0, 232, 120, 0.4);
}
.btn-action-badge.buy:hover {
  background: var(--accent-green);
  color: #000;
}
.btn-action-badge.sell {
  background: rgba(255, 59, 92, 0.2);
  color: var(--accent-red);
  border: 1px solid rgba(255, 59, 92, 0.4);
}
.btn-action-badge.sell:hover {
  background: var(--accent-red);
  color: #fff;
}

/* Quantity Stepper */
.basket-qty-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 3px;
}
.btn-qty-step {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  width: 20px;
  height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}
.btn-qty-step:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.basket-qty-input {
  width: 36px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.basket-qty-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 2px;
  white-space: nowrap;
}

/* Limit Price Input */
.basket-price-input {
  width: 75px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
}
.basket-price-input.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Status Badges */
.status-badge-mini {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge-mini.idle {
  color: var(--text-muted);
}
.status-badge-mini.pending {
  background: rgba(255, 170, 0, 0.15);
  color: var(--accent-gold);
}
.status-badge-mini.sent {
  background: rgba(0, 200, 255, 0.15);
  color: var(--accent-blue);
}
.status-badge-mini.success {
  background: rgba(0, 232, 120, 0.18);
  color: var(--accent-green);
}
.status-badge-mini.failed {
  background: rgba(255, 59, 92, 0.18);
  color: var(--accent-red);
}

.btn-remove-leg {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color var(--transition);
}
.btn-remove-leg:hover {
  color: var(--accent-red);
}

/* Basket Footer Summary & Action */
.basket-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
}
.basket-summary-metrics {
  display: flex;
  align-items: center;
  gap: 14px;
}
.basket-metric {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.basket-metric-lbl {
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}
.basket-metric-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
}

.basket-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.basket-footer-actions .btn {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
}

/* Basket Active Point Indicators in Option Chain */
.basket-point {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px 2px 7px;
  border-radius: 4px;
  margin: 0 4px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: pointer;
  animation: pulsePoint 0.25s ease-out;
  user-select: none;
}
@keyframes pulsePoint {
  0% { transform: scale(0.85); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.basket-point .basket-del-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transition: all 0.15s ease;
}
.basket-point:hover .basket-del-x {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  transform: scale(1.18);
}

.basket-point.buy {
  background: #00E878 !important;
  color: #000000 !important;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 10px rgba(0, 232, 120, 0.6);
}
.basket-point.sell {
  background: #FF3B5C !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 59, 92, 0.6);
}

.strike-basket-point {
  display: inline-block;
  font-size: 13px;
  margin-left: 4px;
  filter: drop-shadow(0 0 6px var(--accent-blue));
}

.row-in-basket {
  background: rgba(0, 200, 255, 0.09) !important;
}
.row-in-basket td.strike-col.strike-in-basket {
  background: rgba(0, 200, 255, 0.25) !important;
  color: #00E8FF !important;
  border-left: 3px solid #00E8FF;
  border-right: 3px solid #00E8FF;
  font-weight: 900 !important;
}

td.ce-side.col-ltp.in-basket {
  background: rgba(0, 232, 120, 0.16) !important;
  box-shadow: inset 0 0 0 1.5px rgba(0, 232, 120, 0.7);
}

td.pe-side.col-ltp.in-basket {
  background: rgba(255, 59, 92, 0.16) !important;
  box-shadow: inset 0 0 0 1.5px rgba(255, 59, 92, 0.7);
}

/* Option Chain Direct Basket Active & Remove Buttons */
.btn-basket-active {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  line-height: 1.2;
  transition: all var(--transition);
  animation: pulsePoint 0.25s ease-out;
  white-space: nowrap;
}
.btn-basket-active.buy {
  background: #00E878 !important;
  color: #000000 !important;
  box-shadow: 0 0 12px rgba(0, 232, 120, 0.7);
}
.btn-basket-active.sell {
  background: #FF3B5C !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 12px rgba(255, 59, 92, 0.7);
}
.btn-basket-active:hover {
  transform: scale(1.06);
  filter: brightness(1.15);
}

.btn-basket-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(255, 59, 92, 0.25);
  color: #FF3B5C;
  border: 1px solid rgba(255, 59, 92, 0.6);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
}
.btn-basket-remove:hover {
  background: #FF3B5C;
  color: #FFFFFF;
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(255, 59, 92, 0.8);
}

/* ============================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS (<= 768px)
   ============================================================ */
@media (max-width: 768px) {
  html, body {
    height: 100dvh;
    overflow-x: hidden;
  }

  .app {
    height: 100dvh;
  }

  /* --- Topbar --- */
  /* --- Topbar on Mobile --- */
  .topbar {
    height: 42px !important;
    padding: 0 8px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    background: var(--bg-surface);
  }

  .topbar-left {
    gap: 6px !important;
    flex: initial !important;
    justify-content: flex-start !important;
    align-items: center !important;
    display: flex !important;
    flex-shrink: 0 !important;
  }

  .logo {
    gap: 4px;
  }

  .logo-text {
    font-size: 13.5px !important;
    font-weight: 800;
  }

  .topbar-right {
    gap: 5px !important;
    flex: initial !important;
    justify-content: flex-end !important;
    align-items: center !important;
    display: flex !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
  }

  .topbar-right button {
    padding: 2px 6px;
    font-size: 10.5px;
    white-space: nowrap;
  }

  .account-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 999999 !important;
  }

  .topbar-btn-text {
    display: none !important;
  }

  .clock {
    display: inline-block !important;
    font-size: 10px !important;
    font-family: var(--font-mono);
    color: var(--text-muted);
    white-space: nowrap;
  }

  .oc-stat-hide-mobile {
    display: none !important;
  }

  /* --- Navigation Tabs --- */
  .tab-nav {
    height: auto;
    min-height: 38px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding: 3px 6px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
  }
  .tab-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    padding: 5px 9px;
    font-size: 11px;
    flex-shrink: 0;
  }

  /* --- Tab Content & Containers --- */
  .tab-content {
    padding: 2px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
  }

  .oc-container {
    width: 100%;
    overflow-x: visible;
    padding: 0;
    margin: 0;
  }

  /* --- Option Chain Toolbar & Summary Strip --- */
  .oc-summary-strip {
    padding: 4px 6px !important;
    gap: 6px !important;
  }
  .oc-summary-strip .stat-pill {
    padding: 2px 5px !important;
    font-size: 10px !important;
  }

  .panel-toolbar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 6px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    transition: all 0.25s ease;
  }

  .toolbar-group {
    flex: 1 1 calc(50% - 6px);
    min-width: 120px;
  }

  .oc-controls .spot-pill {
    width: 100%;
    margin-top: 4px;
    justify-content: space-between;
    font-size: 11px;
    padding: 4px 8px;
  }

  .oc-table-wrapper {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-height: calc(100dvh - 210px);
    border-radius: var(--radius-md);
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .oc-table {
    width: 100%;
    border-collapse: collapse !important;
    margin: 0 !important;
  }

  /* Symmetrical 3-Column Mobile Layout: Fits 100% of Mobile Screen Width */
  .oc-table.oc-compact-mode {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
  }

  /* CALLS Column (Left 42%) */
  .oc-table.oc-compact-mode th.ce-header,
  .oc-table.oc-compact-mode th.ce-col-ltp,
  .oc-table.oc-compact-mode td.ce-col-ltp {
    width: 42% !important;
    min-width: 0 !important;
    max-width: 42% !important;
    padding: 6px 4px !important;
    box-sizing: border-box !important;
    text-align: right !important;
  }

  /* STRIKE Column (Center 16% - Locked in Center) */
  .oc-table .strike-col,
  .oc-table .strike-header {
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .oc-table.oc-compact-mode th.strike-header,
  .oc-table.oc-compact-mode th.strike-col,
  .oc-table.oc-compact-mode td.strike-col {
    width: 16% !important;
    min-width: 0 !important;
    max-width: 16% !important;
    padding: 6px 1px !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    text-align: center !important;
  }

  /* PUTS Column (Right 42%) */
  .oc-table.oc-compact-mode th.pe-header,
  .oc-table.oc-compact-mode th.pe-col-ltp,
  .oc-table.oc-compact-mode td.pe-col-ltp {
    width: 42% !important;
    min-width: 0 !important;
    max-width: 42% !important;
    padding: 6px 4px !important;
    box-sizing: border-box !important;
    text-align: left !important;
  }

  /* When multiple columns are enabled on mobile, allow wide swipeable layout */
  .oc-table:not(.oc-compact-mode) {
    min-width: 700px !important;
    width: max-content !important;
  }

  .oc-table:not(.oc-compact-mode) .strike-col,
  .oc-table:not(.oc-compact-mode) .strike-header {
    position: sticky !important;
    left: 45%;
    z-index: 5;
    background: var(--bg-card) !important;
  }

  /* Comfortable, touch-friendly rows */
  .oc-table tbody tr {
    height: 44px !important;
  }

  .oc-table th, .oc-table td {
    padding: 6px 3px !important;
    font-size: 11.5px;
    box-sizing: border-box !important;
  }

  .strike-col {
    font-size: 12px !important;
    font-weight: 800;
    padding: 6px 1px !important;
    text-align: center !important;
  }

  .atm-tag {
    display: block;
    font-size: 8px !important;
    padding: 0 2px !important;
    margin-top: 1px;
    line-height: 1.1;
  }

  /* Large, easy-to-tap Buy / Sell touch buttons on mobile */
  .btn-buy, .btn-sell, .btn-xs {
    min-height: 28px !important;
    min-width: 26px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    border-radius: 6px !important;
    padding: 4px 6px !important;
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  }

  .col-ltp > div {
    gap: 5px !important;
  }

  .ltp-val {
    font-size: 13.5px !important;
    font-weight: 700 !important;
  }

  .btn-basket-active {
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 10.5px !important;
    border-radius: 6px !important;
  }

  .btn-basket-remove {
    width: 18px !important;
    height: 18px !important;
    font-size: 11px !important;
  }

  /* --- Positions & Order Book --- */
  .pos-summary-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px;
  }

  .positions-header-toolbar, .pos-filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  #pos-script-pills {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  #pos-script-pills::-webkit-scrollbar {
    display: none;
  }

  .positions-table-wrapper, .orders-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .positions-table, .orders-table {
    min-width: 600px;
  }

  /* --- Strategy Builder --- */
  .sb-layout {
    flex-direction: column !important;
    gap: 12px;
    height: auto;
  }

  .sb-left-col, .sb-right-col {
    width: 100% !important;
    max-width: 100% !important;
  }

  .sb-chart-card {
    height: 250px !important;
    min-height: 250px !important;
  }

  /* --- Modals --- */
  .modal-card {
    width: 94vw !important;
    max-width: 94vw !important;
    padding: 16px !important;
    max-height: 88vh;
    overflow-y: auto;
  }

  /* --- Floating Basket Bar & Drawer --- */
  .basket-floating-bar {
    bottom: 8px;
    right: 8px;
    left: 8px;
    width: calc(100% - 16px);
    padding: 6px 12px;
    font-size: 11.5px;
  }

  .basket-drawer {
    width: 100% !important;
    height: 85vh !important;
    border-radius: 16px 16px 0 0;
  }

  .basket-drawer-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /* Mobile 5-Tab Bottom Navigation */
  .tab-nav.bottom-nav {
    height: 56px !important;
    padding: 0 4px !important;
    gap: 2px !important;
  }
  .tab-btn {
    padding: 4px 2px !important;
    flex-direction: column !important;
    gap: 2px !important;
  }
  .tab-btn-icon {
    font-size: 16px !important;
  }
  .tab-btn-text {
    font-size: 9.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0px !important;
  }
  .tab-btn .badge {
    position: absolute;
    top: 2px;
    right: 8px;
    font-size: 8px;
    padding: 0 4px;
    min-width: 13px;
  }

  .account-container {
    padding: 12px 8px !important;
  }
}

/* ============================================================
   MULTI-USER & BROKER ACCOUNTS DROPDOWN STYLES
============================================================ */
.acct-dropdown-item:hover {
  background: var(--bg-surface) !important;
}
.acct-dropdown-item.active-item {
  background: rgba(59, 130, 246, 0.12) !important;
}
.btn-auth-tab:hover {
  opacity: 0.9;
}

/* ============================================================
   GOOGLE AUTHENTICATION BUTTON STYLES
============================================================ */
.btn-google-signin {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-google-signin:hover {
  background: #f3f4f6 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}
.btn-google-signin:active {
  transform: translateY(0);
}
[data-theme="light"] .btn-google-signin {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}

/* Instant OI column hide toggle */
.oc-table.oc-hide-oi .col-oi,
.oc-table.oc-hide-oi th.col-oi,
.oc-table.oc-hide-oi td.col-oi,
.oc-table.oc-hide-oi [class*="col-oi"] {
  display: none !important;
}
