/* ========================================================
   LIGHT THEME - Xtrade Trading Platform
   Comprehensive light mode overrides.
   Activated by body.light-theme class (toggled via theme button).
   ======================================================== */

/* ========= CSS VARIABLE OVERRIDES ========= */
body.light-theme {
  /* Core background & text */
  --bg-main: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #0b0c10;
  --text-secondary: rgba(11, 12, 16, 0.6);
  --border-color: rgba(0, 0, 0, 0.1);

  /* Dark-prefixed vars (used in index.html embedded CSS) */
  --bg-dark-primary: #f5f7fa;
  --bg-dark-secondary: #ffffff;
  --bg-dark-tertiary: #f0f2f5;
  --bg-card-hover: #f8f9fb;

  /* Xt design system vars (Phase G — squared minimalist, greyer tones) */
  --xt-bg-primary: #f0f1f3;        /* page bg — soft grey, less stark than pure white */
  --xt-bg-secondary: #f7f8fa;      /* one step lighter — sidebars, modals */
  --xt-bg-card: #ffffff;            /* card surfaces stay white for max contrast */
  --xt-bg-card-hover: #eceef1;     /* hover surface — flat grey, not blue */
  --xt-text-primary: #0b0c10;
  --xt-text-secondary: rgba(11, 12, 16, 0.6);
  --xt-text-muted: rgba(11, 12, 16, 0.4);
  --xt-border: rgba(0, 0, 0, 0.08);  /* softer border (was 0.12) */
  --xt-border-accent: rgba(33, 150, 238, 0.4);
  --xt-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);  /* softer than the old 0 8px 32px */

  /* Accent colors stay the same */
  --accent-dim: rgba(33, 150, 238, 0.12);
  --accent-glow: rgba(33, 150, 238, 0.08);

  /* Light-theme master grey ("master grey 2"): darker than dark-theme #d4d4d4
     so it reads against a white page. Dark-theme keeps the pale shade. */
  --xt-master-grey: #6b7280;
  --xt-master-grey-hover: #4b5563;
  --xt-master-grey-dim: rgba(107, 114, 128, 0.15);

  /* Force native form controls (checkbox, radio, scrollbar) to their LIGHT
     variant. Without this, when the user's OS is in dark mode but they've
     toggled the manual light theme, Chrome paints checkboxes solid black. */
  color-scheme: light;

  background: #f5f7fa !important;
  color: #0b0c10 !important;
}

/* Selected action button (xt-experience-btn / xt-goal-btn): in light theme
   the fill is the darker master-grey-2, so flip the inner text to white. */
body.light-theme .xt-experience-btn.selected,
body.light-theme .xt-goal-btn.selected {
  color: #ffffff;
}
/* Mobile call-btn keeps an SVG icon and a darker grey background in light
   theme — the inline path stroke must flip white for contrast. */
body.light-theme .auth-buttons .call-btn svg path { stroke: var(--xt-master-grey, #6b7280); }

/* ========= LAYOUT SHELLS ========= */
body.light-theme .wrap,
body.light-theme .main {
  background: var(--bg-main) !important;
}

body.light-theme .shell {
  background: var(--bg-main);
}

body.light-theme .gradient {
  background: transparent !important;
}

/* ========= HEADER ========= */
body.light-theme header {
  background: transparent !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme header .Xtrade-name,
body.light-theme header .logo-text {
  color: #0b0c10 !important;
}

body.light-theme .auth-buttons .guest-badge {
  background: rgba(0, 0, 0, 0.05) !important;
  color: rgba(11, 12, 16, 0.6) !important;
}

/* ========= HEADER PILLS — LIGHT THEME =========
   Every pill in the header keeps its 34px box (inherited from status.css)
   but uses palette tokens that read on a white background. Every variant
   has an explicit visible border so the cluster looks like one cohesive
   row of buttons, never floating fills with no edge. */

/* Outlined-grey variants — Get a Call, Register Free, Logout */
body.light-theme .auth-buttons .call-btn,
body.light-theme .auth-buttons .register-btn,
body.light-theme .auth-buttons .logout-btn {
  background: #ffffff !important;
  border-color: var(--xt-master-grey, #6b7280) !important;
  color: var(--xt-master-grey, #6b7280) !important;
}
body.light-theme .auth-buttons .call-btn:hover,
body.light-theme .auth-buttons .register-btn:hover,
body.light-theme .auth-buttons .logout-btn:hover {
  background: var(--xt-master-grey-dim, rgba(107, 114, 128, 0.15)) !important;
  border-color: var(--xt-master-grey-hover, #4b5563) !important;
  color: var(--xt-master-grey-hover, #4b5563) !important;
}

/* Sign In — solid blue, slightly darker blue border for visible edge */
body.light-theme .auth-buttons .login-btn {
  background: var(--xt-accent, #2196ee) !important;
  border-color: #1976d2 !important;
  color: #ffffff !important;
}
body.light-theme .auth-buttons .login-btn:hover {
  background: #1976d2 !important;
  border-color: var(--xt-accent, #2196ee) !important;
}

/* Admin — solid blue with darker border */
body.light-theme .admin-btn {
  background: var(--xt-accent, #2196ee) !important;
  border: 1px solid #1976d2 !important;
  color: #ffffff !important;
}
body.light-theme .admin-btn:hover {
  background: #1976d2 !important;
  border-color: var(--xt-accent, #2196ee) !important;
}

/* Firstname (user-badge) — green outlined pill that reads on white */
body.light-theme .auth-buttons .user-badge,
body.light-theme .user-badge {
  background: rgba(76, 175, 80, 0.12) !important;
  border-color: rgba(76, 175, 80, 0.55) !important;
  color: #16a34a !important;
}

/* Theme toggle button */
body.light-theme .theme-toggle-btn {
  border-color: rgba(0, 0, 0, 0.2);
  color: #0b0c10;
}
body.light-theme .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.3);
}

/* ========= SIDEBAR ========= */
body.light-theme .sidebar {
  background: #ffffff !important;
  background-image: linear-gradient(180deg, rgba(33, 150, 238, 0.04) 0%, transparent 40%) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .sidebar-collapse-btn {
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.4);
}
body.light-theme .sidebar-collapse-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0b0c10;
}
body.light-theme.sidebar-collapsed .sidebar-collapse-btn {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}

/* Trending Screener - Light Theme */
body.light-theme .trending-container { border-color: rgba(0,0,0,0.1) !important; background: #ffffff !important; }
body.light-theme .trending-header { color: rgba(0,0,0,0.4) !important; border-bottom-color: rgba(0,0,0,0.06) !important; }
body.light-theme .trending-header svg { opacity: 0.35; }
body.light-theme .trending-updated { color: rgba(0,0,0,0.25) !important; }
body.light-theme .trending-section + .trending-section { border-top-color: rgba(0,0,0,0.06) !important; }
body.light-theme .trending-long-label { color: rgba(22,163,74,0.6) !important; }
body.light-theme .trending-short-label { color: rgba(220,38,38,0.6) !important; }
body.light-theme .trending-ticker { background: rgba(0,0,0,0.025) !important; border-color: rgba(0,0,0,0.08) !important; }
body.light-theme .trending-ticker:hover { background: rgba(0,0,0,0.05) !important; }
body.light-theme .trending-rank { color: rgba(0,0,0,0.2) !important; }
body.light-theme .trending-symbol { color: #0b0c10 !important; }
body.light-theme .trending-symbol:hover { color: #2196ee !important; }
body.light-theme .trending-atr { color: rgba(0,0,0,0.3) !important; }
body.light-theme .trending-score,
body.light-theme .trending-score.long,
body.light-theme .trending-score.short { color: #0b0c10 !important; }
body.light-theme .trending-bar { background: rgba(0,0,0,0.06) !important; }
body.light-theme .trending-bar-fill.long { background: #16a34a !important; }
body.light-theme .trending-bar-fill.short { background: #dc2626 !important; }
body.light-theme .trending-loading,
body.light-theme .trending-empty { color: rgba(0,0,0,0.25) !important; }
body.light-theme .trending-launch-arrow { color: rgba(11,12,16,0.55) !important; }
body.light-theme .trending-launch-arrow:hover { color: #2196ee !important; background: rgba(33,150,238,0.12) !important; }

body.light-theme .sidebar-indicator {
  background: linear-gradient(90deg, #2196ee, rgba(33, 150, 238, 0.2));
}

/* Sidebar trading panel — light mode */
body.light-theme .sidebar-divider {
  background: rgba(0, 0, 0, 0.06);
}
body.light-theme .sidebar-trading-header {
  color: rgba(11, 12, 16, 0.4);
}
body.light-theme .sidebar-trade-row input {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.12);
  color: #1a1a1a;
}
body.light-theme .sidebar-trade-row input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}
body.light-theme .sidebar-trade-row input:focus {
  background: #fff;
  border-color: var(--xt-accent);
}
body.light-theme .sidebar-chart-container {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .sidebar-trade-field label {
  color: rgba(11, 12, 16, 0.82);
  font-weight: 700;
}
body.light-theme .sidebar-trade-field input,
body.light-theme .sidebar-trade-field select {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.14);
  color: #1a1a1a;
}
body.light-theme .sidebar-trade-field input:focus,
body.light-theme .sidebar-trade-field select:focus {
  background: #fff;
  border-color: var(--xt-accent);
}
body.light-theme .sidebar-trade-price {
  color: #1a7fc4;
}
body.light-theme .sidebar-trade-long {
  background: var(--xt-success, #22c55e);
}
body.light-theme .sidebar-trade-short {
  background: var(--xt-danger, #ef4444);
}
/* Sidebar activity log — light mode */
body.light-theme .sidebar-activity-header {
  color: rgba(11, 12, 16, 0.4);
}
body.light-theme .sidebar-log-line {
  color: rgba(11, 12, 16, 0.55);
}
body.light-theme .sidebar-log-line strong {
  color: #168540;
}
body.light-theme .sidebar-log-line.log-sell strong {
  color: #c0312a;
}
body.light-theme .sidebar-log-ts {
  color: rgba(11, 12, 16, 0.3);
}
body.light-theme .sidebar-log-empty {
  color: rgba(11, 12, 16, 0.3);
}
body.light-theme .sidebar-activity-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-panel-title {
  color: #2196ee;
  font-weight: 700;
}
body.light-theme .rp-section-title {
  color: rgba(11, 12, 16, 0.82);
  font-weight: 700;
}
/* Graph Panel — light mode */
body.light-theme .xt-graph-panel {
  background: #fff;
  border-left-color: rgba(0,0,0,0.08);
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
}
body.light-theme .xt-graph-panel-header {
  border-bottom-color: rgba(0,0,0,0.08);
}
body.light-theme .xt-graph-panel-title {
  color: rgba(11,12,16,0.4);
}
body.light-theme .xt-graph-panel-close {
  color: rgba(11,12,16,0.4);
}
body.light-theme .xt-graph-panel-close:hover {
  color: #0b0c10;
}
body.light-theme .xt-graph-panel-price {
  color: #1a7fc4;
}

/* Position cards + panel toggle — light mode */
body.light-theme .rp-pos-card {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}
body.light-theme .rp-pos-card:hover {
  border-color: rgba(0,0,0,0.18);
}
body.light-theme .rp-pos-symbol {
  color: #1a7fc4;
}
body.light-theme .rp-pos-row2 {
  border-top-color: rgba(0,0,0,0.04);
}
body.light-theme .rp-pos-meta {
  color: rgba(11,12,16,0.45);
}
body.light-theme .rp-pos-detail {
  color: rgba(11,12,16,0.4);
}
body.light-theme .right-panel-collapse-btn {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  color: rgba(11,12,16,0.4);
}
body.light-theme .right-panel-collapse-btn:hover {
  color: #0b0c10;
}

body.light-theme .ai-check-popover {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
body.light-theme .ai-check-popover .ai-check-direction {
  color: #0b0c10;
}
body.light-theme .ai-check-popover .ai-check-text {
  color: rgba(11, 12, 16, 0.7);
}
body.light-theme .ai-check-popover .ai-check-score.neutral {
  background: rgba(0, 0, 0, 0.1);
  color: #0b0c10;
}

/* ========= CHAT AREA ========= */
body.light-theme .chat {
  background: var(--bg-main) !important;
}

body.light-theme .messages {
  background: transparent !important;
}

body.light-theme .bubble.bot {
  background: transparent !important;
  color: #0b0c10 !important;
  border: none;
}
/* Dark-theme bubble.bot bakes #fff into <strong>, <em>, <h1-h4> — invisible
   on a white page. Override each so they render dark in light theme. */
body.light-theme .bubble.bot strong { color: #0b0c10 !important; }
body.light-theme .bubble.bot em     { color: rgba(11, 12, 16, 0.85) !important; }
body.light-theme .bubble.bot h1,
body.light-theme .bubble.bot h2,
body.light-theme .bubble.bot h3,
body.light-theme .bubble.bot h4 {
  color: #0b0c10 !important;
}
body.light-theme .bubble.bot h3 { color: rgba(11, 12, 16, 0.95) !important; }
body.light-theme .bubble.bot h4 { color: rgba(11, 12, 16, 0.75) !important; }

/* User message bubble — was solid accent blue. Per design, light theme uses
   the darker master-grey-2 fill instead. */
body.light-theme .bubble.user {
  background: var(--xt-master-grey, #6b7280) !important;
  color: #fff !important;
  border-color: var(--xt-master-grey, #6b7280) !important;
}

body.light-theme .bubble.bot a {
  color: #2196ee;
}

body.light-theme .bubble.bot code {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #c7254e;
}

body.light-theme .bubble.bot pre {
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
body.light-theme .bubble.bot pre code {
  color: #0b0c10;
}

body.light-theme .bubble.bot table {
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .bubble.bot th {
  background: rgba(0, 0, 0, 0.04);
  color: #0b0c10;
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .bubble.bot td {
  border-color: rgba(0, 0, 0, 0.08);
  color: #0b0c10;
}

/* The new favicon SVG is a clean round B on transparent; no grey disc
   needed behind it in light mode. The path[stroke="#fff"] override is
   also dead — the current SVG has no white-stroke paths. */

body.light-theme .row.bot .thinking-dots span {
  background: rgba(0, 0, 0, 0.3);
}

/* Financial bubble shimmer */
body.light-theme .row.bot .bubble.financial-bubble {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* ========= COMPOSER / INPUT ========= */
body.light-theme .composer {
  background: var(--bg-main) !important;
}

body.light-theme .inputbar {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
body.light-theme .inputbar:focus-within {
  background: #ffffff !important;
  border-color: #2196ee !important;
}

body.light-theme #input {
  background: transparent !important;
  border: none !important;
  color: #0b0c10 !important;
}
body.light-theme #input::placeholder {
  color: rgba(0, 0, 0, 0.5) !important;
}
body.light-theme #input:focus {
  border-color: #2196ee !important;
}

body.light-theme .sendbtn {
  background: #2196ee !important;
  color: #fff !important;
}

/* Badge (BETA) and hint text */
body.light-theme .badge {
  color: rgba(0, 0, 0, 0.6) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}
body.light-theme .meta {
  color: rgba(0, 0, 0, 0.45) !important;
}
body.light-theme .meta #hint {
  color: rgba(0, 0, 0, 0.45) !important;
}

/* ========= CHART COMPONENTS ========= */
body.light-theme .chart-symbol {
  color: #0b0c10 !important;
}
body.light-theme .chart-current-price {
  color: #0b0c10 !important;
}
body.light-theme .chart-percent-change {
  color: rgba(11, 12, 16, 0.7) !important;
}
body.light-theme .chart-type-btn {
  color: rgba(0, 0, 0, 0.5) !important;
}
body.light-theme .chart-type-btn:hover {
  color: rgba(0, 0, 0, 0.7) !important;
}
body.light-theme .chart-type-btn.active {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #0b0c10 !important;
}
body.light-theme .chart-type-controls {
  background: rgba(0, 0, 0, 0.04) !important;
}
body.light-theme .chart-timeframe-btn {
  color: rgba(0, 0, 0, 0.5) !important;
}
body.light-theme .chart-timeframe-btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: rgba(0, 0, 0, 0.7) !important;
}
body.light-theme .chart-timeframe-btn.active {
  background: rgba(0, 0, 0, 0.1) !important;
  color: #0b0c10 !important;
}
body.light-theme .price-chart-container,
body.light-theme .strategy-chart-container {
  background: var(--bg-main) !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

/* Status indicator */
body.light-theme #status {
  color: rgba(0, 0, 0, 0.4);
}

/* ========= RIGHT PANEL ========= */
body.light-theme .xt-right-panel {
  background: #ffffff !important;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .xt-right-panel-header {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .xt-right-panel-title,
body.light-theme h2.xt-right-panel-title {
  color: #0b0c10 !important;
}
body.light-theme .xt-panel-title {
  color: #2196ee !important;
}

body.light-theme .xt-right-panel-subtitle,
body.light-theme .xt-panel-subtitle {
  color: rgba(11, 12, 16, 0.6) !important;
}

body.light-theme .xt-right-panel-close {
  color: rgba(0, 0, 0, 0.4);
}
body.light-theme .xt-right-panel-close:hover {
  color: #0b0c10;
}

/* Right panel scrollbar */
body.light-theme .xt-right-panel-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
body.light-theme .xt-right-panel-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

/* ========= STEPPER ========= */
body.light-theme .xt-stepper-step span {
  color: rgba(11, 12, 16, 0.5) !important;
}
body.light-theme .xt-stepper-step.active span {
  color: #2196ee !important;
}
body.light-theme .xt-stepper-step.completed span {
  color: #22c55e !important;
}
body.light-theme .xt-stepper-step .xt-step-number {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.4);
}
body.light-theme .xt-stepper-step.active .xt-step-number {
  background: rgba(33, 150, 238, 0.15);
  color: #2196ee;
}
body.light-theme .xt-stepper-step.completed .xt-step-number {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
body.light-theme .xt-stepper-connector {
  background: rgba(0, 0, 0, 0.1);
}

/* ========= SECTOR CARDS ========= */
body.light-theme .xt-sector-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #0b0c10 !important;
}
body.light-theme .xt-sector-card:hover {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.02) !important;
}
body.light-theme .xt-sector-card.selected {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.05) !important;
}
body.light-theme .xt-sector-name {
  color: #0b0c10 !important;
}
body.light-theme .xt-sector-tickers {
  color: rgba(11, 12, 16, 0.5) !important;
}
body.light-theme .xt-sector-desc {
  color: rgba(11, 12, 16, 0.5) !important;
}

/* Stock items */
body.light-theme .xt-stock-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  color: #0b0c10;
}
body.light-theme .xt-stock-item:hover {
  background: rgba(33, 150, 238, 0.04);
}
body.light-theme .xt-stock-item.selected {
  background: rgba(33, 150, 238, 0.08);
  border-color: #2196ee;
}
body.light-theme .xt-stock-symbol {
  color: #0b0c10;
}
body.light-theme .xt-stock-sector {
  color: rgba(11, 12, 16, 0.5);
}

/* Custom ticker input */
body.light-theme .xt-custom-ticker input {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0b0c10 !important;
}
body.light-theme .xt-custom-ticker input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

/* ========= PORTFOLIO PANEL ========= */
body.light-theme .xt-portfolio-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-portfolio-item:hover {
  background: rgba(0, 0, 0, 0.04);
}
body.light-theme .xt-portfolio-symbol {
  color: #0b0c10;
}
body.light-theme .xt-portfolio-alloc input {
  background: rgba(0, 0, 0, 0.04);
  color: #0b0c10;
  border-color: rgba(0, 0, 0, 0.12);
}
body.light-theme .xt-portfolio-strategy {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-portfolio-remove {
  color: rgba(0, 0, 0, 0.3);
}
body.light-theme .xt-portfolio-remove:hover {
  color: #ef4444;
}
body.light-theme .xt-portfolio-add input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}
body.light-theme .xt-portfolio-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
  color: rgba(11, 12, 16, 0.6);
}

/* Allocation bar */
body.light-theme .xt-allocation-bar {
  background: rgba(0, 0, 0, 0.06);
}

/* ========= STRATEGY PANEL ========= */

/* Tab bar */
body.light-theme .xt-strategy-tab-bar {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .xt-strategy-tab-btn {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-strategy-tab-btn.active {
  color: #2196ee;
  border-bottom-color: #2196ee;
}
body.light-theme .xt-strategy-tab-btn:hover {
  color: #0b0c10;
}

/* Ticker tabs */
body.light-theme .xt-strategy-tabs {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-strategy-tab {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(11, 12, 16, 0.6);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-strategy-tab.active {
  background: rgba(33, 150, 238, 0.1);
  color: #2196ee;
  border-color: #2196ee;
}
body.light-theme .xt-strategy-tab.assigned {
  border-color: #22c55e;
}
body.light-theme .xt-strategy-counter {
  color: rgba(11, 12, 16, 0.4);
}

/* Timeframe buttons */
body.light-theme .xt-timeframe-btn {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-timeframe-btn:hover {
  border-color: #2196ee;
  color: #2196ee;
}
body.light-theme .xt-timeframe-btn.active {
  background: #2196ee;
  border-color: #2196ee;
  color: #fff;
}

/* Current ticker info */
body.light-theme .xt-strategy-current {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-strategy-current-symbol {
  color: #0b0c10;
}
body.light-theme .xt-strategy-current-alloc {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-strategy-current-hint {
  color: rgba(11, 12, 16, 0.4);
}

/* Quick pick cards */
body.light-theme .xt-quick-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .xt-quick-card:hover {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.03);
}
body.light-theme .xt-quick-card.selected {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.06);
}
body.light-theme .xt-quick-card-name {
  color: #0b0c10;
}
body.light-theme .xt-quick-card-desc {
  color: rgba(11, 12, 16, 0.5);
}

/* Preset strategy items */
body.light-theme .xt-preset-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-preset-item:hover {
  background: rgba(33, 150, 238, 0.04);
  border-color: rgba(33, 150, 238, 0.3);
}
body.light-theme .xt-preset-item.selected {
  background: rgba(33, 150, 238, 0.08);
  border-color: #2196ee;
}
body.light-theme .xt-preset-name {
  color: #0b0c10;
}
body.light-theme .xt-preset-check {
  color: #2196ee;
}

/* Preset list scrollbar */
body.light-theme .xt-preset-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
body.light-theme .xt-preset-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

/* Quick actions (Improve / Reset / Undo) */
body.light-theme .xt-btn-improve {
  border-color: rgba(139, 92, 246, 0.3);
  color: #7c3aed;
}
body.light-theme .xt-btn-improve:hover {
  background: rgba(139, 92, 246, 0.08);
}
body.light-theme .xt-btn-reset,
body.light-theme .xt-btn-undo {
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-btn-reset:hover,
body.light-theme .xt-btn-undo:hover {
  border-color: rgba(33, 150, 238, 0.4);
  color: #2196ee;
}

/* Backtest results */
body.light-theme .xt-backtest-results {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-backtest-label {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-backtest-value {
  color: #0b0c10;
}

/* Advanced section */
body.light-theme .xt-advanced-section {
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-advanced-header {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-advanced-header:hover {
  color: #0b0c10;
}
body.light-theme .xt-advanced-title {
  color: rgba(11, 12, 16, 0.6);
}

/* Code editor */
body.light-theme .xt-code-editor {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .strategy-name-input {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0b0c10 !important;
}
body.light-theme .xt-code-tab {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-code-tab.active {
  background: #2196ee;
  border-color: #2196ee;
  color: #fff;
}
body.light-theme .xt-code-area {
  background: #ffffff !important;
  color: #0b0c10 !important;
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-code-chat input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}
body.light-theme .xt-code-chat input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}
body.light-theme .xt-code-actions button {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-code-actions button:hover {
  border-color: rgba(33, 150, 238, 0.4);
  color: #2196ee;
}
body.light-theme .xt-llm-response {
  color: rgba(11, 12, 16, 0.6) !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

/* ========= SIMULATION RESULTS ========= */
body.light-theme .xt-sim-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-sim-label {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-sim-value {
  color: #0b0c10;
}

/* ========= TRADING SETUP ========= */
body.light-theme .xt-trading-mode {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-trading-mode-btn {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-trading-mode-btn.active {
  background: #ffffff;
  color: #0b0c10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
body.light-theme .xt-trading-budget input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}
body.light-theme .xt-trading-preset-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-trading-preset-btn:hover {
  border-color: #2196ee;
  color: #2196ee;
}
body.light-theme .xt-trading-preset-btn.active {
  background: rgba(33, 150, 238, 0.1);
  border-color: #2196ee;
  color: #2196ee;
}
body.light-theme .xt-trading-summary {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-trading-summary-label {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-trading-summary-value {
  color: #0b0c10;
}

/* ========= ACTIVE TRADING BAR ========= */
body.light-theme .xt-active-trading-bar {
  background: #ffffff !important;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

body.light-theme .xt-atb-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .xt-atb-label {
  color: #0b0c10;
}

body.light-theme .xt-atb-mode {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(11, 12, 16, 0.6);
}

body.light-theme .xt-atb-pnl-value.positive {
  color: #16a34a;
}
body.light-theme .xt-atb-pnl-value.negative {
  color: #dc2626;
}

body.light-theme .xt-atb-stat-label {
  color: rgba(11, 12, 16, 0.4);
}
body.light-theme .xt-atb-stat-value {
  color: #0b0c10;
}

body.light-theme .xt-atb-expand {
  color: rgba(0, 0, 0, 0.4);
}
body.light-theme .xt-atb-expand:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0b0c10;
}

/* Action buttons row */
body.light-theme .xt-atb-actions {
  border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .xt-atb-action-btn {
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .xt-atb-action-btn:hover {
  border-color: #2196ee;
  color: #2196ee;
}
body.light-theme .xt-atb-action-btn.primary {
  background: #2196ee;
  border-color: #2196ee;
  color: #fff;
}

/* Positions table */
body.light-theme .xt-atb-positions {
  border-top-color: rgba(0, 0, 0, 0.06);
}
body.light-theme .xt-atb-positions-table {
  color: #0b0c10;
}
body.light-theme .xt-atb-positions-table th {
  color: rgba(11, 12, 16, 0.5);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .xt-atb-positions-table td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
  color: #0b0c10;
}
body.light-theme .xt-atb-positions-table td.positive {
  color: #16a34a !important;
}
body.light-theme .xt-atb-positions-table td.negative {
  color: #dc2626 !important;
}
body.light-theme .xt-inline-tpsl {
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
  background: rgba(0, 0, 0, 0.03);
}
body.light-theme .xt-inline-tpsl:focus {
  border-color: #2196ee;
}
body.light-theme .xt-atb-close-position {
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-atb-close-position:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* Close all / Stop buttons */
body.light-theme .xt-atb-close-all {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}
body.light-theme .xt-atb-stop {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

/* View toggle buttons (grid/list/full) */
body.light-theme .xt-atb-view-btn {
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(11, 12, 16, 0.4);
}
body.light-theme .xt-atb-view-btn.active {
  background: rgba(33, 150, 238, 0.1);
  border-color: #2196ee;
  color: #2196ee;
}

/* ========= MANUAL TRADING SECTION ========= */
body.light-theme .xt-manual-trade-section {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
body.light-theme .xt-manual-trade-search input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}
body.light-theme .xt-manual-trade-search input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}
body.light-theme .xt-manual-trade-field label {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .xt-manual-trade-field input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
}

/* ========= ACTIVE TRADES MANAGER (sidebar panel) ========= */
body.light-theme .at-balance-row {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .at-balance-value {
  color: #0b0c10;
}
body.light-theme .at-position {
  border-color: rgba(0, 0, 0, 0.06);
  color: #0b0c10;
}
body.light-theme .at-position.cash {
  color: rgba(11, 12, 16, 0.5);
}
body.light-theme .at-ticker {
  color: #0b0c10;
}
body.light-theme .at-invested {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .at-pnl-small.positive {
  color: #16a34a;
}
body.light-theme .at-pnl-small.negative {
  color: #dc2626;
}
body.light-theme .at-sell-btn {
  color: rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .at-sell-btn:hover {
  color: #ef4444;
  border-color: #ef4444;
}
body.light-theme .at-sell-portfolio-btn {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

/* ========= MODALS ========= */
body.light-theme .modal-backdrop {
  background: rgba(0, 0, 0, 0.3);
}
body.light-theme .modal-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 251, 0.98)) !important;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  color: #0b0c10;
}
body.light-theme .modal-content h2,
body.light-theme .modal-content h3 {
  color: #0b0c10 !important;
}
body.light-theme .modal-content p {
  color: rgba(11, 12, 16, 0.7);
}
body.light-theme .modal-content label {
  color: rgba(11, 12, 16, 0.7);
}
body.light-theme .modal-content input[type="text"],
body.light-theme .modal-content input[type="email"],
body.light-theme .modal-content input[type="password"],
body.light-theme .modal-content input[type="number"],
body.light-theme .modal-content input[type="tel"],
body.light-theme .modal-content select {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  color: #0b0c10 !important;
  border-radius: 8px;
}
body.light-theme .modal-content input:focus,
body.light-theme .modal-content select:focus {
  border-color: #2196ee !important;
  box-shadow: 0 0 0 2px rgba(33, 150, 238, 0.15);
}
body.light-theme .modal-content input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}
body.light-theme .modal-content input[type="checkbox"] {
  accent-color: #2196ee;
  background: #ffffff;
}
body.light-theme .modal-content .form-disclaimer label {
  color: rgba(11, 12, 16, 0.6);
}
body.light-theme .modal-content .form-disclaimer a {
  color: #2196ee;
}
body.light-theme .modal-content .modal-footer {
  border-top-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .modal-content .modal-footer a {
  color: #2196ee;
}
body.light-theme .modal-close {
  color: rgba(0, 0, 0, 0.4);
}
body.light-theme .modal-close:hover {
  color: #0b0c10;
  background: rgba(0, 0, 0, 0.05);
}

/* Copy code button */
body.light-theme .xt-copy-code-btn {
  color: rgba(11, 12, 16, 0.4);
}
body.light-theme .xt-copy-code-btn:hover {
  color: #2196ee;
}

/* Trading setup modal */
body.light-theme .trading-setup-modal {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1);
}

/* ========= SIGNALS MODAL ========= */
body.light-theme .signals-modal-content {
  background: #ffffff !important;
  color: #0b0c10;
}

/* ========= SCROLL TO BOTTOM BUTTON ========= */
body.light-theme .scroll-btn {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0b0c10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========= QUALIFICATION FLOW BUTTONS ========= */
body.light-theme .qual-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0b0c10;
}
body.light-theme .qual-btn:hover {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.05);
}
body.light-theme .qual-btn.selected {
  border-color: #2196ee;
  background: rgba(33, 150, 238, 0.1);
  color: #2196ee;
}

/* ========= GENERAL SCROLLBAR ========= */
body.light-theme ::-webkit-scrollbar {
  width: 6px;
}
body.light-theme ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
body.light-theme ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}
body.light-theme ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* ========= GLOW ADJUSTMENTS FOR LIGHT MODE ========= */
/* Dimmer glow effects on light background */
body.light-theme .xt-btn-primary,
body.light-theme .xt-trading-start,
body.light-theme .xt-atb-action-btn.primary,
body.light-theme .xt-custom-ticker button {
  box-shadow: 0 0 10px rgba(33, 150, 238, 0.2);
}
body.light-theme .xt-btn-primary:hover,
body.light-theme .xt-trading-start:hover,
body.light-theme .xt-atb-action-btn.primary:hover,
body.light-theme .xt-custom-ticker button:hover {
  box-shadow: 0 0 16px rgba(33, 150, 238, 0.35);
}
body.light-theme .sendbtn {
  box-shadow: 0 0 10px rgba(33, 150, 238, 0.2), 0 2px 8px rgba(33, 150, 238, 0.15) !important;
}
body.light-theme .xt-atb-close-all,
body.light-theme .at-sell-portfolio-btn,
body.light-theme .xt-atb-stop {
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}
body.light-theme .xt-manual-trade-buy {
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}
body.light-theme .xt-manual-trade-sell {
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* ========= UTILITY CLASSES FOR INLINE STYLE OVERRIDES ========= */
body.light-theme .xt-text-dim {
  color: rgba(0, 0, 0, 0.5) !important;
}
body.light-theme .xt-text-muted-inline {
  color: rgba(0, 0, 0, 0.4) !important;
}
body.light-theme .xt-text-light {
  color: rgba(0, 0, 0, 0.7) !important;
}
body.light-theme .xt-bg-dim {
  background: rgba(0, 0, 0, 0.04) !important;
}

/* ========= PREMIUM BLUR SECTION ========= */
body.light-theme .premium-blur {
  background: rgba(255, 255, 255, 0.9);
}

/* ========= TOOLTIP / POPOVER ========= */
body.light-theme [data-tooltip]::after {
  background: #0b0c10;
  color: #ffffff;
}

/* ========= LEVERAGE BADGE ========= */
body.light-theme .leverage-badge {
  background: rgba(33, 150, 238, 0.1);
  color: #2196ee;
}

/* ========= ACTIVITY LOG ========= */
body.light-theme .xt-activity-log-panel {
  background: #ffffff !important;
  border-left-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .xt-activity-log-header {
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .xt-activity-log-close {
  color: rgba(0, 0, 0, 0.4) !important;
}
body.light-theme .xt-activity-log-close:hover {
  color: #0b0c10 !important;
  background: rgba(0, 0, 0, 0.05) !important;
}
body.light-theme .xt-activity-log-line {
  color: rgba(11, 12, 16, 0.7) !important;
}
body.light-theme .xt-log-time {
  color: rgba(11, 12, 16, 0.4) !important;
}
body.light-theme .position-title {
  color: #1a1a2e !important;
}

/* ========= STRATEGY TRENDING ("Strategy Ready") — light theme ========= */
body.light-theme .strat-trending-container {
  border-color: rgba(0, 0, 0, 0.1);
  background: #ffffff;
}
body.light-theme .strat-trending-header {
  color: rgba(11, 12, 16, 0.6);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .strat-trending-updated {
  color: rgba(11, 12, 16, 0.4);
}
body.light-theme .strat-trending-card {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .strat-trending-card:hover {
  background: rgba(0, 0, 0, 0.05);
}
body.light-theme .strat-trending-symbol {
  color: #0b0c10;
}
body.light-theme .strat-trending-tf {
  color: rgba(11, 12, 16, 0.6);
  background: rgba(0, 0, 0, 0.06);
}
body.light-theme .strat-trending-row2 {
  color: rgba(11, 12, 16, 0.55);
}
body.light-theme .strat-trending-stat strong {
  color: rgba(11, 12, 16, 0.85);
}
body.light-theme .strat-trending-launch-arrow {
  color: rgba(11, 12, 16, 0.55);
}
body.light-theme .strat-trending-launch-arrow:hover {
  color: #2196ee;
  background: rgba(33, 150, 238, 0.12);
}

/* ===== AGENDA / PROACTIVE BUBBLES — light-theme overrides =====
   Same green accent but tuned for a white background. Heading + strong
   + em colors forced back to dark so they don't inherit dark-theme white. */
body.light-theme .row.bot.agenda-bubble .bubble.bot,
body.light-theme .bubble.bot.agenda-bubble {
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.4);
  border-left-color: #16a34a;
  color: #0b0c10;
}
body.light-theme .bubble.bot.agenda-bubble strong,
body.light-theme .bubble.bot.agenda-bubble em,
body.light-theme .bubble.bot.agenda-bubble h1,
body.light-theme .bubble.bot.agenda-bubble h2,
body.light-theme .bubble.bot.agenda-bubble h3,
body.light-theme .bubble.bot.agenda-bubble h4 {
  color: #0b0c10;
}
body.light-theme .bubble.bot.agenda-bubble a {
  color: #15803d;
}
