/************************************************************
 * DEFINITIVE ANALYSIS — GLOBAL CSS (FINAL UNIFIED VERSION)
 * Pure black theme • Orange accent • Unified table engine
 ************************************************************/

/*******************************************************
 * RESET + BASE THEME
 *******************************************************/
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: #000 !important;
    color: #fff;
    font-family: Arial, sans-serif;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/*******************************************************
 * HEADER BAR
 *******************************************************/
.da-header {
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 9999;
    border-bottom: 2px solid #111;
}

.da-menu-btn {
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 15px;
}

.da-menu-btn div {
    width: 28px;
    height: 3px;
    background: #FFA500;
    margin: 4px 0;
    border-radius: 12px;
}

.da-logo {
    width: 48px;
    height: 48px;
    margin-right: 15px;
}

.da-title {
    font-size: 28px;
    font-weight: 700;
    color: #FFA500;
    margin-right: auto;
}

/*******************************************************
 * SLIDE-OUT MENU
 *******************************************************/
.da-menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #111;
    padding: 30px 20px;
    box-shadow: 4px 0 12px rgba(0,0,0,0.6);
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 10000;
    color: #FFA500;
    pointer-events: none;
}

.da-menu-panel.open {
    transform: translateX(0);
    pointer-events: auto;
}

/*******************************************************
 * UI WRAPPER (Ticker + Buttons)
 *******************************************************/
.da-ui-wrapper {
    width: 100%;
    padding: 20px;
    color: #FFA500;
}

.da-ticker-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.da-ticker-input {
    width: 160px;
    padding: 12px 15px;
    background: #111;
    border: 2px solid #FFA500;
    color: #FFA500;
    font-size: 18px;
    border-radius: 12px;
}

.da-change-btn {
    background: #FFA500;
    color: #000;
    border: none;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
}

/*******************************************************
 * TOGGLE BUTTONS + UNIT BUTTONS
 *******************************************************/
.da-toggle-btn,
.da-unit-btn {
    padding: 10px 18px;
    margin: 0 6px;
    border-radius: 30px;
    border: 2px solid #FFA500;
    background: #111;
    color: #FFA500;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .20s ease;
}

.da-toggle-btn:hover,
.da-unit-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

.da-toggle-btn.active,
.da-unit-btn.active {
    background: #FFA500 !important;
    color: #000 !important;
}

/*******************************************************
 * UNITS LABEL
 *******************************************************/
.da-units-label {
    font-size: 16px;
    font-weight: 700;
    color: #FFA500;
    margin-right: 6px;
    padding-top: 12px;
}

/********************************************************
 * UNIFIED TABLE ENGINE — FINAL VERSION
 ********************************************************/

/* SECTION WRAPPER */
.da-table-section {
    width: 95%;
    margin: 30px auto;
}

/* SCROLL WRAPPER */
.da-table-scroll {
    width: 100%;
    overflow-x: auto;
    background: #000;
    padding: 10px;
    border-radius: 12px;
}

/* BASE TABLE */
.da-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #FFA500;
    border-radius: 12px;
    overflow: hidden;
    font-size: 15px;
}

/*******************************************************
 * DEFAULT CELL STYLING — includes required fallback color
 *******************************************************/
.da-table td,
.da-table th {
    padding: 6px;
    border-bottom: 1px solid #111;
    color: #FFFFFF;   /* FIX — restores missing data */
}

/*******************************************************
 * ALIGNMENT RULES
 *******************************************************/
.da-table td { text-align: right; }
.da-table th { text-align: right; }

.da-table td.da-metric,
.da-table th:first-child {
    text-align: left !important;
}

/*******************************************************
 * HEADER STYLING — ORANGE
 *******************************************************/
.da-table th {
    color: #FFA500 !important;
    background: #1a1a1a !important;
    font-weight: 700;
}

/*******************************************************
 * METRIC COLUMN — ORANGE + STICKY
 *******************************************************/
.da-metric {
    color: #FFA500 !important;
    font-weight: 700;
    background: #000 !important;
}

.sticky-col {
    position: sticky;
    left: 0;
    background: #000 !important;
    z-index: 5;
}

/*******************************************************
 * COLOR TAGS
 *******************************************************/
.da-text-white { color: #FFFFFF !important; }
.da-num-white  { color: #FFFFFF !important; }
.da-date-white { color: #FFFFFF !important; }

.da-text-orange { color: #FFA500 !important; }
.da-date-orange { color: #FFA500 !important; }

/*******************************************************
 * POS/NEG COLORING
 *******************************************************/
.da-pos { color: #5cff5c !important; }
.da-neg { color: #ff5c5c !important; }
.da-zero { color: #FFFFFF !important; }

/*******************************************************
 * ROW STRIPING
 *******************************************************/
.da-table tr:nth-child(odd) td { background: #000 !important; }
.da-table tr:nth-child(even) td { background: #111 !important; }

.da-table tr:nth-child(even) td.da-metric.sticky-col {
    background: #000 !important;
}

/*******************************************************
 * INFO BOX
 *******************************************************/
.da-info-box {
    width: 95%;
    margin: 25px auto;
    background: #1b1b1b;
    border-left: 4px solid #FFA500;
    padding: 18px 20px;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 0.98rem;
    line-height: 1.45;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/*******************************************************
 * RESPONSIVE
 *******************************************************/
@media (max-width: 600px) {
    .da-title { font-size: 22px; }
    .da-table-title { font-size: 20px; }
    .da-ticker-input { width: 120px; }
}

/********************************************************
 * UNIFIED TABLE ENGINE — FIXED FOR ALL HELPERS
 ********************************************************/

/* SECTION WRAPPER */
.da-table-section {
    width: 95%;
    margin: 30px auto;
}

/* SCROLL WRAPPER */
.da-table-scroll {
    width: 100%;
    overflow-x: auto;
    background: #000;
    padding: 10px;
    border-radius: 12px;
}

/* BASE TABLE */
.da-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #FFA500;
    border-radius: 12px;
    overflow: hidden;
    font-size: 15px;
}

/*******************************************************
 * CELL DEFAULTS
 *******************************************************/
.da-table td,
.da-table th {
    padding: 6px;
    border-bottom: 1px solid #111;
    color: #FFFFFF;
    text-align: right;
}

/*******************************************************
 * FORCE FULL ORANGE HEADER (ALL HELPERS)
 *******************************************************/
.da-table thead th {
    color: #FFA500 !important;
    background: #1a1a1a !important;
    font-weight: 700;
}

/*******************************************************
 * FORCE LEFT COLUMN ORANGE (NO RENDERER CHANGES)
 *******************************************************/
.da-table td:first-child,
.da-table th:first-child {
    color: #FFA500 !important;
    text-align: left !important;
    font-weight: 700;
    background: #000 !important;
}

/*******************************************************
 * STICKY FIRST COLUMN
 *******************************************************/
.da-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #000 !important;
}

/*******************************************************
 * POS / NEG COLORS (UNCHANGED)
 *******************************************************/
.da-pos { color: #5cff5c !important; }
.da-neg { color: #ff5c5c !important; }
.da-zero { color: #FFFFFF !important; }

/*******************************************************
 * STRIPING
 *******************************************************/
.da-table tr:nth-child(odd) td { background: #000 !important; }
.da-table tr:nth-child(even) td { background: #111 !important; }

.da-table tr:nth-child(even) td:first-child {
    background: #000 !important;
}

/********************************************************
 * UNIFIED TABLE ENGINE — FINAL HEADER + METRIC FIX
 ********************************************************/

/* BASE CELL DEFAULTS */
.da-table td,
.da-table th {
    padding: 6px;
    border-bottom: 1px solid #111;
    color: #FFFFFF;
    text-align: right;
}

/*******************************************************
 * FORCE ALL HEADERS ORANGE — NO THEAD REQUIRED
 *******************************************************/
.da-table th {
    color: #FFA500 !important;
    background: #1a1a1a !important;
    font-weight: 700;
    text-align: right;
}

/*******************************************************
 * FORCE LEFT COLUMN ORANGE — UNIVERSAL FIX
 *******************************************************/
.da-table td:first-child,
.da-table th:first-child {
    color: #FFA500 !important;
    text-align: left !important;
    font-weight: 700;
    background: #000 !important;
}

/*******************************************************
 * STICKY FIRST COLUMN
 *******************************************************/
.da-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #000 !important;
}

/*******************************************************
 * POS/NEG COLORS (unchanged)
 *******************************************************/
.da-pos { color: #5cff5c !important; }
.da-neg { color: #ff5c5c !important; }
.da-zero { color: #FFFFFF !important; }

/*******************************************************
 * STRIPING
 *******************************************************/
.da-table tr:nth-child(odd) td { background: #000 !important; }
.da-table tr:nth-child(even) td { background: #111 !important; }

.da-table tr:nth-child(even) td:first-child {
    background: #000 !important;
}

/********************************************
 * GLOBAL LOADER
 ********************************************/
#da-loader-overlay{
  position:fixed;
  top:0;left:0;
  width:100%;height:100%;
  background:rgba(0,0,0,0.92);
  display:none;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  z-index:999999;
}
.da-spinner{
  width:70px;height:70px;
  border:6px solid #333;
  border-top:6px solid #FFA500;
  border-radius:50%;
  animation:da-spin 1s linear infinite;
}
@keyframes da-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
#da-loader-text{
  color:#FFA500;
  font-size:22px;
  font-weight:bold;
  margin-top:18px;
  text-align:center;
}

/********************************************
 * MODE BAR  (Company / Industry / Sector)
 ********************************************/
.da-mode-bar{
  margin-top:15px;
  display:flex;
  justify-content:center;
  gap:10px;
}
.da-mode-btn{
  background:#111;
  border:1px solid #FFA500;
  color:#FFA500;
  padding:8px 16px;
  font-size:14px;
  border-radius:6px;
  cursor:pointer;
  transition:0.15s;
}
.da-mode-btn:hover{background:#222;}
.da-mode-btn.active{
  background:#FFA500;
  color:#000;
  font-weight:bold;
}

/* =========================================================
   FULL-SCREEN LOADER OVERLAY
========================================================= */
#da-loader-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: rgba(0,0,0,0.85);
  z-index: 999999;
  color: #FFA500;
  text-align: center;
  font-size: 22px;
}

.da-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #333;
  border-top: 6px solid #FFA500;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }