/* ── Kubmix shared theme (light) ─────────────────────────────────────────
   Tema light pra todas as páginas da landing (exceto index.html, que tem o
   dele inline). Cada página precisa de:
     1. boot script inline no <head> (lê kubmix-theme do localStorage)
     2. <link rel="stylesheet" href="kbx-theme.css"> no fim do <head>
   O toggle é injetado pelo navbar-shared.js (kbxToggleTheme).
   Regras dark NÃO vivem aqui — cada página já é dark por padrão. */

/* Toggle (estrutura, vale pros dois temas) */
#kbx-shared-navbar .kbx-theme-toggle {
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(160, 160, 184, 0.95);
    width: 34px; height: 34px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
#kbx-shared-navbar .kbx-theme-toggle:hover {
    background: rgba(14, 165, 233, 0.16);
    color: #fff;
    transform: rotate(15deg);
}
#kbx-shared-navbar .kbx-theme-toggle svg { width: 17px; height: 17px; }
#kbx-shared-navbar .kbx-theme-toggle .moon { display: none; }
#kbx-shared-navbar .kbx-theme-toggle .sun { display: block; }
html[data-theme="light"] #kbx-shared-navbar .kbx-theme-toggle .moon { display: block; }
html[data-theme="light"] #kbx-shared-navbar .kbx-theme-toggle .sun { display: none; }
html[data-theme="light"] #kbx-shared-navbar .kbx-theme-toggle {
    border-color: rgba(15, 23, 42, 0.1);
    color: #475569;
}
html[data-theme="light"] #kbx-shared-navbar .kbx-theme-toggle:hover { color: #0f172a; }

/* ── Variáveis: superset dos nomes usados pelas páginas ── */
html[data-theme="light"] {
    color-scheme: light;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fbff;
    --bg-darker: #ffffff;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-subtle: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(14, 165, 233, 0.4);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent: #0284c7;
    --accent-light: #0ea5e9;
    --accent-dark: #075985;
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(15, 23, 42, 0.08);
    --navbar-bg: rgba(255, 255, 255, 0.82);
    --navbar-scrolled: rgba(255, 255, 255, 0.96);
    --shadow-card: 0 8px 28px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    /* domains.html (nomes curtos) */
    --bg: #ffffff;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] body {
    background:
        radial-gradient(900px 600px at 12% -5%, rgba(14, 165, 233, 0.10), transparent 60%),
        radial-gradient(900px 600px at 88% 8%, rgba(168, 85, 247, 0.08), transparent 60%),
        #ffffff !important;
    color: #0f172a !important;
}

/* ── Navbar compartilhado (precisa vencer o styleTag !important do JS) ── */
html[data-theme="light"] #kbx-shared-navbar.kbx-navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}
html[data-theme="light"] #kbx-shared-navbar.scrolled {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06) !important;
}
html[data-theme="light"] #kbx-shared-navbar .kbx-logo,
html[data-theme="light"] #kbx-shared-navbar .kbx-logo span { color: #0f172a !important; }
html[data-theme="light"] #kbx-shared-navbar .kbx-nav-links > li > a { color: #475569 !important; }
html[data-theme="light"] #kbx-shared-navbar .kbx-nav-links > li > a:hover,
html[data-theme="light"] #kbx-shared-navbar .kbx-nav-links a.kbx-active { color: #0f172a !important; }
html[data-theme="light"] #kbx-shared-navbar .nav-dropdown-toggle { color: #475569 !important; }
html[data-theme="light"] #kbx-shared-navbar .nav-dropdown-toggle:hover { color: #0f172a !important; }
html[data-theme="light"] #kbx-shared-navbar .kbx-btn-outline {
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
    background: #ffffff !important;
}
html[data-theme="light"] #kbx-shared-navbar .kbx-btn-outline:hover {
    background: #f8fafc !important;
    border-color: #0284c7 !important;
}
html[data-theme="light"] #kbx-shared-navbar .kbx-lang-toggle {
    background: rgba(14, 165, 233, 0.06) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: #475569 !important;
}
html[data-theme="light"] #kbx-shared-navbar .kbx-lang-toggle:hover {
    background: rgba(14, 165, 233, 0.12) !important;
    color: #0f172a !important;
}
html[data-theme="light"] #kbx-shared-navbar .kbx-lang-dropdown {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12) !important;
}
html[data-theme="light"] #kbx-shared-navbar .kbx-lang-dropdown a { color: #475569 !important; }
html[data-theme="light"] #kbx-shared-navbar .kbx-lang-dropdown a:hover {
    background: rgba(14, 165, 233, 0.06) !important;
    color: #0f172a !important;
}
html[data-theme="light"] #kbx-shared-navbar .kbx-mob-btn span { background: #475569 !important; }

/* Mega-menu (mega-menu.css é dark hardcoded) */
html[data-theme="light"] .mega-menu {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04) !important;
}
html[data-theme="light"] .mega-item-name { color: #0f172a !important; }
html[data-theme="light"] .mega-item-desc { color: #64748b !important; }
html[data-theme="light"] .mega-category-title { color: rgba(15, 23, 42, 0.5) !important; }
html[data-theme="light"] .mega-item:hover { background: #f1f5fb !important; }
html[data-theme="light"] .mega-featured {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.07), rgba(168, 85, 247, 0.06)) !important;
    border-color: rgba(14, 165, 233, 0.18) !important;
}
html[data-theme="light"] .mega-featured-text { color: #475569 !important; }
html[data-theme="light"] .mega-featured-text strong { color: #0f172a !important; }

/* Mobile nav */
html[data-theme="light"] .kbx-mob-nav { background: rgba(255, 255, 255, 0.98) !important; }
html[data-theme="light"] .kbx-mob-nav .kbx-mob-header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-theme="light"] .kbx-mob-nav .kbx-mob-logo,
html[data-theme="light"] .kbx-mob-nav .kbx-mob-close { color: #0f172a !important; }
html[data-theme="light"] .kbx-mob-nav .kbx-mob-section-label { color: rgba(15, 23, 42, 0.5) !important; }
html[data-theme="light"] .kbx-mob-nav .kbx-mob-card,
html[data-theme="light"] .kbx-mob-nav .kbx-mob-card-title { color: #0f172a !important; }
html[data-theme="light"] .kbx-mob-nav .kbx-mob-card-sub { color: rgba(15, 23, 42, 0.65) !important; }
html[data-theme="light"] .kbx-mob-nav .kbx-mob-links a { color: #334155 !important; }
html[data-theme="light"] .kbx-mob-nav .kbx-mob-links a:hover { background: rgba(15, 23, 42, 0.04) !important; color: #0f172a !important; }
html[data-theme="light"] .kbx-mob-nav .kbx-mob-divider { background: rgba(15, 23, 42, 0.08) !important; }
html[data-theme="light"] .kbx-mob-nav .kbx-mob-signin {
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
    background: #ffffff !important;
}

/* ── Footer v2 (replicado inline em várias páginas) ── */
html[data-theme="light"] .footer,
html[data-theme="light"] .footer-v2 {
    background: #f8fafc !important;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}
html[data-theme="light"] .footer a,
html[data-theme="light"] .footer-v2 a { color: #475569; }
html[data-theme="light"] .footer a:hover,
html[data-theme="light"] .footer-v2 a:hover { color: #0284c7; }
html[data-theme="light"] .footer h4,
html[data-theme="light"] .footer-v2 h4,
html[data-theme="light"] .footer-v2-col h4,
html[data-theme="light"] .footer-v2-brand-block span,
html[data-theme="light"] .footer-logo span { color: #0f172a !important; }
html[data-theme="light"] .footer-v2-bottom { border-top-color: rgba(15, 23, 42, 0.08) !important; }

/* ── Componentes genéricos ── */
html[data-theme="light"] h1, html[data-theme="light"] h2, html[data-theme="light"] h3 { color: var(--text-primary, #0f172a); }
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #94a3b8; }

/* Containers de card (classe terminando em "card") ganham sombra suave.
   NÃO usar [class*="card"]: pegaria filhos como calc-card-title/-icon. */
html[data-theme="light"] [class$="card"],
html[data-theme="light"] [class*="card "] {
    box-shadow: var(--shadow-card);
}

/* ── partners.html ── */
/* Badges/pílulas com texto pastel (cyan/lavanda) somem no branco */
html[data-theme="light"] .partners-hero-badge { color: #7c3aed; }
html[data-theme="light"] .model-card-badge { color: #0369a1; }
html[data-theme="light"] .model-card.purple .model-card-badge { color: #7c3aed; }

/* ── affiliates.html ── */
/* h1 usava gradiente branco→cinza-claro (invisível no branco) */
html[data-theme="light"] .hero-affiliate h1 {
    background-image: linear-gradient(135deg, #0f172a 0%, #334155 100%);
}
/* Glows vermelhos do tema de afiliados ficam discretos como no dark */
html[data-theme="light"] .hero-affiliate::before { opacity: 0.45; }
html[data-theme="light"] .how-it-works {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.045) 0%, rgba(249, 115, 22, 0.03) 100%);
}
