/**
 * TBE Light Theme — overrides for [data-tbe-theme="light"]
 * Load after tbe-global.css and tbe-dashboard.css.
 */

/* ── Light design tokens ── */
[data-tbe-theme="light"] #tbe-wrapper,
[data-tbe-theme="light"] #tbe-dashboard {
    --tbe-canvas: #f4f5f7;
    --tbe-panel: #ffffff;
    --tbe-surface: #ffffff;
    --tbe-interactive: rgba(0, 0, 0, 0.04);
    --tbe-text: #111827;
    --tbe-muted: #6b7280;
    --tbe-disabled: #9ca3af;
    --tbe-indigo: #635bff;
    --tbe-indigo-hover: #4f46e5;
    --tbe-fire: #e63946;
    --tbe-border: rgba(0, 0, 0, 0.08);
    --tbe-border-strong: rgba(0, 0, 0, 0.12);
    --tbe-shadow-indigo: 0 4px 14px rgba(99, 91, 255, 0.18);
}

[data-tbe-theme="light"] {
    --tbev-canvas: #f4f5f7;
    --tbev-panel: #ffffff;
    --tbev-card: #ffffff;
    --tbev-text: #111827;
    --tbev-muted: #6b7280;
    --tbev-disabled: #9ca3af;
    --tbev-purple: #635bff;
    --tbev-purple-hover: #4f46e5;
    --tbev-fire: #e63946;
    --tbev-border: rgba(0, 0, 0, 0.08);
    --tbev-border-strong: rgba(0, 0, 0, 0.12);
    --tbev-input-bg: rgba(0, 0, 0, 0.04);
    /* Root aliases for pages styling html/body directly */
    --tbe-canvas: #f4f5f7;
    --tbe-panel: #ffffff;
    --tbe-surface: #ffffff;
    --tbe-text: #111827;
    --tbe-muted: #6b7280;
    --tbe-border: rgba(0, 0, 0, 0.08);
}

/* ── Global shell ── */
[data-tbe-theme="light"] html,
[data-tbe-theme="light"] body {
    background-color: #f4f5f7 !important;
    color: #111827 !important;
}

[data-tbe-theme="light"] #tbe-global-loader {
    background: #f4f5f7 !important;
}

[data-tbe-theme="light"] .tbe-tour-overlay {
    background: rgba(0, 0, 0, 0.35);
}

[data-tbe-theme="light"] .tbe-spotlight {
    box-shadow: 0 0 0 4px var(--tbe-indigo), 0 0 40px rgba(0, 0, 0, 0.12);
}

/* ── Tailwind utility overrides (#tbe-wrapper scoped) ── */
[data-tbe-theme="light"] #tbe-wrapper .bg-tbe-bg,
[data-tbe-theme="light"] #tbe-dashboard .bg-tbe-bg { background-color: #f4f5f7 !important; }

[data-tbe-theme="light"] #tbe-wrapper .bg-tbe-card,
[data-tbe-theme="light"] #tbe-dashboard .bg-tbe-card,
[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#1A1D27\],
[data-tbe-theme="light"] #tbe-dashboard .bg-\[\#1A1D27\] { background-color: #ffffff !important; }

[data-tbe-theme="light"] #tbe-wrapper .bg-tbe-hover,
[data-tbe-theme="light"] #tbe-dashboard .bg-tbe-hover,
[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#12151E\],
[data-tbe-theme="light"] #tbe-dashboard .bg-\[\#12151E\] { background-color: #f0f1f5 !important; }

[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#0B0D14\],
[data-tbe-theme="light"] #tbe-dashboard .bg-\[\#0B0D14\] { background-color: #f4f5f7 !important; }

[data-tbe-theme="light"] #tbe-wrapper .bg-tbe-input,
[data-tbe-theme="light"] #tbe-dashboard .bg-tbe-input { background-color: rgba(0, 0, 0, 0.04) !important; }

[data-tbe-theme="light"] #tbe-wrapper .text-tbe-text,
[data-tbe-theme="light"] #tbe-dashboard .text-tbe-text,
[data-tbe-theme="light"] #tbe-wrapper .text-\[\#F3F4F6\],
[data-tbe-theme="light"] #tbe-dashboard .text-\[\#F3F4F6\] { color: #111827 !important; }

[data-tbe-theme="light"] #tbe-wrapper .text-tbe-muted,
[data-tbe-theme="light"] #tbe-dashboard .text-tbe-muted { color: #6b7280 !important; }

[data-tbe-theme="light"] #tbe-wrapper .border-tbe-border,
[data-tbe-theme="light"] #tbe-dashboard .border-tbe-border { border-color: rgba(0, 0, 0, 0.08) !important; }

/* bg-tbe-border is rgb(42,45,53) in tbe-global — fix count badges */
[data-tbe-theme="light"] #tbe-wrapper .bg-tbe-border,
[data-tbe-theme="light"] #tbe-dashboard .bg-tbe-border {
    background-color: rgba(99, 91, 255, 0.1) !important;
    color: #635bff !important;
}
[data-tbe-theme="light"] #tbe-wrapper #total-badge,
[data-tbe-theme="light"] #tbe-wrapper span.bg-tbe-border.text-tbe-muted {
    background-color: rgba(99, 91, 255, 0.1) !important;
    color: #635bff !important;
    border: 1px solid rgba(99, 91, 255, 0.2);
}

/* Add Teacher button — indigo in light (not gold/white ghost) */
[data-tbe-theme="light"] #tbe-wrapper .tbe-btn-add-teacher,
[data-tbe-theme="light"] #tbe-dashboard .tbe-btn-add-teacher {
    color: #635bff !important;
    background: rgba(99, 91, 255, 0.08) !important;
    border: 1px solid rgba(99, 91, 255, 0.45) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-btn-add-teacher:hover,
[data-tbe-theme="light"] #tbe-dashboard .tbe-btn-add-teacher:hover {
    color: #ffffff !important;
    background: #635bff !important;
    border-color: #635bff !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-btn-add-teacher svg,
[data-tbe-theme="light"] #tbe-dashboard .tbe-btn-add-teacher svg {
    color: #635bff !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-btn-add-teacher:hover svg,
[data-tbe-theme="light"] #tbe-dashboard .tbe-btn-add-teacher:hover svg {
    color: #ffffff !important;
}

[data-tbe-theme="light"] #tbe-wrapper .hover\:bg-white\/5:hover,
[data-tbe-theme="light"] #tbe-dashboard .hover\:bg-white\/5:hover { background-color: rgba(0, 0, 0, 0.04) !important; }

[data-tbe-theme="light"] #tbe-wrapper .hover\:text-tbe-text:hover,
[data-tbe-theme="light"] #tbe-dashboard .hover\:text-tbe-text:hover { color: #111827 !important; }

[data-tbe-theme="light"] #main-sidebar #tbe-sidebar-toggle {
    background-color: #ffffff !important;
}

/* ── Settings page (.set-*) ── */
[data-tbe-theme="light"] #tbe-main-content > header {
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

[data-tbe-theme="light"] #tbe-main-content > header h1 { color: var(--tbe-text) !important; }

[data-tbe-theme="light"] .set-rail a:hover { background: var(--tbe-interactive); color: var(--tbe-text); }
[data-tbe-theme="light"] .set-rail a.is-active { color: #4f46e5; background: rgba(99, 91, 255, 0.08); }
[data-tbe-theme="light"] .set-pills a { border-color: var(--tbe-border); }
[data-tbe-theme="light"] .set-card { background: var(--tbe-surface); border-color: var(--tbe-border); }
[data-tbe-theme="light"] .set-h2 { color: var(--tbe-text); }
[data-tbe-theme="light"] .set-input,
[data-tbe-theme="light"] .set-input-wrap input {
    background: var(--tbev-input-bg);
    border-color: var(--tbe-border);
    color: var(--tbe-text);
}
[data-tbe-theme="light"] .set-btn-ghost {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--tbe-border);
    color: #374151;
}
[data-tbe-theme="light"] .set-btn-ghost:hover { background: var(--tbe-interactive); color: var(--tbe-text); }
[data-tbe-theme="light"] .set-kv span:last-child { color: #374151; }
[data-tbe-theme="light"] .set-badge-beta {
    background: rgba(99, 91, 255, 0.1);
    color: #4f46e5;
    border-color: rgba(99, 91, 255, 0.25);
}
[data-tbe-theme="light"] .set-pills a.is-active {
    color: #4f46e5;
    border-color: rgba(99, 91, 255, 0.35);
    background: rgba(99, 91, 255, 0.1);
}
[data-tbe-theme="light"] .set-unsaved-bar {
    background: rgba(255, 255, 255, 0.92) !important;
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .set-unsaved-title { color: #6b7280 !important; }
[data-tbe-theme="light"] .set-unsaved-txt { color: #111827 !important; }
[data-tbe-theme="light"] .set-switch-label { color: var(--tbe-text) !important; }

/* ── Home (index.html) ── */
[data-tbe-theme="light"] #tbe-home-root .topbar {
    background: rgba(255, 255, 255, 0.88) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-home-root .brand-link { color: #111827 !important; }
[data-tbe-theme="light"] #tbe-home-root .btn-ghost {
    color: #374151 !important;
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-tbe-theme="light"] #tbe-home-root .btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}
[data-tbe-theme="light"] #tbe-home-root .hero {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-home-root .hero h1 { color: #111827 !important; }
[data-tbe-theme="light"] #tbe-home-root .hero p { color: #6b7280 !important; }
[data-tbe-theme="light"] #tbe-home-root .card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-home-root .card h3 { color: #111827 !important; }
[data-tbe-theme="light"] #tbe-home-root .card p { color: #6b7280 !important; }
[data-tbe-theme="light"] #tbe-home-root footer {
    border-top-color: rgba(0, 0, 0, 0.08) !important;
    color: #6b7280 !important;
}

/* ── Legal pages ── */
[data-tbe-theme="light"] #tbe-legal-root .topbar {
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-legal-root .chip {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #6b7280;
}
[data-tbe-theme="light"] #tbe-legal-root .hero {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-legal-root .hero h1 { color: #111827 !important; }
[data-tbe-theme="light"] #tbe-legal-root .prose,
[data-tbe-theme="light"] #tbe-legal-root .prose p,
[data-tbe-theme="light"] #tbe-legal-root .prose li { color: #374151 !important; }
[data-tbe-theme="light"] #tbe-legal-root a { color: #4f46e5 !important; }
[data-tbe-theme="light"] #tbe-legal-root footer {
    border-top-color: rgba(0, 0, 0, 0.08) !important;
    color: #6b7280 !important;
}

/* ── Login ── */
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100dvh !important;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #111827;
    background-color: #f4f5f7;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 91, 255, 0.12), transparent 60%),
        radial-gradient(ellipse 60% 50% at 20% 100%, rgba(79, 70, 229, 0.08), transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 90%, rgba(230, 57, 70, 0.05), transparent 55%),
        url('https://teachingbusinessenglish.com.br/wp-content/uploads/2026/04/bg-login.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(244, 245, 247, 0.15) 0%, rgba(244, 245, 247, 0.88) 100%);
    pointer-events: none;
    z-index: 0;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 input:-webkit-autofill,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 input:-webkit-autofill:hover,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 input:-webkit-autofill:focus,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #111827 !important;
}

/* Login form card + inputs (Tailwind CDN uses dark tbe.* tokens) */
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .tbe-glass {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(244, 245, 247, 0.92) 100%) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04) inset !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .tbe-glass-highlight {
    background: linear-gradient(90deg, transparent, rgba(99, 91, 255, 0.25), transparent) !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .text-tbe-text,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 h1,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 label {
    color: #111827 !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .text-tbe-muted,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 p {
    color: #4b5563 !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 input,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .bg-tbe-input,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .bg-black\/25 {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 #open-reset-btn {
    color: #4b5563 !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 #open-reset-btn:hover {
    color: #635bff !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 input::placeholder {
    color: #9ca3af !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .border-tbe-border {
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 #tbe-mode-toggle {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 #tbe-mode-toggle button {
    color: #6b7280 !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 #tbe-mode-toggle button.active {
    color: #ffffff !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .tbe-divider {
    color: #9ca3af !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .tbe-divider::before,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .tbe-divider::after {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent) !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .tbe-sso-btn {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #374151 !important;
}
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 .tbe-sso-btn:hover {
    background: rgba(99, 91, 255, 0.06) !important;
    border-color: rgba(99, 91, 255, 0.25) !important;
    color: #635bff !important;
}
[data-tbe-theme="light"] #reset-modal-card.tbe-glass,
[data-tbe-theme="light"] #tbe-login-wrapper-X9J2K1 #reset-modal .tbe-glass {
    background: #ffffff !important;
    color: #111827 !important;
}

/* ── Flatpickr (caderno) ── */
[data-tbe-theme="light"] .flatpickr-calendar {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}
[data-tbe-theme="light"] .flatpickr-months .flatpickr-month,
[data-tbe-theme="light"] .flatpickr-weekdays,
[data-tbe-theme="light"] span.flatpickr-weekday {
    background: #f4f5f7 !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .flatpickr-day { color: #111827 !important; }
[data-tbe-theme="light"] .flatpickr-day:hover { background: rgba(0, 0, 0, 0.05) !important; }
[data-tbe-theme="light"] .flatpickr-day.prevMonthDay,
[data-tbe-theme="light"] .flatpickr-day.nextMonthDay { color: #9ca3af !important; }

/* ── Notifications bell dropdown ── */
[data-tbe-theme="light"] #tbe-notif-btn {
    color: #6b7280 !important;
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}
[data-tbe-theme="light"] #tbe-notif-btn:hover {
    color: #635bff !important;
    background: rgba(99, 91, 255, 0.06) !important;
    border-color: rgba(99, 91, 255, 0.25) !important;
}
[data-tbe-theme="light"] #tbe-notif-btn svg {
    stroke: currentColor !important;
}
[data-tbe-theme="light"] #tbe-notif-badge {
    border-color: #ffffff !important;
}
[data-tbe-theme="light"] #tbe-notif-panel,
[data-tbe-theme="light"] .tbe-notif-panel {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12) !important;
}
[data-tbe-theme="light"] #tbe-notif-panel > div:first-child {
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-notif-panel > div:first-child span {
    color: #111827 !important;
}
[data-tbe-theme="light"] .tbe-notif-item:hover { background: rgba(0, 0, 0, 0.04) !important; }

/* ── Lesson viewer overlay ── */
[data-tbe-theme="light"] .tbev-overlay {
    background: rgba(244, 245, 247, 0.88);
}

/* ── Lesson / exercise viewer (tbe-lesson.css tokens) ── */
[data-tbe-theme="light"] {
    --tbev-surface-inset: rgba(0, 0, 0, 0.04);
    --tbev-surface-hover: rgba(0, 0, 0, 0.04);
    --tbev-surface-subtle: rgba(0, 0, 0, 0.03);
    --tbev-surface-muted: rgba(0, 0, 0, 0.04);
    --tbev-accent-soft: #4338ca;
    --tbev-accent-term: #3730a3;
    --tbev-accent-badge: #4f46e5;
    --tbev-btn-ghost-text: #4b5563;
    --tbev-chart-track: rgba(0, 0, 0, 0.08);
    --tbev-chart-pct: #4338ca;
    --tbev-answer-key-bg: rgba(99, 91, 255, 0.06);
    --tbev-answer-key-vault-bg: rgba(99, 91, 255, 0.08);
    --tbev-pill-red-text: #b91c1c;
    --tbev-pill-yellow-text: #a16207;
    --tbev-pill-green-text: #15803d;
    --tbev-score-good-text: #15803d;
    --tbev-score-mid-text: #a16207;
    --tbev-score-bad-text: #b91c1c;
    --tbev-scrollbar-thumb: rgba(0, 0, 0, 0.12);
    --tbev-scrollbar-thumb-hover: rgba(0, 0, 0, 0.2);
    --luci-accent-text: #4338ca;
}
[data-tbe-theme="light"] .tbev-article .luci-section {
    --luci-accent-text: #4338ca;
}
[data-tbe-theme="light"] .tbev-article .luci-roleplay-label,
[data-tbe-theme="light"] .tbev-article .luci-callout--inset::before {
    color: var(--tbev-accent-soft);
}
[data-tbe-theme="light"] .tbev-article [data-luci-opt] {
    background: var(--tbev-surface-subtle);
}
[data-tbe-theme="light"] .tbev-article [data-luci-opt]:hover {
    background: var(--tbev-surface-hover);
}
[data-tbe-theme="light"] .tbev-match-row,
[data-tbe-theme="light"] .tbev-order-item,
[data-tbe-theme="light"] .tbev-cat-row,
[data-tbe-theme="light"] .tbev-mini-dlg {
    background: var(--tbev-surface-subtle);
}
[data-tbe-theme="light"] .tbev-order-up,
[data-tbe-theme="light"] .tbev-order-down {
    background: var(--tbev-surface-muted);
    color: var(--tbev-btn-ghost-text);
}
[data-tbe-theme="light"] .tbev-btn-check {
    color: #4338ca;
}
[data-tbe-theme="light"] .tbev-btn-check:hover {
    color: #312e81;
}

/* ── Caderno / notebook ── */
[data-tbe-theme="light"] html,
[data-tbe-theme="light"] body,
[data-tbe-theme="light"] #tbe-wrapper {
    background: #f4f5f7 !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .nb-tabs { background: #f0f1f5 !important; border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .nb-tab.is-active { background: #ffffff !important; color: #111827 !important; }
[data-tbe-theme="light"] #tbe-global-loader { background: #f4f5f7 !important; }

/* ── Comunidade ── */
[data-tbe-theme="light"] #tbe-comm-main { background: #f4f5f7 !important; }
[data-tbe-theme="light"] .tbe-images-grid.count-1 .img-tile img { background: #f4f5f7 !important; }

/* ── Minha agenda calendar chrome ── */
[data-tbe-theme="light"] .cal-day-header,
[data-tbe-theme="light"] .cal-corner { background: #f4f5f7 !important; border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] #tbe-global-loader { background: #f4f5f7 !important; }

/* ═══════════════════════════════════════════════════════════
   LIGHT THEME — Phase 2 fixes (shell, pages, buttons, text)
   Accent: TBE Indigo #635BFF
   ═══════════════════════════════════════════════════════════ */

/* ── Shell: footer, bottom nav, toasts, confirm modal ── */
[data-tbe-theme="light"] .tbe-global-footer {
    background: #ffffff !important;
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbe-global-footer-text { color: #6b7280 !important; }
[data-tbe-theme="light"] #tbe-bottom-nav {
    background: rgba(255, 255, 255, 0.97) !important;
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbe-nav-item { color: #6b7280 !important; }
[data-tbe-theme="light"] .tbe-nav-item:not(.active-gold):hover { color: #635bff !important; }
[data-tbe-theme="light"] .tbe-nav-item.active-gold {
    color: #635bff !important;
}
[data-tbe-theme="light"] .tbe-nav-item.active-gold::after {
    background: #635bff !important;
    box-shadow: 0 0 12px rgba(99, 91, 255, 0.35) !important;
}
[data-tbe-theme="light"] .tbe-toast.info {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #4f46e5 !important;
}
[data-tbe-theme="light"] .tbe-toast.success {
    background: #ffffff !important;
    border-color: rgba(34, 197, 94, 0.25) !important;
    color: #16a34a !important;
}
[data-tbe-theme="light"] .tbe-toast.error {
    background: #ffffff !important;
    border-color: rgba(230, 57, 70, 0.25) !important;
    color: #dc2626 !important;
}
[data-tbe-theme="light"] .tbe-toast.warning {
    background: #ffffff !important;
    border-color: rgba(234, 179, 8, 0.25) !important;
    color: #ca8a04 !important;
}
[data-tbe-theme="light"] .tbe-confirm-overlay {
    background: rgba(0, 0, 0, 0.35) !important;
}
[data-tbe-theme="light"] .tbe-confirm-card,
[data-tbe-theme="light"] #tbe-confirm-modal > div:not(:first-child) {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12) !important;
}
[data-tbe-theme="light"] #confirm-modal-title { color: #111827 !important; }
[data-tbe-theme="light"] #confirm-modal-text { color: #6b7280 !important; }
[data-tbe-theme="light"] #confirm-modal-cancel {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #6b7280 !important;
}

/* ── Sidebar nav: indigo active + hover (replace gold/white in light) ── */
[data-tbe-theme="light"] #main-sidebar nav a.text-tbe-gold,
[data-tbe-theme="light"] #main-sidebar nav a.border-tbe-gold\/20,
[data-tbe-theme="light"] #main-sidebar nav a[class*="bg-tbe-gold"] {
    background: rgba(99, 91, 255, 0.1) !important;
    color: #635bff !important;
    border-color: rgba(99, 91, 255, 0.25) !important;
    box-shadow: none !important;
}
[data-tbe-theme="light"] #main-sidebar nav a.text-tbe-muted:hover,
[data-tbe-theme="light"] #main-sidebar nav a.hover\:text-white:hover {
    color: #635bff !important;
    background: rgba(99, 91, 255, 0.06) !important;
}
[data-tbe-theme="light"] #main-sidebar #userName { color: #111827 !important; }

/* ── Extra Tailwind bg overrides ── */
[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#16181D\],
[data-tbe-theme="light"] #tbe-dashboard .bg-\[\#16181D\] { background-color: #f0f1f5 !important; }
[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#1A1C23\],
[data-tbe-theme="light"] #tbe-dashboard .bg-\[\#1A1C23\] { background-color: #ffffff !important; }
[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#0F1014\],
[data-tbe-theme="light"] #tbe-dashboard .bg-\[\#0F1014\] { background-color: #f4f5f7 !important; }
[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#0B0D14\]\/95,
[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#0B0D14\]\/95 { background-color: rgba(244, 245, 247, 0.95) !important; }
[data-tbe-theme="light"] #tbe-wrapper .bg-black\/20 { background-color: rgba(0, 0, 0, 0.04) !important; }
[data-tbe-theme="light"] #tbe-wrapper .border-white\/\[0\.08\] { border-color: rgba(0, 0, 0, 0.08) !important; }

/* ── Global text-white → dark text (keep white on indigo/colored bg) ── */
[data-tbe-theme="light"] #tbe-wrapper .text-white { color: #111827 !important; }
[data-tbe-theme="light"] #tbe-wrapper .hover\:text-white:hover { color: #635bff !important; }
[data-tbe-theme="light"] #tbe-wrapper .bg-tbe-purple,
[data-tbe-theme="light"] #tbe-wrapper .bg-tbe-purple.text-white,
[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#635BFF\],
[data-tbe-theme="light"] #tbe-wrapper .bg-\[\#635BFF\].text-white,
[data-tbe-theme="light"] #tbe-wrapper button.bg-tbe-purple,
[data-tbe-theme="light"] #tbe-wrapper a.bg-tbe-purple,
[data-tbe-theme="light"] #tbe-wrapper .nb-btn-primary,
[data-tbe-theme="light"] #tbe-wrapper button.nb-tab.nb-active,
[data-tbe-theme="light"] #tbe-wrapper .tbe-btn-primary,
[data-tbe-theme="light"] #tbe-wrapper [class*="shadow-tbe-purple"] {
    color: #ffffff !important;
}
[data-tbe-theme="light"] #tbe-wrapper input.text-white,
[data-tbe-theme="light"] #tbe-wrapper select.text-white,
[data-tbe-theme="light"] #tbe-wrapper textarea.text-white {
    color: #111827 !important;
}

/* ── Ghost / outline buttons: indigo text + border ── */
[data-tbe-theme="light"] #tbe-wrapper .tbe-btn-ghost,
[data-tbe-theme="light"] #tbe-wrapper .nb-btn-ghost,
[data-tbe-theme="light"] #tbe-wrapper button.nb-btn-ghost,
[data-tbe-theme="light"] #tbe-wrapper a.nb-btn-ghost {
    color: #635bff !important;
    border-color: rgba(99, 91, 255, 0.35) !important;
    background: transparent !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-btn-ghost:hover,
[data-tbe-theme="light"] #tbe-wrapper .nb-btn-ghost:hover,
[data-tbe-theme="light"] #tbe-wrapper button.nb-btn-ghost:hover {
    color: #4f46e5 !important;
    border-color: rgba(99, 91, 255, 0.5) !important;
    background: rgba(99, 91, 255, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .nb-btn-secondary,
[data-tbe-theme="light"] #tbe-wrapper a.nb-btn-secondary {
    background: #ffffff !important;
    color: #374151 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .nb-btn-secondary:hover,
[data-tbe-theme="light"] #tbe-wrapper a.nb-btn-secondary:hover {
    background: #f0f1f5 !important;
    color: #111827 !important;
}

/* ── KPI cards & stat numbers ── */
[data-tbe-theme="light"] #tbe-wrapper .tbe-kpi-card h3,
[data-tbe-theme="light"] #tbe-wrapper #kpi-total,
[data-tbe-theme="light"] #tbe-wrapper #kpi-new,
[data-tbe-theme="light"] #tbe-wrapper #kpi-revenue,
[data-tbe-theme="light"] #tbe-wrapper .tbe-billing-stat-card,
[data-tbe-theme="light"] #tbe-wrapper .tbe-billing-stat-card p {
    color: #111827 !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-billing-stat-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .nb-kpi {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .nb-kpi-value { color: #111827 !important; }
[data-tbe-theme="light"] .nb-kpi-label,
[data-tbe-theme="light"] .nb-kpi-sub { color: #6b7280 !important; }

/* ── Arsenal / Library ── */
[data-tbe-theme="light"] #tbe-main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
[data-tbe-theme="light"] #top-zone {
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: #ffffff !important;
}
[data-tbe-theme="light"] #top-zone > header,
[data-tbe-theme="light"] #tbe-wrapper .tbe-arsenal-header,
[data-tbe-theme="light"] #tbe-wrapper header.bg-\[\#0B0D14\]\/95 {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-breadcrumb span.bc-item.active { color: #111827 !important; }
[data-tbe-theme="light"] #tbe-breadcrumb span.bc-sep { color: #9ca3af !important; }
[data-tbe-theme="light"] #tbe-breadcrumb a { color: #6b7280 !important; }
[data-tbe-theme="light"] #tbe-breadcrumb a:hover { color: #635bff !important; }
[data-tbe-theme="light"] #tbe-breadcrumb .bc-item { color: #6b7280 !important; }
[data-tbe-theme="light"] #tbe-breadcrumb .bc-item:hover { color: #635bff !important; }
[data-tbe-theme="light"] #tbe-wrapper .ml-cat-title { color: #111827 !important; }
[data-tbe-theme="light"] #tbe-wrapper .ml-cat-title.text-tbe-purple { color: #635bff !important; }
[data-tbe-theme="light"] #tbe-wrapper .ml-cat-title:hover { color: #635bff !important; }
[data-tbe-theme="light"] #tbe-wrapper .ml-sub-link { color: #6b7280 !important; }
[data-tbe-theme="light"] #tbe-wrapper .ml-sub-link:hover { color: #111827 !important; }
[data-tbe-theme="light"] #tbe-wrapper .ml-sub-link.active { color: #635bff !important; border-left-color: #635bff !important; }
[data-tbe-theme="light"] #tbe-wrapper .ml-total,
[data-tbe-theme="light"] #tbe-wrapper .ml-total.tbe-count-badge {
    background: rgba(99, 91, 255, 0.1) !important;
    color: #635bff !important;
    border-color: rgba(99, 91, 255, 0.2) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .ml-master-rule { background: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] #tbe-level-filter {
    background: #ffffff !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-wrapper button.tbe-pill,
[data-tbe-theme="light"] #tbe-wrapper .tbe-pill {
    color: #374151 !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-pill:hover {
    color: #111827 !important;
    background: #f0f1f5 !important;
    border-color: rgba(99, 91, 255, 0.25) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-pill.active {
    color: #ffffff !important;
    background: #635bff !important;
    border-color: #635bff !important;
    box-shadow: 0 2px 8px rgba(99, 91, 255, 0.25) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-pill-sep { background: rgba(0, 0, 0, 0.1) !important; }
[data-tbe-theme="light"] .tbe-tab-bar {
    background: #f0f1f5 !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #currentViewTitle { color: #111827 !important; }
[data-tbe-theme="light"] .tbe-note-card { background: #ffffff !important; border-color: rgba(0, 0, 0, 0.08) !important; }

/* ── Caderno modals (Aula / Notas) ── */
[data-tbe-theme="light"] .nb-modal-overlay { background: rgba(0, 0, 0, 0.35) !important; }
[data-tbe-theme="light"] .nb-modal {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .nb-modal h3,
[data-tbe-theme="light"] .nb-h,
[data-tbe-theme="light"] .nb-sticky-head h2 { color: #111827 !important; }
[data-tbe-theme="light"] .nb-card,
[data-tbe-theme="light"] .nb-sticky-head,
[data-tbe-theme="light"] .nb-table-wrap {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .nb-sticky-head {
    background: linear-gradient(180deg, #f4f5f7 0%, #ffffff 100%) !important;
}
[data-tbe-theme="light"] .nb-tabs { background: #f0f1f5 !important; border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .nb-tab { color: #6b7280 !important; }
[data-tbe-theme="light"] .nb-tab.nb-active,
[data-tbe-theme="light"] #tbe-wrapper button.nb-tab.nb-active { background: #635bff !important; color: #ffffff !important; }
[data-tbe-theme="light"] .nb-table th { background: #f0f1f5 !important; color: #6b7280 !important; border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .nb-table td { border-color: rgba(0, 0, 0, 0.06) !important; color: #111827 !important; }
[data-tbe-theme="light"] .nb-field input,
[data-tbe-theme="light"] .nb-field textarea,
[data-tbe-theme="light"] .nb-field select {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] #tbe-wrapper #nb-root,
[data-tbe-theme="light"] #tbe-wrapper #nb-root *:not(.nb-btn-primary):not(.nb-tab.nb-active) {
    color: inherit;
}

/* ── AI Labs (ai-studio.html) ── */
[data-tbe-theme="light"] #tbe-wrapper,
[data-tbe-theme="light"] #tbe-main-content {
    background-color: #f4f5f7 !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] #tbe-main-content > header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #tbe-main-content > header h1 { color: #111827 !important; }
[data-tbe-theme="light"] .ai-hub-card {
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .ai-hub-title,
[data-tbe-theme="light"] .ai-hub-panel h2,
[data-tbe-theme="light"] .ai-hub-teacher .name { color: #111827 !important; }
[data-tbe-theme="light"] .ai-hub-subtitle,
[data-tbe-theme="light"] .ai-hub-panel .panel-desc { color: #6b7280 !important; }
[data-tbe-theme="light"] .ai-tab-button { color: #6b7280 !important; }
[data-tbe-theme="light"] .ai-tab-button:hover { color: #635bff !important; background: rgba(99, 91, 255, 0.06) !important; }
[data-tbe-theme="light"] .ai-tab-button.active {
    background: rgba(99, 91, 255, 0.1) !important;
    color: #635bff !important;
    border-color: rgba(99, 91, 255, 0.25) !important;
}
[data-tbe-theme="light"] .ai-hub-card input,
[data-tbe-theme="light"] .ai-hub-card select,
[data-tbe-theme="light"] .ai-hub-card textarea {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .ai-hub-tab-row { background: #f0f1f5 !important; }

/* ── Formação sidebar / playlist ── */
[data-tbe-theme="light"] .fmc-header {
    background: #ffffff !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .fmc-breadcrumb,
[data-tbe-theme="light"] .fmc-title { color: #111827 !important; }
[data-tbe-theme="light"] .fmc-playlist {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .module-item.active {
    background-color: rgba(99, 91, 255, 0.08) !important;
    border-left-color: #635bff !important;
}
[data-tbe-theme="light"] .module-item.active h4 { color: #635bff !important; }
[data-tbe-theme="light"] .fmc-search input {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .prose-tbe th { background: #f0f1f5 !important; color: #111827 !important; }
[data-tbe-theme="light"] .prose-tbe code { background: #f0f1f5 !important; color: #635bff !important; }

/* ── Comunidade ── */
[data-tbe-theme="light"] #tbe-comm-sidebar {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbe-comm-ch { color: #374151 !important; }
[data-tbe-theme="light"] .tbe-comm-ch:hover { background: rgba(0, 0, 0, 0.04) !important; color: #111827 !important; }
[data-tbe-theme="light"] .tbe-comm-ch.on {
    background: rgba(99, 91, 255, 0.1) !important;
    border-color: rgba(99, 91, 255, 0.25) !important;
    color: #635bff !important;
}
[data-tbe-theme="light"] .tbe-btn {
    color: #635bff !important;
    border-color: rgba(99, 91, 255, 0.35) !important;
    background: transparent !important;
}
[data-tbe-theme="light"] .tbe-btn:hover {
    background: rgba(99, 91, 255, 0.08) !important;
    color: #4f46e5 !important;
}
[data-tbe-theme="light"] .tbe-btn-primary { color: #ffffff !important; background: #635bff !important; }
[data-tbe-theme="light"] .tbe-post,
[data-tbe-theme="light"] .tbe-sidecard,
[data-tbe-theme="light"] .tbe-comm-compose,
[data-tbe-theme="light"] .tbe-comm-card,
[data-tbe-theme="light"] .tbe-compose-box {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbe-post-who strong,
[data-tbe-theme="light"] .tbe-sidecard h3,
[data-tbe-theme="light"] .tbe-trend-item strong,
[data-tbe-theme="light"] .tbe-quiz h4 { color: #111827 !important; }
[data-tbe-theme="light"] .tbe-comm-body,
[data-tbe-theme="light"] .tbe-comm-compose textarea { color: #374151 !important; }
[data-tbe-theme="light"] .tbe-chip { color: #6b7280 !important; border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .tbe-chip.on { color: #635bff !important; background: rgba(99, 91, 255, 0.1) !important; }

/* ── Minha Agenda calendar ── */
[data-tbe-theme="light"] #tbe-main-content > header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .cal-day-header .day-num { color: #374151 !important; }
[data-tbe-theme="light"] .cal-day-header.today .day-name { color: #635bff !important; }
[data-tbe-theme="light"] .cal-day-header.today .day-num { color: #ffffff !important; background: #635bff !important; }
[data-tbe-theme="light"] .cal-slot {
    border-top-color: rgba(0, 0, 0, 0.06) !important;
    border-left-color: rgba(0, 0, 0, 0.06) !important;
}
[data-tbe-theme="light"] .cal-slot.half-hour { border-top-color: rgba(0, 0, 0, 0.04) !important; }
[data-tbe-theme="light"] .cal-slot.hour-mark { border-top-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .cal-slot:hover { background: rgba(99, 91, 255, 0.08) !important; }
[data-tbe-theme="light"] #event-modal-box,
[data-tbe-theme="light"] #lesson-search-results {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .modal-input {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}

/* ── Table headers (gestão de alunos) ── */
[data-tbe-theme="light"] #tbe-wrapper thead th {
    color: #6b7280 !important;
    background: #f0f1f5 !important;
}
[data-tbe-theme="light"] #tbe-wrapper thead th:hover,
[data-tbe-theme="light"] #tbe-wrapper thead th[data-sort-key]:hover {
    color: #635bff !important;
}

/* Row hovers — Tailwind cardHover is dark-only (#12151E) */
[data-tbe-theme="light"] #tbe-wrapper .hover\:bg-tbe-cardHover:hover,
[data-tbe-theme="light"] #tbe-dashboard .hover\:bg-tbe-cardHover:hover {
    background-color: rgba(99, 91, 255, 0.06) !important;
}

/* Subtle surface tints */
[data-tbe-theme="light"] #tbe-wrapper .bg-white\/5,
[data-tbe-theme="light"] #tbe-dashboard .bg-white\/5 {
    background-color: rgba(0, 0, 0, 0.04) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .hover\:bg-white\/\[0\.03\]:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* Placeholders — gray-700 is invisible on light inputs */
[data-tbe-theme="light"] #tbe-wrapper input.placeholder-gray-700::placeholder,
[data-tbe-theme="light"] #tbe-wrapper .placeholder-gray-700::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

/* Status badges — red-300 fails AA on white */
[data-tbe-theme="light"] #tbe-wrapper .text-red-300 {
    color: #dc2626 !important;
}

/* Muted text at reduced opacity — bump for AA on light surfaces */
[data-tbe-theme="light"] #tbe-wrapper .text-tbe-muted\/50,
[data-tbe-theme="light"] #tbe-wrapper .text-tbe-muted\/60 {
    color: #6b7280 !important;
    opacity: 1 !important;
}

/* Disabled pagination / controls — explicit color, not opacity-30 */
[data-tbe-theme="light"] #tbe-wrapper .disabled\:opacity-30:disabled,
[data-tbe-theme="light"] #tbe-wrapper button:disabled {
    opacity: 1 !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-btn-page:disabled {
    color: #9ca3af !important;
}

/* Icon buttons with solid fills — keep white glyphs (AA on indigo/red/green) */
[data-tbe-theme="light"] #tbe-wrapper .tbe-icon-btn--edit,
[data-tbe-theme="light"] #tbe-wrapper .tbe-icon-btn--edit:hover,
[data-tbe-theme="light"] #tbe-wrapper .tbe-icon-btn--solid-danger,
[data-tbe-theme="light"] #tbe-wrapper .tbe-icon-btn--solid-danger:hover,
[data-tbe-theme="light"] #tbe-wrapper .tbe-icon-btn--solid-success,
[data-tbe-theme="light"] #tbe-wrapper .tbe-icon-btn--solid-success:hover {
    color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════════
   Light theme — form & surface fixes (v2)
   High-specificity overrides for pages with inline dark CSS
   ══════════════════════════════════════════════════════════════ */

/* ── Caderno modals: beat ID-scoped !important in caderno.html ── */
[data-tbe-theme="light"] #nb-modal-edit-profile input,
[data-tbe-theme="light"] #nb-modal-edit-profile select,
[data-tbe-theme="light"] #nb-modal-edit-profile textarea,
[data-tbe-theme="light"] #nb-modal-add input,
[data-tbe-theme="light"] #nb-modal-add select,
[data-tbe-theme="light"] #nb-modal-add textarea,
[data-tbe-theme="light"] #nb-modal-detail input,
[data-tbe-theme="light"] #nb-modal-detail select,
[data-tbe-theme="light"] #nb-modal-detail textarea,
[data-tbe-theme="light"] #nb-modal-luci-asg input:not([type="checkbox"]):not([type="radio"]),
[data-tbe-theme="light"] #nb-modal-luci-asg select,
[data-tbe-theme="light"] #nb-modal-luci-asg textarea,
[data-tbe-theme="light"] #nb-modal-donna input,
[data-tbe-theme="light"] #nb-modal-donna select,
[data-tbe-theme="light"] #nb-modal-donna textarea,
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal .nb-field input[type="text"],
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal .nb-field input[type="email"],
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal .nb-field input[type="url"],
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal .nb-field input[type="number"],
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal .nb-field textarea,
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal select,
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal .nb-field select {
    background-color: rgba(0, 0, 0, 0.04) !important;
    background-image: none !important;
    color: #111827 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #nb-modal-edit-profile select,
[data-tbe-theme="light"] #nb-modal-add select,
[data-tbe-theme="light"] #nb-modal-detail select,
[data-tbe-theme="light"] #nb-modal-luci-asg select,
[data-tbe-theme="light"] #nb-modal-donna select,
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal select {
    background-color: rgba(0, 0, 0, 0.04) !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
}
[data-tbe-theme="light"] #nb-modal-edit-profile select option,
[data-tbe-theme="light"] #nb-modal-luci-asg select option,
[data-tbe-theme="light"] #nb-modal-donna select option,
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal select option {
    background: #ffffff !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] #nb-modal-edit-profile input:-webkit-autofill,
[data-tbe-theme="light"] #nb-modal-edit-profile input:-webkit-autofill:hover,
[data-tbe-theme="light"] #nb-modal-edit-profile input:-webkit-autofill:focus,
[data-tbe-theme="light"] #nb-modal-luci-asg input:-webkit-autofill,
[data-tbe-theme="light"] #nb-modal-luci-asg input:-webkit-autofill:hover,
[data-tbe-theme="light"] #nb-modal-luci-asg input:-webkit-autofill:focus,
[data-tbe-theme="light"] #nb-modal-donna input:-webkit-autofill,
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal input:-webkit-autofill {
    -webkit-text-fill-color: #111827 !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.04) inset !important;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.04) inset !important;
    caret-color: #111827 !important;
}
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal input::placeholder,
[data-tbe-theme="light"] .nb-modal-overlay .nb-modal textarea::placeholder,
[data-tbe-theme="light"] #nb-modal-luci-asg input::placeholder,
[data-tbe-theme="light"] #nb-modal-luci-asg textarea::placeholder,
[data-tbe-theme="light"] #nb-modal-donna textarea::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

/* CEFR pills */
[data-tbe-theme="light"] .nb-luci-pill {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #6b7280 !important;
}
[data-tbe-theme="light"] .nb-luci-pill:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .nb-luci-pill.nb-on {
    background: rgba(99, 91, 255, 0.12) !important;
    border-color: rgba(99, 91, 255, 0.35) !important;
    color: #635bff !important;
}
[data-tbe-theme="light"] .nb-luci-pill-label { color: #6b7280 !important; }

/* Donna + modal ghost/cancel buttons */
[data-tbe-theme="light"] #tbe-wrapper button.nb-btn-tool {
    background: rgba(99, 91, 255, 0.06) !important;
    border-color: rgba(99, 91, 255, 0.35) !important;
    color: #635bff !important;
}
[data-tbe-theme="light"] #tbe-wrapper button.nb-btn-tool:not(.nb-btn-tool-ai):hover {
    background: rgba(99, 91, 255, 0.12) !important;
    border-color: rgba(99, 91, 255, 0.45) !important;
    color: #4f46e5 !important;
}
[data-tbe-theme="light"] .nb-modal-overlay button.nb-btn-ghost {
    color: #6b7280 !important;
    background: transparent !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .nb-modal-overlay button.nb-btn-ghost:hover {
    color: #111827 !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}
[data-tbe-theme="light"] .nb-modal-overlay button.nb-btn-secondary {
    color: #374151 !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .nb-modal-overlay button.nb-btn-secondary:hover {
    color: #111827 !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}
[data-tbe-theme="light"] #nb-luci-asg-busy { background: rgba(255, 255, 255, 0.92) !important; }
[data-tbe-theme="light"] #nb-luci-asg-busy-msg { color: #111827 !important; }
[data-tbe-theme="light"] .nb-luci-type-tip { background: #ffffff !important; border-color: rgba(99, 91, 255, 0.25) !important; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important; }
[data-tbe-theme="light"] .nb-luci-type-tip-text { color: #374151 !important; }
[data-tbe-theme="light"] .nb-luci-preview-questions { background: rgba(0, 0, 0, 0.04) !important; }

/* ── Formação lesson list hover ── */
[data-tbe-theme="light"] #tbe-wrapper .hover\:bg-tbe-hover:hover,
[data-tbe-theme="light"] .module-item:hover {
    background-color: rgba(99, 91, 255, 0.06) !important;
}
[data-tbe-theme="light"] .module-item:hover .group-hover\:text-white,
[data-tbe-theme="light"] .module-item.group:hover .group-hover\:text-white,
[data-tbe-theme="light"] #tbe-wrapper .module-item:hover h4,
[data-tbe-theme="light"] #tbe-wrapper .module-item:hover .text-tbe-muted,
[data-tbe-theme="light"] #tbe-wrapper .module-item:hover .text-tbe-text {
    color: #111827 !important;
}
[data-tbe-theme="light"] .module-watch-dot { background: rgba(0, 0, 0, 0.12) !important; }
[data-tbe-theme="light"] .module-item.watched .module-watch-dot {
    background: #10b981 !important;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.35) !important;
}

/* ── Formação prose + player surfaces ── */
[data-tbe-theme="light"] .prose-tbe { color: #374151 !important; }
[data-tbe-theme="light"] .prose-tbe h1,
[data-tbe-theme="light"] .prose-tbe h2,
[data-tbe-theme="light"] .prose-tbe h3 { color: #111827 !important; }
[data-tbe-theme="light"] .prose-tbe h2 { color: #635bff !important; }
[data-tbe-theme="light"] .prose-tbe strong { color: #111827 !important; }
[data-tbe-theme="light"] .prose-tbe a { color: #635bff !important; }
[data-tbe-theme="light"] .prose-tbe a:hover { color: #4f46e5 !important; }
[data-tbe-theme="light"] .prose-tbe blockquote {
    color: #374151 !important;
    background: rgba(99, 91, 255, 0.06) !important;
    border-left-color: #635bff !important;
}
[data-tbe-theme="light"] .prose-tbe th,
[data-tbe-theme="light"] .prose-tbe td { border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .prose-tbe img { border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .fmc-player-wrap {
    background: #f0f1f5 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .fmc-player { background: #e5e7eb !important; }
[data-tbe-theme="light"] .fmc-title { color: #111827 !important; }
[data-tbe-theme="light"] .fmc-tab { color: #6b7280 !important; }
[data-tbe-theme="light"] .fmc-tab:hover { color: #111827 !important; }
[data-tbe-theme="light"] .fmc-tab.active { color: #635bff !important; border-bottom-color: #635bff !important; }
[data-tbe-theme="light"] .fmc-tabs { border-bottom-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .fmc-notes-area {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .fmc-notes-area::placeholder { color: #6b7280 !important; }
[data-tbe-theme="light"] .fmc-resources-empty {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #6b7280 !important;
}
[data-tbe-theme="light"] .fmc-resource-card {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .fmc-resource-card:hover {
    background: rgba(99, 91, 255, 0.06) !important;
    border-color: rgba(99, 91, 255, 0.25) !important;
}
[data-tbe-theme="light"] .fmc-resource-card .fmc-resource-title { color: #111827 !important; }
[data-tbe-theme="light"] .fmc-resource-card .fmc-resource-sub { color: #6b7280 !important; }
[data-tbe-theme="light"] .fmc-icon-btn { color: #6b7280 !important; border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .fmc-icon-btn:hover {
    color: #111827 !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}
[data-tbe-theme="light"] .fmc-content { padding-bottom: 80px !important; }

/* ── Arsenal audio / modal black surfaces ── */
[data-tbe-theme="light"] #audioSection .bg-black,
[data-tbe-theme="light"] #audioSection .tbe-audio-wrap,
[data-tbe-theme="light"] #modalEmbedContainer.bg-black {
    background-color: #f0f1f5 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #lessonModal .bg-black\/95 {
    background-color: rgba(0, 0, 0, 0.35) !important;
}
[data-tbe-theme="light"] #lessonModal .bg-black\/50,
[data-tbe-theme="light"] #lessonModal .tbe-lesson-nav-bar,
[data-tbe-theme="light"] #lessonModal [role="toolbar"].bg-black\/50 {
    background-color: rgba(0, 0, 0, 0.04) !important;
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] #lessonModal .tbe-lesson-nav-bar button,
[data-tbe-theme="light"] #lessonModal [role="toolbar"] a,
[data-tbe-theme="light"] #lessonModal [role="toolbar"] button {
    color: #374151 !important;
}
[data-tbe-theme="light"] #lessonModal .tbe-lesson-nav-bar button span,
[data-tbe-theme="light"] #lessonModal [role="toolbar"] a:hover,
[data-tbe-theme="light"] #lessonModal [role="toolbar"] button:hover,
[data-tbe-theme="light"] #lessonModal .tbe-lesson-nav-bar button:hover {
    color: #635bff !important;
}
[data-tbe-theme="light"] #lessonModal .tbe-lesson-nav-bar button:hover {
    background-color: rgba(99, 91, 255, 0.06) !important;
}

/* ── Exercise viewer hardcoded surfaces ── */
[data-tbe-theme="light"] .tbev-article code {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .tbev-article pre {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #111827 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbev-article .luci-word-bank,
[data-tbe-theme="light"] .tbev-article .tbev-word-bank {
    background: rgba(0, 0, 0, 0.04) !important;
}
[data-tbe-theme="light"] .tbev-article .luci-word-chip { color: #4f46e5 !important; }

/* ── Status badges ATIVO / INATIVO ── */
[data-tbe-theme="light"] #tbe-wrapper .bg-green-500\/10 {
    background-color: rgba(16, 185, 129, 0.15) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .text-tbe-success {
    color: #047857 !important;
}
[data-tbe-theme="light"] #tbe-wrapper .border-green-500\/20 {
    border-color: rgba(16, 185, 129, 0.35) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .bg-red-500\/10 {
    background-color: rgba(239, 68, 68, 0.12) !important;
}
[data-tbe-theme="light"] #tbe-wrapper .border-red-500\/20 {
    border-color: rgba(239, 68, 68, 0.3) !important;
}

/* ── Comunidade (fix class mismatch: .tbe-composer not .tbe-comm-compose) ── */
[data-tbe-theme="light"] .tbe-composer {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbe-composer-input,
[data-tbe-theme="light"] .tbe-comment-compose textarea,
[data-tbe-theme="light"] .tbe-comment-compose .tbe-composer-input {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .tbe-composer-input::placeholder,
[data-tbe-theme="light"] .tbe-comment-compose textarea::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}
[data-tbe-theme="light"] .tbe-channelbar-title { color: #111827 !important; }
[data-tbe-theme="light"] .tbe-post-body,
[data-tbe-theme="light"] .tbe-md-body,
[data-tbe-theme="light"] .tbe-comment-body { color: #374151 !important; }
[data-tbe-theme="light"] .tbe-md-body h2,
[data-tbe-theme="light"] .tbe-md-body h3 { color: #111827 !important; }
[data-tbe-theme="light"] .tbe-comment-who,
[data-tbe-theme="light"] .tbe-comments-head { color: #111827 !important; }
[data-tbe-theme="light"] .tbe-post-meta,
[data-tbe-theme="light"] .tbe-post-foot,
[data-tbe-theme="light"] .tbe-react { color: #6b7280 !important; }
[data-tbe-theme="light"] .tbe-md-toolbar button {
    color: #6b7280 !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbe-md-toolbar button:hover {
    color: #111827 !important;
    background: rgba(0, 0, 0, 0.06) !important;
}
[data-tbe-theme="light"] .tbe-quiz { background: rgba(0, 0, 0, 0.04) !important; border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .tbe-quiz-opt { background: rgba(0, 0, 0, 0.02) !important; border-color: rgba(0, 0, 0, 0.08) !important; }
[data-tbe-theme="light"] .tbe-quiz-opt .lbl { color: #374151 !important; }
[data-tbe-theme="light"] .tbe-avatar { color: #635bff !important; border-color: rgba(99, 91, 255, 0.25) !important; }
[data-tbe-theme="light"] .tbe-channel-search input {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #111827 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbe-edit-shell textarea {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #111827 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* ── Footer — stay below modals/sidebar inside #tbe-wrapper ── */
[data-tbe-theme="light"] .tbe-global-footer { z-index: 5 !important; }

/* Gestão table skeleton — transform sweep (light theme safe) */
@keyframes tbe-skeleton-sweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
#tbe-wrapper .tbe-skeleton,
#tbe-dashboard .tbe-skeleton {
    position: relative;
    overflow: hidden;
    background-color: #1a1d27;
    border-radius: 4px;
    isolation: isolate;
}
#tbe-wrapper .tbe-skeleton::after,
#tbe-dashboard .tbe-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 42%,
        rgba(255, 255, 255, 0.14) 50%,
        rgba(255, 255, 255, 0.06) 58%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: tbe-skeleton-sweep 1.4s ease-in-out infinite;
    pointer-events: none;
}
#tbe-table-body.tbe-table-loading {
    min-height: calc(56px * 5);
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-skeleton,
[data-tbe-theme="light"] #tbe-dashboard .tbe-skeleton {
    background-color: #d1d5db !important;
}
[data-tbe-theme="light"] #tbe-wrapper .tbe-skeleton::after,
[data-tbe-theme="light"] #tbe-dashboard .tbe-skeleton::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.5) 42%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(255, 255, 255, 0.5) 58%,
        transparent 100%
    ) !important;
    animation: tbe-skeleton-sweep 1.4s ease-in-out infinite !important;
}

/* ══════════════════════════════════════════════════════════════
   Light theme — lesson viewer (luci-sections) v3
   Dark-mode accent text (#F5E6A8 etc.) is invisible on white
   ══════════════════════════════════════════════════════════════ */

/* Per-section dark accent text for light backgrounds */
[data-tbe-theme="light"] .tbev-article .luci-section--warm-up,
[data-tbe-theme="light"] .tbev-article .luci-section--warm-up-questions {
    --luci-accent-text: #92400e;
}
[data-tbe-theme="light"] .tbev-article .luci-section--learning-objectives {
    --luci-accent-text: #b91c1c;
}
[data-tbe-theme="light"] .tbev-article .luci-section--dialogue,
[data-tbe-theme="light"] .tbev-article .luci-section--dialogue-and-content,
[data-tbe-theme="light"] .tbev-article .luci-section--dialogue-content,
[data-tbe-theme="light"] .tbev-article [class*="luci-section--dialogue"] {
    --luci-accent-text: #0369a1;
}
[data-tbe-theme="light"] .tbev-article .luci-section--strategic-analysis,
[data-tbe-theme="light"] .tbev-article [class*="luci-section--strategic-analysis"] {
    --luci-accent-text: #15803d;
}
[data-tbe-theme="light"] .tbev-article .luci-section--language-focus,
[data-tbe-theme="light"] .tbev-article .luci-section--language-focus-drilling,
[data-tbe-theme="light"] .tbev-article [class*="luci-section--language-focus"] {
    --luci-accent-text: #0f766e;
}
[data-tbe-theme="light"] .tbev-article .luci-section--drilling,
[data-tbe-theme="light"] .tbev-article .luci-section--application,
[data-tbe-theme="light"] .tbev-article .luci-section--skills-practice,
[data-tbe-theme="light"] .tbev-article [class*="luci-section--application"],
[data-tbe-theme="light"] .tbev-article [class*="luci-section--skills-practice"] {
    --luci-accent-text: #7c3aed;
}
[data-tbe-theme="light"] .tbev-article .luci-section--business-insight,
[data-tbe-theme="light"] .tbev-article .luci-section--case-study,
[data-tbe-theme="light"] .tbev-article [class*="luci-section--business-insight"],
[data-tbe-theme="light"] .tbev-article [class*="luci-section--case-study"] {
    --luci-accent-text: #be185d;
}
[data-tbe-theme="light"] .tbev-article .luci-section--discussion,
[data-tbe-theme="light"] .tbev-article .luci-section--discussion-anchored,
[data-tbe-theme="light"] .tbev-article .luci-section--discussion-closed,
[data-tbe-theme="light"] .tbev-article [class*="luci-section--discussion"] {
    --luci-accent-text: #4338ca;
}
[data-tbe-theme="light"] .tbev-article .luci-section--key-takeaways,
[data-tbe-theme="light"] .tbev-article [class*="luci-section--key-takeaways"] {
    --luci-accent-text: #a16207;
}

/* Body text — force readable dark gray on all lesson content */
[data-tbe-theme="light"] .tbev-article .luci-section-body,
[data-tbe-theme="light"] .tbev-article .luci-section-body p,
[data-tbe-theme="light"] .tbev-article .luci-section-body li,
[data-tbe-theme="light"] .tbev-article .luci-callout,
[data-tbe-theme="light"] .tbev-article .luci-callout p,
[data-tbe-theme="light"] .tbev-article .luci-warmup-card,
[data-tbe-theme="light"] .tbev-article .luci-objective-card,
[data-tbe-theme="light"] .tbev-article .luci-discussion-card,
[data-tbe-theme="light"] .tbev-article .luci-analysis-card-body,
[data-tbe-theme="light"] .tbev-article .luci-dialogue-line,
[data-tbe-theme="light"] .tbev-article .luci-app-exercise-body,
[data-tbe-theme="light"] .tbev-article .luci-app-exercise-instruct {
    color: #374151 !important;
}
[data-tbe-theme="light"] .tbev-article .luci-section-body strong,
[data-tbe-theme="light"] .tbev-article .luci-callout strong {
    color: #111827 !important;
}

/* Card / inset surfaces */
[data-tbe-theme="light"] .tbev-article .luci-warmup-card,
[data-tbe-theme="light"] .tbev-article .luci-objective-card,
[data-tbe-theme="light"] .tbev-article .luci-discussion-card,
[data-tbe-theme="light"] .tbev-article fieldset[data-luci-q],
[data-tbe-theme="light"] .tbev-article div[data-luci-q] {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbev-article .luci-dialogue-panel {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbev-article .luci-dialogue-turn {
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}
[data-tbe-theme="light"] .tbev-article .luci-dialogue-speaker,
[data-tbe-theme="light"] .tbev-article .luci-dialogue-context-label,
[data-tbe-theme="light"] .tbev-article .luci-analysis-card-head,
[data-tbe-theme="light"] .tbev-article .luci-traffic-board-title {
    color: var(--luci-accent-text) !important;
}
[data-tbe-theme="light"] .tbev-article input[type="text"][data-luci-q],
[data-tbe-theme="light"] .tbev-article input[type="number"][data-luci-q],
[data-tbe-theme="light"] .tbev-article textarea[data-luci-q],
[data-tbe-theme="light"] #tbev-notes {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .tbev-article input[data-luci-q]::placeholder,
[data-tbe-theme="light"] .tbev-article textarea[data-luci-q]::placeholder,
[data-tbe-theme="light"] #tbev-notes::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}
[data-tbe-theme="light"] .tbev-article input.tbev-gap[data-luci-q] {
    border-bottom-color: rgba(0, 0, 0, 0.25) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .tbev-side-block,
[data-tbe-theme="light"] .tbev-feedback-col {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbev-fb-list li {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #374151 !important;
}

/* Exercise question numbers */
[data-tbe-theme="light"] .tbev-article .tbev-q-num {
    color: #5C54E7 !important;
    background: rgba(92, 84, 231, 0.1) !important;
    border-color: rgba(92, 84, 231, 0.3) !important;
}

/* Caderno atividades table */
[data-tbe-theme="light"] .nb-table-wrap {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .nb-table th {
    background: #f0f1f5 !important;
    color: #6b7280 !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .nb-table td {
    background: #ffffff !important;
    color: #111827 !important;
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}
[data-tbe-theme="light"] .nb-table tr.nb-row-click:hover td {
    background: rgba(99, 91, 255, 0.06) !important;
}
[data-tbe-theme="light"] .nb-act-due-input {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
}
[data-tbe-theme="light"] .nb-act-pagination {
    background: #ffffff !important;
    border-top-color: rgba(0, 0, 0, 0.08) !important;
    color: #6b7280 !important;
}

/* LuciAI button — keep white text on indigo hover */
[data-tbe-theme="light"] #tbe-wrapper button.nb-btn-tool.nb-btn-tool-ai,
[data-tbe-theme="light"] #tbe-wrapper button.nb-btn-tool.nb-btn-tool-ai:hover {
    color: #ffffff !important;
    background: #635bff !important;
    border-color: transparent !important;
}
[data-tbe-theme="light"] #tbe-wrapper button.nb-btn-tool.nb-btn-tool-ai:hover {
    background: #4f46e5 !important;
}

/* Arsenal audio — beat Tailwind bg-black utility */
[data-tbe-theme="light"] .tbe-audio-wrap,
[data-tbe-theme="light"] #audioSection .tbe-audio-wrap,
[data-tbe-theme="light"] #audioSection .bg-black,
[data-tbe-theme="light"] #lessonModal .bg-black {
    background-color: #f0f1f5 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Sidebar profile / settings — no gray active box on settings page */
[data-tbe-theme="light"] #tbe-profile-trigger,
[data-tbe-theme="light"] #tbe-settings-gear {
    background: transparent !important;
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
}
[data-tbe-theme="light"] #tbe-profile-trigger:hover,
[data-tbe-theme="light"] #tbe-settings-gear:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}
[data-tbe-theme="light"] #userName { color: #111827 !important; }
[data-tbe-theme="light"] #tbe-profile-trigger .text-white { color: #111827 !important; }

/* ══════════════════════════════════════════════════════════════
   Light theme — lesson viewer (luci-sections) v4
   Force readable text on ALL generated lesson markup
   ══════════════════════════════════════════════════════════════ */
[data-tbe-theme="light"] .tbev-article .luci-section {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #374151 !important;
}
[data-tbe-theme="light"] .tbev-article .luci-section-head {
    color: var(--luci-accent-text) !important;
    background: rgba(var(--luci-accent-rgb), 0.08) !important;
    border-bottom-color: rgba(var(--luci-accent-rgb), 0.2) !important;
}
[data-tbe-theme="light"] .tbev-article .luci-section-body,
[data-tbe-theme="light"] .tbev-article .luci-section-body p,
[data-tbe-theme="light"] .tbev-article .luci-section-body li,
[data-tbe-theme="light"] .tbev-article .luci-section-body span,
[data-tbe-theme="light"] .tbev-article .luci-section-body label,
[data-tbe-theme="light"] .tbev-article .luci-warmup-card,
[data-tbe-theme="light"] .tbev-article .luci-warmup-card *,
[data-tbe-theme="light"] .tbev-article .luci-objective-card,
[data-tbe-theme="light"] .tbev-article .luci-objective-card *,
[data-tbe-theme="light"] .tbev-article .luci-discussion-card,
[data-tbe-theme="light"] .tbev-article .luci-discussion-card *,
[data-tbe-theme="light"] .tbev-article .luci-callout,
[data-tbe-theme="light"] .tbev-article .luci-callout *,
[data-tbe-theme="light"] .tbev-article .luci-callout--inset,
[data-tbe-theme="light"] .tbev-article .luci-callout--inset *,
[data-tbe-theme="light"] .tbev-article .luci-dialogue-line,
[data-tbe-theme="light"] .tbev-article .luci-dialogue-context p,
[data-tbe-theme="light"] .tbev-article .luci-analysis-card-body,
[data-tbe-theme="light"] .tbev-article .luci-analysis-card-body *,
[data-tbe-theme="light"] .tbev-article .luci-app-exercise-body,
[data-tbe-theme="light"] .tbev-article .luci-app-exercise-instruct,
[data-tbe-theme="light"] .tbev-article fieldset[data-luci-q] legend,
[data-tbe-theme="light"] .tbev-article div[data-luci-q] > p:first-child {
    color: #374151 !important;
}
[data-tbe-theme="light"] .tbev-article .luci-section-body strong,
[data-tbe-theme="light"] .tbev-article .luci-callout strong,
[data-tbe-theme="light"] .tbev-article .luci-warmup-card strong,
[data-tbe-theme="light"] .tbev-article .luci-objective-card strong {
    color: #111827 !important;
}
[data-tbe-theme="light"] .tbev-article .luci-warmup-card,
[data-tbe-theme="light"] .tbev-article .luci-objective-card,
[data-tbe-theme="light"] .tbev-article .luci-discussion-card,
[data-tbe-theme="light"] .tbev-article .luci-callout--inset,
[data-tbe-theme="light"] .tbev-article .luci-dialogue-panel,
[data-tbe-theme="light"] .tbev-article fieldset[data-luci-q],
[data-tbe-theme="light"] .tbev-article div[data-luci-q],
[data-tbe-theme="light"] .tbev-article .luci-analysis-card,
[data-tbe-theme="light"] .tbev-article .luci-app-exercise-card,
[data-tbe-theme="light"] .tbev-article .luci-traffic-board {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-tbe-theme="light"] .tbev-article .luci-section--dialogue-and-content .luci-section-body,
[data-tbe-theme="light"] .tbev-article .luci-section--dialogue-content .luci-section-body {
    background: rgba(0, 0, 0, 0.04) !important;
    border-left-color: rgba(99, 91, 255, 0.35) !important;
}
[data-tbe-theme="light"] .tbev-article .luci-dialogue-speaker,
[data-tbe-theme="light"] .tbev-article .luci-dialogue-context-label,
[data-tbe-theme="light"] .tbev-article .luci-analysis-card-head,
[data-tbe-theme="light"] .tbev-article .luci-traffic-board-title,
[data-tbe-theme="light"] .tbev-article .luci-app-exercise-badge,
[data-tbe-theme="light"] .tbev-article .luci-roleplay-label {
    color: var(--luci-accent-text) !important;
}
[data-tbe-theme="light"] .tbev-article .luci-section-head h2,
[data-tbe-theme="light"] .tbev-article .luci-section-head h3,
[data-tbe-theme="light"] .tbev-article .luci-section h1,
[data-tbe-theme="light"] .tbev-article .luci-section h2,
[data-tbe-theme="light"] .tbev-article .luci-section h3,
[data-tbe-theme="light"] .tbev-article .luci-section-label {
    color: #111827 !important;
}
[data-tbe-theme="light"] .tbev-student-results-inner,
[data-tbe-theme="light"] .tbev-student-results-title {
    color: #111827;
    font-family: 'Figtree', sans-serif;
}
[data-tbe-theme="light"] .tbev-student-fb-block {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}
[data-tbe-theme="light"] .tbev-student-fb-block p,
[data-tbe-theme="light"] .tbev-student-fb-block li {
    color: #374151;
    font-family: 'Figtree', sans-serif;
    line-height: 1.6;
}
[data-tbe-theme="light"] .tbev-student-score {
    color: #374151;
}
[data-tbe-theme="light"] .tbev-student-notes-banner {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0 0 1rem;
    color: #374151;
    font-family: 'Figtree', sans-serif;
    line-height: 1.6;
}
[data-tbe-theme="light"] .tbev-student-notes-banner .tbev-side-badge {
    color: #4F46E5;
}
