/* ==========================================================================
   ASH INFINITY ENGINE — MISSION CONTROL DESIGN SYSTEM
   Theme: Cyber Obsidian Glassmorphism (Mobile-First & Desktop Cockpit)
   ========================================================================== */

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

:root {
  --bg-base: #060911;
  --bg-surface: rgba(11, 17, 30, 0.78);
  --bg-card: rgba(16, 24, 42, 0.65);
  --bg-card-hover: rgba(22, 33, 58, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(0, 245, 160, 0.35);

  --emerald: #00f5a0;
  --emerald-glow: rgba(0, 245, 160, 0.25);
  --cyan: #00d2ff;
  --cyan-glow: rgba(0, 210, 255, 0.25);
  --purple: #9d4edd;
  --purple-glow: rgba(157, 78, 221, 0.25);
  --gold: #ffb703;
  --gold-glow: rgba(255, 183, 3, 0.25);
  --rose: #ff3366;
  --rose-glow: rgba(255, 51, 102, 0.25);

  --text-main: #f3f6fc;
  --text-muted: #8b9bb4;
  --text-sub: #5d6e87;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(0, 245, 160, 0.15);

  --nav-height-mobile: 68px;
  --sidebar-width-desktop: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 210, 255, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(157, 78, 221, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(0, 245, 160, 0.03) 0%, transparent 60%);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */

#app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar (Desktop) */
.sidebar {
  display: none;
  width: var(--sidebar-width-desktop);
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  padding: 24px 20px;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

/* Main Content Viewport */
.main-viewport {
  flex: 1;
  padding: 20px 16px calc(var(--nav-height-mobile) + 24px) 16px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
  }
  .main-viewport {
    margin-left: var(--sidebar-width-desktop);
    padding: 28px 36px 36px 36px;
  }
}

/* Mobile Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height-mobile);
  background: rgba(8, 12, 22, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  padding: 0 10px;
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: all 0.2s ease;
}

.nav-item.active {
  color: var(--emerald);
}

.nav-item.active svg {
  stroke: var(--emerald);
  filter: drop-shadow(0 0 8px var(--emerald-glow));
}

/* Desktop Sidebar Nav Elements */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 8px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--emerald) 0%, var(--cyan) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-heading);
  color: #040810;
  font-size: 18px;
  box-shadow: 0 0 16px var(--emerald-glow);
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff 40%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 10px;
  background: rgba(0, 245, 160, 0.12);
  color: var(--emerald);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.sidebar-link.active {
  background: rgba(0, 245, 160, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(0, 245, 160, 0.2);
}

/* System Heartbeat Pill */
.system-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 12px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse-dot-anim 2s infinite;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 245, 160, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 245, 160, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 245, 160, 0); }
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.header-title-area h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .header-title-area h1 {
    font-size: 30px;
  }
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.market-pill {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.market-pill.open {
  background: rgba(0, 245, 160, 0.1);
  border-color: rgba(0, 245, 160, 0.3);
  color: var(--emerald);
}

.market-pill.closed {
  background: rgba(255, 51, 102, 0.1);
  border-color: rgba(255, 51, 102, 0.3);
  color: var(--rose);
}

/* ==========================================================================
   CARDS & TILES
   ========================================================================== */

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.glass-card:hover {
  border-color: var(--border-glass);
}

/* Metric KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.kpi-card {
  padding: 18px 16px;
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
}

@media (min-width: 768px) {
  .kpi-value {
    font-size: 26px;
  }
}

.kpi-value.green { color: var(--emerald); text-shadow: 0 0 15px var(--emerald-glow); }
.kpi-value.cyan { color: var(--cyan); text-shadow: 0 0 15px var(--cyan-glow); }
.kpi-value.gold { color: var(--gold); text-shadow: 0 0 15px var(--gold-glow); }
.kpi-value.purple { color: var(--purple); text-shadow: 0 0 15px var(--purple-glow); }

.kpi-sub {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* ==========================================================================
   DESK CARDS (4 DESKS)
   ========================================================================== */

.desks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .desks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.desk-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.desk-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.desk-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.desk-badge.nifty { background: rgba(0, 210, 255, 0.12); color: var(--cyan); border: 1px solid rgba(0, 210, 255, 0.3); }
.desk-badge.sensex { background: rgba(157, 78, 221, 0.12); color: var(--purple); border: 1px solid rgba(157, 78, 221, 0.3); }
.desk-badge.mcx { background: rgba(255, 183, 3, 0.12); color: var(--gold); border: 1px solid rgba(255, 183, 3, 0.3); }
.desk-badge.equities { background: rgba(0, 245, 160, 0.12); color: var(--emerald); border: 1px solid rgba(0, 245, 160, 0.3); }

.desk-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: var(--radius-md);
}

.stat-cell {
  text-align: center;
}

.stat-cell-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 2px;
}

.stat-cell-val {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
}

/* ==========================================================================
   ACTIVE POSITIONS RADAR
   ========================================================================== */

.active-positions-section {
  margin-bottom: 28px;
}

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

.section-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.position-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.position-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.position-card.sell-card::before {
  background: var(--rose);
  box-shadow: 0 0 10px var(--rose);
}

.position-card.swap-card::before {
  background: var(--purple);
  box-shadow: 0 0 10px var(--purple);
}

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

.pos-symbol {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.pos-model-tag {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.pos-price-ladder {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 12px;
}

.ladder-item {
  display: flex;
  flex-direction: column;
}

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

.ladder-val {
  font-weight: 600;
}

/* Trailing SL Progress Meter */
.trailing-meter-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.meter-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.meter-stage-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald);
}

/* ==========================================================================
   TRADE LOGS TABLE
   ========================================================================== */

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
}

table.trade-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

table.trade-table th {
  padding: 12px 14px;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

table.trade-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
}

table.trade-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.outcome-pill {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
}

.outcome-pill.win { background: rgba(0, 245, 160, 0.15); color: var(--emerald); }
.outcome-pill.loss { background: rgba(255, 51, 102, 0.15); color: var(--rose); }
.outcome-pill.be { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

/* ==========================================================================
   SETTINGS CONTROL PANEL (TOGGLES & SLIDERS)
   ========================================================================== */

.settings-group {
  margin-bottom: 24px;
}

.settings-group-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(16, 24, 42, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.setting-row:hover {
  background: rgba(22, 33, 58, 0.6);
  border-color: var(--border-glass);
}

.setting-info {
  max-width: 75%;
}

.setting-name {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 2px;
}

.setting-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Custom iOS-style Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 26px;
  border: 1px solid var(--border-subtle);
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

input:checked + .slider {
  background-color: var(--emerald);
  box-shadow: 0 0 12px var(--emerald-glow);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Save Settings Button */
.btn-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--emerald) 0%, #00c480 100%);
  color: #050b14;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--emerald-glow);
  transition: all 0.2s ease;
  width: 100%;
}

@media (min-width: 768px) {
  .btn-save {
    width: auto;
  }
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 245, 160, 0.4);
}

/* ==========================================================================
   PIN SECURITY MODAL
   ========================================================================== */

#pin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 14, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.pin-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-sub);
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background: var(--emerald);
  border-color: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

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

.keypad-btn {
  height: 58px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.keypad-btn:active {
  background: rgba(0, 245, 160, 0.2);
  transform: scale(0.95);
}

/* Active tab view switching */
.view-panel {
  display: none;
}
.view-panel.active {
  display: block;
}

/* ==========================================================================
   HORIZON SWITCHER (LIVE SESSION VS 1-YEAR BACKTEST)
   ========================================================================== */
.horizon-switch-container {
  display: flex;
  background: rgba(16, 24, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 4px;
}

.horizon-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.horizon-btn:hover {
  color: #ffffff;
}

.horizon-btn.active {
  background: rgba(0, 245, 160, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(0, 245, 160, 0.4);
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.2);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseGlow 1.5s infinite;
}

/* ==========================================================================
   TRADE BOOK DESK FILTERS & PAGINATION
   ========================================================================== */
.desk-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.desk-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(16, 24, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.desk-filter-pill:hover {
  background: rgba(22, 33, 58, 0.8);
  color: #ffffff;
  border-color: var(--border-glass);
}

.desk-filter-pill.active {
  background: rgba(0, 210, 255, 0.15);
  color: var(--cyan);
  border-color: rgba(0, 210, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}

.pill-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.sub-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  background: rgba(16, 24, 42, 0.4);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.sub-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.filter-select, .filter-input {
  background: rgba(8, 12, 20, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 7px 12px;
  font-size: 12px;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s ease;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.3);
}

.filter-select option, .filter-select optgroup {
  background: #0d131f;
  color: #e2e8f0;
}

.filter-select optgroup {
  font-weight: 700;
  color: var(--cyan);
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.3);
  color: var(--emerald);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh:hover {
  background: rgba(0, 245, 160, 0.2);
  transform: translateY(-1px);
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  gap: 12px;
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  background: rgba(16, 24, 42, 0.8);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--cyan);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-current {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  padding: 0 8px;
}

/* ==========================================================================
   IMG 1: DYNAMIC OUTCOME SUMMARY STRIP
   ========================================================================== */
.ledger-outcome-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(10, 15, 29, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
}

.outcome-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.outcome-stat-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.outcome-stat-pill.win {
  background: rgba(0, 245, 160, 0.08);
  border: 1px solid rgba(0, 245, 160, 0.25);
  color: var(--emerald);
}
.outcome-stat-pill.win .dot {
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

.outcome-stat-pill.be {
  background: rgba(255, 183, 3, 0.08);
  border: 1px solid rgba(255, 183, 3, 0.25);
  color: var(--gold);
}
.outcome-stat-pill.be .dot {
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
}

.outcome-stat-pill.loss {
  background: rgba(255, 51, 102, 0.08);
  border: 1px solid rgba(255, 51, 102, 0.25);
  color: var(--rose);
}
.outcome-stat-pill.loss .dot {
  background: var(--rose);
  box-shadow: 0 0 6px var(--rose);
}

.outcome-stat-pill.pnl {
  margin-left: auto;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: var(--cyan);
  font-family: var(--font-mono);
}

.outcome-stat-pill .sub {
  font-size: 11px;
  opacity: 0.8;
  font-family: var(--font-mono);
}

/* ==========================================================================
   IMG 2: CLICKABLE TABLE ROWS & TRADE DETAIL MODAL
   ========================================================================== */
.trade-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.trade-table tbody tr:hover {
  background: rgba(0, 245, 160, 0.06);
}

.trade-table tbody tr:hover td:nth-child(2) strong {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.5);
}

.trade-table tbody tr:active {
  background: rgba(0, 245, 160, 0.12);
}

/* Modal Overlay & Box */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.trade-modal-box {
  background: linear-gradient(145deg, rgba(16, 24, 42, 0.96), rgba(10, 15, 29, 0.98));
  border: 1px solid rgba(0, 245, 160, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 245, 160, 0.12);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.trade-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-pretitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 4px;
}

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

.modal-close-btn:hover {
  background: rgba(255, 51, 102, 0.2);
  border-color: var(--rose);
  color: #fff;
}

/* Hero Outcome Banner */
.modal-hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.modal-hero-banner.win {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.12), rgba(0, 210, 255, 0.08));
  border: 1px solid rgba(0, 245, 160, 0.35);
  box-shadow: 0 0 20px rgba(0, 245, 160, 0.12);
}

.modal-hero-banner.be {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.12), rgba(255, 183, 3, 0.05));
  border: 1px solid rgba(255, 183, 3, 0.35);
  box-shadow: 0 0 20px rgba(255, 183, 3, 0.12);
}

.modal-hero-banner.loss {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.12), rgba(255, 51, 102, 0.05));
  border: 1px solid rgba(255, 51, 102, 0.35);
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.12);
}

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

.hero-icon {
  font-size: 28px;
}

.hero-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.modal-hero-banner.win .hero-title { color: var(--emerald); }
.modal-hero-banner.be .hero-title { color: var(--gold); }
.modal-hero-banner.loss .hero-title { color: var(--rose); }

.hero-reason {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.hero-right {
  text-align: right;
  font-family: var(--font-mono);
}

.hero-pnl {
  font-size: 18px;
  font-weight: 800;
}

.modal-hero-banner.win .hero-pnl { color: var(--emerald); }
.modal-hero-banner.be .hero-pnl { color: var(--gold); }
.modal-hero-banner.loss .hero-pnl { color: var(--rose); }

.hero-rmult {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 4-Tile Telemetry Grid */
.modal-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (min-width: 600px) {
  .modal-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.modal-tile {
  background: rgba(10, 15, 29, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.modal-tile .tile-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.modal-tile .tile-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.modal-tile .tile-sub {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 3px;
}

/* Stepper Progression Tracker */
.stepper-card {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 18px;
}

.stepper-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.stepper-track {
  display: flex;
  align-items: center;
  position: relative;
  gap: 8px;
}

.step-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  z-index: 2;
  transition: all 0.2s ease;
}

.step-node.completed .step-circle {
  background: var(--emerald);
  color: #000;
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.5);
}

.step-node.active .step-circle {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.step-node.stopped .step-circle {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

.step-node.pending .step-circle {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.step-label {
  font-size: 10px;
  color: var(--text-sub);
  font-weight: 500;
  line-height: 1.3;
}

.step-node.completed .step-label,
.step-node.active .step-label {
  color: #ffffff;
}

/* Narrative Breakdown Card */
.narrative-card {
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.narrative-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.narrative-section {
  margin-bottom: 12px;
}

.narrative-sub {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.narrative-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   DESK TELEMETRY & UNDERLYING MODEL AUDIT (REQUIREMENT 2)
   ========================================================================== */
.clickable-desk-card {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.clickable-desk-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 210, 255, 0.15);
}

.desk-click-hint {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
}

.clickable-desk-card:hover .desk-click-hint {
  background: var(--cyan);
  color: #060911;
  box-shadow: 0 0 8px var(--cyan);
}

.desk-breakdown-modal-box {
  background: linear-gradient(135deg, rgba(13, 20, 36, 0.96), rgba(8, 12, 22, 0.98));
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 210, 255, 0.1);
  width: 92%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 10001;
}

.desk-modal-kpi-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: rgba(10, 15, 29, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 14px;
  margin-bottom: 16px;
}

.desk-instrument-tab-section {
  margin-bottom: 12px;
}

.desk-instrument-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.desk-inst-pill, .analytics-inst-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.desk-inst-pill:hover, .analytics-inst-pill:hover {
  background: rgba(0, 210, 255, 0.1);
  color: #ffffff;
  border-color: rgba(0, 210, 255, 0.3);
}

.desk-inst-pill.active, .analytics-inst-pill.active {
  background: rgba(0, 210, 255, 0.15);
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.desk-models-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-card {
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.model-card:hover {
  border-color: rgba(0, 210, 255, 0.3);
  background: rgba(13, 20, 36, 0.95);
}

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

.model-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-stats-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
}

.model-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
}

.model-progress-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.model-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Model Outcome Badges & Deep-Dive Accordion */
.model-outcome-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.model-outcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-weight: 600;
}

.model-outcome-pill.win {
  background: rgba(0, 255, 163, 0.08);
  border-color: rgba(0, 255, 163, 0.25);
  color: var(--emerald);
}

.model-outcome-pill.be {
  background: rgba(255, 184, 0, 0.08);
  border-color: rgba(255, 184, 0, 0.25);
  color: var(--gold);
}

.model-outcome-pill.loss {
  background: rgba(255, 59, 92, 0.08);
  border-color: rgba(255, 59, 92, 0.25);
  color: var(--rose);
}

.model-deepdive-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.model-deepdive-toggle-btn:hover {
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.4);
  color: #fff;
}

.model-deepdive-toggle-btn.active {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

.model-deep-dive-panel {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  animation: fadeIn 0.25s ease forwards;
}

.model-deep-dive-panel.active {
  display: block;
}

.model-deep-dive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .model-deep-dive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.model-deep-dive-tile {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 8px 10px;
}

.model-deep-dive-tile .tile-title {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.model-deep-dive-tile .tile-main {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.model-deep-dive-tile .tile-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.model-drilldown-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.model-drilldown-btn {
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.model-drilldown-btn:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--cyan);
  color: #fff;
  transform: translateX(2px);
}

/* ==============================================================
   09:20 AM MORNING INTELLIGENCE BUTTON & MODAL
   ============================================================== */
.morning-intel-btn {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(0, 245, 160, 0.1));
  border: 1px solid rgba(0, 210, 255, 0.4);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.15);
}

.morning-intel-btn:hover {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.3), rgba(0, 245, 160, 0.25));
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.35);
  transform: translateY(-1px);
}

.morning-intel-modal-box {
  background: linear-gradient(145deg, rgba(14, 20, 36, 0.98), rgba(9, 13, 25, 0.99));
  border: 1px solid rgba(0, 210, 255, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 210, 255, 0.15);
  border-radius: var(--radius-lg);
  max-width: 1180px;
  width: 96%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  transform: scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .morning-intel-modal-box {
  transform: scale(1);
}

.intel-header-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.intel-btn-action {
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.35);
  color: var(--emerald);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.intel-btn-action:hover {
  background: rgba(0, 245, 160, 0.25);
  border-color: var(--emerald);
  color: #fff;
}

.intel-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.intel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  margin-bottom: 16px;
}

.intel-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.intel-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.intel-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.intel-contract-chip {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: var(--font-mono);
}

.intel-contract-chip.call {
  border-left: 3px solid var(--emerald);
}

.intel-contract-chip.put {
  border-left: 3px solid var(--rose);
}

.intel-dhan-badge {
  background: rgba(0, 210, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 210, 255, 0.3);
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ==============================================================
   ANGEL ONE LIVE TRADE LOGS & TELEMETRY MODAL STYLES
   ============================================================== */
.trade-logs-modal-box {
  background: linear-gradient(145deg, rgba(14, 20, 36, 0.98), rgba(9, 13, 25, 0.99));
  border: 1px solid rgba(0, 245, 160, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 245, 160, 0.15);
  border-radius: var(--radius-lg);
  max-width: 1180px;
  width: 96%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  transform: scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .trade-logs-modal-box {
  transform: scale(1);
}

.trade-logs-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
  margin-bottom: 20px;
}

.trade-log-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.trade-log-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.trade-log-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.trade-log-stat-sub {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 3px;
}

.trade-log-desk-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.trade-log-desk-btn:hover {
  background: rgba(0, 245, 160, 0.15);
  border-color: rgba(0, 245, 160, 0.35);
  color: #fff;
}

.trade-log-desk-btn.active {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #000;
  font-weight: 800;
}

/* ==============================================================
   LIVE TRADES & LOGS FULL-PAGE VIEW & PERIOD FILTER STYLES
   ============================================================== */
.live-session-card {
  background: linear-gradient(135deg, rgba(14, 25, 45, 0.75), rgba(9, 15, 30, 0.85));
  border: 1px solid rgba(0, 245, 160, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(0, 245, 160, 0.05);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.live-session-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.live-session-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-session-pulse-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0, 245, 160, 0.12);
  border: 1px solid rgba(0, 245, 160, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 15px rgba(0, 245, 160, 0.2);
}

.live-session-meta-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.meta-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
}

.meta-chip-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.meta-chip-val {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* Period Filter Bar for Live Trades */
.period-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(14, 20, 36, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

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

.period-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.period-filter-pill:hover {
  background: rgba(0, 245, 160, 0.12);
  border-color: rgba(0, 245, 160, 0.3);
  color: #fff;
}

.period-filter-pill.active {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.25), rgba(0, 210, 255, 0.2));
  border-color: var(--emerald);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.25);
}

.live-dot-small {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
  animation: pulse-glow 1.5s infinite;
}

/* Sub-Tab Toggle inside Trade Book */
.sub-tab-switch {
  display: flex;
  gap: 6px;
}

.sub-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.sub-tab-btn.active {
  color: #fff;
  background: rgba(0, 245, 160, 0.15);
  border-color: rgba(0, 245, 160, 0.4);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.15);
}

.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald);
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.25);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
