/**
 * Temto V5 — Light Theme (Dashboard only)
 * Applied when html[data-theme="light"] on dashboard pages.
 *
 * Design tokens:
 *   BG-1 (page):    #EBEEF3    — subtle warm gray
 *   BG-2 (card):    #FFFFFF    — white cards
 *   BG-3 (raised):  #F5F7FA   — inputs, table headers, inset areas
 *   BG-4 (sidebar): #F7F8FA   — sidebar with subtle separation
 *   Border:         #D4D9E1   — soft gray border
 *   Border-light:   #E5E8EE   — inner dividers
 *   Text-primary:   #1A1D26   — headings, values
 *   Text-secondary: #5A6478   — labels, muted text
 *   Text-tertiary:  #8B95A5   — placeholders, disabled
 *   Accent:         #2B7FD4   — links, active states
 *   Shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)
 *   Shadow-md:      0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05)
 */

/* ==========================================================
   SAMSUNG / MOBILE BROWSER — color-scheme + dark-mode prevention
   ========================================================== */
html[data-theme="light"] {
  color-scheme: light !important;
}
html[data-theme="light"] body,
html[data-theme="light"] body.dashboard-page {
  color-scheme: light !important;
}
/* Prevent Samsung Internet built-in dark mode from inverting */
@media (prefers-color-scheme: dark) {
  html[data-theme="light"] body,
  html[data-theme="light"] body.dashboard-page {
    color-scheme: light !important;
  }
}
/* Native form controls — force light rendering on Samsung/Android */
html[data-theme="light"] select,
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] button {
  color-scheme: light !important;
}
/* Samsung scrollbar — light */
html[data-theme="light"] * {
  scrollbar-color: #C1C7D0 #EBEEF3;
}

/* === SIDEBAR THEME ROW — icon/label swap only (layout.css = row styling) === */
.theme-icon-sun { display: block; flex-shrink: 0; }
.theme-icon-moon { display: none; }
.theme-label-dark { display: inline; }
.theme-label-light { display: none; }

html[data-theme="light"] .theme-icon-sun { display: none; }
html[data-theme="light"] .theme-icon-moon { display: block; flex-shrink: 0; }
html[data-theme="light"] .theme-label-dark { display: none; }
html[data-theme="light"] .theme-label-light { display: inline; }

html[data-theme="light"] .dashboard-sidebar-footer .sidebar-theme-toggle {
  color: #5A6478;
}
html[data-theme="light"] .dashboard-sidebar-footer .sidebar-theme-toggle:hover {
  color: #1A1D26;
}

/* ==========================================================
   CSS VARIABLE OVERRIDES — single source of truth
   ========================================================== */
html[data-theme="light"] body.dashboard-page {
  --dash-card-bg: #FFFFFF;
  --dash-card-border: #D4D9E1;
  --dash-bg: #EBEEF3;
  --dash-sidebar-bg: #F7F8FA;
  --dash-sidebar-item: #5A6478;
  --dash-sidebar-link-bg: rgba(43, 127, 212, 0.08);
  --dash-sidebar-link-bg-hover: rgba(0, 0, 0, 0.04);
  --dash-sidebar-logo-chrome: 84px;
  --dash-sidebar-footer-chrome: 212px;
  --dash-text: #1A1D26;
  --bg: #EBEEF3;
  --bg-deep: #EBEEF3;
  --text: #1A1D26;
  --muted: #5A6478;
  --border: #D4D9E1;
  --card-bg: #FFFFFF;
  --navbar-bg: #FFFFFF;
  --mk-card-bg: #FFFFFF;
  --mk-card-bg-selected: #EDF2F7;
  --mk-disabled-bg: rgba(0, 0, 0, 0.03);
  --bt-input-bg: #F5F7FA;
}

/* ==========================================================
   CORE: BODY + LAYOUT
   ========================================================== */
html[data-theme="light"] body.dashboard-page,
html[data-theme="light"] body.dashboard-page .dashboard-main {
  background: #EBEEF3 !important;
  color: #1A1D26;
}
html[data-theme="light"] .dashboard-layout {
  background: #EBEEF3;
}
html[data-theme="light"] .page-bg {
  opacity: 0 !important;
}

/* ==========================================================
   SIDEBAR — subtle gray, not pure white
   ========================================================== */
html[data-theme="light"] .dashboard-sidebar {
  background: #F7F8FA;
  border-right: 1px solid #D4D9E1;
}

/* --- Temto Logo: dark text + colorful star in light mode --- */
.logo-light { display: none !important; }
html[data-theme="light"] .logo-dark { display: none !important; }
html[data-theme="light"] .logo-light { display: inline !important; }
html[data-theme="light"] .dashboard-logo-img {
  filter: none;
}
html[data-theme="light"] .dashboard-logo-fallback {
  color: #1A1D26;
}

/* --- Nav links --- */
html[data-theme="light"] .dashboard-sidebar .dashboard-nav a {
  color: var(--dash-sidebar-item, #5A6478);
}
html[data-theme="light"] .dashboard-sidebar .dashboard-nav a:hover {
  color: #1A1D26;
  background: var(--dash-sidebar-link-bg-hover, rgba(0, 0, 0, 0.04));
}
html[data-theme="light"] .dashboard-sidebar .dashboard-nav a.active {
  color: #2B7FD4;
  background: var(--dash-sidebar-link-bg, rgba(43, 127, 212, 0.08));
}

/* --- Nav icons --- */
html[data-theme="light"] .dashboard-sidebar .dashboard-nav a .nav-icon {
  filter: brightness(0) saturate(100%) invert(35%) sepia(10%) saturate(500%) hue-rotate(190deg);
}
html[data-theme="light"] .dashboard-sidebar .dashboard-nav a.active .nav-icon,
html[data-theme="light"] .dashboard-sidebar .dashboard-nav a:hover .nav-icon {
  filter: brightness(0) saturate(100%) invert(40%) sepia(80%) saturate(600%) hue-rotate(195deg);
}

/* --- Sidebar Footer --- */
html[data-theme="light"] .dashboard-sidebar-footer {
  border-top-color: #D4D9E1;
}
html[data-theme="light"] .dashboard-sidebar-user {
  color: #1A1D26;
}
html[data-theme="light"] .dashboard-sidebar-footer a {
  color: #5A6478;
}
html[data-theme="light"] .dashboard-sidebar-footer a:hover {
  color: #1A1D26;
}
html[data-theme="light"] .dashboard-sidebar-footer .nav-icon {
  filter: brightness(0) saturate(100%) invert(35%) sepia(10%) saturate(500%) hue-rotate(190deg);
}

/* ==========================================================
   KPI CARDS (Strategy, Mode, Active Coins, Signals)
   ========================================================== */
html[data-theme="light"] .dashboard-kpi-card,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .kpi-strategy,
html[data-theme="light"] .kpi-mode,
html[data-theme="light"] .kpi-coins,
html[data-theme="light"] .kpi-signals {
  background: #FFFFFF !important;
  border: 1px solid #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .dashboard-kpi-card *,
html[data-theme="light"] .kpi-card * {
  color: #1A1D26;
}
html[data-theme="light"] .dashboard-kpi-card [class*="label"],
html[data-theme="light"] .kpi-card [class*="label"],
html[data-theme="light"] .dashboard-kpi-card small,
html[data-theme="light"] .kpi-card small {
  color: #5A6478 !important;
}

/* KPI cards: light-blue glow on hover, keep text visible */
html[data-theme="light"] .dashboard-kpi-card:hover,
html[data-theme="light"] .kpi-card:hover {
  background: #EBF2FF !important;
  border-color: #7FB3F5 !important;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35) !important;
  outline: 2px solid rgba(59, 130, 246, 0.3);
  outline-offset: -2px;
}
html[data-theme="light"] .dashboard-kpi-card:hover *,
html[data-theme="light"] .kpi-card:hover * {
  color: #1A1D26 !important;
}
html[data-theme="light"] .dashboard-kpi-card:hover [class*="label"],
html[data-theme="light"] .kpi-card:hover [class*="label"],
html[data-theme="light"] .dashboard-kpi-card:hover small,
html[data-theme="light"] .kpi-card:hover small {
  color: #3B6BAD !important;
}
html[data-theme="light"] .dashboard-kpi-card:hover::before {
  opacity: 0 !important;
}

/* ==========================================================
   GENERIC CARDS / PANELS
   ========================================================== */
html[data-theme="light"] .section-card,
html[data-theme="light"] .dash-card,
html[data-theme="light"] [class*="dash-card"],
html[data-theme="light"] .dashboard-content .card,
html[data-theme="light"] .card {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ==========================================================
   LIVE PRICE CARDS (Top Gainers / Top Decliners charts)
   ========================================================== */
html[data-theme="light"] .live-price-card {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .live-price-card * {
  color: #1A1D26;
}
html[data-theme="light"] .live-price-card [class*="muted"],
html[data-theme="light"] .live-price-card [class*="sub"],
html[data-theme="light"] .live-price-card [class*="label"] {
  color: #5A6478 !important;
}
html[data-theme="light"] .live-price-card-chart {
  background: #F5F7FA !important;
}
/* Live price cards: blue glow on hover */
html[data-theme="light"] .live-price-card:hover {
  background: #EBF2FF !important;
  border-color: #7FB3F5 !important;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35) !important;
  outline: 2px solid rgba(59, 130, 246, 0.3);
  outline-offset: -2px;
}
html[data-theme="light"] .live-price-card:hover * {
  color: #1A1D26;
}

/* === MOVERS SECTION (Top Gainers/Decliners/Volume) === */
html[data-theme="light"] .movers-section-card,
html[data-theme="light"] .movers-section,
html[data-theme="light"] .movers-card-gainers,
html[data-theme="light"] .movers-card-losers,
html[data-theme="light"] .movers-card-volume,
html[data-theme="light"] .mover-item {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  /* Avoid square corner artifact behind rounded border on mobile/light */
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background-clip: padding-box;
  overflow: hidden;
}
html[data-theme="light"] .movers-section-card *,
html[data-theme="light"] .movers-section *,
html[data-theme="light"] .mover-item * {
  color: #1A1D26;
}
/* Keep gain/loss colors */
html[data-theme="light"] [class*="gain"],
html[data-theme="light"] .text-gain { color: #16A34A !important; }
html[data-theme="light"] [class*="loss"],
html[data-theme="light"] .text-loss { color: #DC2626 !important; }
/* Preserve green/red section titles + Live badge in movers cards */
html[data-theme="light"] .movers-card-gainers .movers-section-title,
html[data-theme="light"] .movers-card-gainers .live-badge-pill { color: #16A34A !important; }
html[data-theme="light"] .movers-card-losers .movers-section-title { color: #DC2626 !important; }
html[data-theme="light"] .movers-card-losers .live-badge-pill { color: #16A34A !important; }

/* Movers sections: NO hover on outer box, only on individual items */
/* Mover items: blue on hover */
html[data-theme="light"] .mover-item:hover {
  background: #dce8fa !important;
}

/* === ALERTS PAGE — Light Mode === */
html[data-theme="light"] .alerts-slider-val {
  background: #F5F7FA !important;
  border-color: #D4D9E1 !important;
  color: #1A1D26 !important;
}
html[data-theme="light"] .alerts-slider-val span {
  color: #5A6478 !important;
}
html[data-theme="light"] .alerts-btn-secondary {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  color: #2563EB !important;
}
html[data-theme="light"] .alerts-btn-secondary:hover {
  border-color: #2563EB !important;
  background: rgba(37, 99, 235, 0.06) !important;
}

/* ==========================================================
   CONNECTIONS PANEL
   ========================================================== */
html[data-theme="light"] .connections-card,
html[data-theme="light"] .connection-card {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .connections-card *,
html[data-theme="light"] .connection-card * {
  color: #1A1D26;
}
html[data-theme="light"] .connection-card [class*="status"],
html[data-theme="light"] .connection-card [class*="muted"] {
  color: #5A6478 !important;
}
/* Connections card + individual connection cards: blue glow on hover */
html[data-theme="light"] .connections-card:hover {
  border-color: #7FB3F5 !important;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}
html[data-theme="light"] .connection-card:hover {
  background: #EBF2FF !important;
  border-color: #7FB3F5 !important;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35) !important;
}

/* ==========================================================
   LIVE SIGNALS PANEL (on Dashboard)
   ========================================================== */
html[data-theme="light"] .live-signals-card,
html[data-theme="light"] .live-signal-card {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .live-signals-card *,
html[data-theme="light"] .live-signal-card * {
  color: #1A1D26;
}
/* Preserve green Live pill in signals */
html[data-theme="light"] .live-signals-card .live-pill { color: #16A34A !important; }

/* Live signals card + individual signal cards: blue glow on hover */
html[data-theme="light"] .live-signals-card:hover {
  border-color: #7FB3F5 !important;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}
html[data-theme="light"] .live-signal-card:hover {
  background: #EBF2FF !important;
  border-color: #7FB3F5 !important;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35) !important;
}

/* ==========================================================
   FORMS / INPUTS — inset gray background
   ========================================================== */
html[data-theme="light"] body.dashboard-page input,
html[data-theme="light"] body.dashboard-page select,
html[data-theme="light"] body.dashboard-page textarea {
  background: #F5F7FA !important;
  color: #1A1D26 !important;
  border-color: #D4D9E1 !important;
}
html[data-theme="light"] body.dashboard-page input:focus,
html[data-theme="light"] body.dashboard-page select:focus,
html[data-theme="light"] body.dashboard-page textarea:focus {
  border-color: #2B7FD4 !important;
  box-shadow: 0 0 0 3px rgba(43, 127, 212, 0.12);
}
html[data-theme="light"] body.dashboard-page input::placeholder,
html[data-theme="light"] body.dashboard-page textarea::placeholder {
  color: #8B95A5;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
html[data-theme="light"] body.dashboard-page .btn-filter,
html[data-theme="light"] body.dashboard-page button[type="submit"] {
  background: #2B7FD4 !important;
  color: #FFFFFF !important;
  border-color: #2B7FD4 !important;
}
html[data-theme="light"] body.dashboard-page .btn-reset,
html[data-theme="light"] body.dashboard-page .btn-outline {
  background: #FFFFFF !important;
  color: #5A6478 !important;
  border-color: #D4D9E1 !important;
}

/* ==========================================================
   TABLES
   ========================================================== */
html[data-theme="light"] body.dashboard-page table {
  border-color: #E5E8EE;
}
html[data-theme="light"] body.dashboard-page th {
  background: #F0F2F5;
  color: #5A6478;
  border-color: #E5E8EE;
}
html[data-theme="light"] body.dashboard-page td {
  color: #1A1D26;
  border-color: #E5E8EE;
}
html[data-theme="light"] body.dashboard-page tr:hover td {
  background: rgba(43, 127, 212, 0.04);
}
html[data-theme="light"] body.dashboard-page tbody tr {
  border-bottom: 1px solid #E5E8EE;
}

/* ==========================================================
   TEXT + HEADINGS
   ========================================================== */
html[data-theme="light"] body.dashboard-page h1,
html[data-theme="light"] body.dashboard-page h2,
html[data-theme="light"] body.dashboard-page h3,
html[data-theme="light"] body.dashboard-page h4 {
  color: #1A1D26;
}
html[data-theme="light"] body.dashboard-page p,
html[data-theme="light"] body.dashboard-page span,
html[data-theme="light"] body.dashboard-page label,
html[data-theme="light"] body.dashboard-page div {
  color: inherit;
}
html[data-theme="light"] .welcome-bar,
html[data-theme="light"] [class*="welcome"] {
  color: #1A1D26;
}
html[data-theme="light"] .section-head,
html[data-theme="light"] [class*="section-head"] {
  color: #1A1D26;
}

/* ==========================================================
   SCROLLBAR
   ========================================================== */
html[data-theme="light"] body.dashboard-page ::-webkit-scrollbar-track {
  background: #EBEEF3;
}
html[data-theme="light"] body.dashboard-page ::-webkit-scrollbar-thumb {
  background: #C1C7D0;
  border-radius: 4px;
}

/* === GLOW EFFECTS: hide === */
html[data-theme="light"] body.dashboard-page [class*="glow"],
html[data-theme="light"] body.dashboard-page .page-bg {
  opacity: 0 !important;
}

/* ==========================================================
   BADGES
   ========================================================== */
html[data-theme="light"] .badge-on {
  background: rgba(43, 127, 212, 0.10);
  color: #2B7FD4;
}
html[data-theme="light"] .badge-new {
  background: #2B7FD4 !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] .badge-strategy {
  background: #F0F2F5 !important;
  color: #5A6478 !important;
  border: 1px solid #D4D9E1 !important;
}

/* === MOBILE MENU === */
html[data-theme="light"] .mobile-menu-btn {
  color: #1A1D26;
}

/* ==========================================================
   MARKETS PAGE
   ========================================================== */
html[data-theme="light"] .markets-wrap {
  background: #EBEEF3 !important;
}

/* View Tabs (Cards/Heatmap/Funding) */
html[data-theme="light"] .view-tab {
  background: #FFFFFF !important;
  color: #5A6478 !important;
  border-color: #D4D9E1 !important;
}
html[data-theme="light"] .view-tab.active {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #8fb8f2 !important;
  box-shadow: none !important;
}
html[data-theme="light"] .view-tab * {
  color: inherit !important;
}

/* Market Overall + Filtering Panel */
html[data-theme="light"] .mk-market-overall,
html[data-theme="light"] .mk-filtering-panel {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .mk-market-overall *,
html[data-theme="light"] .mk-filtering-panel * {
  color: #1A1D26;
}

/* Coin cards */
html[data-theme="light"] .coin-card,
html[data-theme="light"] .market-card,
html[data-theme="light"] [class*="coin-card"],
html[data-theme="light"] [class*="market-card"],
html[data-theme="light"] .funding-card {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .coin-card *,
html[data-theme="light"] .market-card *,
html[data-theme="light"] [class*="coin-card"] *,
html[data-theme="light"] [class*="market-card"] *,
html[data-theme="light"] .funding-card * {
  color: #1A1D26;
}
html[data-theme="light"] .coin-card [class*="muted"],
html[data-theme="light"] .coin-card [class*="sub"],
html[data-theme="light"] .coin-card [class*="label"],
html[data-theme="light"] .market-card [class*="muted"],
html[data-theme="light"] .market-card [class*="sub"],
html[data-theme="light"] .market-card [class*="label"] {
  color: #5A6478 !important;
}

/* Top Gainers/Decliners/Volume */
html[data-theme="light"] .top-panel,
html[data-theme="light"] [class*="top-gainer"],
html[data-theme="light"] [class*="top-decl"],
html[data-theme="light"] [class*="top-vol"],
html[data-theme="light"] .markets-top-row > div,
html[data-theme="light"] .hm-cell,
html[data-theme="light"] .market-overall {
  border-color: #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .market-overall * {
  color: #1A1D26;
}

/* Tab/filter bars */
html[data-theme="light"] .tab-bar,
html[data-theme="light"] .markets-tabs,
html[data-theme="light"] [class*="tab-bar"] {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
}
html[data-theme="light"] .tab-bar .tab,
html[data-theme="light"] [class*="tab-bar"] button {
  color: #5A6478;
}
html[data-theme="light"] .tab-bar .tab.active,
html[data-theme="light"] [class*="tab-bar"] button.active {
  color: #1A1D26;
  background: #E8EDF3;
}

/* Filter buttons */
html[data-theme="light"] .filter-bar,
html[data-theme="light"] .markets-filter-bar {
  background: transparent !important;
}
html[data-theme="light"] .filter-bar button,
html[data-theme="light"] .markets-filter-bar button {
  background: #FFFFFF !important;
  color: #5A6478 !important;
  border-color: #D4D9E1 !important;
}
html[data-theme="light"] .filter-bar button.active,
html[data-theme="light"] .markets-filter-bar button.active {
  background: #1A1D26 !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] .heatmap-wrap {
  background: #FFFFFF !important;
}

/* ==========================================================
   SIGNALS PAGE (light — template inline styles are dark-first)
   ========================================================== */
html[data-theme="light"] .signal-card,
html[data-theme="light"] [class*="signal-card"] {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
}

/* Filter card shell */
html[data-theme="light"] .signals-page-main .signals-filter-wrap {
  background: #FFFFFF !important;
  border: 1px solid #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-theme="light"] .signals-page-main .signals-filter-header {
  border-bottom-color: #E5E8EE !important;
}
html[data-theme="light"] .signals-page-main .signals-filter-header-title {
  color: #1A1D26 !important;
}
html[data-theme="light"] .signals-page-main .signals-filter-header-icon {
  background: linear-gradient(
    135deg,
    rgba(111, 66, 193, 0.12) 0%,
    rgba(59, 130, 246, 0.12) 100%
  ) !important;
}

/* Row labels */
html[data-theme="light"] .signals-page-main .signals-filter-row label {
  color: #5A6478 !important;
}

/* Native inputs */
html[data-theme="light"] .signals-page-main .signals-filter-row input {
  background: #F5F7FA !important;
  color: #1A1D26 !important;
  border: 1px solid #D4D9E1 !important;
  box-shadow: none !important;
}
/* Selects: use background-color + arrow image; never `background:` shorthand or repeat defaults tile the chevron */
html[data-theme="light"] .signals-page-main .signals-filter-row select {
  background-color: #F5F7FA !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235A6478' d='M6 8L2 4h8z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px 12px !important;
  color: #1A1D26 !important;
  border: 1px solid #D4D9E1 !important;
  box-shadow: none !important;
}
html[data-theme="light"] .signals-page-main .signals-filter-row input:hover {
  background: #EDF2F7 !important;
  border-color: #C1C7D0 !important;
}
html[data-theme="light"] .signals-page-main .signals-filter-row select:hover {
  background-color: #EDF2F7 !important;
  border-color: #C1C7D0 !important;
}
html[data-theme="light"] .signals-page-main .signals-filter-row input:focus {
  background: #FFFFFF !important;
  border-color: #2B7FD4 !important;
  box-shadow: 0 0 0 3px rgba(43, 127, 212, 0.18) !important;
}
html[data-theme="light"] .signals-page-main .signals-filter-row select:focus {
  background-color: #FFFFFF !important;
  border-color: #2B7FD4 !important;
  box-shadow: 0 0 0 3px rgba(43, 127, 212, 0.18) !important;
}
html[data-theme="light"] .signals-page-main .signals-filter-row input::placeholder {
  color: #8B95A5 !important;
  opacity: 1 !important;
}

/* Desktop “search / label” composite — inner was #0a0a0b */
html[data-theme="light"] .signals-page-main .sig-search-field-inner {
  background: #F5F7FA !important;
  border: 1px solid #D4D9E1 !important;
  box-shadow: none !important;
}
html[data-theme="light"] .signals-page-main .sig-search-field-inner:focus-within {
  border-color: #2B7FD4 !important;
  box-shadow: 0 0 0 3px rgba(43, 127, 212, 0.15) !important;
}
html[data-theme="light"] .signals-page-main .sig-search-field-icon {
  color: #8B95A5 !important;
}
html[data-theme="light"] .signals-page-main .sig-search-field-inner .search-spinner--desktop {
  border-color: rgba(0, 0, 0, 0.08) !important;
  border-top-color: #5B3AA8 !important;
}
html[data-theme="light"] .signals-page-main .sig-search-field-inner input,
html[data-theme="light"] .signals-page-main .sig-search-field-inner input#filter-tag {
  color: #1A1D26 !important;
  -webkit-text-fill-color: #1A1D26 !important;
}
html[data-theme="light"] .signals-page-main .sig-search-field-inner input::placeholder {
  color: #8B95A5 !important;
  opacity: 1 !important;
}

/* Actions */
html[data-theme="light"] .signals-page-main .signals-filter-actions .btn-reset {
  background: #FFFFFF !important;
  color: #5A6478 !important;
  border: 1px solid #D4D9E1 !important;
}
html[data-theme="light"] .signals-page-main .signals-filter-actions .btn-reset:hover {
  border-color: #2B7FD4 !important;
  color: #1A1D26 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* Table + empty state */
html[data-theme="light"] .signals-page-main .signals-table-wrap,
html[data-theme="light"] .signals-table-wrap {
  background: #FFFFFF !important;
  border-radius: 12px;
  border: 1px solid #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-theme="light"] .signals-page-main .signals-table th {
  background: #F5F7FA !important;
  color: #5A6478 !important;
  border-bottom-color: #E5E8EE !important;
}
html[data-theme="light"] .signals-page-main .signals-table td {
  color: #1A1D26 !important;
  border-bottom-color: #E5E8EE !important;
}
html[data-theme="light"] .signals-page-main .signals-table tbody tr:hover td {
  background: #F7F8FA !important;
}
html[data-theme="light"] .signals-page-main .signals-empty {
  background: #FFFFFF !important;
  border: 1px solid #D4D9E1 !important;
  color: #5A6478 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .signals-page-main .signals-empty .empty-title {
  color: #1A1D26 !important;
}
html[data-theme="light"] .signals-page-main .signals-empty .empty-desc a {
  color: #2B7FD4 !important;
}
html[data-theme="light"] .signals-page-main .tag-link {
  background: rgba(43, 127, 212, 0.1) !important;
  color: #2B7FD4 !important;
}
html[data-theme="light"] .signals-page-main .tag-link:hover {
  background: rgba(43, 127, 212, 0.16) !important;
  color: #2563eb !important;
}

/* Mobile list cards — template hover is dark-tinted */
html[data-theme="light"] .signals-page-main .signal-card-mobile:hover {
  background: #F7F8FA !important;
  border-color: #C1C7D0 !important;
}
html[data-theme="light"] .signals-page-main .signal-card-mobile:active {
  background: #EDF2F7 !important;
}

/* Mobile: template forces black filter bar — restore light card */
@media (max-width: 640px) {
  html[data-theme="light"] .signals-page-main .signals-filter-wrap {
    background: #FFFFFF !important;
    border-color: #D4D9E1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  }
  html[data-theme="light"] .signals-page-main .signals-filter-wrap::before {
    opacity: 0.5 !important;
  }
  html[data-theme="light"] .signals-page-main .mobile-search-icon-wrap {
    color: #8B95A5 !important;
  }
  html[data-theme="light"] .signals-page-main .mobile-search-input {
    color: #1A1D26 !important;
    -webkit-text-fill-color: #1A1D26 !important;
  }
  html[data-theme="light"] .signals-page-main .mobile-search-input::placeholder {
    color: #8B95A5 !important;
    opacity: 1 !important;
  }
}

/* ==========================================================
   PORTFOLIO PAGE
   ========================================================== */
html[data-theme="light"] .portfolio-card,
html[data-theme="light"] [class*="portfolio-card"],
html[data-theme="light"] .portfolio-section {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
}

/* Portfolio template-specific cards (pf-*) */
html[data-theme="light"] body.dashboard-page .portfolio-page-main {
  --card-bg: #FFFFFF;
  --card-border: #D4D9E1;
  --text: #1A1D26;
  --muted: #5A6478;
}
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-hero-card,
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-stat,
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-equity,
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-chart-card,
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-table-wrap,
html[data-theme="light"] body.dashboard-page .portfolio-page-main .bd-card,
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-pagination a,
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-pagination span,
html[data-theme="light"] body.dashboard-page .portfolio-page-main .export-btn {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Portfolio details tabs in light mode */
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-tab {
  background: #f4f6f9 !important;
  border: 1px solid #314158 !important;
  color: #1A1D26 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-tab:hover {
  background: #eef2f7 !important;
  border-color: #2B7FD4 !important;
  color: #1A1D26 !important;
}
html[data-theme="light"] body.dashboard-page .portfolio-page-main .pf-tab.active {
  background: linear-gradient(135deg, #7C5CFF 0%, #3B82F6 100%) !important;
  border-color: #4f6eff !important;
  color: #FFFFFF !important;
}

/* ==========================================================
   BACKTEST PAGE
   ========================================================== */
html[data-theme="light"] .backtest-card,
html[data-theme="light"] [class*="backtest-card"] {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
/* Custom select dropdowns (black bg fix) */
html[data-theme="light"] .bt-select-trigger,
html[data-theme="light"] .bt-select-list,
html[data-theme="light"] .bt-select-option {
  background: #F5F7FA !important;
  color: #1A1D26 !important;
  border-color: #D4D9E1 !important;
}
html[data-theme="light"] .bt-select-list {
  background: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}
html[data-theme="light"] .bt-select-option:hover {
  background: #EDF2F7 !important;
}
html[data-theme="light"] .bt-select-option.selected {
  background: #2B7FD4 !important;
  color: #FFFFFF !important;
}
/* Backtest status overlay */
html[data-theme="light"] .bt-status-overlay {
  background: rgba(235, 238, 243, 0.90) !important;
}
html[data-theme="light"] .bt-status-panel {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
/* Compound buttons */
html[data-theme="light"] .bt-compound-btn,
html[data-theme="light"] [class*="bt-compound"] button {
  background: #FFFFFF !important;
  color: #5A6478 !important;
  border-color: #D4D9E1 !important;
}
html[data-theme="light"] .bt-compound-btn.active,
html[data-theme="light"] [class*="bt-compound"] button.active {
  background: #2B7FD4 !important;
  color: #FFFFFF !important;
  border-color: #2B7FD4 !important;
}
/* Checkbox styling */
html[data-theme="light"] body.dashboard-page input[type="checkbox"] {
  accent-color: #2B7FD4;
}
/* Form-check checkboxes (V6 modules, etc.) — fix dark appearance */
html[data-theme="light"] body.dashboard-page .form-check-input {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: #FFFFFF !important;
  border: 2px solid #C1C7D0 !important;
  border-radius: 4px !important;
  width: 22px !important;
  height: 22px !important;
  cursor: pointer;
  position: relative;
}
html[data-theme="light"] body.dashboard-page .form-check-input:checked {
  background-color: #2B7FD4 !important;
  border-color: #2B7FD4 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
  background-size: 16px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* ==========================================================
   LIVE TRADING PAGE
   ========================================================== */
/* Exchange cards at top (Pionex/MEXC/Binance) */
html[data-theme="light"] .lt-ex-card {
  background: #FFFFFF !important;
  border: 1px solid #D4D9E1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: visible !important;
}
/* Kill the animated border ::before and the black ::after overlay */
html[data-theme="light"] .lt-ex-card::before {
  display: none !important;
}
html[data-theme="light"] .lt-ex-card::after {
  background: #FFFFFF !important;
  inset: 0 !important;
  border-radius: 8px !important;
}
html[data-theme="light"] .lt-ex-card * {
  color: #1A1D26 !important;
}
html[data-theme="light"] .lt-ex-card [class*="amount"],
html[data-theme="light"] .lt-ex-card [class*="status"] {
  color: #5A6478 !important;
}
/* AES-256 badge */
html[data-theme="light"] .lt-aes-badge,
html[data-theme="light"] [class*="aes-badge"] {
  background: #F0F2F5 !important;
  color: #5A6478 !important;
  border: 1px solid #D4D9E1 !important;
}
/* Detail cards (API form, setup guide) */
html[data-theme="light"] .lt-card,
html[data-theme="light"] .lt-card-guide {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .lt-card-test-signal {
  background: linear-gradient(150deg, rgba(37, 99, 235, 0.06) 0%, #ffffff 75%) !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08), 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}
html[data-theme="light"] .lt-card-test-signal::before {
  background: linear-gradient(90deg, transparent 0%, #2b7fd4 25%, #2b7fd4 75%, transparent 100%) !important;
}
html[data-theme="light"] .lt-card-test-signal .lt-btn-trade {
  background: #f8fafc !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] .lt-card-test-signal .lt-btn-trade:hover {
  background: rgba(43, 127, 212, 0.1) !important;
  color: #1f3f67 !important;
  border-color: rgba(43, 127, 212, 0.45) !important;
}
html[data-theme="light"] .lt-card-test-signal .lt-info {
  background: rgba(43, 127, 212, 0.08) !important;
  border-color: rgba(43, 127, 212, 0.24) !important;
  color: #1f3f67 !important;
}
html[data-theme="light"] .lt-card *,
html[data-theme="light"] .lt-card-guide * {
  color: #1A1D26;
}
html[data-theme="light"] .lt-card-guide [class*="muted"],
html[data-theme="light"] .lt-card-guide [class*="step"] {
  color: #5A6478;
}
/* Mobile form label separators on white cards */
html[data-theme="light"] .live-trading-page .lt-pane-grid > .lt-card .lt-fg > label {
  border-top-color: #e8ecf1;
}
/* Section headers and tabs */
html[data-theme="light"] .lt-section-header,
html[data-theme="light"] .lt-tabs button {
  color: #5A6478 !important;
}
html[data-theme="light"] .lt-tabs button.active {
  color: #2B7FD4 !important;
  border-color: #2B7FD4 !important;
}
/* Lt-tab (Coins / Trading) — light cards; active = soft blue (dark mode uses Temto #5E88FF family in live-trading.css) */
html[data-theme="light"] .lt-tab {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
/* Tab icons: circular well; Coins + Trading use lt-theme-icon-light assets in light mode (no brightness(0) on white PNG/SVG) */
html[data-theme="light"] .lt-tab-icon {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
}
html[data-theme="light"] .lt-tab-icon.lt-theme-icon-light {
  filter: none !important;
}
/* coin.svg / coin-light.svg in headers — no PNG invert filter */
html[data-theme="light"] .lt-tab:hover {
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  background: #f1f5f9 !important;
}
html[data-theme="light"] .lt-tab:hover .lt-tab-icon {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}
html[data-theme="light"] .lt-tab.on {
  border-color: #2563eb !important;
  color: #1d4ed8 !important;
  background: rgba(37, 99, 235, 0.06) !important;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}
html[data-theme="light"] .lt-tab.on .lt-tab-icon {
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
  box-shadow: none !important;
}
html[data-theme="light"] .lt-tab-icon.lt-tab-icon-coin,
html[data-theme="light"] .lt-tab:hover .lt-tab-icon.lt-tab-icon-coin,
html[data-theme="light"] .lt-tab.on .lt-tab-icon.lt-tab-icon-coin {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
html[data-theme="light"] .lt-tab.on:hover {
  border-color: #1d4ed8 !important;
  color: #1e40af !important;
}
/* Toggle switch */
html[data-theme="light"] .lt-toggle-track {
  background: #D4D9E1 !important;
}
html[data-theme="light"] .lt-toggle-track.active {
  background: #2B7FD4 !important;
}

html[data-theme="light"] .lt-btn-save-coins {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #1e3a5f !important;
  border: 1px solid rgba(37, 99, 235, 0.32) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}
html[data-theme="light"] .lt-btn-save-coins:hover {
  background: rgba(37, 99, 235, 0.16) !important;
  border-color: rgba(29, 78, 216, 0.42) !important;
  color: #0f172a !important;
}

html[data-theme="light"] .lt-btn-save-settings {
  background: rgba(43, 127, 212, 0.06) !important;
  color: #2563eb !important;
  border: 1px solid rgba(43, 127, 212, 0.42) !important;
  box-shadow: 0 0 0 1px rgba(43, 127, 212, 0.1), 0 0 12px rgba(43, 127, 212, 0.1) !important;
}
html[data-theme="light"] .lt-btn-save-settings:hover {
  background: rgba(43, 127, 212, 0.11) !important;
  border-color: rgba(29, 78, 216, 0.5) !important;
  color: #1d4ed8 !important;
  box-shadow: 0 0 0 1px rgba(43, 127, 212, 0.14), 0 0 16px rgba(43, 127, 212, 0.12) !important;
}

/* Live Trading — setup wizard (light): circles only, calm pro palette */
html[data-theme="light"] .lt-wizard-premium.lt-wizard-banner {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 20px rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-theme="light"] .lt-wizard-premium-head {
  border-bottom-color: #e8ecf1 !important;
}
html[data-theme="light"] .lt-wizard-premium-eyebrow {
  color: #64748b !important;
  letter-spacing: 0.12em !important;
}
html[data-theme="light"] .lt-wizard-premium-sub {
  color: #475569 !important;
}
html[data-theme="light"] .lt-wizard-premium-sub strong {
  color: #0f172a !important;
}
/* No rectangular button fill — rings carry the UI */
html[data-theme="light"] .lt-wizard-step-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  color: inherit !important;
}
html[data-theme="light"] .lt-wizard-step-btn:hover .lt-wiz-ring {
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.08) !important;
}
html[data-theme="light"] .lt-wizard-step-btn:focus-visible .lt-wiz-ring {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #2563eb !important;
}
html[data-theme="light"] .lt-wizard-step-btn.is-selected .lt-wiz-ring {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 5px rgba(37, 99, 235, 0.2), 0 10px 26px rgba(37, 99, 235, 0.15) !important;
  animation: lt-wiz-ring-pulse-light 2.2s ease-in-out infinite !important;
}
@keyframes lt-wiz-ring-pulse-light {
  0%,
  100% {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 5px rgba(37, 99, 235, 0.18), 0 10px 26px rgba(37, 99, 235, 0.12);
  }
  50% {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 6px rgba(37, 99, 235, 0.12), 0 12px 28px rgba(37, 99, 235, 0.16);
  }
}
html[data-theme="light"] .lt-wiz-connector-line {
  background: linear-gradient(90deg, #bbf7d0, #bfdbfe) !important;
  opacity: 1 !important;
}
html[data-theme="light"] .lt-wizard-steps--interactive .lt-wizard-label {
  color: #64748b !important;
}
html[data-theme="light"] .lt-wizard-step-btn.is-selected .lt-wizard-label {
  color: #0f172a !important;
}
html[data-theme="light"] .lt-wizard-hint {
  color: #94a3b8 !important;
}
html[data-theme="light"] .lt-wizard-step-btn.is-complete .lt-wiz-ring {
  background: linear-gradient(145deg, #ecfdf5, #d1fae5) !important;
  border-color: #6ee7b7 !important;
}
html[data-theme="light"] .lt-wizard-step-btn.is-complete .lt-wizard-num {
  color: #047857 !important;
}
html[data-theme="light"] .lt-wizard-step-btn.is-trading .lt-wiz-ring {
  background: linear-gradient(145deg, #eff6ff, #dbeafe) !important;
  border-color: #93c5fd !important;
}
html[data-theme="light"] .lt-wizard-step-btn.is-trading .lt-wizard-num {
  color: #1d4ed8 !important;
}
html[data-theme="light"] .lt-wizard-panels {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
html[data-theme="light"] .lt-wizard-panel-title {
  color: #0f172a !important;
}
html[data-theme="light"] .lt-wizard-panel-body {
  color: #475569 !important;
}
html[data-theme="light"] .lt-wizard-panel-body strong {
  color: #0f172a !important;
}
html[data-theme="light"] .lt-wizard-panel-tip {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #92400e !important;
}
html[data-theme="light"] .lt-wizard-panel-tip--soft {
  background: #f5f3ff !important;
  border-color: #ddd6fe !important;
  color: #5b21b6 !important;
}
html[data-theme="light"] .lt-wizard-panel-tip--live {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #b91c1c !important;
}
@media (max-width: 640px) {
  html[data-theme="light"] .lt-wiz-connector-line {
    background: linear-gradient(180deg, #bbf7d0, #bfdbfe) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="light"] .lt-wizard-step-btn.is-selected .lt-wiz-ring {
    animation: none !important;
  }
}

/* ==========================================================
   STRATEGY PAGE
   ========================================================== */
html[data-theme="light"] .settings-card,
html[data-theme="light"] .settings-section,
html[data-theme="light"] [class*="settings-card"] {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
}
/* Strategy card header bars (dark rgba overlay → light) */
html[data-theme="light"] .card-head {
  background: #F0F2F5 !important;
  border-bottom: 1px solid #D4D9E1 !important;
  color: #1A1D26 !important;
}
html[data-theme="light"] .card-head * {
  color: #1A1D26 !important;
}
html[data-theme="light"] .card-head .badge-on {
  background: rgba(22, 163, 74, 0.10) !important;
  color: #16A34A !important;
  border: 1px solid rgba(22, 163, 74, 0.25) !important;
}
html[data-theme="light"] .card-head .badge-off {
  background: #F0F2F5 !important;
  color: #8B95A5 !important;
  border: 1px solid #D4D9E1 !important;
}
html[data-theme="light"] .card-head .badge-new,
html[data-theme="light"] .card-head [class*="badge-v6"],
html[data-theme="light"] .card-head [class*="badge-core"] {
  background: #2B7FD4 !important;
  color: #FFFFFF !important;
}
/* Strategy status bar (inline gradient) */
html[data-theme="light"] body.dashboard-page [style*="linear-gradient(135deg"] {
  background: linear-gradient(135deg, #FFFFFF, #F5F7FA) !important;
  border: 1px solid #D4D9E1 !important;
}
html[data-theme="light"] body.dashboard-page [style*="background:#0f3460"],
html[data-theme="light"] body.dashboard-page [style*="background: #0f3460"] {
  background: #2B7FD4 !important;
}
/* V6 modules (inline dark backgrounds) */
html[data-theme="light"] body.dashboard-page [style*="background:#0B1426"],
html[data-theme="light"] body.dashboard-page [style*="background: #0B1426"],
html[data-theme="light"] body.dashboard-page [style*="background:#0F1A2E"],
html[data-theme="light"] body.dashboard-page [style*="background: #0F1A2E"] {
  background: #F5F7FA !important;
  border: 1px solid #D4D9E1 !important;
}
/* Strategy card body — override dark card bg from admindashboard.css */
html[data-theme="light"] .card {
  background: #FFFFFF !important;
  border: 1px solid #D4D9E1 !important;
  backdrop-filter: none !important;
}
/* Optimizer result banner */
html[data-theme="light"] .card-head[style*="rgba(63,169,245"] {
  background: rgba(43, 127, 212, 0.08) !important;
}
/* Input group text badges (%, USDT) — inline dark bg override */
html[data-theme="light"] .input-group-text,
html[data-theme="light"] body.dashboard-page [style*="background:#1a2a3c"],
html[data-theme="light"] body.dashboard-page [style*="background: #1a2a3c"] {
  background: #E8EDF3 !important;
  color: #5A6478 !important;
  border-color: #D4D9E1 !important;
}
/* Switch/toggle sliders — inactive state visible on white */
html[data-theme="light"] .switch .slider {
  background: #D4D9E1 !important;
}
html[data-theme="light"] .switch .slider::before {
  background: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
html[data-theme="light"] .switch input:checked + .slider {
  background: #16A34A !important;
}
html[data-theme="light"] .switch input:checked + .slider::before {
  background: #FFFFFF !important;
}

/* ==========================================================
   AUDIT LOG PAGE
   ========================================================== */
html[data-theme="light"] body.dashboard-page [class*="audit"] td [class*="badge"],
html[data-theme="light"] body.dashboard-page td [style*="background"] {
  background: #EDF2F7 !important;
  color: #1A1D26 !important;
}

/* ==========================================================
   ADMIN DASHBOARD
   ========================================================== */
html[data-theme="light"] [class*="admin-card"],
html[data-theme="light"] .admin-panel {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
}

/* ==========================================================
   SEMANTIC COLORS (preserved)
   ========================================================== */
html[data-theme="light"] .direction-long,
html[data-theme="light"] .dir-long { color: #16A34A !important; }
html[data-theme="light"] .direction-short,
html[data-theme="light"] .dir-short { color: #DC2626 !important; }
html[data-theme="light"] .direction-exit,
html[data-theme="light"] .dir-exit { color: #DC2626 !important; }

/* ==========================================================
   LINKS
   ========================================================== */
html[data-theme="light"] body.dashboard-page a {
  color: #2B7FD4;
}
html[data-theme="light"] body.dashboard-page a:hover {
  color: #1D5FA0;
}
html[data-theme="light"] .title-link {
  color: #1A1D26 !important;
}
html[data-theme="light"] .title-link:hover {
  color: #2B7FD4 !important;
}

/* ==========================================================
   CATCH-ALL: inline dark backgrounds → light
   ========================================================== */
html[data-theme="light"] body.dashboard-page [style*="background: #000"],
html[data-theme="light"] body.dashboard-page [style*="background:#000"],
html[data-theme="light"] body.dashboard-page [style*="background-color: #000"],
html[data-theme="light"] body.dashboard-page [style*="background-color:#000"] {
  background: #FFFFFF !important;
  border: 1px solid #D4D9E1 !important;
}
html[data-theme="light"] body.dashboard-page [style*="background: rgba(19"],
html[data-theme="light"] body.dashboard-page [style*="background:rgba(19"],
html[data-theme="light"] body.dashboard-page [style*="background: rgba(0,"],
html[data-theme="light"] body.dashboard-page [style*="background:rgba(0,"],
html[data-theme="light"] body.dashboard-page [style*="background: rgba(0, "],
html[data-theme="light"] body.dashboard-page [style*="background: rgba(13"],
html[data-theme="light"] body.dashboard-page [style*="background:rgba(13"],
html[data-theme="light"] body.dashboard-page [style*="background: rgba(4"],
html[data-theme="light"] body.dashboard-page [style*="background:rgba(4"],
html[data-theme="light"] body.dashboard-page [style*="background: rgba(10"],
html[data-theme="light"] body.dashboard-page [style*="background:rgba(10"] {
  background: #FFFFFF !important;
  border: 1px solid #D4D9E1 !important;
}
html[data-theme="light"] body.dashboard-page [style*="background: #0D"],
html[data-theme="light"] body.dashboard-page [style*="background:#0D"],
html[data-theme="light"] body.dashboard-page [style*="background: #0A"],
html[data-theme="light"] body.dashboard-page [style*="background:#0A"],
html[data-theme="light"] body.dashboard-page [style*="background: #0B"],
html[data-theme="light"] body.dashboard-page [style*="background:#0B"],
html[data-theme="light"] body.dashboard-page [style*="background: #0F"],
html[data-theme="light"] body.dashboard-page [style*="background:#0F"],
html[data-theme="light"] body.dashboard-page [style*="background: #08"],
html[data-theme="light"] body.dashboard-page [style*="background:#08"],
html[data-theme="light"] body.dashboard-page [style*="background: #05"],
html[data-theme="light"] body.dashboard-page [style*="background:#05"],
html[data-theme="light"] body.dashboard-page [style*="background: #001"],
html[data-theme="light"] body.dashboard-page [style*="background:#001"],
html[data-theme="light"] body.dashboard-page [style*="background:#13"],
html[data-theme="light"] body.dashboard-page [style*="background: #13"],
html[data-theme="light"] body.dashboard-page [style*="background:#1c"],
html[data-theme="light"] body.dashboard-page [style*="background: #1c"],
html[data-theme="light"] body.dashboard-page [style*="background:#1a"],
html[data-theme="light"] body.dashboard-page [style*="background: #1a"],
html[data-theme="light"] body.dashboard-page [style*="background:#131314"],
html[data-theme="light"] body.dashboard-page [style*="background: #131314"] {
  background: #FFFFFF !important;
  border: 1px solid #D4D9E1 !important;
}
/* White text on previously dark → now force dark text */
html[data-theme="light"] body.dashboard-page [style*="background: #000"] *,
html[data-theme="light"] body.dashboard-page [style*="background:#000"] *,
html[data-theme="light"] body.dashboard-page [style*="background: rgba(0,"] *,
html[data-theme="light"] body.dashboard-page [style*="background:rgba(0,"] *,
html[data-theme="light"] body.dashboard-page [style*="background: rgba(19"] *,
html[data-theme="light"] body.dashboard-page [style*="background:rgba(19"] *,
html[data-theme="light"] body.dashboard-page [style*="background: rgba(13"] *,
html[data-theme="light"] body.dashboard-page [style*="background:rgba(13"] *,
html[data-theme="light"] body.dashboard-page [style*="background:#08"] *,
html[data-theme="light"] body.dashboard-page [style*="background: #08"] *,
html[data-theme="light"] body.dashboard-page [style*="background:#0B"] *,
html[data-theme="light"] body.dashboard-page [style*="background: #0B"] *,
html[data-theme="light"] body.dashboard-page [style*="background:#0F"] *,
html[data-theme="light"] body.dashboard-page [style*="background: #0F"] *,
html[data-theme="light"] body.dashboard-page [style*="background:#05"] *,
html[data-theme="light"] body.dashboard-page [style*="background: #05"] * {
  color: #1A1D26 !important;
}
/* Inline color:#fff — force dark text in light mode */
html[data-theme="light"] body.dashboard-page [style*="color:#fff"],
html[data-theme="light"] body.dashboard-page [style*="color: #fff"],
html[data-theme="light"] body.dashboard-page [style*="color: white"],
html[data-theme="light"] body.dashboard-page [style*="color:white"] {
  color: #1A1D26 !important;
}
/* Exception: keep white text on colored buttons (primary, red, green) */
html[data-theme="light"] body.dashboard-page [style*="background:var(--primary)"][style*="color:#fff"],
html[data-theme="light"] body.dashboard-page [style*="background:var(--red)"][style*="color:#fff"],
html[data-theme="light"] body.dashboard-page [style*="background: #7289DA"][style*="color: white"],
html[data-theme="light"] body.dashboard-page button[style*="color:#fff"],
html[data-theme="light"] body.dashboard-page button[style*="color: white"] {
  color: #FFFFFF !important;
}
/* Inline rgba(255,255,255,0.0x) backgrounds → light gray in light mode */
html[data-theme="light"] body.dashboard-page [style*="background:rgba(255,255,255,0.0"],
html[data-theme="light"] body.dashboard-page [style*="background: rgba(255,255,255,0.0"],
html[data-theme="light"] body.dashboard-page [style*="background: rgba(255, 255, 255, 0.0"] {
  background: #F0F2F5 !important;
  border-color: #D4D9E1 !important;
}

/* ==========================================================
   MOBILE — Sidebar backdrop overlay (lighter for light mode)
   ========================================================== */
html[data-theme="light"] .sidebar-backdrop {
  background: rgba(0, 0, 0, 0.18) !important;
}

/* ==========================================================
   MOBILE — Sidebar when overlay-open on small screens
   ========================================================== */
html[data-theme="light"] .dashboard-sidebar.open,
html[data-theme="light"] .dashboard-sidebar.active {
  background: #F7F8FA !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.10);
}

/* ==========================================================
   MOBILE — Hamburger menu button
   ========================================================== */
html[data-theme="light"] .mobile-menu-btn:hover,
html[data-theme="light"] .mobile-menu-btn:active {
  background: transparent !important;
  color: #0f172a !important;
  box-shadow: none !important;
}
html[data-theme="light"] .mobile-menu-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.35) !important;
}

/* ==========================================================
   FLASH MESSAGES — Light mode variants
   ========================================================== */
html[data-theme="light"] .flash,
html[data-theme="light"] .flash-message {
  background: #FFFFFF !important;
  border: 1px solid #D4D9E1 !important;
  color: #1A1D26 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .flash-ok,
html[data-theme="light"] .flash-success {
  background: rgba(22, 163, 74, 0.06) !important;
  border-color: rgba(22, 163, 74, 0.25) !important;
  color: #15803D !important;
}
html[data-theme="light"] .flash-fail,
html[data-theme="light"] .flash-error {
  background: rgba(220, 38, 38, 0.06) !important;
  border-color: rgba(220, 38, 38, 0.25) !important;
  color: #DC2626 !important;
}
html[data-theme="light"] .flash-info {
  background: rgba(43, 127, 212, 0.06) !important;
  border-color: rgba(43, 127, 212, 0.25) !important;
  color: #2B7FD4 !important;
}

/* ==========================================================
   MOBILE — KPI cards horizontal scroll area
   ========================================================== */
@media (max-width: 768px) {
  html[data-theme="light"] .kpi-row,
  html[data-theme="light"] .kpi-scroll,
  html[data-theme="light"] [class*="kpi-row"],
  html[data-theme="light"] [class*="kpi-scroll"] {
    background: transparent !important;
  }
  html[data-theme="light"] .kpi-row::-webkit-scrollbar-track,
  html[data-theme="light"] [class*="kpi-row"]::-webkit-scrollbar-track {
    background: #EBEEF3;
  }
  html[data-theme="light"] .kpi-row::-webkit-scrollbar-thumb,
  html[data-theme="light"] [class*="kpi-row"]::-webkit-scrollbar-thumb {
    background: #C1C7D0;
    border-radius: 4px;
  }

  /* Dashboard KPI: never force a wide min-width on mobile — it breaks the 4-column
     grid (tracks shrink below 140px each) and cards overlap. Dark mode has no such
     rule; match that behavior in light mode. */
  html[data-theme="light"] body.dashboard-page .dashboard-kpi-card,
  html[data-theme="light"] body.dashboard-page .kpi-card {
    min-width: 0;
  }

  /* Mobile charts area — ensure no dark bleed-through */
  html[data-theme="light"] .live-price-scroll,
  html[data-theme="light"] [class*="live-price-scroll"] {
    background: transparent !important;
  }
}

/* ==========================================================
   MOBILE — Signal cards (mobile layout)
   ========================================================== */
@media (max-width: 768px) {
  html[data-theme="light"] .signal-mobile-card,
  html[data-theme="light"] [class*="signal-mobile"],
  html[data-theme="light"] .sig-card {
    background: #FFFFFF !important;
    border: 1px solid #D4D9E1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  html[data-theme="light"] .signal-mobile-card *,
  html[data-theme="light"] .sig-card * {
    color: #1A1D26;
  }

  /* Mobile Live Trading — exchange cards stack */
  html[data-theme="light"] .lt-ex-grid {
    gap: 8px !important;
  }

  /* Mobile Backtest — full-width inputs */
  html[data-theme="light"] .bt-form-group input,
  html[data-theme="light"] .bt-form-group select {
    background: #F5F7FA !important;
    border-color: #D4D9E1 !important;
  }
}

/* ==========================================================
   MOBILE — Bottom safe area + notch handling (iOS)
   ========================================================== */
@supports (padding: env(safe-area-inset-bottom)) {
  @media (max-width: 480px) {
    html[data-theme="light"] .dashboard-sidebar-footer {
      padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
  }
}

/* ==========================================================
   TABLET (iPad) — Sidebar + content adjustments
   ========================================================== */
@media (min-width: 744px) and (max-width: 1024px) {
  html[data-theme="light"] .dashboard-sidebar {
    background: #F7F8FA !important;
    border-right: 1px solid #D4D9E1;
  }
  html[data-theme="light"] .dashboard-main {
    background: #EBEEF3 !important;
  }
}

/* ==========================================================
   MOBILE — Landscape mode (short height)
   ========================================================== */
@media (max-height: 500px) and (orientation: landscape) {
  html[data-theme="light"] .dashboard-sidebar {
    background: #F7F8FA !important;
  }
}

/* ==========================================================
   TOOLTIPS + DROPDOWNS + POPOVERS
   ========================================================== */
html[data-theme="light"] .tooltip,
html[data-theme="light"] .popover,
html[data-theme="light"] [class*="tooltip"],
html[data-theme="light"] [class*="popover"] {
  background: #FFFFFF !important;
  color: #1A1D26 !important;
  border: 1px solid #D4D9E1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ==========================================================
   SELECTION HIGHLIGHT
   ========================================================== */
html[data-theme="light"] body.dashboard-page ::selection {
  background: rgba(43, 127, 212, 0.20);
  color: #1A1D26;
}

/* ==========================================================
   LOADING STATES / SPINNERS
   ========================================================== */
html[data-theme="light"] .spinner,
html[data-theme="light"] .loading-overlay,
html[data-theme="light"] [class*="loading"] {
  color: #2B7FD4;
}
html[data-theme="light"] .loading-overlay {
  background: rgba(235, 238, 243, 0.85) !important;
}

/* ==========================================================
   NON-DASHBOARD PAGES (Legal, Delivery, Privacy, Refund)
   — override inline color:#fff to dark text
   ========================================================== */
html[data-theme="light"] [style*="color:#fff"],
html[data-theme="light"] [style*="color: #fff"] {
  color: #1A1D26 !important;
}
html[data-theme="light"] [style*="color:#a78bfa"],
html[data-theme="light"] [style*="color: #a78bfa"] {
  color: #2B7FD4 !important;
}
/* Keep white text on colored buttons everywhere */
html[data-theme="light"] button[style*="color:#fff"],
html[data-theme="light"] button[style*="color: #fff"],
html[data-theme="light"] button[style*="color: white"],
html[data-theme="light"] button[style*="color:white"],
html[data-theme="light"] a.btn[style*="color:#fff"],
html[data-theme="light"] a.btn[style*="color: white"],
html[data-theme="light"] [style*="background:var(--primary)"][style*="color:#fff"],
html[data-theme="light"] [style*="background:var(--red)"][style*="color:#fff"],
html[data-theme="light"] [style*="background: #7289DA"][style*="color: white"] {
  color: #FFFFFF !important;
}
/* Non-dashboard page background dot pattern — subtle for light */
html[data-theme="light"] body:not(.dashboard-page) {
  color-scheme: light !important;
}
/* Navbar light mode for non-dashboard pages */
html[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom-color: #D4D9E1 !important;
}
html[data-theme="light"] .nav-links a {
  color: #5A6478 !important;
}
html[data-theme="light"] .nav-links a:hover {
  color: #2B7FD4 !important;
  background: rgba(43, 127, 212, 0.06) !important;
}
html[data-theme="light"] .nav-user {
  background: #F0F2F5 !important;
  border-color: #D4D9E1 !important;
  color: #5A6478 !important;
}
html[data-theme="light"] .nav-logout {
  color: #DC2626 !important;
  border-color: rgba(220, 38, 38, 0.25) !important;
}
html[data-theme="light"] .nav-logout:hover {
  background: rgba(220, 38, 38, 0.06) !important;
}

/* ==========================================================
   ADMIN — Action badges (dark bg → light)
   ========================================================== */
html[data-theme="light"] .action-badge.action-login {
  background: rgba(22, 163, 74, 0.10) !important;
}
html[data-theme="light"] .action-badge.action-register {
  background: rgba(37, 99, 235, 0.10) !important;
}
html[data-theme="light"] .action-badge.action-plan {
  background: rgba(212, 148, 10, 0.10) !important;
}
html[data-theme="light"] .action-badge.action-admin {
  background: rgba(220, 38, 38, 0.10) !important;
}
html[data-theme="light"] .action-badge.action-other {
  background: #F0F2F5 !important;
}

/* ==========================================================
   ADMIN — Audit table rows
   ========================================================== */
html[data-theme="light"] .audit-table td {
  border-bottom-color: #E5E8EE !important;
}
html[data-theme="light"] .audit-table tr:hover td {
  background: rgba(43, 127, 212, 0.04) !important;
}

/* ==========================================================
   LAYOUT — Sidebar user text (white → dark)
   ========================================================== */
html[data-theme="light"] .dashboard-sidebar-user {
  color: #1A1D26 !important;
}
html[data-theme="light"] .dashboard-sidebar-user .nav-icon {
  filter: brightness(0) saturate(100%) invert(35%) sepia(10%) saturate(500%) hue-rotate(190deg) !important;
}

/* ==========================================================
   MARKETS — CSS variable overrides for light
   ========================================================== */
html[data-theme="light"] .markets-wrap,
html[data-theme="light"] .mk-dashboard-content {
  --mk-card-bg: #FFFFFF;
  --mk-card-bg-selected: #EDF2F7;
  --mk-disabled-bg: rgba(0, 0, 0, 0.03);
}

/* ==========================================================
   LIVE TRADING — Chart background overrides
   ========================================================== */
html[data-theme="light"] .lt-chart-wrap,
html[data-theme="light"] .lt-chart-container,
html[data-theme="light"] [class*="lt-chart"] {
  background: #F5F7FA !important;
  border-color: #D4D9E1 !important;
}

/* ==========================================================
   LIVE PRICES — Card backgrounds
   ========================================================== */
html[data-theme="light"] .live-price-wrap,
html[data-theme="light"] .price-card,
html[data-theme="light"] [class*="price-card"] {
  background: #FFFFFF !important;
  border-color: #D4D9E1 !important;
}

/* ==========================================================
   MOBILE — Dashboard header (Samsung fix)
   ========================================================== */
html[data-theme="light"] .dashboard-mobile-header {
  background: rgba(255, 255, 255, 0.95) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid #D4D9E1 !important;
}
html[data-theme="light"] .mobile-menu-btn {
  color: #1A1D26 !important;
}
/* Mobile header logo — keep colorful in light mode */
html[data-theme="light"] .dashboard-mobile-header-logo img {
  filter: none !important;
}
/* Sidebar logo — keep colorful in light mode */
html[data-theme="light"] .dashboard-sidebar-logo img,
html[data-theme="light"] .dashboard-sidebar-logo img.dashboard-logo-img {
  filter: none !important;
}
/* Sidebar nav icons — dark in light mode */
html[data-theme="light"] .dashboard-nav a svg,
html[data-theme="light"] .dashboard-nav a .nav-icon,
html[data-theme="light"] .dashboard-nav a img.nav-icon {
  filter: brightness(0) saturate(100%) invert(35%) sepia(10%) saturate(500%) hue-rotate(190deg) !important;
}
/* Sidebar footer icons — dark in light mode */
html[data-theme="light"] .dashboard-sidebar-footer a .nav-icon,
html[data-theme="light"] .dashboard-sidebar-footer a img.nav-icon {
  filter: brightness(0) saturate(100%) invert(35%) sepia(10%) saturate(500%) hue-rotate(190deg) !important;
}
/* Mobile sidebar backdrop — lighter for light mode */
html[data-theme="light"] .sidebar-open .sidebar-backdrop {
  background: rgba(0, 0, 0, 0.15) !important;
}
/* Mobile sidebar open state — ensure white bg */
html[data-theme="light"] .sidebar-open .dashboard-sidebar {
  background: #F7F8FA !important;
  border-right: 1px solid #D4D9E1 !important;
}

/* ==========================================================
   MOBILE — Ensure all card * text is dark in light mode
   ========================================================== */
@media (max-width: 768px) {
  html[data-theme="light"] .card *,
  html[data-theme="light"] .dash-card *,
  html[data-theme="light"] .section *,
  html[data-theme="light"] .admin-card * {
    color: #1A1D26;
  }
  /* Preserve semantic colors on mobile */
  html[data-theme="light"] [class*="gain"],
  html[data-theme="light"] .text-gain { color: #16A34A !important; }
  html[data-theme="light"] [class*="loss"],
  html[data-theme="light"] .text-loss { color: #DC2626 !important; }
  html[data-theme="light"] .direction-long,
  html[data-theme="light"] .dir-long { color: #16A34A !important; }
  html[data-theme="light"] .direction-short,
  html[data-theme="light"] .dir-short { color: #DC2626 !important; }
  html[data-theme="light"] a { color: #2B7FD4; }
  html[data-theme="light"] [class*="muted"],
  html[data-theme="light"] [class*="label"],
  html[data-theme="light"] small { color: #5A6478 !important; }
}

/* === CHECKBOXES — Light Mode (all dashboard pages) === */
html[data-theme="light"] body.dashboard-page input[type="checkbox"]:not(.switch input) {
  background-color: #FFFFFF !important;
  border: 2px solid #B0B8C4 !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
}
html[data-theme="light"] body.dashboard-page input[type="checkbox"]:not(.switch input):hover {
  border-color: #0891B2 !important;
}
html[data-theme="light"] body.dashboard-page input[type="checkbox"]:not(.switch input):checked {
  background-color: #0891B2 !important;
  border-color: #0891B2 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
  background-size: 14px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Live Trading — signal chips (LONG/EXIT): neutral chips, not global cyan */
html[data-theme="light"] body.dashboard-page.live-trading-page .lt-signal-checks input[type="checkbox"] {
  background-color: #ffffff !important;
  border: 1px solid #c5cdd8 !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  background-image: none !important;
}
html[data-theme="light"] body.dashboard-page.live-trading-page .lt-signal-checks input[type="checkbox"]:hover {
  border-color: #94a3b8 !important;
}
html[data-theme="light"] body.dashboard-page.live-trading-page .lt-signal-checks input[type="checkbox"]:checked {
  background-color: #1a1d26 !important;
  border-color: #1a1d26 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6l2.5 2.5L9.5 3.5'/%3E%3C/svg%3E") !important;
  background-size: 9px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
html[data-theme="light"] .live-trading-page .lt-fg .lt-signal-checks .lt-signal-chip {
  border-color: #e2e8f0 !important;
  background: #f8fafc !important;
  color: #64748b !important;
  box-shadow: none !important;
}
html[data-theme="light"] .live-trading-page .lt-fg .lt-signal-checks .lt-signal-chip:hover {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
}
html[data-theme="light"] .live-trading-page .lt-fg .lt-signal-checks .lt-signal-chip:has(input:checked) {
  border-color: rgba(43, 127, 212, 0.45) !important;
  background: rgba(43, 127, 212, 0.08) !important;
  box-shadow: 0 0 0 1px rgba(43, 127, 212, 0.12) !important;
  color: #1f3f67 !important;
}

/* === COIN CHIPS — Light Mode (Admin Dashboard) === */
html[data-theme="light"] .coin-chip {
  background: #FFFFFF;
  border-color: #D4D9E1;
}
html[data-theme="light"] .coin-chip.active {
  border-color: #0891B2;
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 0 1.5px rgba(6, 182, 212, 0.25);
}
html[data-theme="light"] .coin-chip.active > span:first-of-type { color: #0E7490; }
html[data-theme="light"] .coin-chip.disabled {
  border-color: #E5E8EE;
  background: #F5F7FA;
}
html[data-theme="light"] .coin-chip.disabled > span:first-of-type { color: #8B95A5; }
html[data-theme="light"] .coin-chip:hover { border-color: #0891B2; }

/* === COIN CHIPS — Light Mode (Live Trading) === */
html[data-theme="light"] .lt-coin-chip {
  background: #FFFFFF;
  border-color: #D4D9E1;
}
html[data-theme="light"] .lt-coin-chip.active {
  border-color: #94a8d8;
  background: rgba(94, 136, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(94, 136, 255, 0.18);
}
html[data-theme="light"] .lt-coin-chip:not(.active) {
  border-color: #E5E8EE;
  background: #F5F7FA;
}
html[data-theme="light"] .lt-coin-chip span { color: #8B95A5; }
html[data-theme="light"] .lt-coin-chip.active span { color: #3d4f72; }
html[data-theme="light"] .lt-coin-chip:hover { border-color: #b4c0e0; }
/* Live Trading coin grid — small checkbox; dark blue checked (override global 20×20 checkbox) */
html[data-theme="light"] .live-trading-page .lt-coin-chip input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  min-height: 8px !important;
  margin: 0 !important;
  border-radius: 2px !important;
  border: 1px solid #8a94a3 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-theme="light"] .live-trading-page .lt-coin-chip input[type="checkbox"]:hover {
  border-color: #6f7b8d !important;
  background-color: #eef2f7 !important;
}
html[data-theme="light"] .live-trading-page .lt-coin-chip input[type="checkbox"]:checked {
  background-color: #0f2340 !important;
  border-color: #0a1a30 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6l2.5 2.5L9.5 3.5'/%3E%3C/svg%3E") !important;
  background-size: 6px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Live Trading — Coins / Active Coins: light dot-grid panels */
html[data-theme="light"] #t-coins .lt-card-coins {
  background: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px), #ffffff !important;
  background-size: 22px 22px, 100% 100% !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}
html[data-theme="light"] #t-coins .lt-card-coins::before {
  background: linear-gradient(90deg, transparent 0%, #2b7fd4 25%, #2b7fd4 75%, transparent 100%) !important;
}
html[data-theme="light"] #t-trading .lt-card.lt-card-coins-sum {
  background: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px), #ffffff !important;
  background-size: 22px 22px, 100% 100% !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}
html[data-theme="light"] #t-trading .lt-card.lt-card-coins-sum::before {
  background: linear-gradient(90deg, transparent 0%, #2b7fd4 25%, #2b7fd4 75%, transparent 100%) !important;
}
html[data-theme="light"] .live-trading-page .lt-coins-chips {
  background-color: #f5f7fa !important;
  border-color: #e2e8f0 !important;
}
html[data-theme="light"] .live-trading-page .lt-coins-chips.lt-coins-panel-bg {
  background-image: radial-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1px) !important;
  background-size: 22px 22px !important;
}
html[data-theme="light"] .live-trading-page .lt-coins-chips .lt-coin-chip {
  background: #ffffff !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.06) !important;
}
html[data-theme="light"] .live-trading-page .lt-coins-chips .lt-coin-chip:hover {
  border-color: rgba(37, 99, 235, 0.4) !important;
  background: rgba(43, 127, 212, 0.06) !important;
}
html[data-theme="light"] .live-trading-page .lt-coins-chips .lt-coin-img {
  filter: grayscale(0.35) brightness(0.96);
}
html[data-theme="light"] .live-trading-page .lt-coins-chips .lt-coin-chip:hover .lt-coin-img {
  filter: none;
}
html[data-theme="light"] .live-trading-page .lt-coin-grid {
  background-color: #f5f7fa !important;
  border-color: #e2e8f0 !important;
  background-image: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px) !important;
}
html[data-theme="light"] .live-trading-page .lt-coins-header {
  background: radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px), #f8fafc !important;
  background-size: 20px 20px, 100% 100% !important;
  border-color: rgba(37, 99, 235, 0.18) !important;
}
html[data-theme="light"] .live-trading-page .lt-coin-chip .lt-coin-img {
  filter: grayscale(0.3) brightness(0.98);
}
html[data-theme="light"] .live-trading-page .lt-coin-chip:hover .lt-coin-img,
html[data-theme="light"] .live-trading-page .lt-coin-chip.active .lt-coin-img {
  filter: none;
}

/* === COIN CHIPS — Light Mode (Grid Trading) === */
html[data-theme="light"] .grid-coin-chip {
  background: #FFFFFF;
  border-color: #D4D9E1;
}
html[data-theme="light"] .grid-coin-chip.active {
  border-color: #0891B2;
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 0 1.5px rgba(6, 182, 212, 0.25);
}
html[data-theme="light"] .grid-coin-chip:not(.active) {
  border-color: #E5E8EE;
  background: #F5F7FA;
}
html[data-theme="light"] .grid-coin-chip-header { color: #8B95A5; }
html[data-theme="light"] .grid-coin-chip.active .grid-coin-chip-header { color: #0E7490; }
html[data-theme="light"] .grid-coin-chip:hover { border-color: #0891B2; }
html[data-theme="light"] .grid-param-input {
  background: #F5F7FA;
  border-color: #D4D9E1;
  color: #1A1D26;
}
