/* RAYBRIDGE V19 BLOOMBERG TERMINAL UPGRADE - STRICT ARIAL TYPOGRAPHY */
*, *::before, *::after,
.font-mono, [class*="font-mono"], .inst-table td, .inst-table th {
  font-family: Arial, Helvetica, sans-serif !important;
}

  /* 1. STICKY YEAR HEADERS & STICKY FIRST COLUMN ACROSS ALL MULTI-YEAR TABLES */
  .inst-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    background-color: var(--win-header-bg) !important;
    box-shadow: none !important;
  }

  /* Keep first column (Line Item / Particulars / Ratio Name) sticky on horizontal scroll */
  #tbl-exec-summary th:first-child,
  #tbl-exec-summary td:first-child,
  #tbl-financial-statement th:first-child,
  #tbl-financial-statement td:first-child,
  #tbl-ratios-10y th:first-child,
  #tbl-ratios-10y td:first-child,
  #tbl-shareholding th:first-child,
  #tbl-shareholding td:first-child,
  #tbl-ectr-guidance-bridge th:first-child,
  #tbl-ectr-guidance-bridge td:first-child,
  #tbl-rf-checklist th:first-child,
  #tbl-rf-checklist td:first-child,
  #tbl-comp-matrix th:first-child,
  #tbl-comp-matrix td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 20 !important;
    background-color: var(--win-surface) !important;
    border-right: 1px solid var(--win-border-light) !important;
  }
  #tbl-exec-summary thead th:first-child,
  #tbl-financial-statement thead th:first-child,
  #tbl-ratios-10y thead th:first-child,
  #tbl-shareholding thead th:first-child,
  #tbl-ectr-guidance-bridge thead th:first-child,
  #tbl-rf-checklist thead th:first-child,
  #tbl-comp-matrix thead th:first-child {
    z-index: 35 !important;
    background-color: var(--win-header-bg) !important;
  }

  /* Ensure scrollable vertical viewports on all multi-year tables so sticky headers stay pinned */
  #tbl-exec-summary,
  #tbl-ratios-10y,
  #tbl-shareholding,
  #tbl-ectr-guidance-bridge,
  #tbl-rf-checklist {
    position: relative;
  }
  #tab-dossier .bevel-inset:has(#tbl-exec-summary),
  #tab-ratios .bevel-inset:has(#tbl-ratios-10y),
  #tab-shareholding .bevel-inset:has(#tbl-shareholding),
  #tab-ectr .bevel-inset:has(#tbl-ectr-guidance-bridge),
  #tab-redflag .bevel-inset:has(#tbl-rf-checklist) {
    max-height: 620px;
    overflow-y: auto !important;
  }

  /* 2. PIC 1 FIX: ULTRA-COMPACT TOP CHROME & COLLAPSIBLE SECURITY DETAILS FOR MAXIMUM DASHBOARD SPACE */
  body.compact-header-mode #stock-val-strip {
    display: none !important;
  }
  body:not(.compact-header-mode) #stock-val-strip {
    display: grid !important;
  }
  body.compact-header-mode #ondemand-stock-facts-banner .ondemand-facts-row2 {
    display: none !important;
  }
  body.compact-header-mode #ondemand-stock-facts-banner {
    padding: 2px 6px !important;
  }
  body.compact-header-mode #active-stock-banner {
    padding: 2px 6px !important;
  }
  body.compact-header-mode #active-stock-banner > div:first-child {
    padding-bottom: 0 !important;
  }
  body.compact-header-mode #main-workspace {
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  body.compact-header-mode #mdi-content-area {
    padding: 8px 10px !important;
  }

  /* 3. MULTI-YEAR SELECTOR BAR STYLING */
  .year-selector-bar {
    background: #0c1017;
    border: 1px solid #262626;
    padding: 2px 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 10px;
  }
  .yr-pill-btn {
    padding: 1px 5px;
    font-size: 9.5px;
    font-weight: bold;
    border: 1px solid #262626;
    background: #0D131D;
    color: #94A3B8;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s;
  }
  .yr-pill-btn:hover {
    border-color: #FF9900;
    color: #FFFFFF;
  }
  .yr-pill-btn.active {
    background: #FF9900;
    color: #000000 !important;
    border-color: #FF9900;
  }
  .yr-preset-btn {
    padding: 1px 6px;
    font-size: 9.5px;
    font-weight: bold;
    border: 1px solid #FF9900;
    background: #0A0E17;
    color: #FF9900;
    cursor: pointer;
  }
  .yr-preset-btn.active, .yr-preset-btn:hover {
    background: #FF9900;
    color: #000000 !important;
  }

  /* 4. SPLC UPGRADES 1, 2, 3 BADGES (COGS DELTA, NSE DISCLOSURE ALERT, CONCENTRATION CAPS) */
  .splc-cogs-delta-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 4px;
    font-size: 9px;
    font-weight: bold;
    border-radius: 0px !important;
  }
  .splc-conc-cap-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0.5px 4px;
    font-size: 8.5px;
    font-weight: bold;
    border-radius: 0px !important;
    letter-spacing: 0.15px;
  }
  .splc-nse-alert-flash {
    animation: splcAlertPulse 1.8s infinite;
  }
  @keyframes splcAlertPulse {
    0%, 100% { border-color: #FF3B30; box-shadow: none !important; }
    50% { border-color: #FF9900; box-shadow: none !important; }
  }

/* ============================================================================
   AUTHENTIC BLOOMBERG TERMINAL SPLC (SUPPLY CHAIN ANALYSIS) STYLES
   ============================================================================ */
.splc-header-container {
  background: #0B0F17;
  border: 1px solid #262626;
}
.splc-insight-card {
  background: #0B0F17;
  border: 1px solid #262626;
  min-height: 120px;
}
.splc-insight-card:hover {
  border-color: #38495E;
}
.splc-master-table th {
  background: #161F2C !important;
  color: #FF9900 !important;
  padding: 6px 10px !important;
  font-size: 10.5px !important;
  font-weight: bold !important;
  letter-spacing: 0.3px;
}
.splc-master-table td {
  padding: 5px 10px !important;
  font-size: 11px !important;
  border-color: #1A2332 !important;
}
.splc-master-table tr:hover td {
  background: #162235 !important;
}
.splc-nav-pill {
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  user-select: none;
}

/* INTERACTIVE DRAGGABLE RESIZABLE PANELS & SPLITTERS */
.resizable-panels-row {
  display: flex;
  position: relative;
  width: 100%;
  align-items: stretch;
}

.panel-resizer-handle-x {
  width: 7px;
  min-width: 7px;
  cursor: col-resize;
  background: #111827;
  border-left: 1px solid #262626;
  border-right: 1px solid #262626;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  z-index: 10;
  margin: 0 1px;
}

.panel-resizer-handle-x:hover,
.panel-resizer-handle-x.is-dragging {
  background: #FF9900 !important;
  border-color: #FFAA33 !important;
  box-shadow: none !important;
}

.resizer-grip-line {
  width: 1px;
  height: 28px;
  background: #475569;
}

.panel-resizer-handle-x:hover .resizer-grip-line,
.panel-resizer-handle-x.is-dragging .resizer-grip-line {
  background: #000;
}

.resizable-panel {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#box-forensics-table {
  overflow-x: auto;
  scrollbar-width: thin;
}

#box-forensics-table table {
  width: 100%;
  border-collapse: collapse;
}

#box-forensics-table th,
#box-forensics-table td {
  padding: 4px 6px;
  font-size: 11px;
}


/* ============================================================================
   SMART UI DECLUTTERING & SPATIAL OPTIMIZATION FOR ALL DASHBOARD FUNCTIONS
   ============================================================================ */

/* 1. Main Workspace Spacious Canvas & Viewports */
#main-workspace {
  padding: 10px 14px !important;
  gap: 10px !important;
  background-color: #06090F !important;
  overflow: hidden !important;
}

#mdi-content-area {
  padding: 10px 12px !important;
  border-radius: 0px !important;
  background: #000000 !important;
  border: 1px solid #1A2333 !important;
}

.tab-pane {
  padding: 6px 4px !important;
}

/* 2. Active Stock Master Banner - Spacious, Clear & High Contrast */
#active-stock-banner {
  padding: 12px 16px !important;
  border-radius: 0px !important;
  background: #0c1017 !important;
  border: 1px solid #262626 !important;
  box-shadow: none !important;
}

#hdr-symbol {
  font-size: 1.25rem !important;
  letter-spacing: -0.02em !important;
  color: #FF9900 !important;
  font-weight: 800 !important;
}

#hdr-company-name {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #F8FAFC !important;
}

#hdr-ltp {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

/* 3. 9-Metric Institutional Strip - Spacious Modern Cards */
#stock-val-strip {
  gap: 8px !important;
  padding-top: 10px !important;
  margin-top: 8px !important;
  border-top: 1px solid #262626 !important;
}

#stock-val-strip .bevel-inset {
  padding: 7px 10px !important;
  border-radius: 0px !important;
  background: #131313 !important;
  border: 1px solid #262626 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-height: 46px !important;
  transition: border-color 0.15s, background-color 0.15s !important;
}

#stock-val-strip .bevel-inset:hover {
  border-color: #FF9900 !important;
  background-color: #1c1b1b !important;
}

#stock-val-strip .bevel-inset span {
  font-size: 9.5px !important;
  color: #8B949E !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  font-weight: 600 !important;
  margin-bottom: 2px !important;
}

#stock-val-strip .bevel-inset b {
  font-size: 12px !important;
  color: #F1F5F9 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 700 !important;
}

/* 4. MDI Tab Bar - Spacious & Crisp Visual Feedback */
#mdi-tab-bar {
  padding: 6px 8px 0 8px !important;
  gap: 4px !important;
  border-bottom: 2px solid #262626 !important;
  background: #000000 !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
}

.mdi-tab {
  padding: 7px 14px !important;
  border-radius: 0px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.4px !important;
  border: 1px solid #262626 !important;
  border-bottom: none !important;
  background: #131313 !important;
  color: #94A3B8 !important;
  transition: all 0.15s ease-in-out !important;
  cursor: pointer !important;
}

.mdi-tab:hover {
  background: #1c1b1b !important;
  color: #FFFFFF !important;
  border-color: #38495E !important;
}

.mdi-tab.active {
  background: #131313 !important;
  color: #FF9900 !important;
  font-weight: 800 !important;
  border: 1px solid #FF9900 !important;
  border-top: 2px solid #FF9900 !important;
  border-bottom: 2px solid #131313 !important;
  box-shadow: none !important;
}

/* 5. Institutional Tables Across All Functions (Spacious, Clear & Readable) */
.inst-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 11.5px !important;
  line-height: 1.45 !important;
  background: #090D15 !important;
}

.inst-table th {
  padding: 8px 12px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  background: #121A28 !important;
  color: #FF9900 !important;
  border-bottom: 2px solid #262626 !important;
  border-right: 1px solid #262626 !important;
}

.inst-table td {
  padding: 7px 12px !important;
  font-size: 11.5px !important;
  color: #D1D5DB !important;
  border-bottom: 1px solid #151D2A !important;
  border-right: 1px solid #151D2A !important;
  font-variant-numeric: tabular-nums !important;
}

.inst-table tbody tr:nth-child(even) {
  background-color: #0A0F1A !important;
}

.inst-table tbody tr:nth-child(odd) {
  background-color: #0D1422 !important;
}

.inst-table tbody tr:hover {
  background-color: #172438 !important;
}

.inst-table tr.section-row td {
  background: #151E2E !important;
  color: #38BDF8 !important;
  font-weight: bold !important;
  padding: 8px 12px !important;
  letter-spacing: 0.5px !important;
  border-top: 1px solid #2A3B52 !important;
  border-bottom: 1px solid #2A3B52 !important;
}

.inst-table tr.total-row td {
  background: #131B2A !important;
  color: #FF9900 !important;
  font-weight: 800 !important;
  padding: 8px 12px !important;
  border-top: 1.5px solid #FF9900 !important;
  border-bottom: 2px double #FF9900 !important;
}

/* 6. High-Contrast Accounting Formats (Red Negatives & Emerald Positives) */
.num-neg, .text-red-400, .text-red-500 {
  color: #FF5252 !important;
  font-weight: 600 !important;
}

.num-pos, .text-emerald-400, .text-emerald-500 {
  color: #00E676 !important;
  font-weight: 600 !important;
}

/* 7. SPLC Chart & Materiality Node Styles */
.splc-node {
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s !important;
}

.splc-node:hover {
  transform: translateY(-1px) !important;
  box-shadow: none !important;
}

#splc-chart-hub {
  background: #0c1017 !important;
  border: 2px solid #FF9900 !important;
  box-shadow: none !important;
  padding: 12px 14px !important;
}

#splc-chart-disclosures-card {
  box-shadow: none !important;
}

/* Scrollbars - Clean & Minimal */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #000000;
}
::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 0px !important;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

  /* Pic 4 Fix: Strict container containment for 10-year tables to prevent sticky column bleed */
  #container-exec-summary,
  #dossier-row-exec-summary,
  .bevel-inset:has(#tbl-exec-summary) {
    position: relative !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    isolation: isolate !important;
    contain: paint !important;
  }

#ondemand-stock-facts-banner, .ondemand-fetch-banner { display: none !important; }
