/* ============================================
   PRE-LOGIN PAGES – LIGHT MODE OVERRIDES
   Covers: login, legal, pricing, guides
   ============================================ */

/* ====== BODY & BASE TEXT ====== */
[data-theme="light"] body {
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 25%, #dce3ed 50%, #e2e8f0 75%, #f0f4f8 100%) !important;
    color: #1e293b !important;
}

/* ====== ANIMATED BACKGROUNDS / OVERLAYS ====== */
[data-theme="light"] .animated-bg {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8ecf4 50%, #f1f5f9 100%) !important;
}

[data-theme="light"] .animated-bg::before {
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 35%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 70%, rgba(6, 182, 212, 0.04) 0%, transparent 35%) !important;
}

[data-theme="light"] .grid-bg {
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px) !important;
}

/* Glowing orbs – tone down dramatically */
[data-theme="light"] .glow-orb,
[data-theme="light"] .glow-orb-1,
[data-theme="light"] .glow-orb-2,
[data-theme="light"] .glow-orb-3,
[data-theme="light"] .glowing-orb-guide,
[data-theme="light"] .glowing-orb-guide-1,
[data-theme="light"] .glowing-orb-guide-2,
[data-theme="light"] .glowing-orb-guide-3 {
    opacity: 0.15 !important;
}

/* body::before decorative gradient overlay */
[data-theme="light"] body::before {
    opacity: 0.15 !important;
}

/* ====== FLOATING INTEGRATIONS (login page) ====== */
[data-theme="light"] .floating-integration {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .floating-integration .fi-title {
    color: #1e293b !important;
}

[data-theme="light"] .floating-integration .fi-info {
    color: #64748b !important;
}

[data-theme="light"] .floating-integration .fi-name {
    color: #334155 !important;
}

[data-theme="light"] .floating-integration .fi-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* ====== HERO SECTION (login/homepage) ====== */
[data-theme="light"] .hero-section h1,
[data-theme="light"] .hero-title {
    color: #1e293b !important;
}

[data-theme="light"] .hero-title .gradient-text {
    -webkit-text-fill-color: initial !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .hero-section p,
[data-theme="light"] .hero-subtitle {
    color: #475569 !important;
}

[data-theme="light"] .hero-badge {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
    color: #4f46e5 !important;
}

[data-theme="light"] .hero-badge-pulse {
    background: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .btn-hero-secondary {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #1e293b !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
}

[data-theme="light"] .btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* ====== SECTION HEADERS (used across login page) ====== */
[data-theme="light"] .section-title,
[data-theme="light"] .page-title {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: #1e293b !important;
}

[data-theme="light"] .section-subtitle,
[data-theme="light"] .page-subtitle,
[data-theme="light"] .section-header .section-subtitle {
    color: #64748b !important;
}

[data-theme="light"] .section-badge {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}

/* ====== FEATURES SECTION (login page) ====== */
[data-theme="light"] .feature-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: blur(20px) !important;
}

[data-theme="light"] .feature-card:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12) !important;
}

[data-theme="light"] .feature-card.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .feature-card h3,
[data-theme="light"] .feature-card-title {
    color: #1e293b !important;
}

[data-theme="light"] .feature-card p,
[data-theme="light"] .feature-card-desc {
    color: #64748b !important;
}

[data-theme="light"] .feature-card-link:hover {
    color: #4f46e5 !important;
}

/* ====== INTEGRATIONS MARQUEE (login page) ====== */
[data-theme="light"] .integration-item {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .integration-item:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1) !important;
}

[data-theme="light"] .integration-name {
    color: #1e293b !important;
}

[data-theme="light"] .integration-desc {
    color: #64748b !important;
}

[data-theme="light"] .integrations-title {
    color: #64748b !important;
}

/* ====== STATS SECTION (login page) ====== */
[data-theme="light"] .stat-item {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(15, 23, 42, 0.06) !important;
}

[data-theme="light"] .stat-item:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}

[data-theme="light"] .stat-label {
    color: #64748b !important;
}

/* ====== SHOWCASE SECTION (login page – integration cards) ====== */
[data-theme="light"] .showcase-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .showcase-card:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .showcase-title {
    color: #1e293b !important;
}

[data-theme="light"] .showcase-subtitle {
    color: #64748b !important;
}

[data-theme="light"] .showcase-desc {
    color: #475569 !important;
}

[data-theme="light"] .showcase-feature-tag {
    background: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: #475569 !important;
}

/* ====== STEPS / HOW IT WORKS (login page) ====== */
[data-theme="light"] .step-title {
    color: #1e293b !important;
}

[data-theme="light"] .step-desc {
    color: #64748b !important;
}

/* ====== CTA SECTION (login page) ====== */
[data-theme="light"] .cta-container {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .cta-title {
    color: #1e293b !important;
}

[data-theme="light"] .cta-desc {
    color: #475569 !important;
}

/* ====== GUIDES DROPDOWN (login page mega-menu) ====== */
[data-theme="light"] .guides-dropdown-overlay {
    background: rgba(0, 0, 0, 0.3) !important;
}

[data-theme="light"] .guides-dropdown-content {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .guides-dropdown-header {
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .guides-dropdown-header h3 {
    color: #1e293b !important;
}

[data-theme="light"] .guide-link-item {
    background: rgba(15, 23, 42, 0.03) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #334155 !important;
}

[data-theme="light"] .guide-link-item:hover {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
    color: #4f46e5 !important;
}

/* ====== LEGAL PAGES ====== */
[data-theme="light"] .legal-container {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .legal-header {
    border-bottom-color: rgba(99, 102, 241, 0.2) !important;
}

[data-theme="light"] .legal-header .last-updated {
    color: #64748b !important;
}

[data-theme="light"] .legal-content {
    color: #334155 !important;
}

[data-theme="light"] .legal-content h2 {
    color: #4f46e5 !important;
}

[data-theme="light"] .legal-content h3 {
    color: #6366f1 !important;
}

[data-theme="light"] .legal-content strong {
    color: #1e293b !important;
}

[data-theme="light"] .legal-content a {
    color: #4f46e5 !important;
}

[data-theme="light"] .contact-info {
    background: rgba(99, 102, 241, 0.06) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}

/* Legal infographics */
[data-theme="light"] .infographic-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.06)) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .infographic-title {
    color: #4f46e5 !important;
}

[data-theme="light"] .data-flow-item {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .data-flow-item h4 {
    color: #1e293b !important;
}

[data-theme="light"] .data-flow-item p {
    color: #64748b !important;
}

[data-theme="light"] .right-card {
    background: rgba(16, 185, 129, 0.06) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

[data-theme="light"] .right-card h5 {
    color: #1e293b !important;
}

[data-theme="light"] .right-card p {
    color: #64748b !important;
}

[data-theme="light"] .integration-badge {
    background: rgba(99, 102, 241, 0.08) !important;
    color: #334155 !important;
}

/* Legal inter-document navigation (inline styles override) */
[data-theme="light"] .legal-container [style*="background: rgba(99,102,241,0.08)"] {
    background: rgba(99, 102, 241, 0.05) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .legal-container [style*="background: rgba(255,255,255,0.07)"] {
    background: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: #475569 !important;
}

[data-theme="light"] .legal-container [style*="background: rgba(99,102,241,0.25)"] {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #4f46e5 !important;
}

/* ====== PRICING PAGE ====== */
[data-theme="light"] .pricing-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .pricing-card.featured {
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12) !important;
}

[data-theme="light"] .pricing-card h3,
[data-theme="light"] .pricing-card .price {
    color: #1e293b !important;
}

[data-theme="light"] .pricing-card .features li {
    color: #475569 !important;
}

[data-theme="light"] .pricing-header h1,
[data-theme="light"] .pricing-header h2 {
    color: #1e293b !important;
}

[data-theme="light"] .pricing-header p {
    color: #64748b !important;
}

/* ====== GUIDES INDEX PAGE ====== */
[data-theme="light"] .guides-container {
    background: transparent !important;
    box-shadow: none !important;
}

[data-theme="light"] .guides-header {
    border-bottom-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .guides-header p {
    color: #64748b !important;
}

[data-theme="light"] .quick-start {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.06)) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .quick-step {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .quick-step:hover {
    background: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="light"] .quick-step-content h4 {
    color: #1e293b !important;
}

[data-theme="light"] .quick-step-content p {
    color: #64748b !important;
}

[data-theme="light"] .section-header {
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .section-header h2 {
    color: #4f46e5 !important;
}

[data-theme="light"] .section-header h2 i {
    color: #6366f1 !important;
}

/* Guide cards (index page) */
[data-theme="light"] .guide-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .guide-card:hover {
    border-color: rgba(99, 102, 241, 0.35) !important;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12) !important;
}

[data-theme="light"] .guide-card h2 {
    color: #1e293b !important;
}

[data-theme="light"] .guide-card h3,
[data-theme="light"] .guide-card .guide-title {
    color: #1e293b !important;
}

[data-theme="light"] .guide-card p,
[data-theme="light"] .guide-card .guide-description {
    color: #64748b !important;
}

[data-theme="light"] .guide-card-features li {
    color: #475569 !important;
}

/* ====== GUIDE SUBPAGES (e.g. dashboard.ejs, repairs.ejs, etc.) ====== */
[data-theme="light"] .guide-container {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .guide-header {
    border-bottom-color: rgba(99, 102, 241, 0.2) !important;
}

[data-theme="light"] .guide-content {
    color: #334155 !important;
}

[data-theme="light"] .guide-content p {
    color: #334155 !important;
}

[data-theme="light"] .guide-content li {
    color: #334155 !important;
}

[data-theme="light"] .guide-content h2 {
    color: #4f46e5 !important;
    border-left-color: #4f46e5 !important;
}

[data-theme="light"] .guide-content h3 {
    color: #6366f1 !important;
}

/* Feature/step/tip boxes inside guides */
[data-theme="light"] .feature-box {
    background: rgba(99, 102, 241, 0.06) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .step-box {
    background: rgba(16, 185, 129, 0.06) !important;
}

[data-theme="light"] .tip-box {
    background: rgba(245, 158, 11, 0.06) !important;
}

[data-theme="light"] .feature-box h4,
[data-theme="light"] .feature-box p,
[data-theme="light"] .step-box p,
[data-theme="light"] .tip-box p {
    color: #334155 !important;
}

[data-theme="light"] .feature-box li,
[data-theme="light"] .step-box li,
[data-theme="light"] .tip-box li {
    color: #334155 !important;
}

/* Nav links inside guide pages */
[data-theme="light"] .nav-links {
    border-top-color: rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .nav-link.secondary {
    background: rgba(15, 23, 42, 0.06) !important;
    color: #334155 !important;
}

[data-theme="light"] .nav-link.secondary:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #4f46e5 !important;
}

/* Back link (guides index) */
[data-theme="light"] .back-link {
    color: white !important;
}

/* ====== DPA / SUB-PROCESSORS TABLE STYLES ====== */
[data-theme="light"] table {
    border-color: rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] th {
    background: rgba(99, 102, 241, 0.08) !important;
    color: #1e293b !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] td {
    color: #334155 !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.02) !important;
}

/* ====== AUTH PAGES (register, forgot-password, reset-password, 2fa) ====== */
[data-theme="light"] .auth-container,
[data-theme="light"] .login-container {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .auth-container h1,
[data-theme="light"] .auth-container h2,
[data-theme="light"] .login-container h1,
[data-theme="light"] .login-container h2 {
    color: #1e293b !important;
}

[data-theme="light"] .auth-container p,
[data-theme="light"] .login-container p {
    color: #64748b !important;
}

[data-theme="light"] .auth-container label,
[data-theme="light"] .login-container label {
    color: #475569 !important;
}

[data-theme="light"] .auth-container input,
[data-theme="light"] .login-container input {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #1e293b !important;
}

[data-theme="light"] .auth-container a,
[data-theme="light"] .login-container a {
    color: #4f46e5 !important;
}

/* ====== COOKIE BANNER ====== */
[data-theme="light"] .cookie-banner {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08) !important;
    color: #334155 !important;
}

/* ====== FOOTER ====== */
[data-theme="light"] .footer-section,
[data-theme="light"] footer,
[data-theme="light"] .landing-footer {
    background: rgba(255, 255, 255, 0.7) !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] footer a,
[data-theme="light"] .landing-footer a {
    color: #64748b !important;
}

[data-theme="light"] footer a:hover,
[data-theme="light"] .landing-footer a:hover {
    color: #4f46e5 !important;
}

[data-theme="light"] footer h3,
[data-theme="light"] footer h4,
[data-theme="light"] .landing-footer h3,
[data-theme="light"] .landing-footer h4 {
    color: #1e293b !important;
}

[data-theme="light"] footer p,
[data-theme="light"] .landing-footer p {
    color: #64748b !important;
}

[data-theme="light"] footer li,
[data-theme="light"] .landing-footer li {
    color: #64748b !important;
}

/* ====== TRUST BADGES / INTEGRATION CARDS ====== */
[data-theme="light"] .trust-badge,
[data-theme="light"] .integration-card {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* ====== GLASS/ELEVATED SURFACES (inline style overrides) ====== */
[data-theme="light"] [style*="rgba(30, 41, 59"] {
    background-color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="light"] [style*="rgba(15, 23, 42"] {
    background-color: rgba(255, 255, 255, 0.8) !important;
}

/* ====== WHITE TEXT INLINE STYLE FALLBACKS ====== */
[data-theme="light"] [style*="color: #ffffff"],
[data-theme="light"] [style*="color:#ffffff"],
[data-theme="light"] [style*="color: white"],
[data-theme="light"] [style*="color:#fff"],
[data-theme="light"] [style*="color: #fff"] {
    color: #1e293b !important;
}

[data-theme="light"] [style*="color: rgba(255, 255, 255, 0.9)"],
[data-theme="light"] [style*="color: rgba(255,255,255,0.9)"] {
    color: #334155 !important;
}

[data-theme="light"] [style*="color: rgba(255, 255, 255, 0.8)"],
[data-theme="light"] [style*="color: rgba(255,255,255,0.8)"] {
    color: #475569 !important;
}

[data-theme="light"] [style*="color: rgba(255, 255, 255, 0.7)"],
[data-theme="light"] [style*="color: rgba(255,255,255,0.7)"] {
    color: #64748b !important;
}

[data-theme="light"] [style*="color: rgba(255, 255, 255, 0.6)"],
[data-theme="light"] [style*="color: rgba(255,255,255,0.6)"] {
    color: #94a3b8 !important;
}

[data-theme="light"] [style*="color: rgba(255, 255, 255, 0.55)"],
[data-theme="light"] [style*="color: rgba(255,255,255,0.55)"] {
    color: #94a3b8 !important;
}

[data-theme="light"] [style*="color: rgba(255, 255, 255, 0.5)"],
[data-theme="light"] [style*="color: rgba(255,255,255,0.5)"] {
    color: #94a3b8 !important;
}

/* White-alpha borders */
[data-theme="light"] [style*="border: 1px solid rgba(255, 255, 255"],
[data-theme="light"] [style*="border: 1px solid rgba(255,255,255"] {
    border-color: rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] [style*="border-bottom: 1px solid rgba(255, 255, 255"],
[data-theme="light"] [style*="border-bottom: 1px solid rgba(255,255,255"] {
    border-bottom-color: rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] [style*="border-top: 1px solid rgba(255, 255, 255"],
[data-theme="light"] [style*="border-top: 1px solid rgba(255,255,255"] {
    border-top-color: rgba(15, 23, 42, 0.1) !important;
}

/* White-alpha backgrounds */
[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.0"],
[data-theme="light"] [style*="background: rgba(255,255,255,0.0"],
[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.1"],
[data-theme="light"] [style*="background: rgba(255,255,255,0.1"] {
    background: rgba(15, 23, 42, 0.04) !important;
}

/* Dark-alpha backgrounds in inline styles */
[data-theme="light"] [style*="background: rgba(0, 0, 0, 0."],
[data-theme="light"] [style*="background: rgba(0,0,0,0."] {
    background: rgba(15, 23, 42, 0.03) !important;
}
