/* ═══ Light Theme ═══ */
[data-theme="light"] {
    --bg: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-solid: #ffffff;
    --bg-elevated: rgba(248, 250, 252, 0.8);
    --bg-elevated-solid: #f8fafc;
    --bg-hover: rgba(99, 102, 241, 0.05);
    
    --border: rgba(148, 163, 184, 0.3);
    --border-strong: rgba(148, 163, 184, 0.5);
    --border-glow: rgba(99, 102, 241, 0.3);
    
    --text: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.2);
    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.2);
    --warning: #d97706;
    --warning-glow: rgba(217, 119, 6, 0.2);
    --danger: #dc2626;
    --danger-glow: rgba(220, 38, 38, 0.2);
    --gold: #d97706;
    --gold-glow: rgba(217, 119, 6, 0.2);
    
    --glass-border: rgba(15, 23, 42, 0.06);
    
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.1);
}



/* ═══ Light Mode - Comprehensive Overrides ═══ */
/* Body background gradient overrides */
[data-theme="light"] body {
    background-image: 
        radial-gradient(circle at 20% 0%, rgba(99, 102, 241, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 80% 100%, rgba(217, 119, 6, 0.04) 0%, transparent 40%) !important;
}

/* Header */
[data-theme="light"] .header {
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.04) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(217, 119, 6, 0.04) 100%) !important;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
[data-theme="light"] .header h1 {
    color: var(--text) !important;
}

/* Hardcoded backgrounds → use vars */
[data-theme="light"] .symbol-card,
[data-theme="light"] .modal,
[data-theme="light"] .tab-btn,
[data-theme="light"] .btn,
[data-theme="light"] .search-input,
[data-theme="light"] .market-status,
[data-theme="light"] .div-alert-card,
[data-theme="light"] .div-stat-card,
[data-theme="light"] .div-filter-btn,
[data-theme="light"] .market-info-section,
[data-theme="light"] .market-session-row,
[data-theme="light"] .market-tip,
[data-theme="light"] .market-info-row,
[data-theme="light"] .div-counter-bar,
[data-theme="light"] .div-filters,
[data-theme="light"] .div-alert-detail,
[data-theme="light"] .market-hero,
[data-theme="light"] .market-info-content {
    background: var(--bg-card-solid) !important;
}

[data-theme="light"] .symbol-card { background: rgba(255, 255, 255, 0.85) !important; }
[data-theme="light"] .symbol-card:hover { background: #ffffff !important; }

/* Cards inside cards (elevated) */
[data-theme="light"] .market-info-row,
[data-theme="light"] .market-tip,
[data-theme="light"] .market-session-row,
[data-theme="light"] .div-counter-bar,
[data-theme="light"] .div-alert-detail,
[data-theme="light"] .div-filters {
    background: rgba(241, 245, 249, 0.7) !important;
}

/* Text colors */
[data-theme="light"] .header-time-value,
[data-theme="light"] .modal-header h2,
[data-theme="light"] .symbol-name {
    color: var(--text) !important;
}
[data-theme="light"] .modal-header h2 {
    color: #d97706 !important;
}

/* Subtitle and meta */
[data-theme="light"] .subtitle,
[data-theme="light"] .ms-label,
[data-theme="light"] .ms-time,
[data-theme="light"] .header-time-label {
    color: var(--text-muted) !important;
}

/* Buttons in light mode */
[data-theme="light"] .btn {
    background: rgba(255, 255, 255, 0.8) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}
[data-theme="light"] .btn:hover {
    background: #ffffff !important;
}
[data-theme="light"] .btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover)) !important;
    color: white !important;
}
[data-theme="light"] .telegram-btn-primary {
    color: white !important;
}

/* Btn divergence in light */
[data-theme="light"] .btn-divergence {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(99, 102, 241, 0.05)) !important;
}

/* Tab buttons */
[data-theme="light"] .tab-btn {
    background: transparent !important;
    color: var(--text-muted) !important;
}
[data-theme="light"] .tab-btn:hover {
    background: var(--bg-hover) !important;
    color: var(--text) !important;
}
[data-theme="light"] .tab-btn.active {
    background: rgba(99, 102, 241, 0.12) !important;
    color: var(--text) !important;
}

/* Search input */
[data-theme="light"] .search-input {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--text) !important;
}

/* Modal in light mode */
[data-theme="light"] .modal {
    background: #ffffff !important;
    border: 1px solid var(--border-strong);
}
[data-theme="light"] .modal-header {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), transparent) !important;
    border-bottom-color: var(--border);
}

/* Modal overlay */
[data-theme="light"] .modal-overlay {
    background: rgba(15, 23, 42, 0.4) !important;
}

/* Info boxes in modals */
[data-theme="light"] .market-info-section {
    background: rgba(241, 245, 249, 0.5) !important;
    border-color: var(--border);
}
[data-theme="light"] .market-hero {
    background: rgba(99, 102, 241, 0.05) !important;
}

/* Theme toggle button itself */
[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--text);
}

/* Header sub-elements */
[data-theme="light"] .market-status:hover {
    background: rgba(99, 102, 241, 0.08) !important;
}

/* DXY Widget in light */
[data-theme="light"] .dxy-widget {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: var(--border);
}

/* Toast notifications - solid background in light */
[data-theme="light"] .toast {
    background: #ffffff !important;
    border-color: var(--border-strong);
}

/* Skeleton loaders in light */
[data-theme="light"] .skeleton {
    background: linear-gradient(
        90deg,
        rgba(241, 245, 249, 1) 0%,
        rgba(226, 232, 240, 1) 50%,
        rgba(241, 245, 249, 1) 100%
    ) !important;
    background-size: 200% 100% !important;
}

/* Card elements colored backgrounds */
[data-theme="light"] .card-header,
[data-theme="light"] .card-meta-bar {
    border-color: var(--border);
}

/* Loading spinner */
[data-theme="light"] .loading {
    color: var(--text);
}

/* Status indicators - keep colors but adjust opacity */
[data-theme="light"] .badge-bullish,
[data-theme="light"] .badge-bearish,
[data-theme="light"] .badge-neutral {
    background: rgba(241, 245, 249, 0.8) !important;
}

/* Generic dark backgrounds (catch-all) */
[data-theme="light"] [style*="background: rgba(20, 27, 45"],
[data-theme="light"] [style*="background: rgba(15, 20, 33"],
[data-theme="light"] [style*="background-color: rgba(20, 27, 45"] {
    background: rgba(241, 245, 249, 0.8) !important;
}

/* Ensure all text uses theme color */
[data-theme="light"] * {
    color: inherit;
}
[data-theme="light"] body,
[data-theme="light"] .container {
    color: var(--text);
}



