/* ==========================================================================
   XPROTECT — LIGHT THEME
   Activated by <html data-theme="light"> (toggle in the header, saved in
   localStorage "xp-theme", or ?theme=light). Dark stays the default.
   Every rule is scoped to html[data-theme="light"] so dark mode is untouched.
   ========================================================================== */

html[data-theme="light"] {
  color-scheme: light;
  --bg-dark: #f5f6fb;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.86);
  --border-subtle: rgba(15, 23, 42, 0.10);
  --border-light: rgba(15, 23, 42, 0.16);
  --border-glow: rgba(37, 99, 235, 0.30);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --shadow-glow-blue: 0 10px 30px -14px rgba(37, 99, 235, 0.35);
  --shadow-glow-green: 0 10px 30px -14px rgba(16, 185, 129, 0.35);
  --shadow-glow-purple: 0 10px 30px -14px rgba(124, 58, 237, 0.35);

  /* light tokens shared by the rules below */
  --lt-bg: #f5f6fb;
  --lt-surface: #ffffff;
  --lt-surface-2: #f1f3f9;
  --lt-line: rgba(15, 23, 42, 0.10);
  --lt-line-2: rgba(15, 23, 42, 0.16);
  --lt-text: #0f172a;
  --lt-text-2: #334155;
  --lt-muted: #64748b;
  --lt-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -14px rgba(15, 23, 42, 0.16);
}

/* smooth switch only while toggling (never on first paint) */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease, fill 0.2s ease !important;
}

html[data-theme="light"] body {
  background: var(--lt-bg) !important;
  color: var(--lt-text) !important;
}
html[data-theme="light"] ::selection { background: rgba(37, 99, 235, 0.18); color: inherit; }

/* ---------- Top info bar ---------- */
html[data-theme="light"] .top-info-bar {
  background: #ffffff !important;
  border-bottom-color: var(--lt-line) !important;
  color: var(--lt-text) !important;
}
html[data-theme="light"] .top-info-bar::after { opacity: 0.55; }
html[data-theme="light"] .ip-display {
  background: var(--lt-surface-2);
  border-color: var(--lt-line);
  color: var(--lt-muted) !important;
}
html[data-theme="light"] .ip-display:hover { color: var(--lt-text) !important; border-color: var(--lt-line-2); background: #e9edf5; }
html[data-theme="light"] .ip-display i { color: #2563eb !important; }
html[data-theme="light"] .ip-display #user-ip-address { color: var(--lt-text); }
html[data-theme="light"] .dns-status-pill { box-shadow: none; }
html[data-theme="light"] .dns-status-pill.status-protected {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
}
html[data-theme="light"] .dns-status-pill.status-unprotected {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #991b1b !important;
}
html[data-theme="light"] .dns-status-pill.status-checking {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1e40af !important;
}
html[data-theme="light"] .dns-brand-name { color: inherit; font-weight: 600; }
html[data-theme="light"] .status-protected i.status-icon { color: #059669; }
html[data-theme="light"] .status-unprotected i.status-icon { color: #dc2626; }
html[data-theme="light"] .dns-setup-btn {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff !important;
}
html[data-theme="light"] .dns-setup-btn:hover { background: #b91c1c; }
html[data-theme="light"] .dns-status i.fa-rotate-right { color: var(--lt-muted) !important; }

/* ---------- Header & menu ---------- */
html[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid var(--lt-line) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02) !important;
}
html[data-theme="light"] .nav-brand,
html[data-theme="light"] .nav-brand span { color: var(--lt-text) !important; }
html[data-theme="light"] .menu li a { color: #334155 !important; }
html[data-theme="light"] .menu li a:hover,
html[data-theme="light"] .menu li.active > a { color: #fff !important; }
html[data-theme="light"] .submenu {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(124, 98, 219, 0.08) !important;
}
html[data-theme="light"] .submenu li a:hover { background: #f8fafc !important; border-color: rgba(124, 98, 219, 0.32) !important; }
html[data-theme="light"] .submenu li a,
html[data-theme="light"] .submenu li a:hover { color: var(--lt-text) !important; }
html[data-theme="light"] .tool-title { color: var(--lt-text) !important; }
html[data-theme="light"] .tool-desc { color: var(--lt-muted) !important; }
html[data-theme="light"] .tool-info i { color: #6d55ce !important; }
@media (min-width: 992px) {
  html[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.88) !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }
  html[data-theme="light"] .navbar > .menu {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  }
  html[data-theme="light"] .navbar > .menu > li > a {
    color: #334155 !important;
  }
  html[data-theme="light"] .navbar > .menu > li > a > i:first-child {
    color: #64748b !important;
  }
  html[data-theme="light"] .navbar > .menu > li > a:hover,
  html[data-theme="light"] .navbar > .menu > li.submenu-wrapper:hover > a,
  html[data-theme="light"] .navbar > .menu > li.submenu-wrapper.mega-hover > a,
  html[data-theme="light"] .navbar > .menu > li.submenu-wrapper:focus-within > a {
    background: #ffffff !important;
    border-color: rgba(124, 98, 219, 0.3) !important;
    color: #0f172a !important;
  }
  html[data-theme="light"] .navbar > .menu > li.active > a {
    background: #ffffff !important;
    border-color: rgba(124, 98, 219, 0.42) !important;
    color: #4c1d95 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06) !important;
  }
  html[data-theme="light"] .xp-mega-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 30px 65px -15px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(124, 98, 219, 0.08) !important;
  }
  html[data-theme="light"] .xp-mega-spotlight {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-right-color: #e2e8f0 !important;
  }
  html[data-theme="light"] .xp-spotlight-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
  }
  html[data-theme="light"] .xp-spotlight--vault {
    background: linear-gradient(145deg, rgba(124, 98, 219, 0.07) 0%, #ffffff 100%) !important;
    border-color: rgba(124, 98, 219, 0.25) !important;
  }
  html[data-theme="light"] .xp-spotlight--yara {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.07) 0%, #ffffff 100%) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
  }
  html[data-theme="light"] .xp-spotlight-card:hover,
  html[data-theme="light"] .xp-spotlight-card.is-current {
    box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.14) !important;
  }
  html[data-theme="light"] .xp-spotlight-title,
  html[data-theme="light"] .xp-item-title {
    color: #0f172a !important;
  }
  html[data-theme="light"] .xp-spotlight-desc,
  html[data-theme="light"] .xp-item-desc,
  html[data-theme="light"] .xp-spotlight-trust,
  html[data-theme="light"] .xp-mega-footer-note {
    color: #475569 !important;
  }
  html[data-theme="light"] .xp-pill--new {
    background: rgba(234, 88, 12, 0.1) !important;
    border-color: rgba(234, 88, 12, 0.3) !important;
    color: #c2410c !important;
  }
  html[data-theme="light"] .xp-pill--top {
    background: rgba(5, 150, 105, 0.1) !important;
    border-color: rgba(5, 150, 105, 0.3) !important;
    color: #047857 !important;
  }
  html[data-theme="light"] .xp-mega-item:hover,
  html[data-theme="light"] .xp-mega-item.is-current {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
  }
  html[data-theme="light"] .xp-mega-footer {
    background: #f8fafc !important;
    border-top-color: #e2e8f0 !important;
  }
  html[data-theme="light"] .xp-mega-quicklink {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
  }
  html[data-theme="light"] .xp-mega-quicklink:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }
  html[data-theme="light"] .xp-mega-quicklink--primary {
    background: rgba(124, 98, 219, 0.12) !important;
    border-color: rgba(124, 98, 219, 0.35) !important;
    color: #5b21b6 !important;
  }
  html[data-theme="light"] .xp-mega-quicklink--primary:hover {
    background: rgba(124, 98, 219, 0.2) !important;
    color: #4c1d95 !important;
  }
}
html[data-theme="light"] .hamburger-line,
html[data-theme="light"] .toggle-btn .icon span { background: #0f172a !important; }
html[data-theme="light"] .hamburger-circle {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
html[data-theme="light"] .toggle-btn.open .hamburger-circle,
html[data-theme="light"] .toggle-btn.active .hamburger-circle {
  background: rgba(124, 98, 219, 0.12) !important;
  border-color: rgba(124, 98, 219, 0.36) !important;
}
html[data-theme="light"] .xp-pill--new {
  background: rgba(234, 88, 12, 0.1) !important;
  border-color: rgba(234, 88, 12, 0.3) !important;
  color: #c2410c !important;
}
html[data-theme="light"] .xp-pill--top {
  background: rgba(5, 150, 105, 0.1) !important;
  border-color: rgba(5, 150, 105, 0.3) !important;
  color: #047857 !important;
}

html[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border-color: var(--lt-line-2);
  color: #334155;
}
html[data-theme="light"] .theme-toggle:hover { background: #f1f5f9; }

html[data-theme="light"] #login-button,
html[data-theme="light"] .btn-webauth {
  background: #ffffff !important;
  border-color: rgba(124, 98, 219, 0.35) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.1) !important;
}
html[data-theme="light"] #login-button .btn-wallet-icon,
html[data-theme="light"] .btn-webauth .btn-wallet-icon {
  color: #6d55ce !important;
}
html[data-theme="light"] #login-button #arrow {
  color: #64748b !important;
}
@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] #login-button:hover,
  html[data-theme="light"] .btn-webauth:hover {
    background: #f8fafc !important;
    border-color: #7c62db !important;
  }
}
html[data-theme="light"] #dropdown {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(124, 98, 219, 0.08) !important;
}
html[data-theme="light"] .wallet-user-header {
  background: #f8fafc !important;
  border-color: rgba(124, 98, 219, 0.25) !important;
  color: #5b21b6 !important;
}
html[data-theme="light"] .wallet-user-icon { color: #6d55ce !important; }
html[data-theme="light"] .wallet-item { color: var(--lt-text) !important; }
html[data-theme="light"] .wallet-item.cursor-default,
html[data-theme="light"] .wallet-item[style*="cursor: default"] { color: #475569 !important; }
html[data-theme="light"] .wallet-item:hover:not(.cursor-default):not([style*="cursor: default"]):not(.wallet-user-header) { background: rgba(124, 98, 219, 0.1) !important; color: #4338ca !important; }
html[data-theme="light"] #logout-option { color: #dc2626 !important; }
html[data-theme="light"] #logout-option:hover { background: rgba(239, 68, 68, 0.1) !important; color: #b91c1c !important; }
html[data-theme="light"] .wallet-divider { background: #e2e8f0 !important; }

@media (max-width: 991px) {
  html[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }
  html[data-theme="light"] .menu {
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid rgba(124, 98, 219, 0.2) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 28px 56px -16px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.04) !important;
  }
  html[data-theme="light"] .menu > li > a {
    color: #334155 !important;
  }
  html[data-theme="light"] .menu > li > a > i:first-child {
    color: #64748b !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
  }
  html[data-theme="light"] .menu > li > a:active,
  html[data-theme="light"] .menu > li.submenu-wrapper.open > a {
    background: #f8fafc !important;
    border-color: rgba(124, 98, 219, 0.3) !important;
    color: #0f172a !important;
  }
  html[data-theme="light"] .menu > li.active > a {
    background: rgba(124, 98, 219, 0.1) !important;
    border-color: rgba(124, 98, 219, 0.36) !important;
    color: #4c1d95 !important;
    box-shadow: none !important;
  }
  html[data-theme="light"] .menu > li > a:active > i:first-child,
  html[data-theme="light"] .menu > li.submenu-wrapper.open > a > i:first-child,
  html[data-theme="light"] .menu > li.active > a > i:first-child {
    color: #6d28d9 !important;
    background: rgba(124, 98, 219, 0.12) !important;
    border-color: rgba(124, 98, 219, 0.28) !important;
  }
  html[data-theme="light"] .submenu {
    background: #f8fafc !important;
    box-shadow: inset 0 0 0 1px #e2e8f0 !important;
  }
  html[data-theme="light"] .submenu li a:hover,
  html[data-theme="light"] .submenu li a:active,
  html[data-theme="light"] .submenu li a.is-current {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
  }
  html[data-theme="light"] .submenu .tool-title {
    color: #0f172a !important;
  }
  html[data-theme="light"] .submenu .tool-desc {
    color: #475569 !important;
  }
  html[data-theme="light"] .submenu .tool-info .xp-item-icon i {
    color: inherit !important;
  }
}

/* ---------- Footer ---------- */
html[data-theme="light"] .site-footer {
  background: #ffffff !important;
  border-top: 1px solid var(--lt-line) !important;
}
html[data-theme="light"] .footer-logo,
html[data-theme="light"] .footer-col h4 { color: var(--lt-text) !important; }
html[data-theme="light"] .footer-desc { color: var(--lt-text-2) !important; }
html[data-theme="light"] .footer-links a,
html[data-theme="light"] .footer-legal-btn { color: #475569 !important; }
html[data-theme="light"] .footer-links a:hover,
html[data-theme="light"] .footer-legal-btn:hover { color: #1d4ed8 !important; }
html[data-theme="light"] .footer-bottom { border-color: var(--lt-line) !important; color: var(--lt-muted) !important; }
html[data-theme="light"] .footer-social-btn {
  background: var(--lt-surface-2);
  border-color: var(--lt-line);
  color: #475569 !important;
}
html[data-theme="light"] .footer-social-btn:hover { background: #2563eb; border-color: #2563eb; color: #fff !important; }
html[data-theme="light"] .footer-status-pill { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }

/* ---------- Modals (shared) ---------- */
html[data-theme="light"] .modal-overlay { background: rgba(15, 23, 42, 0.45); }
html[data-theme="light"] .modal-container {
  background: #ffffff !important;
  border-color: var(--lt-line) !important;
  box-shadow: 0 30px 70px -20px rgba(15, 23, 42, 0.45) !important;
  color: var(--lt-text);
}
html[data-theme="light"] .modal-header { border-bottom-color: var(--lt-line) !important; }
html[data-theme="light"] .modal-header h2,
html[data-theme="light"] .modal-header h3,
html[data-theme="light"] .modal-title { color: var(--lt-text) !important; }
html[data-theme="light"] .modal-body { color: var(--lt-text-2); }
html[data-theme="light"] .modal-close-btn { color: var(--lt-muted) !important; background: var(--lt-surface-2) !important; border-color: var(--lt-line) !important; }
html[data-theme="light"] .modal-close-btn:hover { color: var(--lt-text) !important; }

/* ---------- Under attack modal ---------- */
html[data-theme="light"] .ua-fab { box-shadow: 0 8px 20px -10px rgba(153, 27, 27, 0.6); }
html[data-theme="light"] .ua-modal { background: #ffffff !important; border-color: #fecaca !important; }
html[data-theme="light"] .ua-head { background: linear-gradient(180deg, #fef2f2, #ffffff) !important; border-bottom-color: var(--lt-line) !important; }
html[data-theme="light"] .ua-title h2 { color: var(--lt-text); }
html[data-theme="light"] .ua-title p { color: var(--lt-muted); }
html[data-theme="light"] .ua-title-icon { background: #fee2e2; border-color: #fecaca; color: #dc2626; }
html[data-theme="light"] .ua-label { color: var(--lt-text); }
html[data-theme="light"] .ua-label i, html[data-theme="light"] .ua-hint { color: var(--lt-muted); }
html[data-theme="light"] .ua-input,
html[data-theme="light"] .ua-textarea {
  background: #ffffff;
  border-color: var(--lt-line-2);
  color: var(--lt-text);
}
html[data-theme="light"] .ua-input::placeholder, html[data-theme="light"] .ua-textarea::placeholder { color: #94a3b8; }
html[data-theme="light"] .ua-input:focus, html[data-theme="light"] .ua-textarea:focus { background: #fff; border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14); }
html[data-theme="light"] .ua-seg { background: var(--lt-surface-2); border-color: var(--lt-line); }
html[data-theme="light"] .ua-seg label { color: #475569; }
html[data-theme="light"] .ua-seg label:hover { color: var(--lt-text); }
html[data-theme="light"] .ua-seg input:checked + label { color: #fff; }
html[data-theme="light"] .ua-note { background: var(--lt-surface-2); border-color: var(--lt-line); color: #475569; }
html[data-theme="light"] .ua-note i { color: #7c3aed; }
html[data-theme="light"] .ua-auth.is-in { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
html[data-theme="light"] .ua-auth.is-out { background: #fffbeb; border-color: #fde68a; color: #92400e; }
html[data-theme="light"] .ua-status.is-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
html[data-theme="light"] .ua-status.is-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
html[data-theme="light"] .ua-btn-ghost { background: #ffffff; border-color: var(--lt-line-2); color: #334155; }
html[data-theme="light"] .ua-btn-ghost:hover { background: var(--lt-surface-2); color: var(--lt-text); }
@media (max-width: 640px) {
  html[data-theme="light"] .ua-actions { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 22%); }
}

/* ---------- Generic form controls ---------- */
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color-scheme: light;
}

/* ==========================================================================
   PAGE FIXES (on top of the generated /assets/css/light/<page>.css)
   ========================================================================== */

/* ---------- Home ---------- */
html[data-theme="light"][data-page="home"] {
  --primary-orange: #e06a00;
  --text-dim: #475569;
}
html[data-theme="light"][data-page="home"] .text-gradient {
  background-image: linear-gradient(135deg, #0f172a 0%, #334155 100%) !important;
}
html[data-theme="light"][data-page="home"] .hero-btn-secondary {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
html[data-theme="light"][data-page="home"] .hero-btn-secondary:hover { background: #f1f5f9 !important; }
html[data-theme="light"][data-page="home"] .hero-stats-row { background: #ffffff; border-color: rgba(15, 23, 42, 0.1); box-shadow: var(--lt-card-shadow); }
html[data-theme="light"][data-page="home"] .sherlock-audit-card { box-shadow: 0 24px 50px -24px rgba(15, 23, 42, 0.28) !important; }
html[data-theme="light"][data-page="home"] .hero-bg-glow { opacity: 0.6; }
html[data-theme="light"][data-page="home"] .orange-gradient { background-image: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important; }
html[data-theme="light"][data-page="home"] #new_columns-1038-47 h1,
html[data-theme="light"][data-page="home"] #new_columns-1038-47 h2,
html[data-theme="light"][data-page="home"] #new_columns-1038-47 .ct-headline,
html[data-theme="light"][data-page="home"] #new_columns-1038-47 .ct-text-block { color: #ffffff !important; }
html[data-theme="light"][data-page="home"] #_tabs-1149-47,
html[data-theme="light"][data-page="home"] #_tabs_contents-1181-47 { border: 1px solid rgba(15, 23, 42, 0.08) !important; box-shadow: var(--lt-card-shadow) !important; }

/* ---------- Shared accents on light surfaces ---------- */
html[data-theme="light"] .text-gradient,
html[data-theme="light"] .gradient-text {
  background-image: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ---------- Tailwind utility pages (My DNS, Bug Hunter) ---------- */
html[data-theme="light"] .text-white { color: #0f172a !important; }
html[data-theme="light"] .text-gray-100,
html[data-theme="light"] .text-gray-200 { color: #1e293b !important; }
html[data-theme="light"] .text-gray-300 { color: #334155 !important; }
html[data-theme="light"] .text-gray-400 { color: #475569 !important; }
html[data-theme="light"] .text-gray-500 { color: #64748b !important; }
html[data-theme="light"] .text-blue-200,
html[data-theme="light"] .text-blue-300,
html[data-theme="light"] .text-blue-400 { color: #1d4ed8 !important; }
html[data-theme="light"] .text-green-200,
html[data-theme="light"] .text-green-300,
html[data-theme="light"] .text-green-400,
html[data-theme="light"] .text-green-500 { color: #047857 !important; }
html[data-theme="light"] .text-teal-400 { color: #0f766e !important; }
html[data-theme="light"] .text-red-300,
html[data-theme="light"] .text-red-400 { color: #b91c1c !important; }
html[data-theme="light"] .text-yellow-400,
html[data-theme="light"] .text-amber-200,
html[data-theme="light"] .text-amber-300 { color: #a16207 !important; }
html[data-theme="light"] .text-orange-400 { color: #c2410c !important; }
html[data-theme="light"] .text-purple-200,
html[data-theme="light"] .text-purple-400 { color: #6d28d9 !important; }
html[data-theme="light"] .hover\:text-white:hover { color: #1d4ed8 !important; }
html[data-theme="light"] .bg-slate-800 { background-color: #f1f5f9 !important; }
html[data-theme="light"] .border-gray-800 { border-color: #e2e8f0 !important; }
/* white text must stay white on solid / gradient fills */
html[data-theme="light"] [class*="bg-gradient-to"],
html[data-theme="light"] [class*="bg-gradient-to"] *,
html[data-theme="light"] .bg-blue-600, html[data-theme="light"] .bg-blue-600 *,
html[data-theme="light"] .bg-green-500, html[data-theme="light"] .bg-green-500 *,
html[data-theme="light"] .bg-gray-500, html[data-theme="light"] .bg-gray-500 *,
html[data-theme="light"] .btn-primary, html[data-theme="light"] .btn-primary *,
html[data-theme="light"] .setup-step-num { color: #ffffff !important; }

/* ---------- XPR Block Producers ---------- */
html[data-theme="light"] .bp-dash {
  --bp-card: #ffffff;
  --bp-card-2: #ffffff;
  --bp-line: rgba(15, 23, 42, 0.09);
  --bp-text: #0f172a;
  --bp-muted: #64748b;
  --bp-primary: #0369a1;
  --bp-violet: #6d28d9;
  --bp-ok: #047857;
  --bp-warn: #c2410c;
  --bp-bad: #be123c;
}
html[data-theme="light"] .bp-dash .bp-chip.is-gov,
html[data-theme="light"] .bp-dash .bp-chip.is-good { color: #047857; }
html[data-theme="light"] .bp-dash .bp-kv > b.lvl-medium,
html[data-theme="light"] .bp-dash .bp-kv > b.lvl-note { color: #fff; }

/* ---------- Browser scan ---------- */
html[data-theme="light"] #xr-start, html[data-theme="light"] #xr-start * { color: #ffffff !important; }

/* ---------- Scan domain ---------- */
html[data-theme="light"] .xprotect-scanner-wrap {
  --cyan: #0284c7;
  --green: #059669;
  --amber: #d97706;
  --orange: #ea580c;
  --crit: #e11d48;
}
html[data-theme="light"] .xprotect-scanner-wrap .tab-btn .tab-count.bad { color: #fff !important; }
html[data-theme="light"] .xprotect-scanner-wrap .verdict-title span { color: color-mix(in srgb, var(--vtone, #0284c7) 72%, #000) !important; }
html[data-theme="light"] #map-container {
  background-color: #f3f6fb !important;
  background-image: radial-gradient(rgba(37, 99, 235, 0.10) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
}
html[data-theme="light"] .country-tooltip {
  background: #ffffff !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
  color: #1d4ed8 !important;
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.25) !important;
}
/* IP pin tooltip is built with inline dark styles in scanner-engine.js */
html[data-theme="light"] .custom-map-tooltip > div {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.3) !important;
}
html[data-theme="light"] .custom-map-tooltip > div strong { color: #0369a1 !important; }
html[data-theme="light"] .custom-map-tooltip > div div { color: #334155 !important; }
html[data-theme="light"] .country-tooltip::before { border-top-color: #ffffff !important; }

/* ---------- White text on accent fills (tabs, chips, counters) ---------- */
html[data-theme="light"][data-page] .bp-dash .bp-tab[aria-selected="true"],
html[data-theme="light"][data-page] .bp-dash .bp-dapps,
html[data-theme="light"][data-page] .bp-dash .bp-bubble,
html[data-theme="light"][data-page] .tab-btn.active,
html[data-theme="light"][data-page] .tab-btn.active *,
html[data-theme="light"][data-page] .tab-btn .tab-new,
html[data-theme="light"][data-page] .setup-step-num,
html[data-theme="light"][data-page] .btn-primary,
html[data-theme="light"][data-page] .btn-primary * { color: #ffffff !important; }

/* ---------- Browser scan: attack-surface map (SVG) ---------- */
html[data-theme="light"] .xr-orbit { stroke: rgba(15, 23, 42, 0.16) !important; }
html[data-theme="light"] .xr-edge { stroke-opacity: 0.6 !important; }
html[data-theme="light"] .xr-edge.is-hot { stroke-opacity: 1 !important; filter: none !important; }
html[data-theme="light"] .xr-leaf-edge { stroke-opacity: 0.55 !important; }
html[data-theme="light"] .xr-leaf circle:not(.xr-leaf-pulse) { stroke: #ffffff !important; }
html[data-theme="light"] .xr-hub-ring { fill: #ffffff !important; filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.12)); }
html[data-theme="light"] .xr-hub:hover .xr-hub-ring { fill: #f1f5f9 !important; }
html[data-theme="light"] .xr-hub-ico { filter: saturate(1.2) brightness(0.8); }
html[data-theme="light"] .xr-hub-label { fill: #334155 !important; }
html[data-theme="light"] .xr-core-ring { fill: #eef2ff !important; stroke: #6366f1 !important; }
html[data-theme="light"] .xr-core-ring2 { stroke: rgba(99, 102, 241, 0.45) !important; }
html[data-theme="light"] .xr-core-ico { color: #4f46e5 !important; }
html[data-theme="light"] .xr-core-label { fill: #0f172a !important; }
html[data-theme="light"] .xr-web { stroke: rgba(15, 23, 42, 0.12) !important; }
html[data-theme="light"] .xr-web:last-of-type { stroke: rgba(15, 23, 42, 0.22) !important; }
html[data-theme="light"] .xr-spoke { stroke: rgba(15, 23, 42, 0.1) !important; }
html[data-theme="light"] .xr-area { filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.3)) !important; stroke: #6366f1 !important; }
html[data-theme="light"] .xr-axis-label { fill: #334155 !important; }
html[data-theme="light"] .xr-axis-val { fill: #64748b !important; }
html[data-theme="light"] .xr-axis-row b { color: #0f172a !important; }
html[data-theme="light"] .xr-axis-bar { background: rgba(15, 23, 42, 0.08) !important; }
html[data-theme="light"] .xr-tip { background: #ffffff !important; box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.3) !important; }

/* ---------- Bug Hunter ---------- */
html[data-theme="light"] .xprotect-bughunter-wrap {
  --bh-solid-card: #ffffff;
  --bh-solid-line: rgba(15, 23, 42, 0.08);
}

/* ---------- Buy credits modal ---------- */
html[data-theme="light"] .package-card { background: #ffffff !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
html[data-theme="light"] .package-card:hover { background: #eff6ff !important; border-color: #3b82f6 !important; }
html[data-theme="light"] .package-price { background: #2563eb !important; color: #ffffff !important; }

/* ---------- Home: WebAuth notice, audit card, iOS block ---------- */
html[data-theme="light"][data-page="home"] #div_block-1111-47 {
  background-image: none !important;
  background-color: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: none !important;
}
html[data-theme="light"][data-page="home"] #text_block-1112-47,
html[data-theme="light"][data-page="home"] #text_block-1112-47 * { color: #1e3a8a !important; }
html[data-theme="light"][data-page="home"] #text_block-1112-47 a { color: #1d4ed8 !important; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
html[data-theme="light"][data-page="home"] #text_block-1112-47 img,
html[data-theme="light"][data-page="home"] #div_block-1111-47 img { filter: none; }
html[data-theme="light"][data-page="home"] #div_block-804-47 { background-color: #f5f6fb !important; }
html[data-theme="light"] .xprotect-bughunter-wrap .program-card { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 20px -14px rgba(15, 23, 42, 0.25) !important; }
html[data-theme="light"] .xprotect-bughunter-wrap .program-card:hover { background: #ffffff !important; border-color: rgba(37, 99, 235, 0.35) !important; }
html[data-theme="light"] .xr-ring-track { stroke: rgba(15, 23, 42, 0.08) !important; }
html[data-theme="light"] .xr-ring-ticks { stroke: rgba(15, 23, 42, 0.2) !important; }

/* ---------- Mobile menu: tapped items keep readable text ---------- */
html[data-theme="light"] .top-info-bar::after { display: none !important; }

/* ---------- Scan: tabs, count badges, search input ---------- */
html[data-theme="light"][data-page="scan"] .xprotect-scanner-wrap .tab-btn:hover:not(.active) { color: #1d4ed8 !important; background-color: #eff6ff !important; }
html[data-theme="light"][data-page="scan"] .xprotect-scanner-wrap .tab-btn.active,
html[data-theme="light"][data-page="scan"] .xprotect-scanner-wrap .tab-btn.active:hover { color: #fff !important; background-color: #2563eb !important; }
html[data-theme="light"][data-page="scan"] .xprotect-scanner-wrap .tab-btn .tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px !important; border-radius: 999px !important;
  font-size: 10.5px; line-height: 1; font-variant-numeric: tabular-nums;
}
html[data-theme="light"][data-page="scan"] .xprotect-scanner-wrap .tab-btn .tab-count.bad { background-color: #e11d48 !important; color: #fff !important; }
html[data-theme="light"][data-page="scan"] .xprotect-scanner-wrap .tab-btn.active .tab-count:not(.bad) { background-color: rgba(255, 255, 255, 0.22) !important; }
html[data-theme="light"][data-page="scan"] .xprotect-scanner-wrap .search-input { border: 0 !important; background: transparent !important; box-shadow: none !important; }

/* ---------- Bug Hunter: nav tabs (Overview / Bounty Programs / Leaderboard ...) ---------- */
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .tab-btn:hover:not(.active) { color: #1d4ed8 !important; background-color: #eff6ff !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .tab-btn.active,
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .tab-btn.active:hover { color: #fff !important; background-color: var(--accent-blue) !important; }

/* ---------- Bug Hunter: AI agents, dashboard, redacted rows, code blocks (2026-11) ---------- */
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-strong { color: #0f172a !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-violet { color: #7c3aed !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-link { color: #1d4ed8 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-surface,
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-table-wrap,
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .overflow-x-auto.rounded-xl[style*="rgba(15, 23, 42"] { background: #ffffff !important; border: 1px solid rgba(15, 23, 42, 0.10) !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-feature,
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-check,
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-agent-prog,
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-info-row,
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-stat { background: #f8fafc !important; border: 1px solid rgba(15, 23, 42, 0.10) !important; color: #0f172a !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-agent-prog.cursor-pointer:hover { background: #eff6ff !important; border-color: #bfdbfe !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-feature span, html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-check small, html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-stat span { color: #64748b !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-feature b, html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-check b, html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-stat b { color: #0f172a !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-feature i { color: #7c3aed !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap #mine-accepted { color: #047857 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap #mine-pending, html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap #mine-earned { color: #b45309 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-callout { color: #334155 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-callout-blue { background: #eff6ff !important; border: 1px solid #bfdbfe !important; color: #1e3a8a !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-callout-green { background: #ecfdf5 !important; border: 1px solid #a7f3d0 !important; color: #065f46 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-callout-red { background: #fef2f2 !important; border: 1px solid #fecaca !important; color: #7f1d1d !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-callout-purple { background: #f5f3ff !important; border: 1px solid #ddd6fe !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-callout code { background: rgba(15, 23, 42, 0.06); padding: 0 4px; border-radius: 4px; color: inherit; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-code { background: #0f172a !important; border: 1px solid #1e293b !important; color: #bfdbfe !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-code-block { background: #0f172a !important; border: 1px solid #1e293b !important; color: #bfdbfe !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-code-block code { color: inherit !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-inline-code { background: #eef2ff !important; border: 1px solid #c7d2fe !important; color: #3730a3 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-agent-pill { background: #f5f3ff !important; border: 1px solid #ddd6fe !important; color: #6d28d9 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-sev-Undisclosed { background: #f1f5f9 !important; border: 1px dashed #94a3b8 !important; color: #475569 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-policy { background: #faf5ff !important; border: 1px solid #e9d5ff !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-policy .whitespace-pre-wrap { color: #334155 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-owner-settings { background: #eff6ff !important; border: 1px solid #bfdbfe !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-owner-settings summary { color: #1d4ed8 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-ai-promo { background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%) !important; border: 1px solid #ddd6fe !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-ai-promo h4 { color: #0f172a !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-ai-promo p { color: #475569 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-ai-promo li { color: #334155 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-ai-promo li i { color: #7c3aed !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .bh-ai-promo-kicker { background: #ede9fe !important; color: #6d28d9 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap #tab-agents i { color: #7c3aed !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap #tab-mine i { color: #059669 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap #tab-agents.active i, html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap #tab-mine.active i { color: #ffffff !important; }
/* light-on-dark accent colours used inline by rendered rows -> readable on white */
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap [style*="color:#fcd34d"], html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap [style*="color:#fbbf24"] { color: #b45309 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap [style*="color:#a7f3d0"] { color: #047857 !important; }
html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap [style*="color:#9ca3af"] { color: #64748b !important; }
@media (max-width: 640px) {
  html[data-theme="light"][data-page="bug-hunter"] .xprotect-bughunter-wrap .tabs-header { background: rgba(255, 255, 255, 0.92) !important; }
}
