/* ============================================================
   THEME — Sistema de tema claro/escuro (creme + dourado)
   - Padrao: respeita prefers-color-scheme do sistema
   - Botao flutuante fixo no canto superior direito em todas as telas
   - Preferencia persistida em localStorage (chave: site-theme)
   ============================================================ */

/* ===== Botao flutuante de toggle ===== */
.theme-toggle-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(240,180,41,0.30);
    background: rgba(11,26,46,0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #F0B429;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    padding: 0;
    font-family: inherit;
}
.theme-toggle-btn:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 6px 22px rgba(0,0,0,0.30), 0 0 18px rgba(240,180,41,0.25);
    border-color: rgba(240,180,41,0.55);
}
.theme-toggle-btn:active { transform: translateY(0) scale(0.98); }
.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.theme-toggle-btn:hover svg { transform: rotate(20deg); }

@media (max-width: 768px) {
    body.admin-layout .theme-toggle-btn {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }
}

/* ============================================================
   Espacamento dos botoes top-right no admin para nao ficarem
   embaixo do botão flutuante de tema (42px + 16px = ~58px)
   ============================================================ */
.rsp-actions-row,
.admin-main .admin-page-header > div:last-child {
    margin-right: 58px;
}
@media (max-width: 768px) {
    .rsp-actions-row,
    .admin-main .admin-page-header > div:last-child {
        margin-right: 52px;
    }
}

/* ============================================================
   TEMA ESCURO — body generico (paginas que herdam style.css claro)
   ============================================================ */
html[data-theme="dark"] body:not(.admin-layout) {
    background: radial-gradient(ellipse at 50% 30%, #0f2545 0%, #091629 55%, #060e1a 100%);
    color: #fff;
}

/* ============================================================
   TEMA CLARO — Off-white quente + dourado
   ============================================================ */

/* ===== 1. Body / fundos principais ===== */
html[data-theme="light"] body {
    background: radial-gradient(ellipse at 50% 20%, #fff8e3 0%, #fdf2d3 50%, #f9e9c2 100%) !important;
    color: #1a140a !important;
}
html[data-theme="light"] body.admin-layout {
    background: #faf2dc !important;
    color: #1a140a !important;
}
/* painel.html usa inline style="background:#0B1A2E" */
html[data-theme="light"] body[style*="0B1A2E"] {
    background: #faf2dc !important;
}

html[data-theme="light"] .theme-toggle-btn {
    background: rgba(255,255,255,0.90);
    border-color: rgba(176,125,14,0.45);
    color: #8a5e08;
    box-shadow: 0 4px 16px rgba(176,125,14,0.18);
}
html[data-theme="light"] .theme-toggle-btn:hover {
    background: #fff;
    border-color: rgba(176,125,14,0.65);
    box-shadow: 0 6px 22px rgba(176,125,14,0.28);
}

/* ============================================================
   CATCH-ALL — converte qualquer texto/border/bg de
   "branco em fundo escuro" para "escuro em fundo claro"
   ============================================================ */

/* 2. Texto: tudo que era branco/transparente-branco vira marrom escuro */
html[data-theme="light"] body :where(
    h1, h2, h3, h4, h5, h6,
    p, span, div, label, td, th, li, a, strong, em, small,
    button, dt, dd, blockquote, figcaption, summary,
    li > *
) {
    color: #1a140a;
}

/* 3. Inputs / textareas / selects — branco com texto escuro */
html[data-theme="light"] body input,
html[data-theme="light"] body textarea,
html[data-theme="light"] body select {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(176,125,14,0.30) !important;
    color: #1a140a !important;
}
html[data-theme="light"] body input:focus,
html[data-theme="light"] body textarea:focus,
html[data-theme="light"] body select:focus {
    border-color: rgba(176,125,14,0.65) !important;
    background: #fff !important;
}
html[data-theme="light"] body input::placeholder,
html[data-theme="light"] body textarea::placeholder {
    color: rgba(26,20,10,0.40) !important;
}
html[data-theme="light"] body select option {
    background: #fff !important;
    color: #1a140a !important;
}

/* Inputs com bg darkly hardcoded (.text-input, .rsp-search-input, etc) */
html[data-theme="light"] body .text-input,
html[data-theme="light"] body .rsp-search-input,
html[data-theme="light"] body .rsp-sel,
html[data-theme="light"] body .adm-search-input {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(176,125,14,0.30) !important;
    color: #1a140a !important;
}
html[data-theme="light"] body .text-input::placeholder,
html[data-theme="light"] body .rsp-search-input::placeholder,
html[data-theme="light"] body .adm-search-input::placeholder {
    color: rgba(26,20,10,0.40) !important;
}

/* ============================================================
   EXCECOES — manter cores de marca/destaque
   ============================================================ */

/* Dourado em titulos/destaques que devem permanecer dourados */
html[data-theme="light"] body :where(
    .t-gold,
    .hero-title .t-gold,
    .brand-name em,
    .brand-year,
    .sidebar-brand-name,
    .price-amount,
    .price-amount small,
    .required,
    .question-title::before
) {
    color: #8a5e08 !important;
}

/* Inline style com cor dourada explicita */
html[data-theme="light"] body [style*="#F0B429"],
html[data-theme="light"] body [style*="#D4A017"],
html[data-theme="light"] body [style*="#EAB308"] {
    color: #8a5e08 !important;
}

/* Verde de sucesso */
html[data-theme="light"] body :where(.t-green, [class*="success-box"] p) {
    color: #1e7a4a !important;
}
html[data-theme="light"] body [style*="#6EE7B7"],
html[data-theme="light"] body [style*="#A7F3D0"] {
    color: #1e7a4a !important;
}

/* Vermelho de alerta */
html[data-theme="light"] body [style*="#fca5a5"],
html[data-theme="light"] body [style*="#f87171"] {
    color: #c43030 !important;
}

/* Botoes com fundo proprio mantem texto branco */
html[data-theme="light"] body .btn-gold,
html[data-theme="light"] body .btn-filled,
html[data-theme="light"] body .rsp-go {
    color: #fff !important;
}
/* Botao de radio selecionado mantem texto escuro */
html[data-theme="light"] body .radio-option input[type="radio"]:checked + label {
    color: #1a140a !important;
}

/* Botao "Ver Aluno" (admin) - tem fundo azul escuro */
html[data-theme="light"] body a[style*="background:#1B4D8A"],
html[data-theme="light"] body [style*="background:#1B4D8A"] {
    color: #fff !important;
}

/* ============================================================
   SUPERFICIES — cards com rgba(255,255,255,0.X) viram brancos
   ============================================================ */
html[data-theme="light"] body :where(
    .card.question-card .card-body,
    .question-card .card-body,
    .main-card,
    .signup-card,
    .event-pass,
    .dash-stat,
    .dash-charts .ch,
    .rsp-filters,
    .rsp-stat-card,
    .admin-main .card,
    .admin-main .detail-card,
    .admin-main .chart-card,
    .admin-main .stat-card,
    .admin-main .panel-section
) {
    background: rgba(255,255,255,0.80) !important;
    border-color: rgba(176,125,14,0.22) !important;
    box-shadow: 0 2px 12px rgba(150,110,30,0.10) !important;
}

/* Hover dos cards */
html[data-theme="light"] body .dash-stat:hover,
html[data-theme="light"] body .dash-charts .ch:hover,
html[data-theme="light"] body .card.question-card .card-body:hover {
    background: rgba(255,255,255,0.92) !important;
    border-color: rgba(176,125,14,0.40) !important;
    box-shadow: 0 6px 20px rgba(150,110,30,0.18) !important;
}

/* Tabelas */
html[data-theme="light"] body .admin-main .data-table {
    background: rgba(255,255,255,0.80) !important;
}
html[data-theme="light"] body .admin-main .data-table th {
    background: rgba(176,125,14,0.12) !important;
    color: #4a3717 !important;
    border-bottom-color: rgba(176,125,14,0.30) !important;
}
html[data-theme="light"] body .admin-main .data-table td {
    color: #1a140a !important;
    border-bottom-color: rgba(176,125,14,0.15) !important;
}
html[data-theme="light"] body .admin-main .data-table tr:hover td {
    background: rgba(176,125,14,0.06) !important;
}

/* admin_respostas: bulk row */
html[data-theme="light"] body .bulk-row {
    background: rgba(255,255,255,0.80) !important;
    border-color: rgba(176,125,14,0.18) !important;
}
html[data-theme="light"] body .bulk-row:hover {
    background: rgba(176,125,14,0.06) !important;
}

/* ============================================================
   PAGE-SPECIFIC FINE TUNING
   ============================================================ */

/* ===== WELCOME / LOGIN ===== */
html[data-theme="light"] .bg-glow .orb-1 {
    background: radial-gradient(circle, rgba(176,125,14,0.18), transparent 70%);
}
html[data-theme="light"] .bg-glow .orb-2 {
    background: radial-gradient(circle, rgba(140,100,30,0.10), transparent 70%);
}
html[data-theme="light"] .bg-glow .orb-3 {
    background: radial-gradient(circle, rgba(176,125,14,0.08), transparent 70%);
}
html[data-theme="light"] .main-card {
    box-shadow: 0 4px 24px rgba(150,110,30,0.14), 0 0 0 1px rgba(255,255,255,0.6) inset !important;
}
html[data-theme="light"] .card-header {
    color: #8a5e08 !important;
}
html[data-theme="light"] .hero-title .t-white { color: #1a140a !important; }
html[data-theme="light"] .hero-badge {
    color: #8a5e08 !important;
    border-color: rgba(176,125,14,0.45) !important;
    background: rgba(176,125,14,0.10) !important;
}
html[data-theme="light"] .btn-gold {
    background: linear-gradient(135deg, #D4A017 0%, #B07D0E 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 18px rgba(176,125,14,0.40), 0 1px 3px rgba(0,0,0,0.10) !important;
}
html[data-theme="light"] .btn-gold:hover {
    box-shadow: 0 8px 26px rgba(176,125,14,0.50), 0 2px 6px rgba(0,0,0,0.12) !important;
}
html[data-theme="light"] .btn-ghost {
    background: rgba(255,255,255,0.55) !important;
    color: #1a140a !important;
    border-color: rgba(176,125,14,0.35) !important;
}
html[data-theme="light"] .btn-ghost:hover {
    border-color: rgba(176,125,14,0.60) !important;
    color: #1a140a !important;
    background: rgba(176,125,14,0.10) !important;
}
html[data-theme="light"] .btn-link.gold { color: #8a5e08 !important; }
html[data-theme="light"] .btn-link.muted { color: rgba(26,20,10,0.55) !important; }
html[data-theme="light"] .or-divider { color: rgba(26,20,10,0.40) !important; }
html[data-theme="light"] .or-divider::before,
html[data-theme="light"] .or-divider::after {
    background: linear-gradient(90deg, transparent, rgba(176,125,14,0.30), transparent) !important;
}
html[data-theme="light"] .signup-link {
    background: rgba(255,255,255,0.75) !important;
    border-color: rgba(176,125,14,0.30) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .signup-link:hover {
    background: rgba(176,125,14,0.14) !important;
    border-color: rgba(176,125,14,0.55) !important;
    color: #8a5e08 !important;
}
html[data-theme="light"] .login-msg.error {
    background: rgba(220,38,38,0.10) !important;
    color: #b91c1c !important;
    border-color: rgba(220,38,38,0.30) !important;
}
html[data-theme="light"] .login-msg.success {
    background: rgba(34,160,90,0.12) !important;
    color: #166534 !important;
    border-color: rgba(34,160,90,0.30) !important;
}
html[data-theme="light"] .success-box {
    background: rgba(34,160,90,0.10) !important;
    border-color: rgba(34,160,90,0.35) !important;
}

/* ===== INSCRICOES / FORM (welcome card + question cards) ===== */
html[data-theme="light"] .header-title-block h1 { color: #5a4720 !important; }
html[data-theme="light"] .header-title-block .brand-name { color: #1a140a !important; }
html[data-theme="light"] .header-title-block .brand-year {
    color: #8a5e08 !important;
    border-color: rgba(176,125,14,0.45) !important;
}
html[data-theme="light"] .pass-lead { color: #2a1f10 !important; }
html[data-theme="light"] .pass-lead strong { color: #1a140a !important; }
html[data-theme="light"] .pass-info-label { color: #6a531b !important; }
html[data-theme="light"] .pass-info-value { color: #1a140a !important; }
html[data-theme="light"] .pass-instruments-label { color: #6a531b !important; }
html[data-theme="light"] .inst-tag {
    color: #4a3717 !important;
    background: rgba(176,125,14,0.10) !important;
    border-color: rgba(176,125,14,0.25) !important;
}
html[data-theme="light"] .inst-tag.alert {
    color: #b91c1c !important;
    background: rgba(220,38,38,0.08) !important;
    border-color: rgba(220,38,38,0.30) !important;
}
html[data-theme="light"] .price-label { color: #6a531b !important; }
html[data-theme="light"] .price-amount { color: #8a5e08 !important; }
html[data-theme="light"] .price-amount small { color: rgba(138,94,8,0.65) !important; }
html[data-theme="light"] .price-sep { background: rgba(176,125,14,0.25) !important; }
html[data-theme="light"] .header-cta { color: #4a3717 !important; }
html[data-theme="light"] .pass-tear::before {
    border-top-color: rgba(176,125,14,0.30) !important;
}
/* As "notches" do ticket usavam #091629 escuro para emular o background — em light, usar a cor de fundo */
html[data-theme="light"] .pass-tear::after {
    background: #faf2dc !important;
    box-shadow: calc(100% + 600px - 20px) 0 0 0 #faf2dc !important;
}
html[data-theme="light"] .pass-info-icon {
    background: rgba(176,125,14,0.14) !important;
    color: #8a5e08 !important;
}

/* Question cards */
html[data-theme="light"] .card.question-card .card-body {
    background: rgba(255,255,255,0.85) !important;
    border-color: rgba(176,125,14,0.22) !important;
}
html[data-theme="light"] .question-title { color: #1a140a !important; }
html[data-theme="light"] .question-title::before { color: #8a5e08 !important; opacity: 1 !important; }
html[data-theme="light"] .question-description { color: #4a3717 !important; }
html[data-theme="light"] .required { color: #c43030 !important; }
html[data-theme="light"] .required-notice { color: #c43030 !important; }

html[data-theme="light"] .radio-option label {
    background: rgba(255,255,255,0.70) !important;
    border-color: rgba(176,125,14,0.25) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .radio-option label:hover {
    border-color: rgba(176,125,14,0.55) !important;
    color: #1a140a !important;
    background: rgba(176,125,14,0.10) !important;
}
html[data-theme="light"] .radio-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #D4A017, #B07D0E) !important;
    color: #fff !important;
    border-color: #B07D0E !important;
}

html[data-theme="light"] .btn-filled {
    background: linear-gradient(135deg, #D4A017, #B07D0E) !important;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(176,125,14,0.40) !important;
}

html[data-theme="light"] .progress-bar {
    background: rgba(176,125,14,0.10) !important;
}

/* ===== ADMIN DASHBOARD (admin_dashboard.html) ===== */
html[data-theme="light"] .dash-stat-value { color: #1a140a !important; }
html[data-theme="light"] .dash-stat-label { color: #6a531b !important; }
html[data-theme="light"] .dash-stat-sub { color: #2a1f10 !important; border-top-color: rgba(176,125,14,0.20) !important; }
html[data-theme="light"] .dash-stat-sub-tag {
    background: rgba(34,160,90,0.14) !important;
    color: #166534 !important;
}
html[data-theme="light"] .dash-category {
    color: #4a3717 !important;
    border-bottom-color: rgba(176,125,14,0.30) !important;
}
html[data-theme="light"] .ch-title { color: #1a140a !important; }
html[data-theme="light"] .ch-sub { color: #6a531b !important; }
/* Dashboard h1/p inline */
html[data-theme="light"] .admin-main h1[style*="rgba(255,255,255"] { color: #1a140a !important; }
html[data-theme="light"] .admin-main p[style*="rgba(255,255,255"] { color: #6a531b !important; }

/* ===== ADMIN RESPOSTAS (admin_respostas.html) ===== */
html[data-theme="light"] .rsp-stat-card-label { color: #6a531b !important; }
html[data-theme="light"] .rsp-stat-card-value { color: #1a140a !important; }
html[data-theme="light"] .rsp-filters {
    background: rgba(255,255,255,0.65) !important;
    border-color: rgba(176,125,14,0.20) !important;
}
html[data-theme="light"] .rsp-search-wrap .ico { color: rgba(26,20,10,0.45) !important; }
html[data-theme="light"] .rsp-search-clear {
    background: rgba(176,125,14,0.12) !important;
    color: #4a3717 !important;
}
html[data-theme="light"] .rsp-search-clear:hover {
    background: rgba(176,125,14,0.22) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .rsp-sel {
    background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l3 3 3-3' stroke='rgba(26,20,10,0.45)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}
html[data-theme="light"] .rsp-sel option { background: #fff !important; color: #1a140a !important; }
html[data-theme="light"] .rsp-sep { background: rgba(176,125,14,0.25) !important; }
html[data-theme="light"] .rsp-per { color: #4a3717 !important; }
html[data-theme="light"] .rsp-export {
    background: linear-gradient(135deg, rgba(34,160,90,0.14) 0%, rgba(15,123,109,0.10) 100%) !important;
    border-color: rgba(34,160,90,0.40) !important;
    color: #1e7a4a !important;
}

/* Bulk toolbar / select-all */
html[data-theme="light"] .bulk-row .bulk-row-name,
html[data-theme="light"] .bulk-row .bulk-row-meta,
html[data-theme="light"] .bulk-row .bulk-row-email,
html[data-theme="light"] .bulk-row .bulk-row-phone {
    color: #1a140a !important;
}

/* ===== SIDEBAR ADMIN ===== */
html[data-theme="light"] .admin-sidebar {
    background: linear-gradient(180deg, #fffbef 0%, #fdf3d3 50%, #faecbe 100%) !important;
    border-right-color: rgba(176,125,14,0.22) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .sidebar-header {
    border-bottom-color: rgba(176,125,14,0.20) !important;
}
html[data-theme="light"] .sidebar-brand-name { color: #8a5e08 !important; }
html[data-theme="light"] .sidebar-brand-sub { color: #4a3717 !important; }
html[data-theme="light"] .sidebar-group-label { color: #6a531b !important; }
html[data-theme="light"] .sidebar-group-label::before {
    background: linear-gradient(90deg, rgba(176,125,14,0.30), rgba(176,125,14,0.10)) !important;
}
html[data-theme="light"] .sidebar-link { color: #4a3717 !important; }
html[data-theme="light"] .sidebar-link:hover {
    color: #1a140a !important;
    background: rgba(176,125,14,0.12) !important;
    border-color: rgba(176,125,14,0.18) !important;
}
html[data-theme="light"] .sidebar-link.active {
    color: #1a140a !important;
    background: linear-gradient(135deg, rgba(176,125,14,0.28) 0%, rgba(176,125,14,0.16) 100%) !important;
    border-color: rgba(176,125,14,0.40) !important;
    box-shadow: 0 2px 12px rgba(176,125,14,0.20), inset 0 1px 0 rgba(255,255,255,0.7) !important;
}
html[data-theme="light"] .sidebar-link.active i,
html[data-theme="light"] .sidebar-link.active svg {
    color: #8a5e08 !important;
    stroke: #8a5e08 !important;
}
html[data-theme="light"] .sidebar-toggle {
    background: rgba(176,125,14,0.12) !important;
    border-color: rgba(176,125,14,0.30) !important;
    color: #4a3717 !important;
}
html[data-theme="light"] .sidebar-toggle:hover {
    background: rgba(176,125,14,0.22) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .sidebar-footer .sidebar-logout {
    color: #4a3717 !important;
    background: rgba(255,255,255,0.70) !important;
    border-color: rgba(176,125,14,0.22) !important;
}
html[data-theme="light"] .sidebar-footer .sidebar-logout:hover {
    color: #c43030 !important;
    background: rgba(220,38,38,0.12) !important;
    border-color: rgba(220,38,38,0.30) !important;
}

/* ===== ADMIN MAIN ===== */
html[data-theme="light"] .admin-page-header h1 { color: #1a140a !important; }
html[data-theme="light"] .admin-page-header p { color: #6a531b !important; }
html[data-theme="light"] .admin-main label { color: #4a3717 !important; }
html[data-theme="light"] .admin-main .empty-state { color: #6a531b !important; }
html[data-theme="light"] .admin-footer { color: #6a531b !important; }
html[data-theme="light"] .admin-main .stat-card .stat-number { color: #1a140a !important; }
html[data-theme="light"] .admin-main .stat-card .stat-label { color: #6a531b !important; }
html[data-theme="light"] .admin-main .panel-section h2 {
    color: #1a140a !important;
    border-bottom-color: rgba(176,125,14,0.22) !important;
}
html[data-theme="light"] .admin-main .chart-card h3 { color: #4a3717 !important; }
html[data-theme="light"] .admin-main .btn-outlined {
    border-color: rgba(176,125,14,0.35) !important;
    color: #4a3717 !important;
}
html[data-theme="light"] .admin-main .btn-outlined:hover {
    border-color: rgba(176,125,14,0.55) !important;
    background: rgba(176,125,14,0.10) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .admin-main .pagination a,
html[data-theme="light"] .admin-main .pagination span {
    border-color: rgba(176,125,14,0.25) !important;
    color: #4a3717 !important;
}
html[data-theme="light"] .admin-main .detail-row .detail-label { color: #6a531b !important; }
html[data-theme="light"] .admin-main .detail-row .detail-value { color: #1a140a !important; }
html[data-theme="light"] .admin-main .detail-row { border-bottom-color: rgba(176,125,14,0.18) !important; }
html[data-theme="light"] .admin-main .detail-card .detail-header h3 { color: #8a5e08 !important; }

/* Mobile header admin */
html[data-theme="light"] .admin-mobile-header {
    background: linear-gradient(90deg, #fffbef, #fdf3d3) !important;
    border-bottom-color: rgba(176,125,14,0.25) !important;
    color: #1a140a !important;
    box-shadow: 0 4px 16px rgba(150,110,30,0.14) !important;
}
html[data-theme="light"] .hamburger-btn {
    background: rgba(176,125,14,0.14) !important;
    border-color: rgba(176,125,14,0.30) !important;
    color: #8a5e08 !important;
}
html[data-theme="light"] .hamburger-btn:hover { background: rgba(176,125,14,0.22) !important; }

/* ===== ADM-SEARCH ===== */
html[data-theme="light"] .adm-search {
    background: rgba(255,255,255,0.80) !important;
    border-color: rgba(176,125,14,0.28) !important;
}
html[data-theme="light"] .adm-search:focus-within {
    border-color: rgba(176,125,14,0.55) !important;
    background: #fff !important;
}
html[data-theme="light"] .adm-search-icon { color: rgba(26,20,10,0.50) !important; }
html[data-theme="light"] .adm-search-clear { color: rgba(26,20,10,0.50) !important; }
html[data-theme="light"] .adm-search-clear:hover {
    background: rgba(176,125,14,0.14) !important;
    color: #1a140a !important;
}

/* ===== PAINEL / CARTEIRINHA ===== */
html[data-theme="light"] .pnl-brand-text-main { color: #1a140a !important; }
html[data-theme="light"] .pnl-admin-link {
    color: #4a3717 !important;
    border-color: rgba(176,125,14,0.30) !important;
}
html[data-theme="light"] .pnl-historico-link,
html[data-theme="light"] .pnl-logout-link {
    color: #4a3717 !important;
    background: rgba(255,255,255,0.60) !important;
    border-color: rgba(176,125,14,0.22) !important;
}
html[data-theme="light"] .pnl-wa-hero {
    background: linear-gradient(135deg, rgba(34,160,90,0.14), rgba(34,160,90,0.05)) !important;
    border-color: rgba(34,160,90,0.35) !important;
}
html[data-theme="light"] .pnl-wa-hero-title { color: #1a140a !important; }
html[data-theme="light"] .pnl-wa-hero-sub { color: #4a3717 !important; }
html[data-theme="light"] .pnl-wa-hero-btn {
    background: rgba(34,160,90,0.12) !important;
    border-color: rgba(34,160,90,0.40) !important;
    color: #1e7a4a !important;
}

/* ============================================================
   PAINEL / CARTEIRINHA — coberturas adicionais (anti-flutuacao)
   ============================================================ */
/* Cabecalho colapsavel "SUA CARTEIRINHA" */
html[data-theme="light"] .carteirinha-label {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.28) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 4px 14px rgba(120,85,20,0.10) !important;
}
html[data-theme="light"] .carteirinha-label:hover {
    background: #fffefa !important;
    border-color: rgba(176,125,14,0.45) !important;
}
html[data-theme="light"] .carteirinha-label-icon {
    background: linear-gradient(135deg, rgba(212,160,23,0.22), rgba(212,160,23,0.34)) !important;
    color: #8a5e08 !important;
}
html[data-theme="light"] .carteirinha-label-text { color: #1a140a !important; }
html[data-theme="light"] .carteirinha-toggle-arrow { color: #6a531b !important; }

/* Sections do painel (SUAS INSCRICOES / SUAS AVALIACOES) */
html[data-theme="light"] .pnl-section-header {
    border-bottom-color: rgba(140,100,30,0.30) !important;
}
html[data-theme="light"] .pnl-section-title { color: #1a140a !important; }
html[data-theme="light"] .pnl-section-count {
    background: linear-gradient(135deg, #D4A017, #B07D0E) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(176,125,14,0.32) !important;
}

/* Cards das inscricoes (.painel-card) */
html[data-theme="light"] .painel-card {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.28) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 4px 14px rgba(120,85,20,0.10) !important;
}
html[data-theme="light"] .painel-card:hover {
    border-color: rgba(176,125,14,0.45) !important;
}
html[data-theme="light"] .painel-card-header {
    background: linear-gradient(135deg, #fff8e0 0%, #fdf2c8 100%) !important;
    border-bottom: 1px solid rgba(140,100,30,0.22) !important;
}
html[data-theme="light"] .painel-card-header h3 { color: #1a140a !important; }
html[data-theme="light"] .painel-card-header .card-date { color: #4a3717 !important; }
html[data-theme="light"] .painel-card-body { background: transparent !important; }
html[data-theme="light"] .painel-detail-row { border-bottom-color: rgba(140,100,30,0.18) !important; }
html[data-theme="light"] .painel-detail-label { color: #6a531b !important; }
html[data-theme="light"] .painel-detail-value { color: #1a140a !important; }

/* Nome/instrumento/dados inline dentro do painel-card (estilo inline com #fff) */
html[data-theme="light"] .painel-card [style*="color:#fff"],
html[data-theme="light"] .painel-card h3[style*="color:#fff"] { color: #1a140a !important; }
html[data-theme="light"] .painel-card [style*="rgba(255,255,255,0.35)"],
html[data-theme="light"] .painel-card [style*="rgba(255,255,255,0.22)"],
html[data-theme="light"] .painel-card [style*="rgba(255,255,255,0.30)"] { color: #6a531b !important; }
html[data-theme="light"] .painel-card [style*="rgba(255,255,255,0.75)"],
html[data-theme="light"] .painel-card [style*="rgba(255,255,255,0.80)"],
html[data-theme="light"] .painel-card [style*="rgba(255,255,255,0.85)"] { color: #1a140a !important; }

/* Badges de status (.painel-status-*) — claro */
html[data-theme="light"] .painel-status-matriculado {
    background: rgba(27,77,138,0.16) !important;
    color: #1E3A8A !important;
    border-color: rgba(27,77,138,0.45) !important;
}
html[data-theme="light"] .painel-status-habilitado {
    background: rgba(34,160,90,0.18) !important;
    color: #155d39 !important;
    border-color: rgba(34,160,90,0.45) !important;
}
html[data-theme="light"] .painel-status-experimental {
    background: rgba(230,126,34,0.18) !important;
    color: #7a3e08 !important;
    border-color: rgba(230,126,34,0.45) !important;
}
html[data-theme="light"] .painel-status-pendente {
    background: rgba(140,100,30,0.10) !important;
    color: #4a3717 !important;
    border-color: rgba(140,100,30,0.30) !important;
}
html[data-theme="light"] .painel-status-cancelado {
    background: rgba(201,59,46,0.14) !important;
    color: #991b1b !important;
    border-color: rgba(201,59,46,0.45) !important;
}

/* Action sections (Sincronizar etc) */
html[data-theme="light"] .painel-action-section {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.28) !important;
}
html[data-theme="light"] .painel-action-section h4 { color: #1a140a !important; }

/* CTA "Preencher avaliacao" (inline style com bg verde translucido) */
html[data-theme="light"] a[href="/avaliacoes"][style*="rgba(15,123,109"] {
    background: rgba(34,160,90,0.10) !important;
    border-color: rgba(34,160,90,0.40) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 4px 14px rgba(34,160,90,0.12) !important;
}
html[data-theme="light"] a[href="/avaliacoes"][style*="rgba(15,123,109"] > div > div:first-child { color: #1a140a !important; }
html[data-theme="light"] a[href="/avaliacoes"][style*="rgba(15,123,109"] > div > div:last-child { color: #4a3717 !important; }

/* "Seu historico" / "Sair da Carteirinha" — empurrar pra esquerda do toggle */
.pnl-logout-link {
    margin-right: 58px;
}
@media (max-width: 768px) {
    .pnl-logout-link { margin-right: 52px; }
}

/* ===== TEXTOS BASE / RESETS ===== */
/* Restaura cor de texto em elementos com background colorido (badges, buttons) */
html[data-theme="light"] body :where(
    [class*="badge"]:not([class*="badge-outline"]),
    .stat-card .stat-number
) {
    /* deixa cores especificas serem aplicadas por suas regras */
}

/* Garante texto escuro em inputs do form mesmo com !important hardcoded */
html[data-theme="light"] body input[type="text"],
html[data-theme="light"] body input[type="email"],
html[data-theme="light"] body input[type="tel"],
html[data-theme="light"] body input[type="password"],
html[data-theme="light"] body input[type="number"],
html[data-theme="light"] body input[type="date"],
html[data-theme="light"] body input[type="search"] {
    color: #1a140a !important;
    background: rgba(255,255,255,0.92) !important;
}

/* ============================================================
   FASE 2 — Correcoes posteriores
   - Preservar cores dos badges (status, tags, chips) no claro
   - Reforcar bordas/sombras dos cards
   - Cobrir modal Visao 360 (aluno360.css)
   - Cobrir Matriculas (.mat-*), Cobrancas (.cob-*), Dados da Conta (.sub-*)
   ============================================================ */

/* ===== Refor co contraste dos cards (anti-flutuante) ===== */
html[data-theme="light"] body :where(
    .card.question-card .card-body,
    .question-card .card-body,
    .main-card,
    .signup-card,
    .event-pass,
    .dash-stat,
    .dash-charts .ch,
    .rsp-filters,
    .rsp-stat-card,
    .mat-status-pill,
    .mat-card,
    .cob-summary-card,
    .cob-aluno,
    .sub-section,
    .sub-bal-card,
    .sub-saque-card,
    .sub-info-item,
    .admin-main .card,
    .admin-main .detail-card,
    .admin-main .chart-card,
    .admin-main .stat-card,
    .admin-main .panel-section
) {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.28) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 4px 14px rgba(120,85,20,0.10) !important;
}
html[data-theme="light"] body .dash-stat:hover,
html[data-theme="light"] body .dash-charts .ch:hover,
html[data-theme="light"] body .mat-card:hover,
html[data-theme="light"] body .cob-aluno:hover,
html[data-theme="light"] body .card.question-card .card-body:hover {
    background: #fffefa !important;
    border-color: rgba(140,100,30,0.45) !important;
    box-shadow: 0 6px 22px rgba(120,85,20,0.18) !important;
}

/* ============================================================
   BADGES — preservar identidade visual no claro
   (cada regra tem especificidade > catch-all do texto)
   ============================================================ */

/* ---- admin_usuarios .usr-badge-* ---- */
html[data-theme="light"] .usr-badge {
    border-width: 1px;
    font-weight: 700;
}
html[data-theme="light"] .usr-badge-admin {
    background: rgba(27,77,138,0.16) !important;
    color: #1E3A8A !important;
    border-color: rgba(27,77,138,0.45) !important;
}
html[data-theme="light"] .usr-badge-user {
    background: rgba(34,160,90,0.14) !important;
    color: #155d39 !important;
    border-color: rgba(34,160,90,0.40) !important;
}
html[data-theme="light"] .usr-badge-bolsa-list {
    background: rgba(168,85,247,0.14) !important;
    color: #6b21a8 !important;
    border-color: rgba(168,85,247,0.45) !important;
}
html[data-theme="light"] .usr-badge-bolsa-isento {
    background: rgba(34,160,90,0.16) !important;
    color: #14532d !important;
    border-color: rgba(34,160,90,0.45) !important;
}
html[data-theme="light"] .usr-badge-bolsa-legacy {
    background: rgba(212,160,23,0.16) !important;
    color: #7a5208 !important;
    border-color: rgba(212,160,23,0.45) !important;
}
html[data-theme="light"] .usr-badge-mat-cancelada {
    background: rgba(201,59,46,0.12) !important;
    color: #991b1b !important;
    border-color: rgba(201,59,46,0.40) !important;
}

/* ---- admin_respostas .rsp-status-* / .rsp-novo-* / .rsp-chip-* ---- */
html[data-theme="light"] .rsp-status-pendente {
    background: rgba(100,116,139,0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2351607a' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center !important;
    color: #475569 !important;
    border-color: rgba(100,116,139,0.40) !important;
}
html[data-theme="light"] .rsp-status-habilitado {
    background: rgba(34,160,90,0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23155d39' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center !important;
    color: #155d39 !important;
    border-color: rgba(34,160,90,0.50) !important;
}
html[data-theme="light"] .rsp-status-aula_experimental {
    background: rgba(230,126,34,0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a3e08' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center !important;
    color: #7a3e08 !important;
    border-color: rgba(230,126,34,0.50) !important;
}
html[data-theme="light"] .rsp-status-desabilitado {
    background: rgba(201,59,46,0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23991b1b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center !important;
    color: #991b1b !important;
    border-color: rgba(201,59,46,0.45) !important;
}
html[data-theme="light"] .rsp-status-matriculado {
    background: rgba(27,77,138,0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231E3A8A' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center !important;
    color: #1E3A8A !important;
    border-color: rgba(27,77,138,0.50) !important;
}
html[data-theme="light"] .rsp-badge-matriculado {
    background: rgba(27,77,138,0.16) !important;
    color: #1E3A8A !important;
    border-color: rgba(27,77,138,0.45) !important;
}
html[data-theme="light"] .rsp-badge-cancelado {
    background: rgba(201,59,46,0.12) !important;
    color: #991b1b !important;
    border-color: rgba(201,59,46,0.40) !important;
}
html[data-theme="light"] .rsp-novo-yes {
    background: rgba(34,160,90,0.18) !important;
    color: #155d39 !important;
    border-color: rgba(34,160,90,0.45) !important;
}
html[data-theme="light"] .rsp-novo-no {
    background: rgba(201,59,46,0.12) !important;
    color: #991b1b !important;
    border-color: rgba(201,59,46,0.40) !important;
}
html[data-theme="light"] .rsp-chip-inst {
    background: rgba(27,77,138,0.14) !important;
    color: #1E3A8A !important;
    border-color: rgba(27,77,138,0.40) !important;
}
html[data-theme="light"] .rsp-chip-exp {
    background: rgba(212,160,23,0.14) !important;
    color: #7a5208 !important;
    border-color: rgba(212,160,23,0.45) !important;
}
html[data-theme="light"] .rsp-cat-aluno {
    background: rgba(27,77,138,0.12) !important;
    color: #1E3A8A !important;
    border-color: rgba(27,77,138,0.40) !important;
}
html[data-theme="light"] .rsp-cat-monitor {
    background: rgba(34,160,90,0.14) !important;
    color: #155d39 !important;
    border-color: rgba(34,160,90,0.40) !important;
}
html[data-theme="light"] .rsp-cat-professor {
    background: rgba(212,160,23,0.14) !important;
    color: #7a5208 !important;
    border-color: rgba(212,160,23,0.45) !important;
}
html[data-theme="light"] .rsp-wa {
    background: rgba(37,160,90,0.14) !important;
    color: #155d39 !important;
    border-color: rgba(37,160,90,0.40) !important;
}
html[data-theme="light"] .rsp-name-text { color: #1a140a !important; }
html[data-theme="light"] .rsp-name-email { color: #4a3717 !important; }
html[data-theme="light"] .rsp-name-phone { color: #6a531b !important; }
html[data-theme="light"] .rsp-date { color: #6a531b !important; }
html[data-theme="light"] .rsp-presenca { color: #155d39 !important; }
html[data-theme="light"] .rsp-pagination a {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.30) !important;
    color: #4a3717 !important;
}
html[data-theme="light"] .rsp-pagination a:hover {
    background: rgba(212,160,23,0.10) !important;
    color: #1a140a !important;
}

/* ---- Visao 360 Modal (aluno360.css) ---- */
html[data-theme="light"] .u360-overlay {
    background: rgba(120,90,30,0.40) !important;
}
html[data-theme="light"] .u360-card {
    background: linear-gradient(160deg, #fffdf5 0%, #fdf5e1 100%) !important;
    border-color: rgba(140,100,30,0.32) !important;
    box-shadow: 0 30px 80px rgba(120,85,20,0.35) !important;
}
html[data-theme="light"] .u360-close {
    background: rgba(140,100,30,0.10) !important;
    border-color: rgba(140,100,30,0.30) !important;
    color: #4a3717 !important;
}
html[data-theme="light"] .u360-close:hover {
    background: rgba(220,38,38,0.12) !important;
    color: #991b1b !important;
    border-color: rgba(220,38,38,0.40) !important;
}
html[data-theme="light"] .u360-header {
    background: rgba(255,253,245,0.65) !important;
    border-bottom-color: rgba(140,100,30,0.22) !important;
}
html[data-theme="light"] .u360-name { color: #1a140a !important; }
html[data-theme="light"] .u360-contact { color: #4a3717 !important; }
html[data-theme="light"] .u360-contact span { color: #4a3717 !important; }
html[data-theme="light"] .u360-section { border-bottom-color: rgba(140,100,30,0.20) !important; }
html[data-theme="light"] .u360-section-head h3 { color: #1a140a !important; }
html[data-theme="light"] .u360-section-sub { color: #6a531b !important; }
html[data-theme="light"] .u360-label { color: #6a531b !important; }
html[data-theme="light"] .u360-field input {
    background: #fff !important;
    border-color: rgba(140,100,30,0.30) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .u360-field input:disabled {
    color: #1a140a !important;
    background: rgba(255,253,245,0.85) !important;
}
html[data-theme="light"] .u360-field input:not(:disabled):focus {
    border-color: rgba(140,100,30,0.65) !important;
    background: #fff !important;
}
html[data-theme="light"] .u360-matricula {
    background: rgba(255,253,245,0.90) !important;
    border-color: rgba(140,100,30,0.22) !important;
}
html[data-theme="light"] .u360-mat-row { border-bottom-color: rgba(140,100,30,0.15) !important; }
html[data-theme="light"] .u360-mat-label { color: #6a531b !important; }
html[data-theme="light"] .u360-mat-value { color: #1a140a !important; }
html[data-theme="light"] .u360-hist-status { color: #4a3717 !important; }
html[data-theme="light"] .u360-hist-curso { color: #6a531b !important; }
html[data-theme="light"] .u360-hist-date { color: #6a531b !important; }
html[data-theme="light"] .u360-hist-item { background: rgba(255,253,245,0.85) !important; }
html[data-theme="light"] .u360-pag-stat {
    background: rgba(255,253,245,0.90) !important;
    border-color: rgba(140,100,30,0.22) !important;
}
html[data-theme="light"] .u360-pag-stat-label { color: #6a531b !important; }
html[data-theme="light"] .u360-pag-stat-value { color: #1a140a !important; }
html[data-theme="light"] .u360-pag-stat-paid { border-color: rgba(34,160,90,0.40) !important; }
html[data-theme="light"] .u360-pag-stat-paid .u360-pag-stat-value { color: #155d39 !important; }
html[data-theme="light"] .u360-pag-stat-pending { border-color: rgba(251,191,36,0.45) !important; }
html[data-theme="light"] .u360-pag-stat-pending .u360-pag-stat-value { color: #7a5208 !important; }
html[data-theme="light"] .u360-pag-row {
    background: rgba(255,253,245,0.85) !important;
}
html[data-theme="light"] .u360-pag-date { color: #4a3717 !important; }
html[data-theme="light"] .u360-pag-valor { color: #1a140a !important; }
html[data-theme="light"] .u360-pag-status { color: #4a3717 !important; }
html[data-theme="light"] .u360-badge-admin {
    background: rgba(212,160,23,0.16) !important; color: #7a5208 !important; border-color: rgba(212,160,23,0.45) !important;
}
html[data-theme="light"] .u360-badge-user {
    background: rgba(27,77,138,0.14) !important; color: #1E3A8A !important; border-color: rgba(27,77,138,0.40) !important;
}
html[data-theme="light"] .u360-badge-ativa {
    background: rgba(34,160,90,0.16) !important; color: #155d39 !important; border-color: rgba(34,160,90,0.45) !important;
}
html[data-theme="light"] .u360-badge-info {
    background: rgba(27,77,138,0.14) !important; color: #1E3A8A !important; border-color: rgba(27,77,138,0.40) !important;
}
html[data-theme="light"] .u360-badge-pend {
    background: rgba(212,160,23,0.16) !important; color: #7a5208 !important; border-color: rgba(212,160,23,0.45) !important;
}
html[data-theme="light"] .u360-badge-muted {
    background: rgba(140,100,30,0.08) !important; color: #4a3717 !important; border-color: rgba(140,100,30,0.25) !important;
}
html[data-theme="light"] .u360-badge-bolsa {
    background: rgba(168,85,247,0.14) !important; color: #6b21a8 !important; border-color: rgba(168,85,247,0.45) !important;
}
html[data-theme="light"] .u360-badge-nota {
    background: rgba(244,114,182,0.14) !important; color: #9d174d !important; border-color: rgba(244,114,182,0.45) !important;
}
html[data-theme="light"] .u360-badge-warn {
    background: rgba(230,126,34,0.16) !important; color: #7a3e08 !important; border-color: rgba(230,126,34,0.45) !important;
}
html[data-theme="light"] .u360-btn-edit {
    background: rgba(27,77,138,0.12) !important;
    color: #1E3A8A !important;
    border-color: rgba(27,77,138,0.40) !important;
}
html[data-theme="light"] .u360-btn-edit:hover { background: rgba(27,77,138,0.20) !important; }
html[data-theme="light"] .u360-btn-cancel {
    background: rgba(140,100,30,0.10) !important;
    border-color: rgba(140,100,30,0.30) !important;
    color: #4a3717 !important;
}

/* ---- Matriculas (.mat-*) ---- */
html[data-theme="light"] .mat-status-pill-num { color: #1a140a !important; }
html[data-theme="light"] .mat-sp-cancelada .mat-status-pill-num { color: rgba(26,20,10,0.50) !important; }
html[data-theme="light"] .mat-status-pill-label { color: #6a531b !important; }
html[data-theme="light"] .mat-sp-ativa .mat-status-pill-icon {
    background: rgba(34,160,90,0.18) !important;
    color: #155d39 !important;
}
html[data-theme="light"] .mat-sp-aguardando .mat-status-pill-icon {
    background: rgba(230,126,34,0.18) !important;
    color: #7a3e08 !important;
}
html[data-theme="light"] .mat-sp-cancelada .mat-status-pill-icon {
    background: rgba(140,100,30,0.10) !important;
    color: #6a531b !important;
}
html[data-theme="light"] .mat-avatar-ativa {
    background: linear-gradient(135deg, rgba(34,160,90,0.32), rgba(34,160,90,0.16)) !important;
    color: #155d39 !important;
}
html[data-theme="light"] .mat-avatar-contrato {
    background: linear-gradient(135deg, rgba(230,126,34,0.32), rgba(230,126,34,0.16)) !important;
    color: #7a3e08 !important;
}
html[data-theme="light"] .mat-avatar-cancelada {
    background: rgba(140,100,30,0.10) !important;
    color: #6a531b !important;
}

/* ---- Cobrancas (.cob-*) ---- */
html[data-theme="light"] .cob-summary-label { color: #6a531b !important; }
html[data-theme="light"] .cob-summary-value { color: #1a140a !important; }
html[data-theme="light"] .cob-summary-value.green { color: #155d39 !important; }
html[data-theme="light"] .cob-summary-value.amber { color: #7a5208 !important; }
html[data-theme="light"] .cob-summary-sub { color: #4a3717 !important; border-top-color: rgba(140,100,30,0.18) !important; }
html[data-theme="light"] .cob-summary-sub-tag {
    background: rgba(34,160,90,0.16) !important;
    color: #155d39 !important;
}
html[data-theme="light"] .cob-aluno-avatar {
    background: linear-gradient(135deg, rgba(27,77,138,0.32), rgba(34,160,90,0.22)) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .cob-aluno-name { color: #1a140a !important; }
html[data-theme="light"] .cob-tag {
    background: rgba(140,100,30,0.08) !important;
    color: #4a3717 !important;
    border-color: rgba(140,100,30,0.30) !important;
}
html[data-theme="light"] .cob-tag-pago {
    background: rgba(34,160,90,0.14) !important;
    color: #155d39 !important;
    border-color: rgba(34,160,90,0.40) !important;
}
html[data-theme="light"] .cob-ring-bg { stroke: rgba(140,100,30,0.18) !important; }
html[data-theme="light"] .cob-ring-fill { stroke: #16a34a !important; }
html[data-theme="light"] .cob-ring-text { color: #1a140a !important; }
html[data-theme="light"] .cob-aluno-total-label { color: #6a531b !important; }
html[data-theme="light"] .cob-aluno-total { color: #155d39 !important; }
html[data-theme="light"] .cob-aluno-total-sub { color: #4a3717 !important; }
html[data-theme="light"] .cob-aluno-total-sub-tag {
    background: rgba(34,160,90,0.14) !important;
    color: #155d39 !important;
}

/* Cobrancas filter pills */
html[data-theme="light"] .cob-filter-select {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.30) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .cob-filter-clear {
    background: rgba(140,100,30,0.10) !important;
    color: #4a3717 !important;
    border-color: rgba(140,100,30,0.30) !important;
}

/* ---- Dados da Conta (.sub-*) ---- */
html[data-theme="light"] .sub-section-head { border-bottom-color: rgba(140,100,30,0.22) !important; }
html[data-theme="light"] .sub-section-title { color: #1a140a !important; }
html[data-theme="light"] .sub-section-icon.green { background: rgba(34,160,90,0.18) !important; color: #155d39 !important; }
html[data-theme="light"] .sub-section-icon.blue  { background: rgba(27,77,138,0.18) !important; color: #1E3A8A !important; }
html[data-theme="light"] .sub-section-icon.gold  { background: rgba(212,160,23,0.18) !important; color: #7a5208 !important; }
html[data-theme="light"] .sub-bal-card {
    background: linear-gradient(145deg, rgba(34,160,90,0.10) 0%, rgba(34,160,90,0.04) 100%) !important;
    border-color: rgba(34,160,90,0.35) !important;
}
html[data-theme="light"] .sub-bal-label { color: #6a531b !important; }
html[data-theme="light"] .sub-bal-amount { color: #155d39 !important; }
html[data-theme="light"] .sub-bal-amount.na { color: #6a531b !important; }
html[data-theme="light"] .sub-bal-hint { color: #4a3717 !important; }
html[data-theme="light"] .sub-bal-pix {
    color: #4a3717 !important;
    border-top-color: rgba(140,100,30,0.20) !important;
}
html[data-theme="light"] .sub-bal-pix-type {
    background: rgba(212,160,23,0.16) !important;
    color: #7a5208 !important;
}
html[data-theme="light"] .sub-saque-title { color: #1a140a !important; }
html[data-theme="light"] .sub-saque-desc { color: #4a3717 !important; }
html[data-theme="light"] .sub-saque-quick-label { color: #6a531b !important; }
html[data-theme="light"] .sub-saque-chip {
    background: rgba(34,160,90,0.10) !important;
    border-color: rgba(34,160,90,0.35) !important;
    color: #155d39 !important;
}
html[data-theme="light"] .sub-saque-chip:hover {
    background: rgba(34,160,90,0.20) !important;
    border-color: rgba(34,160,90,0.55) !important;
}
html[data-theme="light"] .sub-saque-chip.active {
    background: rgba(34,160,90,0.28) !important;
    color: #155d39 !important;
}
html[data-theme="light"] .sub-info-item {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.22) !important;
}
html[data-theme="light"] .sub-info-label { color: #6a531b !important; }
html[data-theme="light"] .sub-info-value { color: #1a140a !important; }
html[data-theme="light"] .sub-info-value.mono { color: #4a3717 !important; }

/* ============================================================
   CHART.JS — labels/grid sensiveis ao tema
   admin_dashboard escuta o evento 'themechanged' para re-renderizar
   (controlado via tag em theme.js + admin_dashboard.html)
   ============================================================ */
html[data-theme="light"] canvas { color-scheme: light; color: #1a140a !important; }

/* ============================================================
   FASE 3 — Cards "flutuando" no claro
   - Matriculas: corpo expandido (ficha + financeiro)
   - Usuarios: "Novo usuario" card + linhas da lista (.usr-card)
   ============================================================ */

/* ---- Matriculas: corpo expandido ---- */
html[data-theme="light"] .mat-separator { background: rgba(140,100,30,0.18) !important; }
html[data-theme="light"] .mat-ficha-item {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.25) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 2px 8px rgba(120,85,20,0.08) !important;
}
html[data-theme="light"] .mat-ficha-label { color: #6a531b !important; }
html[data-theme="light"] .mat-ficha-label i { opacity: 0.75 !important; color: #8a5e08 !important; }
html[data-theme="light"] .mat-ficha-value { color: #1a140a !important; }
html[data-theme="light"] .mat-finance-card {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.28) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 2px 10px rgba(120,85,20,0.10) !important;
}
html[data-theme="light"] .mat-finance-label { color: #6a531b !important; }
html[data-theme="light"] .mat-finance-value { color: #4a3717 !important; }
html[data-theme="light"] .mat-finance-value.fin-green { color: #155d39 !important; }
html[data-theme="light"] .mat-finance-value.fin-amber { color: #7a5208 !important; }
html[data-theme="light"] .mat-finance-sub { color: #6a531b !important; }
html[data-theme="light"] .mat-finance-net { color: #4a3717 !important; border-top-color: rgba(140,100,30,0.20) !important; }
html[data-theme="light"] .mat-finance-net-tag {
    background: rgba(34,160,90,0.14) !important;
    color: #155d39 !important;
}
html[data-theme="light"] .mat-aguardando-notice {
    background: rgba(230,126,34,0.10) !important;
    border-color: rgba(230,126,34,0.35) !important;
    color: #7a3e08 !important;
}
html[data-theme="light"] .mat-empty { color: #6a531b !important; }
html[data-theme="light"] .mat-empty i { color: rgba(140,100,30,0.30) !important; }

/* ---- Usuarios: Novo usuario + lista ---- */
html[data-theme="light"] .usr-create-card {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.28) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 4px 14px rgba(120,85,20,0.10) !important;
}
html[data-theme="light"] .usr-create-card:hover {
    border-color: rgba(140,100,30,0.45) !important;
}
html[data-theme="light"] .usr-create-toggle:hover {
    background: rgba(140,100,30,0.06) !important;
}
html[data-theme="light"] .usr-create-toggle-icon {
    background: linear-gradient(135deg, rgba(27,77,138,0.18), rgba(27,77,138,0.08)) !important;
    color: #1E3A8A !important;
}
html[data-theme="light"] .usr-create-toggle.open .usr-create-toggle-icon {
    background: linear-gradient(135deg, rgba(34,160,90,0.20), rgba(34,160,90,0.08)) !important;
    color: #155d39 !important;
}
html[data-theme="light"] .usr-create-toggle-title { color: #1a140a !important; }
html[data-theme="light"] .usr-create-toggle-sub { color: #4a3717 !important; }
html[data-theme="light"] .usr-create-toggle-arrow { color: #6a531b !important; }
html[data-theme="light"] .usr-create-toggle.open .usr-create-toggle-arrow { color: #1a140a !important; }
html[data-theme="light"] .usr-create-sep { background: rgba(140,100,30,0.20) !important; }
html[data-theme="light"] .usr-field label { color: #6a531b !important; }
html[data-theme="light"] .usr-input {
    background: rgba(255,255,255,0.95) !important;
    border-color: rgba(140,100,30,0.30) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .usr-input:focus {
    border-color: rgba(140,100,30,0.65) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(176,125,14,0.14) !important;
}
html[data-theme="light"] .usr-input::placeholder { color: rgba(26,20,10,0.35) !important; }

/* Lista de usuarios — cards individuais */
html[data-theme="light"] .usr-card {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.28) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 2px 10px rgba(120,85,20,0.08) !important;
}
html[data-theme="light"] .usr-card:hover {
    background: #fffefa !important;
    border-color: rgba(140,100,30,0.45) !important;
    box-shadow: 0 4px 18px rgba(120,85,20,0.16) !important;
}
html[data-theme="light"] .usr-avatar { color: #1a140a !important; }
html[data-theme="light"] .usr-avatar-role {
    border-color: #fffdf5 !important;
}
html[data-theme="light"] .usr-role-admin { background: #1E40AF !important; color: #fff !important; }
html[data-theme="light"] .usr-role-user {
    background: rgba(34,160,90,0.80) !important;
    color: #fff !important;
}
html[data-theme="light"] .usr-card-name { color: #1a140a !important; }
html[data-theme="light"] .usr-card-email { color: #4a3717 !important; }
html[data-theme="light"] .usr-card-phone { color: #6a531b !important; }
html[data-theme="light"] .usr-card-phone i { color: #8a5e08 !important; }
html[data-theme="light"] .usr-card-stats {
    border-top-color: rgba(140,100,30,0.20) !important;
}
html[data-theme="light"] .usr-action-btn {
    background: rgba(255,253,245,0.85) !important;
    border-color: rgba(140,100,30,0.30) !important;
    color: #4a3717 !important;
}
html[data-theme="light"] .usr-action-promote {
    color: #1E3A8A !important;
    border-color: rgba(27,77,138,0.40) !important;
}
html[data-theme="light"] .usr-action-promote:hover {
    background: rgba(27,77,138,0.10) !important;
    border-color: rgba(27,77,138,0.60) !important;
}
html[data-theme="light"] .usr-action-revoke {
    color: #991b1b !important;
    border-color: rgba(201,59,46,0.30) !important;
}
html[data-theme="light"] .usr-action-revoke:hover {
    background: rgba(201,59,46,0.10) !important;
    border-color: rgba(201,59,46,0.55) !important;
    color: #991b1b !important;
}
html[data-theme="light"] .usr-stat {
    background: rgba(255,253,245,0.75) !important;
    border-color: rgba(140,100,30,0.25) !important;
    color: #4a3717 !important;
}
html[data-theme="light"] .usr-stat i { color: #6a531b !important; opacity: 0.75 !important; }
html[data-theme="light"] .usr-stat strong { color: #1a140a !important; }

/* Filtros do topo de Usuarios */
html[data-theme="light"] .usr-filter-select {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.30) !important;
    color: #1a140a !important;
}
html[data-theme="light"] .usr-filter-select.active {
    border-color: rgba(176,125,14,0.55) !important;
    background: rgba(176,125,14,0.10) !important;
}
html[data-theme="light"] .usr-filter-clear {
    background: rgba(140,100,30,0.10) !important;
    color: #4a3717 !important;
    border-color: rgba(140,100,30,0.30) !important;
}
html[data-theme="light"] .usr-filter-count { color: #6a531b !important; }
html[data-theme="light"] .usr-filter-count strong { color: #1a140a !important; }

/* ============================================================
   FASE 4 — Tabela rsp-table (Pre-Inscricoes / Avaliacoes)
   Cada <tr> e' um "mini-card". Em claro precisa de fundo opaco + borda.
   ============================================================ */
html[data-theme="light"] .rsp-table tbody tr {
    background: #fffdf5 !important;
}
html[data-theme="light"] .rsp-table tbody tr:hover {
    background: #fffefa !important;
    box-shadow: 0 4px 14px rgba(120,85,20,0.15) !important;
}
html[data-theme="light"] .rsp-table tbody td {
    color: #1a140a !important;
    border-top-color: rgba(140,100,30,0.25) !important;
    border-bottom-color: rgba(140,100,30,0.25) !important;
}
html[data-theme="light"] .rsp-table tbody td:first-child {
    border-left-color: rgba(140,100,30,0.25) !important;
}
html[data-theme="light"] .rsp-table tbody td:last-child {
    border-right-color: rgba(140,100,30,0.25) !important;
}
/* Bulk toolbar (Promover confirmados / Apto) — claro */
html[data-theme="light"] .rsp-bulk-btn {
    background: linear-gradient(135deg, rgba(34,160,90,0.16) 0%, rgba(34,160,90,0.08) 100%) !important;
    border-color: rgba(34,160,90,0.45) !important;
    color: #155d39 !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 2px 8px rgba(34,160,90,0.14) !important;
}
html[data-theme="light"] .rsp-bulk-btn:hover:not(.is-disabled) {
    background: linear-gradient(135deg, rgba(34,160,90,0.28) 0%, rgba(34,160,90,0.16) 100%) !important;
    border-color: rgba(34,160,90,0.65) !important;
    color: #0f4d2c !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 6px 18px rgba(34,160,90,0.22) !important;
}
html[data-theme="light"] .rsp-bulk-btn.is-disabled {
    background: #fffdf5 !important;
    border-color: rgba(140,100,30,0.30) !important;
    color: #6a531b !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 1px 4px rgba(120,85,20,0.08) !important;
    opacity: 0.85 !important;
}
html[data-theme="light"] .rsp-bulk-count {
    background: rgba(34,160,90,0.22) !important;
    color: #0f4d2c !important;
    border-color: rgba(34,160,90,0.50) !important;
}
html[data-theme="light"] .rsp-bulk-btn.is-disabled .rsp-bulk-count {
    background: rgba(140,100,30,0.14) !important;
    color: #4a3717 !important;
    border-color: rgba(140,100,30,0.30) !important;
}
html[data-theme="light"] .rsp-bulk-hint {
    color: #6a531b !important;
}

/* Cabecalho da tabela em claro: usa o MESMO padrao do bloco de busca/filtros
   acima (fundo creme opaco + borda dourada). Texto preto. */
html[data-theme="light"] .rsp-table thead th {
    background: #fffdf5 !important;
    color: #1a140a !important;
    font-weight: 700 !important;
    border-bottom: 2px solid rgba(176,125,14,0.40) !important;
    box-shadow: 0 4px 14px rgba(120,85,20,0.12) !important;
}
html[data-theme="light"] .rsp-table thead th:first-child {
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 0 !important;
    border-left: 1px solid rgba(140,100,30,0.30) !important;
}
html[data-theme="light"] .rsp-table thead th:last-child {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 0 !important;
    border-right: 1px solid rgba(140,100,30,0.30) !important;
}
