/* ══════════════════════════════════════════════════════════════
   AG Themes — temas extras além do Padrão (default)
   • clean       — Modern / Indigo, sidebar branca
   • dark        — Dark mode completo
   • ios         — Estilo iOS / macOS
   • corporativo — ERP corporativo, navy + azul, fonte Inter
   • bb          — Estilo app Banco do Brasil
   • inter       — Estilo app Banco Inter
   • c6          — Estilo app C6 Bank
   ══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   TEMA: CLEAN  (moderno, sidebar branca, indigo)
   ────────────────────────────────────────────────────────────── */
:root[data-theme="clean"] {
    /* Sidebar — clara */
    --sb-bg: #ffffff;
    --sb-border: rgba(99, 102, 241, .10);
    --sb-accent: #6366F1;
    --sb-accent-soft: rgba(99, 102, 241, .10);
    --sb-text: #374151;
    --sb-text-muted: #9CA3AF;
    --sb-text-active: #6366F1;
    --sb-hover-bg: rgba(99, 102, 241, .07);
    --sb-radius: 10px;

    /* App */
    --ag-bg: #F5F7FF;
    --ag-surface: #ffffff;
    --ag-border: #E5E7EB;
    --ag-text: #111827;
    --ag-text2: #1F2937;
    --ag-subtext: #4B5563;
    --ag-muted: #9CA3AF;
    --ag-primary: #6366F1;
    --ag-primary-dark: #4338CA;
    --ag-primary-soft: #EEF2FF;
    --ag-shadow-xs: 0 1px 2px rgba(99,102,241,.06);
    --ag-shadow-sm: 0 1px 4px rgba(99,102,241,.07), 0 2px 10px rgba(99,102,241,.04);
    --ag-shadow-md: 0 2px 8px rgba(99,102,241,.08), 0 6px 24px rgba(99,102,241,.06);
    --ag-shadow-lg: 0 8px 32px rgba(99,102,241,.12), 0 2px 8px rgba(99,102,241,.06);
}

/* Sidebar fundo branco */
:root[data-theme="clean"] .ag-sidebar {
    background: #ffffff;
    box-shadow: 2px 0 12px rgba(99,102,241,.08), 1px 0 0 rgba(99,102,241,.10);
    border-right: 1px solid rgba(99,102,241,.10);
}

/* Logo icon com cor indigo */
:root[data-theme="clean"] .ag-sidebar-logo-icon {
    background: rgba(99, 102, 241, .10);
    border: 1px solid rgba(99, 102, 241, .18);
    color: #6366F1;
}
:root[data-theme="clean"] .ag-sidebar-logo-icon:hover {
    background: rgba(99, 102, 241, .17);
}
:root[data-theme="clean"] .ag-sidebar-logo-texto strong { color: #111827; }
:root[data-theme="clean"] .ag-sidebar-logo-texto span   { color: #6B7280; }

/* Scrollbar da sidebar */
:root[data-theme="clean"] .ag-sidebar-menu {
    scrollbar-color: rgba(99,102,241,.15) transparent;
}
:root[data-theme="clean"] .ag-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(99,102,241,.15);
}

/* Botão de grupo do menu */
:root[data-theme="clean"] .ag-menu-sistema-btn { color: #9CA3AF; }
:root[data-theme="clean"] .ag-menu-sistema-btn:hover { color: #6366F1; }
:root[data-theme="clean"] .ag-menu-sistema.active > .ag-menu-sistema-btn { color: #6366F1; }

/* Linha ativa no menu */
:root[data-theme="clean"] .ag-menu-link.ativo::before,
:root[data-theme="clean"] .ag-menu-link.active::before { background: #6366F1; }

/* Footer da sidebar */
:root[data-theme="clean"] .ag-sidebar-footer {
    border-top-color: rgba(99,102,241,.10);
}

/* Faixa colorida no topbar */
:root[data-theme="clean"] .ag-topbar-pagina::before {
    background: linear-gradient(90deg, #4338CA 0%, #6366F1 55%, #818CF8 100%);
}

/* Overlay sidebar mobile */
:root[data-theme="clean"] .ag-sidebar-overlay {
    background: rgba(17,24,39,.35);
}

/* ──────────────────────────────────────────────────────────────
   TEMA: DARK  (dark mode completo)
   ────────────────────────────────────────────────────────────── */
:root[data-theme="dark"] {
    /* Sidebar — muito escura */
    --sb-bg: #0B1120;
    --sb-border: rgba(255,255,255,.06);
    --sb-accent: #60A5FA;
    --sb-accent-soft: rgba(96,165,250,.15);
    --sb-text: rgba(255,255,255,.75);
    --sb-text-muted: rgba(255,255,255,.32);
    --sb-text-active: #ffffff;
    --sb-hover-bg: rgba(255,255,255,.06);

    /* App */
    --ag-bg: #0F172A;
    --ag-surface: #1E293B;
    --ag-border: rgba(255,255,255,.08);
    --ag-text: #F1F5F9;
    --ag-text2: #CBD5E1;
    --ag-subtext: #94A3B8;
    --ag-muted: #64748B;
    --ag-primary: #60A5FA;
    --ag-primary-dark: #3B82F6;
    --ag-primary-soft: rgba(96,165,250,.14);
    --ag-success-soft: rgba(16,185,129,.14);
    --ag-warning-soft: rgba(245,158,11,.14);
    --ag-shadow-xs: 0 1px 2px rgba(0,0,0,.4);
    --ag-shadow-sm: 0 1px 4px rgba(0,0,0,.5), 0 2px 10px rgba(0,0,0,.35);
    --ag-shadow-md: 0 2px 8px rgba(0,0,0,.5), 0 6px 24px rgba(0,0,0,.4);
    --ag-shadow-lg: 0 8px 32px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.4);
}

/* Sidebar ainda mais escura */
:root[data-theme="dark"] .ag-sidebar {
    background: linear-gradient(175deg, #060c18 0%, #0B1120 55%, #07101f 100%);
}

/* Header principal */
:root[data-theme="dark"] .ag-header {
    background: #1E293B;
    border-bottom-color: rgba(255,255,255,.06);
}

/* Aba de tabs */
:root[data-theme="dark"] .ag-tabs {
    background: #1E293B;
    border-bottom-color: rgba(255,255,255,.06);
}
:root[data-theme="dark"] .ag-tab {
    background: #0F172A;
    border-color: rgba(255,255,255,.07);
    color: #94A3B8;
}
:root[data-theme="dark"] .ag-tab:hover {
    background: #263246;
    color: #CBD5E1;
}
:root[data-theme="dark"] .ag-tab.ativa {
    background: #1E293B;
    color: #60A5FA;
    border-bottom-color: transparent;
}
:root[data-theme="dark"] .ag-tab-fechar { color: #64748B; }
:root[data-theme="dark"] .ag-tab-fechar:hover { background: rgba(255,255,255,.12); color: #F87171; }

/* Área de conteúdo */
:root[data-theme="dark"] .ag-conteudo { background: var(--ag-bg); }

/* Topbar da página */
:root[data-theme="dark"] .ag-topbar-pagina {
    background: #1E293B;
    border-color: rgba(255,255,255,.06);
}
:root[data-theme="dark"] .ag-topbar-pagina::before {
    background: linear-gradient(90deg, #1d4ed8 0%, #60A5FA 55%, #93C5FD 100%);
}

/* KPIs */
:root[data-theme="dark"] .ag-kpi {
    background: #1E293B;
    border-color: rgba(255,255,255,.06);
}

/* Cards */
:root[data-theme="dark"] .ag-card {
    background: #1E293B;
    border-color: rgba(255,255,255,.06);
    box-shadow: 0 1px 3px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}

/* Inputs e selects */
:root[data-theme="dark"] .ag-input,
:root[data-theme="dark"] .ag-select {
    background: #0F172A;
    border-color: rgba(255,255,255,.12);
    color: #F1F5F9;
}
:root[data-theme="dark"] .ag-input::placeholder { color: #64748B; }
:root[data-theme="dark"] .ag-input:focus,
:root[data-theme="dark"] .ag-select:focus {
    background: #1E293B;
    border-color: #60A5FA;
    box-shadow: 0 0 0 3px rgba(96,165,250,.15);
}

/* Tabelas */
:root[data-theme="dark"] .ag-table thead tr { background: #0F172A; }
:root[data-theme="dark"] .ag-table tbody tr:nth-child(even) { background: rgba(255,255,255,.03); }
:root[data-theme="dark"] .ag-table tbody tr:nth-child(odd)  { background: transparent; }
:root[data-theme="dark"] .ag-table tbody td { border-bottom-color: rgba(255,255,255,.05); }
:root[data-theme="dark"] .ag-table tfoot tr { background: rgba(255,255,255,.04); }

/* Botões */
:root[data-theme="dark"] .ag-btn-secundario {
    background: #1E293B;
    border-color: rgba(255,255,255,.12);
    color: #CBD5E1;
}
:root[data-theme="dark"] .ag-btn-secundario:hover {
    background: #263246;
    border-color: #60A5FA;
    color: #60A5FA;
}
:root[data-theme="dark"] .ag-btn-icone {
    background: #1E293B;
    border-color: rgba(255,255,255,.10);
    color: #94A3B8;
}
:root[data-theme="dark"] .ag-btn-icone:hover {
    border-color: #60A5FA;
    color: #60A5FA;
    background: rgba(96,165,250,.12);
}
:root[data-theme="dark"] .ag-btn-icone.perigo:hover {
    border-color: #F87171;
    color: #F87171;
    background: rgba(248,113,113,.12);
}

/* Badges */
:root[data-theme="dark"] .ag-badge-ativo    { background: rgba(5,150,105,.18);   border-color: rgba(5,150,105,.30);   }
:root[data-theme="dark"] .ag-badge-inativo  { background: rgba(100,116,139,.18); border-color: rgba(100,116,139,.30); }
:root[data-theme="dark"] .ag-badge-aviso    { background: rgba(217,119,6,.18);   border-color: rgba(217,119,6,.30);   }
:root[data-theme="dark"] .ag-badge-primario { background: rgba(96,165,250,.18);  border-color: rgba(96,165,250,.30);  }

/* Modal */
:root[data-theme="dark"] .ag-modal {
    background: #1E293B;
    border: 1px solid rgba(255,255,255,.08);
}
:root[data-theme="dark"] .ag-modal-corpo { background: #1E293B; }

/* Faixa colorida da topbar */
:root[data-theme="dark"] .ag-topbar-pagina::before {
    background: linear-gradient(90deg, #1d4ed8 0%, #3B82F6 55%, #60A5FA 100%);
}

/* Fundo alternado nos itens colapsados de menu */
:root[data-theme="dark"] .ag-menu-sistema.active > .ag-menu-sistema-btn {
    color: rgba(255,255,255,.8);
}

/* ──────────────────────────────────────────────────────────────
   TEMA: iOS / macOS
   ────────────────────────────────────────────────────────────── */
:root[data-theme="ios"] {
    /* Sidebar — vidro fosco claro */
    --sb-bg: rgba(242,242,247,.90);
    --sb-border: rgba(0,0,0,.08);
    --sb-accent: #007AFF;
    --sb-accent-soft: rgba(0,122,255,.10);
    --sb-text: #1C1C1E;
    --sb-text-muted: #8E8E93;
    --sb-text-active: #007AFF;
    --sb-hover-bg: rgba(0,122,255,.07);
    --sb-radius: 12px;

    /* App */
    --ag-bg: #F2F2F7;
    --ag-surface: #ffffff;
    --ag-border: rgba(0,0,0,.09);
    --ag-text: #1C1C1E;
    --ag-text2: #2C2C2E;
    --ag-subtext: #6C6C70;
    --ag-muted: #AEAEB2;
    --ag-primary: #007AFF;
    --ag-primary-dark: #0055B3;
    --ag-primary-soft: rgba(0,122,255,.09);
    --ag-font: -apple-system, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    --ag-shadow-xs: 0 1px 3px rgba(0,0,0,.07);
    --ag-shadow-sm: 0 1px 4px rgba(0,0,0,.07), 0 2px 10px rgba(0,0,0,.04);
    --ag-shadow-md: 0 4px 16px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
    --ag-shadow-lg: 0 8px 30px rgba(0,0,0,.11), 0 2px 8px rgba(0,0,0,.05);
}

/* Sidebar com vidro fosco */
:root[data-theme="ios"] .ag-sidebar {
    background: rgba(242,242,247,.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(0,0,0,.08);
    box-shadow: none;
}

/* Logo icon azul iOS */
:root[data-theme="ios"] .ag-sidebar-logo-icon {
    background: rgba(0,122,255,.09);
    border: 1px solid rgba(0,122,255,.16);
    color: #007AFF;
}
:root[data-theme="ios"] .ag-sidebar-logo-icon:hover {
    background: rgba(0,122,255,.16);
}
:root[data-theme="ios"] .ag-sidebar-logo-texto strong { color: #1C1C1E; }
:root[data-theme="ios"] .ag-sidebar-logo-texto span   { color: #6C6C70; }

/* Scrollbar da sidebar */
:root[data-theme="ios"] .ag-sidebar-menu {
    scrollbar-color: rgba(0,0,0,.12) transparent;
}
:root[data-theme="ios"] .ag-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.12);
}

/* Botão de grupo do menu */
:root[data-theme="ios"] .ag-menu-sistema-btn        { color: #8E8E93; }
:root[data-theme="ios"] .ag-menu-sistema-btn:hover  { color: #007AFF; }
:root[data-theme="ios"] .ag-menu-sistema.active > .ag-menu-sistema-btn { color: #007AFF; }

/* Linha ativa */
:root[data-theme="ios"] .ag-menu-link.ativo::before,
:root[data-theme="ios"] .ag-menu-link.active::before { background: #007AFF; }

/* Footer da sidebar */
:root[data-theme="ios"] .ag-sidebar-footer {
    border-top-color: rgba(0,0,0,.08);
}

/* Header com vidro fosco */
:root[data-theme="ios"] .ag-header {
    background: rgba(242,242,247,.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(0,0,0,.07);
}

/* Tabs */
:root[data-theme="ios"] .ag-tabs {
    background: rgba(242,242,247,.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,.07);
}
:root[data-theme="ios"] .ag-tab {
    border-radius: 8px 8px 0 0;
    background: rgba(0,0,0,.04);
    border-color: rgba(0,0,0,.07);
    color: #6C6C70;
}
:root[data-theme="ios"] .ag-tab:hover { background: rgba(0,0,0,.07); color: #1C1C1E; }
:root[data-theme="ios"] .ag-tab.ativa { background: #fff; color: #007AFF; }
:root[data-theme="ios"] .ag-tab-fechar { color: #AEAEB2; }
:root[data-theme="ios"] .ag-tab-fechar:hover { background: rgba(0,0,0,.08); color: #FF3B30; }

/* Cards com cantos mais arredondados */
:root[data-theme="ios"] .ag-card,
:root[data-theme="ios"] .ag-topbar-pagina,
:root[data-theme="ios"] .ag-kpi { border-radius: 16px; }

/* Faixa colorida da topbar */
:root[data-theme="ios"] .ag-topbar-pagina::before {
    background: linear-gradient(90deg, #0040AA 0%, #007AFF 55%, #64C8FF 100%);
    border-radius: 16px 16px 0 0;
}

/* Inputs estilo iOS */
:root[data-theme="ios"] .ag-input,
:root[data-theme="ios"] .ag-select {
    background: rgba(118,118,128,.07);
    border: 1.5px solid transparent;
    border-radius: 10px;
}
:root[data-theme="ios"] .ag-input:focus,
:root[data-theme="ios"] .ag-select:focus {
    background: #fff;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0,122,255,.12);
}

/* Botões primários */
:root[data-theme="ios"] .ag-btn-primario {
    border-radius: 10px;
    font-weight: 600;
}
:root[data-theme="ios"] .ag-btn-secundario {
    border-radius: 10px;
    border-color: rgba(0,0,0,.12);
}
:root[data-theme="ios"] .ag-btn-secundario:hover {
    border-color: #007AFF;
    color: #007AFF;
    background: rgba(0,122,255,.06);
}

/* Overlay sidebar mobile */
:root[data-theme="ios"] .ag-sidebar-overlay {
    background: rgba(28,28,30,.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ──────────────────────────────────────────────────────────────
   TEMA: CORPORATIVO ERP
   Navy profundo · Azul corporativo · Fonte Inter · Visual ERP
   ────────────────────────────────────────────────────────────── */
:root[data-theme="corporativo"] {
    /* Sidebar — navy escuro corporativo */
    --sb-bg: #0E1E3A;
    --sb-border: rgba(255,255,255,.065);
    --sb-accent: #2176C8;
    --sb-accent-soft: rgba(33,118,200,.20);
    --sb-text: rgba(255,255,255,.82);
    --sb-text-muted: rgba(255,255,255,.36);
    --sb-text-active: #ffffff;
    --sb-hover-bg: rgba(255,255,255,.08);
    --sb-radius: 7px;
    --sb-transition: .20s cubic-bezier(.4,0,.2,1);

    /* App */
    --ag-bg: #EBF0F8;
    --ag-surface: #ffffff;
    --ag-border: #D5DEEE;
    --ag-text: #0A1628;
    --ag-text2: #1A2D4E;
    --ag-subtext: #46597A;
    --ag-muted: #8898B8;
    --ag-primary: #1A5FAB;
    --ag-primary-dark: #0D3D76;
    --ag-primary-soft: #DCEAF9;
    --ag-success: #05875C;
    --ag-success-soft: #D0F2E5;
    --ag-warning: #B45309;
    --ag-warning-soft: #FEF0D9;
    --ag-danger: #C0273A;

    /* Tipografia */
    --ag-font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Sombras */
    --ag-shadow-xs: 0 1px 2px rgba(10,22,40,.06);
    --ag-shadow-sm: 0 1px 3px rgba(10,22,40,.08), 0 2px 8px rgba(10,22,40,.05);
    --ag-shadow-md: 0 2px 8px rgba(10,22,40,.09), 0 6px 20px rgba(10,22,40,.07);
    --ag-shadow-lg: 0 6px 24px rgba(10,22,40,.12), 0 2px 8px rgba(10,22,40,.07);
}

/* Sidebar gradient navy */
:root[data-theme="corporativo"] .ag-sidebar {
    background: linear-gradient(175deg, #0A1628 0%, #0E1E3A 40%, #0A1A30 100%);
    border-right: 1px solid rgba(33,118,200,.12);
    box-shadow: 2px 0 16px rgba(0,0,0,.22);
}

/* Logo icon azul corporativo */
:root[data-theme="corporativo"] .ag-sidebar-logo-icon {
    background: rgba(33,118,200,.14);
    border: 1px solid rgba(33,118,200,.22);
    color: #5AABF0;
}
:root[data-theme="corporativo"] .ag-sidebar-logo-icon:hover {
    background: rgba(33,118,200,.22);
}
:root[data-theme="corporativo"] .ag-sidebar-logo-texto strong {
    color: #ffffff;
    letter-spacing: -.01em;
}
:root[data-theme="corporativo"] .ag-sidebar-logo-texto span {
    color: rgba(255,255,255,.40);
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Scrollbar da sidebar */
:root[data-theme="corporativo"] .ag-sidebar-menu {
    scrollbar-color: rgba(33,118,200,.20) transparent;
}
:root[data-theme="corporativo"] .ag-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(33,118,200,.20);
}

/* Linha ativa no menu */
:root[data-theme="corporativo"] .ag-menu-link.ativo::before,
:root[data-theme="corporativo"] .ag-menu-link.active::before {
    background: #5AABF0;
    width: 3px;
}

/* Footer da sidebar */
:root[data-theme="corporativo"] .ag-sidebar-footer {
    border-top-color: rgba(33,118,200,.14);
}

/* Header principal */
:root[data-theme="corporativo"] .ag-header {
    background: #ffffff;
    border-bottom: 1px solid #D5DEEE;
    box-shadow: 0 1px 0 #D5DEEE;
}

/* Tabs */
:root[data-theme="corporativo"] .ag-tabs {
    background: #F3F6FB;
    border-bottom: 1px solid #D5DEEE;
}
:root[data-theme="corporativo"] .ag-tab {
    background: #E4EBF5;
    border-color: #C8D5E8;
    color: #46597A;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 5px 5px 0 0;
}
:root[data-theme="corporativo"] .ag-tab:hover {
    background: #D8E5F4;
    color: #1A2D4E;
}
:root[data-theme="corporativo"] .ag-tab.ativo {
    background: #ffffff;
    color: #1A5FAB;
    border-bottom-color: transparent;
    font-weight: 600;
}
:root[data-theme="corporativo"] .ag-tab-fechar { color: #8898B8; }
:root[data-theme="corporativo"] .ag-tab-fechar:hover {
    background: rgba(192,39,58,.10);
    color: #C0273A;
}

/* Topbar da página */
:root[data-theme="corporativo"] .ag-topbar-pagina {
    background: #ffffff;
    border: 1px solid #D5DEEE;
    border-radius: 10px;
}
:root[data-theme="corporativo"] .ag-topbar-pagina::before {
    background: linear-gradient(90deg, #0D3D76 0%, #1A5FAB 50%, #2E86DE 100%);
    border-radius: 10px 10px 0 0;
}

/* Cards */
:root[data-theme="corporativo"] .ag-card {
    border: 1px solid #D5DEEE;
    box-shadow: 0 1px 3px rgba(10,22,40,.06), 0 2px 8px rgba(10,22,40,.04);
}

/* KPIs */
:root[data-theme="corporativo"] .ag-kpi {
    border: 1px solid #D5DEEE;
    background: #ffffff;
}

/* Inputs e selects */
:root[data-theme="corporativo"] .ag-input,
:root[data-theme="corporativo"] .ag-select {
    border: 1.5px solid #C8D5E8;
    background: #F8FAFD;
    border-radius: 6px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 13.5px;
    color: #0A1628;
}
:root[data-theme="corporativo"] .ag-input::placeholder { color: #8898B8; }
:root[data-theme="corporativo"] .ag-input:focus,
:root[data-theme="corporativo"] .ag-select:focus {
    background: #ffffff;
    border-color: #1A5FAB;
    box-shadow: 0 0 0 3px rgba(26,95,171,.12);
}

/* Botões */
:root[data-theme="corporativo"] .ag-btn-primario {
    background: linear-gradient(135deg, #1A5FAB 0%, #1E6EC0 100%);
    border-color: #154F96;
    border-radius: 6px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: 0 1px 3px rgba(10,22,40,.18), 0 1px 0 rgba(255,255,255,.08) inset;
}
:root[data-theme="corporativo"] .ag-btn-primario:hover {
    background: linear-gradient(135deg, #1755A0 0%, #1A62B5 100%);
    box-shadow: 0 2px 6px rgba(26,95,171,.30);
}
:root[data-theme="corporativo"] .ag-btn-secundario {
    border: 1.5px solid #C8D5E8;
    background: #ffffff;
    color: #1A2D4E;
    border-radius: 6px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-weight: 500;
}
:root[data-theme="corporativo"] .ag-btn-secundario:hover {
    border-color: #1A5FAB;
    color: #1A5FAB;
    background: #EEF5FD;
}
:root[data-theme="corporativo"] .ag-btn-icone {
    border: 1.5px solid #D5DEEE;
    background: #ffffff;
    color: #46597A;
    border-radius: 6px;
}
:root[data-theme="corporativo"] .ag-btn-icone:hover {
    border-color: #1A5FAB;
    color: #1A5FAB;
    background: #EEF5FD;
}

/* Tabela */
:root[data-theme="corporativo"] .ag-tabela thead tr {
    background: #F0F5FC;
}
:root[data-theme="corporativo"] .ag-tabela thead th {
    color: #1A2D4E;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-bottom: 2px solid #C8D5E8;
}
:root[data-theme="corporativo"] .ag-tabela tbody tr:hover {
    background: #F0F5FC;
}
:root[data-theme="corporativo"] .ag-tabela tbody td {
    border-bottom-color: #E4EBF5;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
}

/* Badges */
:root[data-theme="corporativo"] .ag-badge-primario {
    background: #DCEAF9;
    color: #0D3D76;
    border-color: #B8D4F2;
}

/* Overlay mobile */
:root[data-theme="corporativo"] .ag-sidebar-overlay {
    background: rgba(10,22,40,.40);
}

/* ──────────────────────────────────────────────────────────────
   TEMA: BB  (estilo app Banco do Brasil)
   Azul profundo + amarelo BB + visual institucional forte
   ────────────────────────────────────────────────────────────── */
:root[data-theme="bb"] {
    --sb-bg: #0A2D6F;
    --sb-border: rgba(255,255,255,.08);
    --sb-accent: #F7C600;
    --sb-accent-soft: rgba(247,198,0,.16);
    --sb-text: rgba(255,255,255,.86);
    --sb-text-muted: rgba(255,255,255,.42);
    --sb-text-active: #ffffff;
    --sb-hover-bg: rgba(255,255,255,.08);
    --sb-radius: 8px;

    --ag-bg: #EEF4FB;
    --ag-surface: #ffffff;
    --ag-border: #D6E0EF;
    --ag-text: #0F2142;
    --ag-text2: #17376E;
    --ag-subtext: #4C648B;
    --ag-muted: #7E93B3;
    --ag-primary: #0B3B8C;
    --ag-primary-dark: #072B69;
    --ag-primary-soft: #E2ECFA;
    --ag-success: #0B8F55;
    --ag-success-soft: #D9F4E7;
    --ag-warning: #C58A00;
    --ag-warning-soft: #FFF5CC;
    --ag-danger: #C63535;
    --ag-font: 'Inter', 'Segoe UI', system-ui, sans-serif;

    --ag-shadow-xs: 0 1px 2px rgba(11,59,140,.06);
    --ag-shadow-sm: 0 2px 6px rgba(11,59,140,.08), 0 1px 3px rgba(0,0,0,.04);
    --ag-shadow-md: 0 4px 14px rgba(11,59,140,.10), 0 2px 6px rgba(0,0,0,.05);
    --ag-shadow-lg: 0 10px 32px rgba(11,59,140,.14), 0 4px 12px rgba(0,0,0,.06);
}

:root[data-theme="bb"] .ag-sidebar {
    background: linear-gradient(180deg, #0A2D6F 0%, #0B3B8C 55%, #08265B 100%);
    border-right: 1px solid rgba(247,198,0,.12);
    box-shadow: 2px 0 18px rgba(7,43,105,.20);
}
:root[data-theme="bb"] .ag-sidebar-logo-icon {
    background: rgba(247,198,0,.16);
    border: 1px solid rgba(247,198,0,.28);
    color: #F7C600;
}
:root[data-theme="bb"] .ag-sidebar-logo-icon:hover {
    background: rgba(247,198,0,.24);
}
:root[data-theme="bb"] .ag-sidebar-logo-texto strong { color: #ffffff; }
:root[data-theme="bb"] .ag-sidebar-logo-texto span { color: rgba(255,255,255,.56); }

:root[data-theme="bb"] .ag-sidebar-menu {
    scrollbar-color: rgba(247,198,0,.24) transparent;
}
:root[data-theme="bb"] .ag-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(247,198,0,.24);
}

:root[data-theme="bb"] .ag-menu-sistema-btn:hover,
:root[data-theme="bb"] .ag-menu-sistema.active > .ag-menu-sistema-btn {
    color: #F7C600;
}
:root[data-theme="bb"] .ag-menu-link.ativo::before,
:root[data-theme="bb"] .ag-menu-link.active::before {
    background: #F7C600;
    width: 3px;
}
:root[data-theme="bb"] .ag-sidebar-footer {
    border-top-color: rgba(247,198,0,.15);
}

:root[data-theme="bb"] .ag-header {
    background: #ffffff;
    border-bottom: 1px solid #D6E0EF;
    box-shadow: 0 1px 0 rgba(11,59,140,.06);
}
:root[data-theme="bb"] .ag-tabs {
    background: #F4F8FD;
    border-bottom: 1px solid #D6E0EF;
}
:root[data-theme="bb"] .ag-tab {
    background: #E7EFF9;
    border-color: #CCD8EB;
    color: #48638C;
    border-radius: 8px 8px 0 0;
}
:root[data-theme="bb"] .ag-tab:hover {
    background: #DDE9F8;
    color: #0B3B8C;
}
:root[data-theme="bb"] .ag-tab.ativa {
    background: #ffffff;
    color: #0B3B8C;
    border-bottom-color: transparent;
    font-weight: 700;
}
:root[data-theme="bb"] .ag-tab-fechar:hover {
    background: rgba(198,53,53,.10);
    color: #C63535;
}

:root[data-theme="bb"] .ag-topbar-pagina {
    background: #ffffff;
    border: 1px solid #D6E0EF;
    border-radius: 12px;
}
:root[data-theme="bb"] .ag-topbar-pagina::before {
    background: linear-gradient(90deg, #072B69 0%, #0B3B8C 58%, #F7C600 100%);
    border-radius: 12px 12px 0 0;
}

:root[data-theme="bb"] .ag-card,
:root[data-theme="bb"] .ag-kpi {
    background: #ffffff;
    border: 1px solid #D6E0EF;
    box-shadow: var(--ag-shadow-sm);
}

:root[data-theme="bb"] .ag-input,
:root[data-theme="bb"] .ag-select {
    background: #F8FBFF;
    border: 1.5px solid #C9D7EB;
    color: #0F2142;
    border-radius: 8px;
}
:root[data-theme="bb"] .ag-input::placeholder { color: #7E93B3; }
:root[data-theme="bb"] .ag-input:focus,
:root[data-theme="bb"] .ag-select:focus {
    background: #ffffff;
    border-color: #0B3B8C;
    box-shadow: 0 0 0 3px rgba(11,59,140,.12);
}

:root[data-theme="bb"] .ag-btn-primario {
    background: linear-gradient(135deg, #0A2D6F 0%, #0B3B8C 100%);
    border-color: #072B69;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 700;
}
:root[data-theme="bb"] .ag-btn-primario:hover {
    background: linear-gradient(135deg, #08265B 0%, #0A2D6F 100%);
}
:root[data-theme="bb"] .ag-btn-secundario {
    background: #ffffff;
    border: 1.5px solid #CCD8EB;
    color: #17376E;
    border-radius: 8px;
}
:root[data-theme="bb"] .ag-btn-secundario:hover {
    background: #F5F9FF;
    border-color: #0B3B8C;
    color: #0B3B8C;
}
:root[data-theme="bb"] .ag-btn-icone {
    background: #ffffff;
    border: 1.5px solid #D6E0EF;
    color: #48638C;
    border-radius: 8px;
}
:root[data-theme="bb"] .ag-btn-icone:hover {
    border-color: #0B3B8C;
    color: #0B3B8C;
    background: #F5F9FF;
}

:root[data-theme="bb"] .ag-tabela thead tr,
:root[data-theme="bb"] .ag-table thead tr {
    background: #EEF4FB;
}
:root[data-theme="bb"] .ag-tabela thead th,
:root[data-theme="bb"] .ag-table thead th {
    color: #17376E;
    border-bottom: 2px solid #CAD8EC;
}
:root[data-theme="bb"] .ag-tabela tbody tr:hover,
:root[data-theme="bb"] .ag-table tbody tr:hover {
    background: #F7FAFE;
}

:root[data-theme="bb"] .ag-badge-primario {
    background: #E4EEFB;
    color: #0A2D6F;
    border-color: #C4D7F4;
}
:root[data-theme="bb"] .ag-sidebar-overlay {
    background: rgba(10,45,111,.42);
}

/* ──────────────────────────────────────────────────────────────
   TEMA: INTER  (estilo app Banco Inter)
   Laranja vibrante + branco + cinza leve
   ────────────────────────────────────────────────────────────── */
:root[data-theme="inter"] {
    --sb-bg: #FF7A00;
    --sb-border: rgba(255,255,255,.12);
    --sb-accent: #ffffff;
    --sb-accent-soft: rgba(255,255,255,.16);
    --sb-text: rgba(255,255,255,.92);
    --sb-text-muted: rgba(255,255,255,.62);
    --sb-text-active: #ffffff;
    --sb-hover-bg: rgba(255,255,255,.12);
    --sb-radius: 10px;

    --ag-bg: #FFF7F1;
    --ag-surface: #ffffff;
    --ag-border: #F3D8C2;
    --ag-text: #2B2119;
    --ag-text2: #51382A;
    --ag-subtext: #7A5A47;
    --ag-muted: #B18B75;
    --ag-primary: #FF7A00;
    --ag-primary-dark: #D96400;
    --ag-primary-soft: #FFE8D5;
    --ag-success: #0E9F6E;
    --ag-success-soft: #DCF6EC;
    --ag-warning: #C56A00;
    --ag-warning-soft: #FFF0DF;
    --ag-danger: #D73838;
    --ag-font: 'Inter', 'Segoe UI', system-ui, sans-serif;

    --ag-shadow-xs: 0 1px 2px rgba(255,122,0,.06);
    --ag-shadow-sm: 0 2px 8px rgba(255,122,0,.08), 0 1px 3px rgba(0,0,0,.04);
    --ag-shadow-md: 0 6px 18px rgba(255,122,0,.10), 0 2px 6px rgba(0,0,0,.05);
    --ag-shadow-lg: 0 12px 30px rgba(255,122,0,.14), 0 4px 10px rgba(0,0,0,.06);
}

:root[data-theme="inter"] .ag-sidebar {
    background: linear-gradient(180deg, #FF7A00 0%, #F06C00 55%, #D95F00 100%);
    border-right: 1px solid rgba(255,255,255,.10);
    box-shadow: 2px 0 20px rgba(217,95,0,.20);
}
:root[data-theme="inter"] .ag-sidebar-logo-icon {
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.24);
    color: #ffffff;
}
:root[data-theme="inter"] .ag-sidebar-logo-icon:hover {
    background: rgba(255,255,255,.22);
}
:root[data-theme="inter"] .ag-sidebar-logo-texto strong { color: #ffffff; }
:root[data-theme="inter"] .ag-sidebar-logo-texto span { color: rgba(255,255,255,.70); }

:root[data-theme="inter"] .ag-sidebar-menu {
    scrollbar-color: rgba(255,255,255,.22) transparent;
}
:root[data-theme="inter"] .ag-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.22);
}

:root[data-theme="inter"] .ag-menu-sistema-btn:hover,
:root[data-theme="inter"] .ag-menu-sistema.active > .ag-menu-sistema-btn {
    color: #ffffff;
}
:root[data-theme="inter"] .ag-menu-link.ativo::before,
:root[data-theme="inter"] .ag-menu-link.active::before {
    background: #ffffff;
    width: 3px;
}
:root[data-theme="inter"] .ag-sidebar-footer {
    border-top-color: rgba(255,255,255,.16);
}

:root[data-theme="inter"] .ag-header {
    background: #ffffff;
    border-bottom: 1px solid #F3D8C2;
}
:root[data-theme="inter"] .ag-tabs {
    background: #FFF3EA;
    border-bottom: 1px solid #F3D8C2;
}
:root[data-theme="inter"] .ag-tab {
    background: #FFE7D5;
    border-color: #F3D0B5;
    color: #8A5B3C;
    border-radius: 10px 10px 0 0;
}
:root[data-theme="inter"] .ag-tab:hover {
    background: #FFDCC3;
    color: #D96400;
}
:root[data-theme="inter"] .ag-tab.ativa {
    background: #ffffff;
    color: #FF7A00;
    border-bottom-color: transparent;
    font-weight: 700;
}

:root[data-theme="inter"] .ag-topbar-pagina {
    background: #ffffff;
    border: 1px solid #F3D8C2;
    border-radius: 14px;
}
:root[data-theme="inter"] .ag-topbar-pagina::before {
    background: linear-gradient(90deg, #D96400 0%, #FF7A00 60%, #FFB36B 100%);
    border-radius: 14px 14px 0 0;
}

:root[data-theme="inter"] .ag-card,
:root[data-theme="inter"] .ag-kpi {
    background: #ffffff;
    border: 1px solid #F3D8C2;
    box-shadow: var(--ag-shadow-sm);
    border-radius: 16px;
}

:root[data-theme="inter"] .ag-input,
:root[data-theme="inter"] .ag-select {
    background: #FFF9F5;
    border: 1.5px solid #F1D3BC;
    color: #2B2119;
    border-radius: 12px;
}
:root[data-theme="inter"] .ag-input::placeholder { color: #B18B75; }
:root[data-theme="inter"] .ag-input:focus,
:root[data-theme="inter"] .ag-select:focus {
    background: #ffffff;
    border-color: #FF7A00;
    box-shadow: 0 0 0 4px rgba(255,122,0,.12);
}

:root[data-theme="inter"] .ag-btn-primario {
    background: linear-gradient(135deg, #FF7A00 0%, #F06C00 100%);
    border-color: #D96400;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 700;
}
:root[data-theme="inter"] .ag-btn-primario:hover {
    background: linear-gradient(135deg, #F06C00 0%, #D96400 100%);
}
:root[data-theme="inter"] .ag-btn-secundario {
    background: #ffffff;
    border: 1.5px solid #F1D3BC;
    color: #7A5A47;
    border-radius: 12px;
}
:root[data-theme="inter"] .ag-btn-secundario:hover {
    background: #FFF5EE;
    border-color: #FF7A00;
    color: #FF7A00;
}
:root[data-theme="inter"] .ag-btn-icone {
    background: #ffffff;
    border: 1.5px solid #F3D8C2;
    color: #8A6A56;
    border-radius: 12px;
}
:root[data-theme="inter"] .ag-btn-icone:hover {
    border-color: #FF7A00;
    color: #FF7A00;
    background: #FFF4EC;
}

:root[data-theme="inter"] .ag-tabela thead tr,
:root[data-theme="inter"] .ag-table thead tr {
    background: #FFF3EA;
}
:root[data-theme="inter"] .ag-tabela thead th,
:root[data-theme="inter"] .ag-table thead th {
    color: #7A4A29;
    border-bottom: 2px solid #F2D0B6;
}
:root[data-theme="inter"] .ag-tabela tbody tr:hover,
:root[data-theme="inter"] .ag-table tbody tr:hover {
    background: #FFF9F5;
}

:root[data-theme="inter"] .ag-badge-primario {
    background: #FFE8D5;
    color: #D96400;
    border-color: #FFD1AD;
}
:root[data-theme="inter"] .ag-sidebar-overlay {
    background: rgba(255,122,0,.34);
}

/* ──────────────────────────────────────────────────────────────
   TEMA: C6  (estilo app C6 Bank)
   Preto premium + dourado champagne + minimalista
   ────────────────────────────────────────────────────────────── */
:root[data-theme="c6"] {
    --sb-bg: #111111;
    --sb-border: rgba(255,255,255,.06);
    --sb-accent: #C9A86A;
    --sb-accent-soft: rgba(201,168,106,.16);
    --sb-text: rgba(255,255,255,.86);
    --sb-text-muted: rgba(255,255,255,.42);
    --sb-text-active: #ffffff;
    --sb-hover-bg: rgba(255,255,255,.07);
    --sb-radius: 10px;

    --ag-bg: #171717;
    --ag-surface: #202020;
    --ag-border: rgba(255,255,255,.08);
    --ag-text: #F4F1EA;
    --ag-text2: #E4D8C6;
    --ag-subtext: #B9A995;
    --ag-muted: #8D7E6B;
    --ag-primary: #C9A86A;
    --ag-primary-dark: #A7864D;
    --ag-primary-soft: rgba(201,168,106,.12);
    --ag-success: #38A169;
    --ag-success-soft: rgba(56,161,105,.14);
    --ag-warning: #D69E2E;
    --ag-warning-soft: rgba(214,158,46,.14);
    --ag-danger: #E35D5D;
    --ag-font: 'Inter', 'Segoe UI', system-ui, sans-serif;

    --ag-shadow-xs: 0 1px 2px rgba(0,0,0,.36);
    --ag-shadow-sm: 0 2px 8px rgba(0,0,0,.40), 0 1px 3px rgba(0,0,0,.25);
    --ag-shadow-md: 0 6px 18px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.28);
    --ag-shadow-lg: 0 12px 34px rgba(0,0,0,.55), 0 4px 12px rgba(0,0,0,.30);
}

:root[data-theme="c6"] .ag-sidebar {
    background: linear-gradient(180deg, #0D0D0D 0%, #141414 55%, #0A0A0A 100%);
    border-right: 1px solid rgba(201,168,106,.12);
    box-shadow: 2px 0 20px rgba(0,0,0,.35);
}
:root[data-theme="c6"] .ag-sidebar-logo-icon {
    background: rgba(201,168,106,.10);
    border: 1px solid rgba(201,168,106,.20);
    color: #D6B57A;
}
:root[data-theme="c6"] .ag-sidebar-logo-icon:hover {
    background: rgba(201,168,106,.18);
}
:root[data-theme="c6"] .ag-sidebar-logo-texto strong { color: #ffffff; }
:root[data-theme="c6"] .ag-sidebar-logo-texto span { color: rgba(255,255,255,.48); }

:root[data-theme="c6"] .ag-sidebar-menu {
    scrollbar-color: rgba(201,168,106,.22) transparent;
}
:root[data-theme="c6"] .ag-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(201,168,106,.22);
}

:root[data-theme="c6"] .ag-menu-sistema-btn:hover,
:root[data-theme="c6"] .ag-menu-sistema.active > .ag-menu-sistema-btn {
    color: #D6B57A;
}
:root[data-theme="c6"] .ag-menu-link.ativo::before,
:root[data-theme="c6"] .ag-menu-link.active::before {
    background: #C9A86A;
    width: 3px;
}
:root[data-theme="c6"] .ag-sidebar-footer {
    border-top-color: rgba(201,168,106,.14);
}

:root[data-theme="c6"] .ag-header {
    background: #181818;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
:root[data-theme="c6"] .ag-tabs {
    background: #1B1B1B;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
:root[data-theme="c6"] .ag-tab {
    background: #121212;
    border-color: rgba(255,255,255,.07);
    color: #A89682;
    border-radius: 10px 10px 0 0;
}
:root[data-theme="c6"] .ag-tab:hover {
    background: #232323;
    color: #E4D8C6;
}
:root[data-theme="c6"] .ag-tab.ativa {
    background: #202020;
    color: #D6B57A;
    border-bottom-color: transparent;
    font-weight: 700;
}

:root[data-theme="c6"] .ag-topbar-pagina {
    background: #202020;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
}
:root[data-theme="c6"] .ag-topbar-pagina::before {
    background: linear-gradient(90deg, #8E6A34 0%, #C9A86A 55%, #E3C890 100%);
    border-radius: 14px 14px 0 0;
}

:root[data-theme="c6"] .ag-conteudo {
    background: #171717;
}

:root[data-theme="c6"] .ag-card,
:root[data-theme="c6"] .ag-kpi {
    background: #202020;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: var(--ag-shadow-sm);
    border-radius: 16px;
}

:root[data-theme="c6"] .ag-input,
:root[data-theme="c6"] .ag-select {
    background: #141414;
    border: 1.5px solid rgba(255,255,255,.10);
    color: #F4F1EA;
    border-radius: 12px;
}
:root[data-theme="c6"] .ag-input::placeholder { color: #8D7E6B; }
:root[data-theme="c6"] .ag-input:focus,
:root[data-theme="c6"] .ag-select:focus {
    background: #1A1A1A;
    border-color: #C9A86A;
    box-shadow: 0 0 0 4px rgba(201,168,106,.12);
}

:root[data-theme="c6"] .ag-btn-primario {
    background: linear-gradient(135deg, #A7864D 0%, #C9A86A 100%);
    border-color: #8E6A34;
    color: #111111;
    border-radius: 12px;
    font-weight: 700;
}
:root[data-theme="c6"] .ag-btn-primario:hover {
    background: linear-gradient(135deg, #B59358 0%, #D6B57A 100%);
}
:root[data-theme="c6"] .ag-btn-secundario {
    background: #202020;
    border: 1.5px solid rgba(255,255,255,.10);
    color: #E4D8C6;
    border-radius: 12px;
}
:root[data-theme="c6"] .ag-btn-secundario:hover {
    border-color: #C9A86A;
    color: #D6B57A;
    background: #252525;
}
:root[data-theme="c6"] .ag-btn-icone {
    background: #202020;
    border: 1.5px solid rgba(255,255,255,.09);
    color: #B9A995;
    border-radius: 12px;
}
:root[data-theme="c6"] .ag-btn-icone:hover {
    border-color: #C9A86A;
    color: #D6B57A;
    background: rgba(201,168,106,.08);
}
:root[data-theme="c6"] .ag-btn-icone.perigo:hover {
    border-color: #E35D5D;
    color: #E35D5D;
    background: rgba(227,93,93,.10);
}

:root[data-theme="c6"] .ag-tabela thead tr,
:root[data-theme="c6"] .ag-table thead tr {
    background: #151515;
}
:root[data-theme="c6"] .ag-tabela thead th,
:root[data-theme="c6"] .ag-table thead th {
    color: #D6B57A;
    border-bottom: 2px solid rgba(201,168,106,.18);
}
:root[data-theme="c6"] .ag-tabela tbody tr:nth-child(even),
:root[data-theme="c6"] .ag-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,.015);
}
:root[data-theme="c6"] .ag-tabela tbody tr:hover,
:root[data-theme="c6"] .ag-table tbody tr:hover {
    background: rgba(201,168,106,.06);
}
:root[data-theme="c6"] .ag-tabela tbody td,
:root[data-theme="c6"] .ag-table tbody td {
    border-bottom-color: rgba(255,255,255,.06);
}

:root[data-theme="c6"] .ag-badge-primario {
    background: rgba(201,168,106,.12);
    color: #D6B57A;
    border-color: rgba(201,168,106,.22);
}
:root[data-theme="c6"] .ag-modal {
    background: #202020;
    border: 1px solid rgba(255,255,255,.08);
}
:root[data-theme="c6"] .ag-modal-corpo {
    background: #202020;
}
:root[data-theme="c6"] .ag-sidebar-overlay {
    background: rgba(0,0,0,.48);
}