/* ══════════════════════════════════════════════════════════════
   LIGHT THEME FIX — Global Admin + Frontend
   Loaded in admin/templates/footer.php or header.php
   Only activates when [data-theme="light"] is on <html>
   ══════════════════════════════════════════════════════════════ */

/* ── BASE ── */
[data-theme="light"] body { background: #f5f7fa !important; color: #1e293b !important; }
[data-theme="light"] .main-content,
[data-theme="light"] .content-area,
[data-theme="light"] .page-content { background: #f5f7fa !important; color: #1e293b !important; }

/* ── SIDEBAR ── */
[data-theme="light"] .sidebar,
[data-theme="light"] .admin-sidebar,
[data-theme="light"] nav.sidebar { background: #fff !important; border-right: 1px solid #e2e8f0 !important; color: #334155 !important; }
[data-theme="light"] .sidebar a,
[data-theme="light"] .admin-sidebar a { color: #475569 !important; }
[data-theme="light"] .sidebar a:hover,
[data-theme="light"] .admin-sidebar a:hover { background: #f1f5f9 !important; color: #6366f1 !important; }
[data-theme="light"] .sidebar a.active,
[data-theme="light"] .admin-sidebar a.active { background: rgba(99,102,241,.08) !important; color: #6366f1 !important; }
[data-theme="light"] .sidebar .section-title,
[data-theme="light"] .sidebar .menu-section-title { color: #94a3b8 !important; }

/* ── TOP HEADER BAR ── */
[data-theme="light"] .top-bar,
[data-theme="light"] .admin-header,
[data-theme="light"] header.top-bar { background: #fff !important; border-bottom: 1px solid #e2e8f0 !important; color: #1e293b !important; }
[data-theme="light"] .top-bar a,
[data-theme="light"] .admin-header a { color: #475569 !important; }

/* ── CARDS ── */
[data-theme="light"] .card,
[data-theme="light"] .stat-card,
[data-theme="light"] .panel,
[data-theme="light"] .widget { background: #fff !important; border-color: #e2e8f0 !important; color: #334155 !important; box-shadow: 0 1px 3px rgba(0,0,0,.04) !important; }

/* ── TABLES ── */
[data-theme="light"] table th { background: #f8fafc !important; color: #475569 !important; border-color: #e2e8f0 !important; }
[data-theme="light"] table td { color: #334155 !important; border-color: #f1f5f9 !important; }
[data-theme="light"] table tr:hover td { background: #f8fafc !important; }
[data-theme="light"] table { color: #334155 !important; }

/* ── FORMS ── */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="search"],
[data-theme="light"] input[type="url"],
[data-theme="light"] input[type="tel"],
[data-theme="light"] textarea,
[data-theme="light"] select { background: #fff !important; color: #1e293b !important; border-color: #d1d5db !important; }
[data-theme="light"] input::placeholder { color: #9ca3b8 !important; }

/* ── DROPDOWNS / MENUS ── */
[data-theme="light"] .dropdown-menu,
[data-theme="light"] .menu-dropdown,
[data-theme="light"] .notification-dropdown { background: #fff !important; border-color: #e2e8f0 !important; box-shadow: 0 4px 16px rgba(0,0,0,.08) !important; }
[data-theme="light"] .dropdown-menu a,
[data-theme="light"] .dropdown-item { color: #334155 !important; }
[data-theme="light"] .dropdown-menu a:hover,
[data-theme="light"] .dropdown-item:hover { background: #f1f5f9 !important; }

/* ── MODALS ── */
[data-theme="light"] .modal-content,
[data-theme="light"] .modal-dialog .modal-body,
[data-theme="light"] [class*="modal"] > div { background: #fff !important; color: #1e293b !important; border-color: #e2e8f0 !important; }

/* ── BUTTONS ── */
[data-theme="light"] .btn-outline,
[data-theme="light"] .btn-secondary { color: #475569 !important; border-color: #d1d5db !important; background: #fff !important; }
[data-theme="light"] .btn-outline:hover { background: #f1f5f9 !important; }

/* ── BADGES / PILLS ── */
[data-theme="light"] .badge { color: inherit !important; }

/* ── TEXT OVERRIDES ── */
[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3,
[data-theme="light"] h4, [data-theme="light"] h5, [data-theme="light"] h6 { color: #1e293b !important; }
[data-theme="light"] p, [data-theme="light"] span, [data-theme="light"] div,
[data-theme="light"] li, [data-theme="light"] label { color: inherit; }
[data-theme="light"] a { color: #6366f1; }
[data-theme="light"] .text-muted, [data-theme="light"] .text-secondary { color: #64748b !important; }

/* ── CODE BLOCKS ── */
[data-theme="light"] code, [data-theme="light"] pre { background: #f1f5f9 !important; color: #334155 !important; }

/* ── SCROLLBAR ── */
[data-theme="light"] ::-webkit-scrollbar { background: #f1f5f9; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ── FOOTER ── */
[data-theme="light"] footer,
[data-theme="light"] .admin-footer { background: #fff !important; border-top: 1px solid #e2e8f0 !important; color: #64748b !important; }

/* ── TOASTS / NOTIFICATIONS ── */
[data-theme="light"] .toast, [data-theme="light"] .notification-item { color: #fff !important; }

/* ── SPECIFIC PLATFORM PAGES ── */

/* CVE / Threat Feed */
[data-theme="light"] .cve-card, [data-theme="light"] .threat-card { background: #fff !important; border-color: #e2e8f0 !important; color: #334155 !important; }
[data-theme="light"] .cve-card h3, [data-theme="light"] .threat-card h3 { color: #1e293b !important; }
[data-theme="light"] .cve-published, [data-theme="light"] .cve-score { color: #475569 !important; }

/* Darkweb Monitor */
[data-theme="light"] .darkweb-card, [data-theme="light"] .finding-card { background: #fff !important; border-color: #e2e8f0 !important; color: #334155 !important; }

/* Assessment */
[data-theme="light"] .assessment-card, [data-theme="light"] .domain-card { background: #fff !important; color: #334155 !important; }

/* Dashboard widgets */
[data-theme="light"] .dash-widget, [data-theme="light"] .chart-container { background: #fff !important; border-color: #e2e8f0 !important; }

/* Community / Messages */
[data-theme="light"] .message-bubble, [data-theme="light"] .post-card { background: #fff !important; color: #334155 !important; border-color: #e2e8f0 !important; }

/* Settings */
[data-theme="light"] .settings-section, [data-theme="light"] .config-panel { background: #fff !important; border-color: #e2e8f0 !important; }

/* Search overlay */
[data-theme="light"] .search-overlay { background: rgba(255,255,255,.95) !important; }
[data-theme="light"] .search-overlay input { background: #f8fafc !important; color: #1e293b !important; border-color: #e2e8f0 !important; }

/* Announcement cards */
[data-theme="light"] .announcement-card { background: #fff !important; border-color: #e2e8f0 !important; color: #334155 !important; }

/* Tab content areas */
[data-theme="light"] .tab-content, [data-theme="light"] .tab-pane { background: transparent !important; color: #334155 !important; }

/* Ensure no white-on-white text anywhere */
[data-theme="light"] [style*="color: #fff"],
[data-theme="light"] [style*="color:#fff"],
[data-theme="light"] [style*="color: white"],
[data-theme="light"] [style*="color:white"] { color: #1e293b !important; }

/* Exception: buttons with colored backgrounds keep white text */
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-success,
[data-theme="light"] .btn-danger,
[data-theme="light"] .btn-warning,
[data-theme="light"] [class*="btn-"][style*="background"] { color: #fff !important; }

/* footer-fix-v2 */
[data-theme="light"] footer,[data-theme="light"] .site-footer,[data-theme="light"] .footer-main{display:block!important;visibility:visible!important;color:rgba(255,255,255,0.7)!important;background:#0a0e14!important}
[data-theme="light"] .site-footer a,[data-theme="light"] footer a{color:rgba(255,255,255,0.8)!important}
[data-theme="light"] .site-footer h3,[data-theme="light"] .site-footer h4,[data-theme="light"] footer h3,[data-theme="light"] footer h4{color:#00ff88!important}

/* session-timeout-solid */
#session-timeout-overlay,[id*="session"][id*="timeout"],.session-timeout-modal,.session-expiring{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:rgba(0,0,0,.85)!important}
