/* ====================================================================
   DHANVARSHA QUANT TERMINAL — NEUMORPHISM (DARK SOFT UI) DESIGN SYSTEM
   ==================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  /* Neumorphic Dark Base Surface Palette */
  --bg-primary: #12151e;         /* Deep canvas */
  --bg-secondary: #161a25;       /* Elevated layer 1 */
  --bg-card: #181d2a;            /* Elevated card surface */
  --bg-card-hover: #1c2232;
  --bg-inset: #0e1118;           /* Inset well / recessed cavity */
  --bg-input: #0f121a;           /* Inset input field */
  
  /* Neumorphic Extrusion (Dual Light & Dark Shadows) */
  --neu-flat: 6px 6px 14px rgba(0, 0, 0, 0.65), -4px -4px 10px rgba(255, 255, 255, 0.035);
  --neu-flat-hover: 8px 8px 18px rgba(0, 0, 0, 0.75), -5px -5px 12px rgba(255, 255, 255, 0.05);
  --neu-flat-sm: 3px 3px 8px rgba(0, 0, 0, 0.55), -2px -2px 6px rgba(255, 255, 255, 0.035);
  --neu-flat-lg: 10px 10px 26px rgba(0, 0, 0, 0.75), -6px -6px 18px rgba(255, 255, 255, 0.04);
  
  /* Neumorphic Inset / Wells */
  --neu-inset: inset 3px 3px 7px rgba(0, 0, 0, 0.8), inset -2px -2px 5px rgba(255, 255, 255, 0.035);
  --neu-inset-deep: inset 4px 4px 10px rgba(0, 0, 0, 0.9), inset -3px -3px 7px rgba(255, 255, 255, 0.04);
  --neu-pressed: inset 2px 2px 5px rgba(0, 0, 0, 0.85), inset -2px -2px 4px rgba(255, 255, 255, 0.04);

  /* Subtle Tactile Borders */
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-highlight: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(56, 189, 248, 0.6);
  
  /* Modern Typography Colors */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Accent Colors & Soft Neumorphic Glows */
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.3);
  --bullish-green: #10b981;
  --bullish-bg: rgba(16, 185, 129, 0.12);
  --bullish-glow: rgba(16, 185, 129, 0.3);
  --bearish-red: #f43f5e;
  --bearish-bg: rgba(244, 63, 94, 0.12);
  --bearish-glow: rgba(244, 63, 94, 0.3);
  --neutral-amber: #f59e0b;
  --neutral-bg: rgba(245, 158, 11, 0.12);
  --purple-pain: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.3);
  
  --atm-bg: rgba(56, 189, 248, 0.12);
  --atm-border: #38bdf8;
  
  /* Tactile Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Neumorphic Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-inset);
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.6);
}
::-webkit-scrollbar-thumb {
  background: #202737;
  border-radius: var(--radius-full);
  box-shadow: 1px 1px 3px rgba(0,0,0,0.5), -1px -1px 2px rgba(255,255,255,0.04);
}
::-webkit-scrollbar-thumb:hover {
  background: #2b354b;
}

/* ====================================================================
   TOP NAVIGATION BAR (NEUMORPHIC DOCK)
   ==================================================================== */
.top-navbar {
  background: linear-gradient(180deg, #161a25 0%, #131620 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Tactile Brand Logo Button */
.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, #0284c7, #0369a1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6), -2px -2px 6px rgba(255, 255, 255, 0.1), 0 0 14px var(--accent-cyan-glow);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.brand-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.brand-sub {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* Header Status Indicators & Actions Group */
.header-status-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Inset Neumorphic Fyers Badge (Green / Red) */
.fyers-connection-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.25s ease;
}

.fyers-connection-badge.badge-connected {
  border-color: rgba(16, 185, 129, 0.3);
}

.fyers-connection-badge.badge-disconnected {
  border-color: rgba(244, 63, 94, 0.3);
}

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

.badge-connected .conn-pulse-dot {
  background: #10b981;
  box-shadow: 0 0 10px #10b981, 0 0 20px rgba(16, 185, 129, 0.4);
  animation: pulseConn 2s infinite ease-in-out;
}

.badge-disconnected .conn-pulse-dot {
  background: #f43f5e;
  box-shadow: 0 0 10px #f43f5e, 0 0 20px rgba(244, 63, 94, 0.4);
  animation: pulseAlert 1.2s infinite ease-in-out;
}

@keyframes pulseConn {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

@keyframes pulseAlert {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

.conn-details {
  display: flex;
  flex-direction: column;
}

.conn-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.badge-connected .conn-label {
  color: #34d399;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

.badge-disconnected .conn-label {
  color: #fb7185;
  text-shadow: 0 0 8px rgba(244, 63, 94, 0.35);
}

.conn-sub {
  font-size: 9px;
  color: var(--text-dim);
}

/* Inset Neumorphic Market Clock Pill */
.market-clock-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 14px;
}

.market-clock-pill.live-session {
  border-color: rgba(16, 185, 129, 0.3);
}

.clock-details {
  display: flex;
  flex-direction: column;
}

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

.clock-time {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

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

/* ====================================================================
   NEUMORPHIC BUTTONS
   ==================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(145deg, #1b202d, #141723);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--neu-flat-sm);
  transition: all 0.2s ease;
  user-select: none;
}

.btn:hover {
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.7), -3px -3px 8px rgba(255, 255, 255, 0.05);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

.btn:active {
  box-shadow: var(--neu-pressed);
  background: var(--bg-inset);
  transform: translateY(0);
}

.btn-sync {
  background: linear-gradient(145deg, #132233, #0f1a27);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 3px 3px 8px rgba(0,0,0,0.5), -2px -2px 6px rgba(56, 189, 248, 0.08);
}

.btn-sync:hover {
  box-shadow: 4px 4px 12px rgba(0,0,0,0.6), -2px -2px 8px rgba(56, 189, 248, 0.2), 0 0 10px rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

.btn-fyers-auth {
  background: linear-gradient(145deg, #059669, #047857);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.4);
  font-weight: 700;
  box-shadow: 3px 3px 8px rgba(0,0,0,0.5), -2px -2px 6px rgba(16, 185, 129, 0.15), 0 0 12px rgba(16, 185, 129, 0.3);
}

.btn-fyers-auth:hover {
  background: linear-gradient(145deg, #10b981, #059669);
  box-shadow: 4px 4px 14px rgba(0,0,0,0.6), -2px -2px 8px rgba(16, 185, 129, 0.3), 0 0 18px rgba(16, 185, 129, 0.5);
}

.btn-diag {
  background: linear-gradient(145deg, #1b202d, #141723);
  color: #cbd5e1;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(145deg, #0284c7, #0369a1);
  color: white;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5), -2px -2px 6px rgba(56, 189, 248, 0.15), 0 0 12px var(--accent-cyan-glow);
}

.btn-primary:hover {
  background: linear-gradient(145deg, #0ea5e9, #0284c7);
  box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.6), 0 0 18px rgba(14, 165, 233, 0.5);
}

.btn-success {
  background: linear-gradient(145deg, #059669, #047857);
  color: white;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: linear-gradient(145deg, #e11d48, #be123c);
  color: white;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

/* ====================================================================
   SUB-TOOLBAR (ROW 2): TACTILE CHIPS & INSET CONTROLS
   ==================================================================== */
.header-toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  gap: 12px;
}

.quick-chips-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.toolbar-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.quick-chips-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
}

.quick-chips-scroll::-webkit-scrollbar {
  display: none;
}

/* Tactile Symbol Chips */
.symbol-chip {
  background: linear-gradient(145deg, #191e2b, #131722);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5), -2px -2px 5px rgba(255,255,255,0.03);
  transition: all 0.2s ease;
}

.symbol-chip:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 3px 3px 8px rgba(0,0,0,0.6), -2px -2px 6px rgba(56, 189, 248, 0.1);
  transform: translateY(-1px);
}

.symbol-chip.active {
  background: linear-gradient(145deg, #0284c7, #0ea5e9);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: inset 1px 1px 3px rgba(255,255,255,0.4), 0 0 14px rgba(14, 165, 233, 0.5);
  transform: translateY(0);
}

.toolbar-dropdowns {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Inset Control Wells */
.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.control-label {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

select, input {
  background: transparent;
  color: var(--text-main);
  border: none;
  padding: 4px 8px;
  font-family: var(--font-main);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

select option {
  background: #141824;
  color: #f1f5f9;
}

.compact-select {
  padding: 3px 6px;
  font-size: 11px;
}

/* Inset Search Input */
.table-search-input {
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  width: 200px;
  outline: none;
  transition: all 0.25s ease;
}

.table-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--neu-inset), 0 0 8px var(--accent-cyan-glow);
}

/* ====================================================================
   MAIN CONTAINER & NEUMORPHIC KPI CARDS
   ==================================================================== */
.app-container {
  padding: 22px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

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

@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

/* Extruded Neumorphic Card */
.kpi-card {
  background: linear-gradient(145deg, #191e2b, #141723);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--neu-flat);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--neu-flat-hover);
  border-color: var(--border-highlight);
}

.kpi-card:nth-child(1) { border-top: 3px solid #06b6d4; }
.kpi-card:nth-child(2) { border-top: 3px solid #10b981; }
.kpi-card:nth-child(3) { border-top: 3px solid #a855f7; }
.kpi-card:nth-child(4) { border-top: 3px solid #f59e0b; }
.kpi-card:nth-child(5) { border-top: 3px solid #3b82f6; }

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.kpi-footer {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ====================================================================
   NEUMORPHIC TABS (RECESSED TRACK & EXTRUDED BUTTONS)
   ==================================================================== */
.tabs-bar {
  display: flex;
  gap: 8px;
  background: var(--bg-inset);
  box-shadow: var(--neu-inset-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 9px 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-sm);
  position: relative;
  transition: all 0.25s ease;
  user-select: none;
}

.tab-btn:hover {
  color: var(--text-main);
}

/* Active tab extruded from recessed track */
.tab-btn.active {
  background: linear-gradient(145deg, #1b212f, #141823);
  color: var(--accent-cyan);
  box-shadow: var(--neu-flat-sm);
  border: 1px solid var(--border-subtle);
}

.tab-btn.tab-call-radar.active {
  color: #34d399;
  border-bottom: 2px solid #10b981;
  box-shadow: var(--neu-flat-sm), 0 0 12px rgba(16, 185, 129, 0.15);
}

.tab-btn.tab-put-radar.active {
  color: #fb7185;
  border-bottom: 2px solid #f43f5e;
  box-shadow: var(--neu-flat-sm), 0 0 12px rgba(244, 63, 94, 0.15);
}

/* Content Views */
.tab-content {
  display: none;
}

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

/* ====================================================================
   RADAR HIGHLIGHT BANNERS & OPPORTUNITY HERO BOXES
   ==================================================================== */
.radar-header-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .radar-header-banner {
    grid-template-columns: repeat(2, 1fr);
  }
}

.radar-stat-box {
  background: linear-gradient(145deg, #191e2b, #141723);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--neu-flat);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.radar-stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--neu-flat-hover);
}

.radar-stat-box.box-call {
  border-top: 3px solid var(--bullish-green);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.07) 0%, #151823 100%);
}

.radar-stat-box.box-put {
  border-top: 3px solid var(--bearish-red);
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.07) 0%, #151823 100%);
}

.radar-stat-box.box-btst {
  border-top: 3px solid #38bdf8;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.09) 0%, #151823 100%);
}

.radar-stat-box.box-stbt {
  border-top: 3px solid #f59e0b;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.09) 0%, #151823 100%);
}

.radar-stat-box.box-gold {
  border-top: 3px solid #eab308;
  background: linear-gradient(145deg, rgba(234, 179, 8, 0.09) 0%, #151823 100%);
}

.radar-stat-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.radar-stat-main {
  font-size: 21px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.radar-stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.rr-ratio-badge {
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-family: var(--font-mono);
}

/* ====================================================================
   TABLE CARD & TABLES
   ==================================================================== */
.table-card {
  background: linear-gradient(145deg, #181d2a, #131622);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--neu-flat);
}

.table-header-bar {
  padding: 14px 20px;
  background: linear-gradient(180deg, #161a25 0%, #131722 100%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-responsive {
  overflow-x: auto;
  max-height: 680px;
}

/* Screener & Radar Table */
table.screener-table {
  width: 100%;
  border-collapse: collapse;
}

table.screener-table th {
  background: #11141d;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: 0.5px;
}

table.screener-table td {
  padding: 12px 16px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
}

table.screener-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

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

/* Option Chain Ladder Table */
table.ladder-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
}

table.ladder-table thead th {
  background: #10131c;
  color: var(--text-dim);
  font-weight: 700;
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
  letter-spacing: 0.4px;
}

table.ladder-table thead th.th-call-group {
  background: rgba(16, 185, 129, 0.08);
  color: var(--bullish-green);
  text-align: center;
  border-right: 1px solid var(--border-subtle);
}

table.ladder-table thead th.th-strike-group {
  background: #141924;
  color: var(--accent-cyan);
  text-align: center;
}

table.ladder-table thead th.th-put-group {
  background: rgba(244, 63, 94, 0.08);
  color: var(--bearish-red);
  text-align: center;
  border-left: 1px solid var(--border-subtle);
}

table.ladder-table tbody td {
  padding: 7px 12px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

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

table.ladder-table tbody td.col-strike {
  text-align: center;
  font-weight: 800;
  background: #111520;
  color: #f8fafc;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}

/* ATM Row Highlight */
table.ladder-table tbody tr.row-atm {
  background: var(--atm-bg) !important;
  box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.3);
}

table.ladder-table tbody tr.row-atm td.col-strike {
  background: #0284c7;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 12px var(--accent-cyan);
}

.oi-cell-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  width: 100%;
}

.oi-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  opacity: 0.25;
  border-radius: 2px;
  pointer-events: none;
}

.oi-bar-call {
  right: 0;
  background: var(--bullish-green);
}

.oi-bar-put {
  right: 0;
  background: var(--bearish-red);
}

/* ====================================================================
   TACTILE BADGES & STATUS PILLS
   ==================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  box-shadow: var(--neu-flat-sm);
  border: 1px solid transparent;
}

.badge-bullish {
  background: linear-gradient(145deg, #102820, #0c1c17);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.badge-bearish {
  background: linear-gradient(145deg, #2c1218, #200d12);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.4);
}

.badge-neutral {
  background: linear-gradient(145deg, #261d11, #1a140c);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
}

.badge-atm {
  background: linear-gradient(145deg, #0e2738, #0a1b27);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.badge-call-buy {
  background: linear-gradient(145deg, #0f2e22, #0a1e16);
  border: 1px solid #10b981;
  color: #34d399;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5), 0 0 10px rgba(16, 185, 129, 0.3);
}

.badge-put-buy {
  background: linear-gradient(145deg, #321118, #220b10);
  border: 1px solid #f43f5e;
  color: #fb7185;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5), 0 0 10px rgba(244, 63, 94, 0.3);
}

.badge-neutral-rec {
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  border: 1px solid var(--border-subtle);
  color: #94a3b8;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px;
}

/* Dots */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-green {
  background-color: var(--bullish-green);
  box-shadow: 0 0 8px var(--bullish-green);
}

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

.dot-red {
  background-color: var(--bearish-red);
  box-shadow: 0 0 8px var(--bearish-red);
}

/* Confluence Bar */
.confluence-bar-wrap {
  width: 90px;
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.confluence-bar-fill {
  height: 100%;
  border-radius: 3px;
}

/* PineScript Indicators Mini Matrix */
.indicator-mini-matrix {
  display: flex;
  gap: 4px;
  align-items: center;
}

.indicator-mini-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  box-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.pill-bull { background: #0d281e; color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.pill-bear { background: #2c0e14; color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.pill-neut { background: #191e2b; color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }

/* Category Pills Filter Bar */
.category-tabs-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.category-pill-btn {
  background: linear-gradient(145deg, #191e2b, #141722);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.5), -2px -2px 4px rgba(255,255,255,0.03);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-pill-btn:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.category-pill-btn.active {
  background: linear-gradient(145deg, #0284c7, #0ea5e9);
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 12px var(--accent-cyan-glow);
  transform: translateY(0);
}

.category-pill-btn .pill-count,
.btst-filter-btn .pill-count {
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
}

.category-pill-btn *,
.btst-filter-btn * {
  pointer-events: none;
}

.btst-filter-btn {
  background: linear-gradient(145deg, #191e2b, #141722);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.5), -2px -2px 4px rgba(255,255,255,0.03);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btst-filter-btn:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.btst-filter-btn.active {
  background: linear-gradient(145deg, #2563eb, #38bdf8);
  color: #ffffff;
  border-color: #60a5fa;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  transform: translateY(0);
}

/* CLV Visual Range Track */
.clv-range-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.clv-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  position: relative;
  overflow: visible;
}

.clv-marker {
  position: absolute;
  top: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 6px currentColor;
}

.clv-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.badge-btst-buy {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-stbt-sell {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(251, 113, 133, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ====================================================================
   CHARTS & STUDIO LAYOUT
   ==================================================================== */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.chart-card {
  background: linear-gradient(145deg, #191e2b, #141723);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 380px;
  box-shadow: var(--neu-flat);
}

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

.chart-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Text Colors */
.text-bullish { color: var(--bullish-green); }
.text-bearish { color: var(--bearish-red); }
.text-cyan { color: var(--accent-cyan); }
.text-muted { color: var(--text-muted); }

/* ====================================================================
   MODAL DIALOG (NEUMORPHIC POPUP)
   ==================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: linear-gradient(145deg, #191e2b, #141722);
  border: 1px solid var(--border-highlight);
  box-shadow: var(--neu-flat-lg), 0 0 24px var(--accent-cyan-glow);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 16px 20px;
  background: linear-gradient(180deg, #161a25 0%, #131722 100%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

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

.modal-subnav {
  display: flex;
  gap: 6px;
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.modal-subnav button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-subnav button.active {
  background: linear-gradient(145deg, #1b212f, #141823);
  color: var(--accent-cyan);
  box-shadow: var(--neu-flat-sm);
}

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

.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-inset);
  box-shadow: var(--neu-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.form-group input:focus {
  border-color: var(--border-focus);
}

.alert-box {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  display: none;
}

.alert-success {
  background: var(--bullish-bg);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--bullish-green);
}

.alert-error {
  background: var(--bearish-bg);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: var(--bearish-red);
}

.alert-info {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
}

/* ====================================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATION (< 900px)
   ==================================================================== */
@media (max-width: 900px) {
  .top-navbar {
    padding: 10px 12px 8px;
    gap: 8px;
  }

  .header-main-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand-sub {
    font-size: 8px;
  }

  .header-status-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .fyers-connection-badge {
    padding: 5px 10px;
    min-width: 0;
  }

  .conn-label {
    font-size: 10px;
  }

  .conn-sub {
    font-size: 8px;
  }

  .market-clock-pill {
    padding: 5px 10px;
  }

  .clock-time {
    font-size: 10px;
  }

  .header-actions .btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  .header-actions .btn span:last-child {
    display: none; /* Icon-only on mobile to save screen real estate */
  }

  .header-toolbar-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding-top: 6px;
  }

  .quick-chips-wrapper {
    width: 100%;
  }

  .quick-chips-scroll {
    width: 100%;
    padding: 2px 0;
  }

  .symbol-chip {
    padding: 4px 8px;
    font-size: 10px;
  }

  .toolbar-dropdowns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    width: 100%;
  }

  .control-group {
    padding: 3px 6px;
  }

  .control-label {
    font-size: 9px;
  }

  .compact-select {
    padding: 3px 4px;
    font-size: 10px;
    width: 100%;
  }

  /* Main Container on Mobile */
  .app-container {
    padding: 12px 12px 30px;
    gap: 14px;
  }

  /* KPI Grid Mobile: 2 Columns */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .kpi-card {
    padding: 12px 14px;
  }

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

  .kpi-value {
    font-size: 19px;
  }

  .kpi-header {
    font-size: 10px;
  }

  .kpi-footer {
    font-size: 10px;
  }

  /* Tabs Bar Touch-Scrollable Carousel */
  .tabs-bar {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 5px;
    border-radius: var(--radius-md);
  }

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

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

  /* Radar Highlight Banners on Mobile */
  .radar-header-banner {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .radar-stat-box {
    padding: 14px;
  }

  .radar-stat-main {
    font-size: 18px;
  }

  /* Table Card & Header Mobile */
  .table-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .table-header-bar > div:last-child {
    display: flex;
    width: 100%;
  }

  .table-search-input {
    width: 100% !important;
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Mobile Tables with Sticky First Column */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .screener-table {
    min-width: 680px;
  }

  .screener-table th:first-child,
  .screener-table td:first-child {
    position: sticky;
    left: 0;
    background: #11141d;
    z-index: 5;
    box-shadow: 3px 0 8px rgba(0, 0, 0, 0.5);
  }

  .screener-table tr:hover td:first-child {
    background: #181d2a;
  }
}

/* ====================================================================
   AI EXECUTION & RISK DESK STYLES (AI-TRADER INTEGRATION)
   ==================================================================== */
.tab-execution-desk {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #a7f3d0 !important;
}

.tab-execution-desk:hover,
.tab-execution-desk.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(6, 182, 212, 0.3)) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.btn-screener-trade {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.btn-screener-trade:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.45);
}

.risk-engine-banner .kpi-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.risk-engine-banner .kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* ====================================================================
   ORDERBLOCK SMC & MARKET X-RAY STYLES (ORDER-BLOCK.COM ARCHITECTURE)
   ==================================================================== */

/* ====================================================================
   ORDERBLOCK SMC & MARKET X-RAY STYLES (IMAGE 3 INSTITUTIONAL SYSTEM)
   ==================================================================== */

.tab-ob-radar {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fde68a !important;
  font-weight: 700;
}

.tab-ob-radar:hover,
.tab-ob-radar.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(16, 185, 129, 0.3)) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

/* Market X-Ray / Breadth Strip - Image 3 Layout */
.market-xray-strip {
  background: #080c14;
  border: 1px solid #1a2233;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.xray-meta-bar-v2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.xray-meta-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.xray-meta-tag {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
}

.xray-meta-sectors-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.xray-sector-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(6px);
}

.xray-sector-chip.chip-lead {
  border-color: rgba(0, 245, 155, 0.35);
  background: rgba(0, 245, 155, 0.08);
}

.xray-sector-chip.chip-lag {
  border-color: rgba(255, 23, 68, 0.35);
  background: rgba(255, 23, 68, 0.08);
}

.xray-chip-icon {
  font-size: 11px;
}

.xray-chip-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.xray-chip-sym {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 11.5px;
}

.xray-chip-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
}

/* Center: Real-Time Market Breadth Sentiment Progress Bar */
.xray-breadth-meter-box {
  flex: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.xray-breadth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.breadth-bull-text {
  color: #00f59b;
}

.breadth-ratio-text {
  color: #f1f5f9;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.breadth-bear-text {
  color: #ff1744;
}

.xray-breadth-bar-track {
  height: 6px;
  background: #2a0812;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.xray-breadth-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, #00f59b);
  box-shadow: 0 0 8px rgba(0, 245, 155, 0.6);
  transition: width 0.4s ease;
}

/* Right: OrderBlock Desk Button */
.btn-ob-terminal-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  border-radius: 6px;
  padding: 6px 14px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
  user-select: none;
}

.btn-ob-terminal-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
  filter: brightness(1.1);
}

.ob-btn-badge {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: #fbbf24;
}

/* Histogram Container & Quant Liquidity Canvas */
.xray-histogram-container {
  background: linear-gradient(180deg, #050811 0%, #080d1a 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 14px 12px;
  position: relative;
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.8), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hist-scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: #64748b;
  margin-bottom: 6px;
  padding: 0 2px;
}

.tick-zero {
  color: #38bdf8;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.hist-canvas-area {
  position: relative;
  height: 76px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.hist-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hist-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.04);
}

.hist-grid-line.line-center {
  background: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  z-index: 1;
}

.hist-zone-tints {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
}

.zone-tint-bear {
  flex: 1;
  background: linear-gradient(90deg, rgba(255, 23, 68, 0.04), transparent);
}

.zone-tint-bull {
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 155, 0.04));
}

.hist-midline-axis {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(148, 163, 184, 0.25);
  z-index: 1;
}

.hist-dots-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hist-dot-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.hist-dot-node:hover {
  transform: translate(-50%, -50%) scale(2.2);
  z-index: 25;
  box-shadow: 0 0 14px #ffffff !important;
}

.hist-dot-node.is-top-pick {
  box-shadow: 0 0 0 2px #fbbf24, 0 0 10px #fbbf24 !important;
  z-index: 15;
  animation: obPickGlow 2s infinite;
}

@keyframes obPickGlow {
  0% { box-shadow: 0 0 0 2px #fbbf24, 0 0 6px #fbbf24; }
  50% { box-shadow: 0 0 0 3px #fbbf24, 0 0 14px #fbbf24; }
  100% { box-shadow: 0 0 0 2px #fbbf24, 0 0 6px #fbbf24; }
}

/* Floating HUD Diamond Target Pin for Top OrderBlock Picks */
.top-pick-hud-pin {
  position: absolute;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid #fbbf24;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 9.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
  cursor: pointer;
  z-index: 16;
  pointer-events: auto;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.top-pick-hud-pin:hover {
  background: #fbbf24;
  color: #020617;
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.8);
}

/* Floating Tooltip for X-Ray Dots */
.xray-dot-tooltip {
  position: fixed;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #38bdf8;
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 11px;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
}

/* ====================================================================
   MAIN MULTI-LEVEL SECTOR FLOW & FILTERED TRADE MATRIX (IMAGE 3)
   ==================================================================== */

.ob-matrix-view-container {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.ob-sector-stack-col {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--neu-flat);
  display: flex;
  flex-direction: column;
}

.ob-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.ob-sector-battery-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Sector Battery Card (Image 3 design) */
.sector-battery-card {
  background: #0b0f19;
  border: 1px solid #1a2234;
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.sector-battery-card:hover,
.sector-battery-card.active {
  background: #111726;
  border-color: #00f59b;
  box-shadow: 0 0 10px rgba(0, 245, 155, 0.2);
  transform: translateX(3px);
}

.sec-bat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.sec-bat-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #e2e8f0;
}

.sec-bat-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

/* 10-Cell Segmented Battery Meter */
.sec-battery-meter {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  height: 6px;
}

.battery-cell {
  border-radius: 1px;
  height: 100%;
}

.cell-green {
  background: #00f59b;
  box-shadow: 0 0 4px rgba(0, 245, 155, 0.4);
}

.cell-red {
  background: #e11d48;
  opacity: 0.8;
}

/* Right Column: Cyberpunk Stream & Multi-Level Trade Insight Radar */
.ob-stream-trades-col {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--neu-flat);
  display: flex;
  flex-direction: column;
}

.ob-stream-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.ob-level-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ob-level-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ob-level-btn:hover,
.ob-level-btn.active {
  background: rgba(0, 245, 155, 0.15);
  border-color: #00f59b;
  color: #00f59b;
  box-shadow: 0 0 10px rgba(0, 245, 155, 0.25);
}

/* Cyberpunk Flow Canvas Stream & Crosshair Target Frame */
.ob-flow-canvas-wrapper {
  position: relative;
  height: 48px;
  background: #03060a;
  border-radius: var(--radius-xs);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 245, 155, 0.15);
}

.ob-flow-canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ob-target-frame {
  position: absolute;
  right: 12px;
  top: 6px;
  bottom: 6px;
  width: 220px;
  border: 1px dashed rgba(0, 245, 155, 0.4);
  background: rgba(0, 245, 155, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.target-focus-label {
  font-size: 9px;
  font-family: var(--font-mono);
  color: #00f59b;
  letter-spacing: 1px;
  font-weight: 800;
  text-shadow: 0 0 6px #00f59b;
}

.target-bracket-tl, .target-bracket-tr, .target-bracket-bl, .target-bracket-br {
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: #00f59b;
}

.target-bracket-tl { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.target-bracket-tr { top: -1px; right: -1px; border-top: 2px solid; border-right: 2px solid; }
.target-bracket-bl { bottom: -1px; left: -1px; border-bottom: 2px solid; border-left: 2px solid; }
.target-bracket-br { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }

/* Curated Actionable Trade Insight Cards Grid */
.ob-trade-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Individual Actionable Trade Insight Card */
.ob-trade-card {
  background: #090e17;
  border: 1px solid #1a2438;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.ob-trade-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
}

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

.ob-card-sym-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ob-card-sym {
  font-size: 15px;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #fff;
}

.ob-card-thesis {
  background: rgba(15, 23, 42, 0.6);
  border-left: 3px solid #38bdf8;
  border-radius: 2px;
  padding: 7px 9px;
  font-size: 11px;
  line-height: 1.45;
  color: #cbd5e1;
}

.ob-card-levels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 8px;
  text-align: center;
}

.level-box-tag {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.level-box-val {
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.ob-ai-risk-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 10px;
}

.ai-risk-mini-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.ai-risk-mini-chip strong {
  color: var(--text-main);
}

.ob-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-card-trade {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: var(--radius-xs);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  transition: all 0.15s ease;
}

.btn-card-trade:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .ob-matrix-view-container {
    grid-template-columns: 1fr;
  }
}


/* ====================================================================
   MARKET X-RAY CANVASTIC RADAR & TOP PICKS RIBBON
   ==================================================================== */

#xray-density-canvas {
  width: 100%;
  height: 100px;
  display: block;
  cursor: crosshair;
  background: radial-gradient(ellipse at 50% 50%, rgba(15, 23, 42, 0.7) 0%, rgba(3, 7, 18, 0.95) 100%);
  border-radius: 4px;
}

.xray-top-picks-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.xray-picks-label {
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  font-family: var(--font-mono);
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.xray-picks-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.xray-pick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.45);
  font-size: 10.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.2);
}

.xray-pick-chip:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.18);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.6);
  color: #fff;
}

.xray-pick-chip.chip-bear {
  border-color: rgba(255, 23, 68, 0.45);
  color: #ff5252;
  box-shadow: 0 0 6px rgba(255, 23, 68, 0.2);
}

.xray-pick-chip.chip-bear:hover {
  border-color: #ff1744;
  background: rgba(255, 23, 68, 0.18);
  box-shadow: 0 0 14px rgba(255, 23, 68, 0.6);
  color: #fff;
}

/* ====================================================================
   MARKET-WIDE SECTOR FLOW & PARTICIPATION MATRIX (VISUAL CARD GRID)
   ==================================================================== */

.all-sectors-strip {
  background: #080c14;
  border: 1px solid #1a2233;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.sectors-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sectors-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sectors-title-icon {
  font-size: 18px;
}

.sectors-main-title {
  font-size: 12.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #f1f5f9;
  letter-spacing: 0.5px;
}

.sectors-sub-title {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 1px;
}

.sectors-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sectors-filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.8);
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.sector-tab-pill {
  padding: 4px 11px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sector-tab-pill:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}

.sector-tab-pill.active {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.sector-tab-pill.pill-bullish.active {
  background: rgba(0, 245, 155, 0.16);
  color: #00f59b;
  border-color: rgba(0, 245, 155, 0.4);
  box-shadow: 0 0 8px rgba(0, 245, 155, 0.25);
}

.sector-tab-pill.pill-bearish.active {
  background: rgba(255, 23, 68, 0.16);
  color: #ff1744;
  border-color: rgba(255, 23, 68, 0.4);
  box-shadow: 0 0 8px rgba(255, 23, 68, 0.25);
}

/* 6-Column Responsive Visual Grid */
.sectors-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  width: 100%;
}

.sector-card-pill {
  background: rgba(13, 19, 33, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.sector-card-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 14px rgba(56, 189, 248, 0.25);
}

.sector-card-pill.pill-bull {
  border-top: 2px solid #00f59b;
}

.sector-card-pill.pill-bull:hover {
  border-color: rgba(0, 245, 155, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 14px rgba(0, 245, 155, 0.3);
}

.sector-card-pill.pill-bear {
  border-top: 2px solid #ff1744;
}

.sector-card-pill.pill-bear:hover {
  border-color: rgba(255, 23, 68, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 14px rgba(255, 23, 68, 0.3);
}

.sector-pill-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
}

.sector-pill-name {
  font-size: 11.5px;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.sector-pill-chg {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.sector-pill-chg.chg-bull {
  background: rgba(0, 245, 155, 0.14);
  color: #00f59b;
  border: 1px solid rgba(0, 245, 155, 0.3);
}

.sector-pill-chg.chg-bear {
  background: rgba(255, 23, 68, 0.14);
  color: #ff1744;
  border: 1px solid rgba(255, 23, 68, 0.3);
}

.sector-pill-chg.chg-neut {
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Micro Breadth Battery Meter */
.sector-battery-micro {
  display: flex;
  height: 5px;
  border-radius: 2.5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  gap: 1px;
}

.battery-micro-cell {
  flex: 1;
  height: 100%;
  transition: background 0.2s ease;
}

.battery-micro-cell.cell-green {
  background: #00f59b;
  box-shadow: 0 0 3px rgba(0, 245, 155, 0.5);
}

.battery-micro-cell.cell-red {
  background: #ff1744;
  box-shadow: 0 0 3px rgba(255, 23, 68, 0.5);
}

.sector-pill-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-top: 1px;
}

.sector-ratio-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #cbd5e1;
  font-weight: 700;
}

.sector-top-chip {
  color: #38bdf8;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  max-width: 105px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ====================================================================
   INSTITUTIONAL ORDERBLOCK SMC DESK (CYBERNETIC MATRIX & RADAR)
   ==================================================================== */

/* 1. Market Regime & Directive HUD Banner */
.ob-regime-directive-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.ob-regime-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ob-regime-pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pulse-bull {
  background: #00f59b;
  box-shadow: 0 0 10px #00f59b;
  animation: obPulseGlow 1.8s infinite;
}

.pulse-bear {
  background: #ff1744;
  box-shadow: 0 0 10px #ff1744;
  animation: obPulseGlow 1.8s infinite;
}

.pulse-neut {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

@keyframes obPulseGlow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.ob-regime-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.ob-regime-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.ob-directive-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(9, 14, 26, 0.8);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 6px;
  padding: 8px 14px;
  flex: 1;
  max-width: 600px;
}

.ob-directive-tag {
  font-size: 10px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.ob-directive-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.4;
}

.ob-regime-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ob-metric-mini-badge {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 10px;
  font-family: var(--font-mono);
}

/* 2. Playbook Rules Banner */
.ob-playbook-banner {
  margin-bottom: 16px;
}

.ob-playbook-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.ob-playbook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ob-playbook-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(16, 185, 129, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
}

.ob-rules-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.ob-rule-chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.ob-rule-chip:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.rule-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #fbbf24;
  color: #fbbf24;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.2);
}

.ob-rule-chip strong {
  display: block;
  font-size: 12px;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.ob-rule-chip p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-dim);
}

/* 3. Main Matrix View Container */
.ob-matrix-view-container {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 16px;
  margin-bottom: 20px;
  align-items: start;
}

/* Left Column: Sector Flow Battery Stack */
.ob-sector-stack-col {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--neu-flat);
  backdrop-filter: blur(10px);
}

.ob-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: #f1f5f9;
}

.ob-sector-battery-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
}

.ob-sector-battery-list::-webkit-scrollbar {
  width: 4px;
}

.ob-sector-battery-list::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 2px;
}

.sector-battery-card {
  padding: 9px 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.sector-battery-card:hover {
  transform: translateX(3px);
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(56, 189, 248, 0.1);
}

.sector-battery-card.active {
  border-color: #00f59b !important;
  box-shadow: 0 0 14px rgba(0, 245, 155, 0.35);
  background: rgba(0, 245, 155, 0.14) !important;
}

.sec-bat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
}

.sec-bat-name {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

.sec-bat-val {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 11.5px;
}

.sec-battery-meter {
  display: flex;
  gap: 3px;
  height: 7px;
  margin-top: 6px;
  background: #070a13;
  padding: 2px;
  border-radius: 4px;
}

.battery-cell {
  flex: 1;
  border-radius: 1.5px;
  transition: all 0.2s ease;
}

.battery-cell.cell-green {
  background: #00e676;
  box-shadow: 0 0 4px rgba(0, 230, 118, 0.6);
}

.battery-cell.cell-red {
  background: #ff1744;
  box-shadow: 0 0 4px rgba(255, 23, 68, 0.6);
}

/* Right Column: Multi-Level Trade Insight Radar */
.ob-stream-trades-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ob-stream-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ob-level-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ob-level-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.ob-level-btn:hover {
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}

.ob-level-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
  font-weight: 800;
}

/* Cybernetic Stream Canvas */
.ob-flow-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 52px;
  background: linear-gradient(90deg, #050b14 0%, #0c182b 50%, #050b14 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.ob-target-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.target-bracket-tl {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
  border-top: 2px solid #00f59b;
  border-left: 2px solid #00f59b;
}

.target-bracket-tr {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-top: 2px solid #00f59b;
  border-right: 2px solid #00f59b;
}

.target-bracket-bl {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid #00f59b;
  border-left: 2px solid #00f59b;
}

.target-bracket-br {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid #00f59b;
  border-right: 2px solid #00f59b;
}

.target-focus-label {
  position: absolute;
  right: 24px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
}

/* 4. Actionable Trade Setup Cards Grid */
.ob-trade-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.ob-trade-card {
  background: linear-gradient(145deg, rgba(20, 27, 45, 0.9) 0%, rgba(13, 19, 33, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.ob-trade-card.ob-card-bull {
  border-left: 4px solid #00f59b;
}

.ob-trade-card.ob-card-bear {
  border-left: 4px solid #ff1744;
}

.ob-trade-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 15px rgba(56, 189, 248, 0.15);
}

.ob-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ob-card-sym-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ob-card-sym {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  letter-spacing: 0.5px;
}

.ob-card-price-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.ob-card-subbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ob-level-pill {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.ob-level-pill.badge-pos {
  background: rgba(0, 245, 155, 0.15);
  color: #00f59b;
  border: 1px solid rgba(0, 245, 155, 0.35);
}

.ob-level-pill.badge-amber {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.ob-level-pill.badge-flat {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Derivative OI & Multi-Timeframe Confluence Ribbon */
.ob-telemetry-ribbon {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ob-badge-oi {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ob-badge-oi.oi-bull {
  background: rgba(0, 245, 155, 0.12);
  color: #00f59b;
  border: 1px solid rgba(0, 245, 155, 0.35);
  box-shadow: 0 0 8px rgba(0, 245, 155, 0.15);
}

.ob-badge-oi.oi-bear {
  background: rgba(255, 23, 68, 0.12);
  color: #ff1744;
  border: 1px solid rgba(255, 23, 68, 0.35);
  box-shadow: 0 0 8px rgba(255, 23, 68, 0.15);
}

.ob-badge-mtf {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ob-card-thesis {
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.ob-thesis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.ob-retest-tag {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-family: var(--font-mono);
}

.ob-thesis-body {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #cbd5e1;
}

.ob-card-contract-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #94a3b8;
  margin-bottom: 10px;
}

.ob-card-levels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: rgba(7, 10, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 9px;
  margin-bottom: 10px;
  text-align: center;
}

.level-box-tag {
  font-size: 9.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 2px;
}

.level-box-val {
  font-size: 13.5px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.level-box-sub {
  font-size: 9.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

.ob-ai-risk-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.ai-risk-mini-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ob-risk-ceiling-text {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.btn-card-trade {
  background: linear-gradient(135deg, #059669, #047857);
  border: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-card-trade:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-card-dd {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 700;
  border-radius: 5px;
}

.btn-card-dd:hover {
  background: #38bdf8;
  color: #020617;
}

/* 5. Dual Clean Strength Boards */
.ob-boards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.ob-board-card {
  box-shadow: var(--neu-flat);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.ob-bullish-board {
  border-top: 3px solid #00f59b;
}

.ob-bearish-board {
  border-top: 3px solid #ff1744;
}

.rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-weight: 800;
  font-size: 11px;
  border-radius: 50%;
}

.rank-gold {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid #fbbf24;
}

.rank-silver {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid #94a3b8;
}

.rank-bronze {
  background: rgba(217, 119, 6, 0.2);
  color: #f59e0b;
  border: 1px solid #d97706;
}

.rank-normal {
  color: var(--text-dim);
}

.btn-inspect-ob {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-inspect-ob:hover {
  background: #38bdf8;
  color: #000;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* 6. Sector Flow Matrix Grid */
.ob-sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px;
}

.ob-sector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--neu-flat-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.ob-sector-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.ob-sec-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ob-sec-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}

.ob-sec-avg {
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.sector-part-bar {
  height: 6px;
  background: #2a141a;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.sector-part-fill {
  height: 100%;
  background: #10b981;
  transition: width 0.3s ease;
}

.sector-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 70px;
  overflow-y: auto;
}

.sector-chip {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sector-chip:hover {
  filter: brightness(1.3);
}

.ob-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 8px;
}

.ob-check-item.chk-pass {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.08);
}

.ob-check-item.chk-fail {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.08);
}

.ob-check-item .chk-icon {
  font-size: 14px;
  font-weight: 800;
}

.chk-pass .chk-icon { color: #10b981; }
.chk-fail .chk-icon { color: #f43f5e; }

@media (max-width: 1100px) {
  .ob-matrix-view-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .ob-boards-grid {
    grid-template-columns: 1fr;
  }
  .ob-rules-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ====================================================================
   MARKET-WIDE SECTOR FLOW & PARTICIPATION STRIP (ALL 18 SECTORS)
   ==================================================================== */
.all-sectors-strip {
  background: linear-gradient(180deg, #121622 0%, #0d101a 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sectors-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sectors-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sectors-title-icon {
  font-size: 18px;
  color: var(--accent-cyan);
}

.sectors-main-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fff;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.sectors-sub-title {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}

.sectors-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sectors-filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-inset);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.sector-tab-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sector-tab-pill.active {
  background: var(--bg-card);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.sector-tab-pill.pill-bullish.active {
  color: #00f59b;
}

.sector-tab-pill.pill-bearish.active {
  color: #f43f5e;
}

.sector-carousel-controls {
  display: flex;
  gap: 4px;
}

.carousel-nav-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-nav-btn:hover {
  color: #fff;
  border-color: var(--accent-cyan);
  background: var(--bg-card);
}

/* Horizontal Track for Sector Cards */
.sectors-carousel-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 6px;
}

.sectors-carousel-track::-webkit-scrollbar {
  height: 4px;
}

.sectors-carousel-track::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.sectors-carousel-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.sectors-carousel-track::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Sector Card Pill */
.sector-card-pill {
  flex: 0 0 168px;
  scroll-snap-align: start;
  background: linear-gradient(145deg, #141824, #0f131d);
  border: 1px solid #1e2638;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.sector-card-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.15);
}

.sector-card-pill.active {
  border-color: #00f59b;
  box-shadow: 0 0 14px rgba(0, 245, 155, 0.25);
}

.sector-card-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s ease;
}

.sector-card-pill.pill-bull::before {
  background: linear-gradient(90deg, #00f59b, #10b981);
}

.sector-card-pill.pill-bear::before {
  background: linear-gradient(90deg, #f43f5e, #e11d48);
}

.sector-pill-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sector-pill-name {
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: 0.4px;
}

.sector-pill-chg {
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.chg-bull { color: #00f59b; }
.chg-bear { color: #f43f5e; }
.chg-neut { color: #94a3b8; }

/* Micro Segmented Battery Meter */
.sector-battery-micro {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  height: 5px;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px;
  border-radius: 2px;
}

.battery-micro-cell {
  border-radius: 1px;
  height: 100%;
}

.battery-micro-cell.cell-green {
  background: #00f59b;
  box-shadow: 0 0 4px rgba(0, 245, 155, 0.5);
}

.battery-micro-cell.cell-red {
  background: #f43f5e;
  box-shadow: 0 0 4px rgba(244, 63, 94, 0.4);
}

.sector-pill-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 1px;
}

.sector-ratio-text {
  font-family: var(--font-mono);
  font-weight: 600;
}

.sector-top-chip {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.sector-skeleton-loading {
  padding: 18px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  width: 100%;
}

/* ====================================================================
   MOBILE & RESPONSIVE COMPREHENSIVE SYSTEM
   ==================================================================== */
@media (max-width: 1024px) {
  .top-navbar {
    padding: 10px 16px;
  }
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .radar-header-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .table-card {
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  body {
    padding: 8px 10px 24px;
  }

  .top-navbar {
    padding: 8px 12px;
    gap: 8px;
  }

  .header-main-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand-sub {
    font-size: 8px;
  }

  .header-status-group {
    flex-wrap: wrap;
    gap: 6px;
  }

  .fyers-connection-badge {
    padding: 4px 10px;
    font-size: 10px;
  }

  .market-clock-pill {
    padding: 4px 8px;
    font-size: 10px;
  }

  .underlyings-quick-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .symbol-chips-carousel {
    flex-wrap: nowrap;
  }

  .symbol-chip {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 11px;
  }

  .market-xray-strip {
    padding: 10px 12px;
  }

  .xray-stats-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .xray-extremes-group {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hist-canvas-area {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .kpi-card {
    padding: 10px 12px;
  }

  .kpi-value {
    font-size: 20px;
  }

  .all-sectors-strip {
    padding: 10px 12px;
  }

  .sector-card-pill {
    flex: 0 0 148px;
    padding: 8px 10px;
  }

  .tabs-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .tab-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 11px;
    white-space: nowrap;
  }

  .radar-header-banner {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .radar-stat-box {
    padding: 10px 12px;
  }

  .radar-stat-main {
    font-size: 16px;
  }

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

  .data-table th, .data-table td {
    padding: 8px 10px;
    font-size: 11px;
  }

  .modal-card {
    max-width: 96vw !important;
    margin: 8px auto;
    max-height: 94vh;
    padding: 12px;
  }

  .ob-rules-row {
    grid-template-columns: 1fr;
  }
}

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

  .radar-header-banner {
    grid-template-columns: 1fr;
  }

  .sector-card-pill {
    flex: 0 0 138px;
  }

  .sectors-filter-tabs {
    display: none;
  }

  .brand-sub {
    display: none;
  }
}

/* ====================================================================
   LIVE SECTORAL HEATMAP (FYERS / TRADINGVIEW STYLE INSTITUTIONAL TREEMAP)
   ==================================================================== */
.heatmap-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 12px;
  box-shadow: var(--neu-flat);
}

.heatmap-controls-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.heatmap-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.heatmap-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.heatmap-control-group label {
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.heatmap-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.heatmap-select:focus, .heatmap-select:hover {
  border-color: #3b82f6;
  background: rgba(30, 41, 59, 0.9);
}

.multiplier-btn-group {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.hm-btn-mult {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.hm-btn-mult:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.hm-btn-mult.active {
  background: #2563eb;
  color: #ffffff;
}

.hm-btn-reset {
  padding: 5px 12px;
  font-size: 11px;
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.hm-btn-reset:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.9);
}

.heatmap-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  min-width: 240px;
}

.heatmap-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 11.5px;
  width: 100%;
}

.heatmap-search-box input::placeholder {
  color: var(--text-muted);
}

/* Breadth Header Strip */
.heatmap-breadth-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-bottom: 14px;
  font-size: 11.5px;
}

.hm-stat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hm-stat-chip.chip-green strong {
  color: #10b981;
}

.hm-stat-chip.chip-red strong {
  color: #ef4444;
}

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

/* Sector Heatmap Treemap Container */
.sector-heatmap-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 520px;
}

.hm-sector-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: border-color var(--trans-fast);
}

.hm-sector-card:hover {
  border-color: #334155;
}

.hm-sector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid #1e293b;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.hm-sector-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  text-transform: uppercase;
  color: #e2e8f0;
  font-size: 11.5px;
}

.hm-sector-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.hm-sector-avg-badge {
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.hm-sector-avg-badge.badge-pos {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hm-sector-avg-badge.badge-neg {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.hm-sector-avg-badge.badge-flat {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Flexible Tile Grid Inside Sector */
.hm-sector-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  background: #020617;
}

/* Individual Stock Tile */
.hm-stock-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hm-stock-tile:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  z-index: 10;
  border-color: rgba(255, 255, 255, 0.4);
  filter: brightness(1.15);
}

.hm-tile-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-bottom: 3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.hm-tile-chp {
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.hm-tile-price {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Floating Tooltip */
.heatmap-tooltip {
  position: fixed;
  display: none;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid #3b82f6;
  border-radius: 8px;
  padding: 12px 14px;
  color: #f8fafc;
  font-size: 11.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  z-index: 9999;
  max-width: 260px;
  backdrop-filter: blur(8px);
}

.hm-tt-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.hm-tt-symbol {
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.hm-tt-name {
  font-size: 11px;
  color: #94a3b8;
}

.hm-tt-row {
  display: flex;
  justify-content: space-between;
  margin: 3px 0;
  font-size: 11px;
}

.hm-tt-label {
  color: #94a3b8;
}

.hm-tt-val {
  font-weight: 700;
  font-family: var(--font-mono);
}

/* ====================================================================
   INTERACTIVE SECTOR LEADERBOARD & PERFORMANCE RANKING RIBBON
   ==================================================================== */
.hm-sector-leaderboard-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
}

.hm-leaderboard-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.hm-leaderboard-title {
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.5px;
}

.hm-leaderboard-hint {
  color: var(--text-dim);
  font-size: 10px;
}

.hm-leaderboard-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 80px;
  overflow-y: auto;
  padding: 2px 0;
}

.hm-sector-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

.hm-sector-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hm-sector-pill.pill-all {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-weight: 700;
}

.hm-sector-pill.pill-pos {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.hm-sector-pill.pill-neg {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.hm-sector-pill.pill-flat {
  background: rgba(100, 116, 139, 0.15);
  border-color: rgba(100, 116, 139, 0.3);
  color: #cbd5e1;
}

.hm-sector-pill.is-active {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.25) !important;
  color: #ffffff !important;
  font-weight: 800;
}

.hm-pill-chp {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10.5px;
}

.hm-pill-counts {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 2px;
}

/* ====================================================================
   UNIFIED MARKET TREEMAP CANVAS (NO SECTOR BOXES - ONE BIG HEATMAP)
   ==================================================================== */
.hm-unified-grid {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  padding: 8px;
  background: #020617;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-height: 600px;
  width: 100%;
  box-sizing: border-box;
}

/* Sector tag inside stock tile in Unified Mode */
.hm-tile-sector-tag {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
}




