:root {
    /*  Padrão  */
    --template1: #0d8c70;
    /* Painel lateral */
    --template2: #0a7259;
    /* cor hover */
    --template3: #0fa882;
}
.field-icon {
  float: right;
  margin-left: -25px;
  margin-top: -25px;
  position: relative;
  z-index: 2;
  margin-right: 8px;
  cursor: pointer;
}
#mensagem-recuperar{
  color: var(--template1) !important;
  font-size: 13px;

}

.select2-selection__rendered {
    font-weight: 500;
    line-height: 36px !important;
    border-radius: 7px !important;
    border: 1px solid #c9c7c7;
}
.select2-container .select2-selection--single {
    height: 39px !important;
}
.select2-selection__arrow {
    height: 38px !important;
}


hr.separador {
  border: 1px dotted #666;
  border-radius: 5px;
}

.select2-selection__rendered {
    line-height: 35px !important;
}
.select2-container .select2-selection--single {
    height: 39px !important;
}
.select2-selection__arrow {
    height: 38px !important;
}
hr.separador {
  border: 1px dotted #666;
  border-radius: 5px;
}
.text-verde{
  color:#0e9e29;
}
.ocultar{
  display:none;
}
.textareag{
    width:1000px;
    height:550px;
}
.side-menu .slide .side-menu__item:hover {
    background-color: var(--template2);

}
.main-sidemenu {
    background-color: #2A2E3F;
}
.app-sidebar {
    background-color: #2A2E3F;
}

.slide-menu {
    border-left: 4px solid #de7b53;
    background-color: #2a2e3f !important;
    color: #ffffff;
}
.side-menu__item a{
    background-color: var(--template2);
    color: #ffffff;
}

.side-menu__item:hover .side-menu__icon,
.side-menu__item:hover .side-menu__label,
.side-menu__item:hover .angle {
    color: #ffffff !important;
    fill: #ffffff !important;

}
.slide-item.active,
.slide-item:hover,
.slide-item:focus {
    text-decoration: none;
    color: var(--template1) !important;

}
.app-sidebar .side-item.side-item-category {
    color: #7660a7;
}
.main-sidebar-header {
    background: #2A2E3F !important;
}
.main-header {
    background-color: #2A2E3F !important;
}
.slide-item .app-sidebar .slide-menu .slide-item:before:hover {
    color: var(--template1) !important;
}
.slide.is-expanded .slide-menu a:hover:before {
   color: var(--template1) !important;
}
.slide:hover .side-menu__label,
.slide:hover .angle {
    color: #fff !important;
    fill: #fff !important;
}
.header-icon-svgs {
    color: #ffffff;
    fill: #ffffff;
}
/* Tema claro premium: contraste suave sem branco chapado */
body.light-theme .main-sidemenu,
body.light-theme .app-sidebar,
body.light-theme .main-sidebar-header {
    background: transparent !important;
    /* background: linear-gradient(180deg, #f9fbff 0%, #f2f6ff 100%) !important; */
}

body.light-theme .app-sidebar .main-sidemenu,
body.light-theme .app-sidebar .main-sidebar-header,
body.light-theme .sticky .app-sidebar,
body.light-theme .sticky .app-sidebar .main-sidemenu,
body.light-theme .sticky .app-sidebar .main-sidebar-header {
    background: linear-gradient(180deg, #f9fbff 0%, #f2f6ff 100%) !important;
}

body.light-theme .app-sidebar {
    border-right: 1px solid #e3eaf6;
    box-shadow: 6px 0 18px rgba(26, 46, 84, 0.05);
}

body.light-theme .main-header {
    background: linear-gradient(180deg, #fdfefe 0%, #f6f9ff 100%) !important;
    border-bottom: 1px solid #e7edf7;
    box-shadow: 0 2px 10px rgba(26, 46, 84, 0.05);
}

body.light-theme .main-header.side-header,
body.light-theme .main-header .main-container,
body.light-theme .main-header .container-fluid {
    background: linear-gradient(180deg, #fdfefe 0%, #f6f9ff 100%) !important;
}

body.light-theme .side-menu {
    background-color: transparent !important;
}

body.light-theme .slide-menu {
    background-color: #edf3ff !important;
    border-left-color: #d7e1f5;
    color: #314468;
}

body.light-theme .side-menu__item .side-menu__label,
body.light-theme .side-menu__item .side-menu__icon,
body.light-theme .side-menu__item .angle,
body.light-theme .main-header .nav-link,
body.light-theme .header-icon-svgs {
    color: #314468 !important;
    fill: #314468 !important;
}

body.light-theme .app-sidebar .side-menu__label,
body.light-theme .app-sidebar .side-menu__icon,
body.light-theme .app-sidebar .angle,
body.light-theme .app-sidebar .text-white,
body.light-theme .app-sidebar i.text-white,
body.light-theme .app-sidebar .side-menu__item i,
body.light-theme .app-sidebar .side-menu__item a,
body.light-theme .app-sidebar .side-menu__item a i,
body.light-theme .app-sidebar .side-menu__item a span {
    color: #314468 !important;
    fill: #314468 !important;
}

body.light-theme .main-header .main-header-menu-icon span,
body.light-theme .main-header .main-header-menu-icon span::before,
body.light-theme .main-header .main-header-menu-icon span::after {
    background-color: #314468 !important;
}

body.light-theme .app-sidebar .side-item.side-item-category {
    color: #6f7ea3 !important;
}

body.light-theme .app-sidebar .side-menu__item,
body.light-theme .app-sidebar .side-menu__item a,
body.light-theme .app-sidebar .slide-item,
body.light-theme .app-sidebar .slide-item a,
body.light-theme .app-sidebar .slide-item .side-menu__label,
body.light-theme .app-sidebar .slide-item i,
body.light-theme .app-sidebar .slide-item .angle,
body.light-theme .app-sidebar .side-menu__item .side-menu__label,
body.light-theme .app-sidebar .side-menu__item .side-menu__icon,
body.light-theme .app-sidebar .side-menu__item .angle {
    color: #314468 !important;
    fill: #314468 !important;
}

body.light-theme .app-sidebar .side-menu__item a {
    background-color: transparent !important;
}

body.light-theme .app-sidebar .slide-item.active,
body.light-theme .app-sidebar .slide-item.active .side-menu__label,
body.light-theme .app-sidebar .slide-item.active i,
body.light-theme .app-sidebar .slide-item.active .angle {
    color: #1f3158 !important;
    fill: #1f3158 !important;
}

body.light-theme .app-sidebar .side-menu__item:hover .side-menu__icon,
body.light-theme .app-sidebar .side-menu__item:hover .side-menu__label,
body.light-theme .app-sidebar .side-menu__item:hover .angle,
body.light-theme .app-sidebar .slide:hover .side-menu__label,
body.light-theme .app-sidebar .slide:hover .angle {
    color: #1f3158 !important;
    fill: #1f3158 !important;
}

body.light-theme .main-header .nav-link,
body.light-theme .main-header .nav-link i,
body.light-theme .main-header .main-header-message i,
body.light-theme .main-header .main-header-notification i,
body.light-theme .main-header .header-icon-svgs {
    color: #314468 !important;
    fill: #314468 !important;
}

/* Corrige item ativo branco no menu lateral (ex.: Dashboard) */
body.light-theme .side-menu .slide .side-menu__item.active,
body.light-theme .side-menu .slide .side-menu__item.active .side-menu__label,
body.light-theme .side-menu .slide .side-menu__item.active .side-menu__icon,
body.light-theme .side-menu .slide .side-menu__item.active .angle,
body.light-theme .side-menu__item.active,
body.light-theme .side-menu__item.active .side-menu__label,
body.light-theme .side-menu__item.active .side-menu__icon,
body.light-theme .side-menu__item.active .angle {
    color: #1f3158 !important;
    fill: #1f3158 !important;
}

body.light-theme .app-sidebar .slide .side-menu__item.active::before,
body.light-theme .app-sidebar .slide .side-menu__item.active:hover::before {
    background: #1f3158 !important;
}

/* Corrige toggle da sidebar branco/invisivel no modo claro */
body.light-theme .app-sidebar__toggle,
body.light-theme .app-sidebar__toggle .open-toggle,
body.light-theme .app-sidebar__toggle .close-toggle,
body.light-theme .app-sidebar__toggle .open-toggle i,
body.light-theme .app-sidebar__toggle .close-toggle i,
body.light-theme .app-sidebar__toggle .header-icon,
body.light-theme .main-header-left .app-sidebar__toggle,
body.light-theme .main-header-left .app-sidebar__toggle i {
    color: #314468 !important;
    fill: #314468 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.light-theme .app-sidebar__toggle:hover,
body.light-theme .app-sidebar__toggle:focus,
body.light-theme .app-sidebar__toggle .open-toggle:hover,
body.light-theme .app-sidebar__toggle .close-toggle:hover {
    color: #1f3158 !important;
    fill: #1f3158 !important;
}

body.light-theme .side-menu .slide .side-menu__item:hover {
    background-color: #e8efff !important;
}

body.light-theme .slide:hover .side-menu__label,
body.light-theme .slide:hover .angle,
body.light-theme .side-menu__item:hover .side-menu__icon,
body.light-theme .side-menu__item:hover .side-menu__label,
body.light-theme .side-menu__item:hover .angle {
    color: #1f3158 !important;
    fill: #1f3158 !important;
}


/* Mantem header/sidebar escuros quando o tema for dark/transparent */
body.dark-theme .main-sidemenu,
body.dark-theme .app-sidebar,
body.dark-theme .main-sidebar-header,
body.dark-theme .main-header,
body.transparent-theme .main-sidemenu,
body.transparent-theme .app-sidebar,
body.transparent-theme .main-sidebar-header,
body.transparent-theme .main-header {
    background-color: #2A2E3F !important;
}
.font-size-11{
    font-size: 11px !important;
}

#calendar {
    max-width: 1320px;
    margin: 0 auto;
}

/* Toastr: padroniza cores de feedback independentemente do tema */
#toast-container > .toast.toast-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

#toast-container > .toast.toast-error {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

#toast-container > .toast.toast-warning {
    background-color: #f59f00 !important;
    color: #111111 !important;
}

#toast-container > .toast.toast-info {
    background-color: #0dcaf0 !important;
    color: #06202a !important;
}

/* Mantem os toasts acima de modal/backdrop em todas as telas do painel */
#toast-container {
    z-index: 2147483647 !important;
}

body.swal2-toast-shown .swal2-container,
div:where(.swal2-container) {
    z-index: 2147483647 !important;
}

/* iziToast — sempre acima de modais e backdrops */
.iziToast-wrapper {
    z-index: 2147483647 !important;
}

/* Editor TinyMCE — regras de layout neutras (ambos os temas) */
.tox .tox-edit-area__iframe {
    border-radius: 8px !important;
}

.tox .tox-toolbar, .tox .tox-toolbar__overflow {
    border-radius: 8px 8px 0 0 !important;
}

/* Editor TinyMCE — tema escuro */
body.dark-theme .tox .tox-editor-header,
body.dark-theme .tox .tox-toolbar,
body.dark-theme .tox .tox-toolbar__overflow,
body.dark-theme .tox .tox-toolbar__primary,
body.dark-theme .tox .tox-menubar,
body.dark-theme .note-toolbar {
    background: #23263a !important;
    border-color: #2e3250 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .tox .tox-statusbar,
body.dark-theme .note-statusbar {
    background: #1a1d2e !important;
    border-color: #2e3250 !important;
    color: #a0aec0 !important;
}

body.dark-theme .tox .tox-statusbar__wordcount,
body.dark-theme .tox .tox-statusbar__path-item,
body.dark-theme .tox .tox-statusbar__branding {
    background: transparent !important;
    color: #a0aec0 !important;
}

body.dark-theme .tox .tox-statusbar__resize-handle svg path {
    fill: #a0aec0 !important;
}

body.dark-theme .tox .tox-edit-area__iframe {
    border: 1px solid #3a3f5c !important;
}

/* Editor TinyMCE — tema claro */
body.light-theme .tox .tox-statusbar,
body.light-theme .note-statusbar {
    background: #f3f5f9 !important;
    border-color: #dde3ef !important;
    color: #4a5568 !important;
}

body.light-theme .tox .tox-statusbar__wordcount,
body.light-theme .tox .tox-statusbar__path-item {
    color: #4a5568 !important;
}

body.light-theme .tox .tox-edit-area__iframe {
    border: 1px solid #dde3ef !important;
}

/* ── Cabeçalho mobile: corrige logo e ícones em telas pequenas ── */
@media (max-width: 991px) {
    /* Logo responsiva: volta ao fluxo normal (evita sobreposição) */
    .responsive-logo .header-logo {
        position: static !important;
        display: flex !important;
        align-items: center;
    }
    .responsive-logo .mobile-logo {
        height: 34px !important;
        width: auto !important;
        max-width: 80px !important;
        margin-left: 0 !important;
    }
    /* Ícones do header direito: compactos e em linha única */
    .header-icons {
        flex-wrap: nowrap !important;
    }
    .header-icons .new.nav-link {
        margin: auto 1px !important;
        width: 30px !important;
        height: 30px !important;
        line-height: 30px !important;
        font-size: 14px !important;
    }
    .header-icons .header-icon-svgs {
        width: 18px !important;
        height: 18px !important;
    }
    /* Oculta botão tela cheia no mobile (inútil em celular) */
    .fullscreen-button {
        display: none !important;
    }
}

/* Em telas muito pequenas (<480px): oculta a logo, mantém só hamburger + SAS */
@media (max-width: 479px) {
    .responsive-logo {
        display: none !important;
    }
    /* Oculta toggle de tema (preferência definida uma vez, raramente trocada) */
    .theme-layout {
        display: none !important;
    }
}

/* ── Menu lateral — ícones coloridos por categoria (painel + SAS) ── */

.side-menu__item .menu-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    flex-shrink: 0;
    font-size: 13px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.side-menu__item:hover .menu-icon-wrap {
    transform: scale(1.12);
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

/* Cores — dark theme */
.cat-academico   { background: rgba(59,130,246,0.18);  color: #60a5fa !important; }
.cat-financeiro  { background: rgba(16,185,129,0.18);  color: #34d399 !important; }
.cat-gestao      { background: rgba(245,158,11,0.18);  color: #fbbf24 !important; }
.cat-comunicacao { background: rgba(139,92,246,0.18);  color: #a78bfa !important; }
.cat-sistema     { background: rgba(100,116,139,0.18); color: #94a3b8 !important; }
.cat-suporte     { background: rgba(239,68,68,0.18);   color: #f87171 !important; }

/* Cores — light theme */
body.light-theme .cat-academico   { background: rgba(59,130,246,0.12);  color: #1d4ed8 !important; }
body.light-theme .cat-financeiro  { background: rgba(16,185,129,0.12);  color: #059669 !important; }
body.light-theme .cat-gestao      { background: rgba(245,158,11,0.12);  color: #b45309 !important; }
body.light-theme .cat-comunicacao { background: rgba(139,92,246,0.12);  color: #6d28d9 !important; }
body.light-theme .cat-sistema     { background: rgba(100,116,139,0.12); color: #334155 !important; }
body.light-theme .cat-suporte     { background: rgba(239,68,68,0.12);   color: #dc2626 !important; }

/* Label sem margin-left inline */
.side-menu__item .menu-icon-wrap + .side-menu__label {
    margin-left: 10px;
}

/* Cabeçalho de categoria */
.side-item.side-item-category {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.22) !important;
    padding: 22px 18px 6px !important;
    pointer-events: none;
}

.side-item.side-item-category::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.07);
}

body.light-theme .side-item.side-item-category {
    color: rgba(30,58,138,0.38) !important;
}

body.light-theme .side-item.side-item-category::after {
    background: rgba(0,0,0,0.07);
}

/* Tablet/mobile: dropdown de perfil acima do sidebar (z-index 1029) */
@media (max-width: 1024px) {
    .main-profile-menu.show .dropdown-menu {
        z-index: 2000 !important;
    }
}

/* Seletor de tema no modal de configurações */
.sge-theme-btn {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sge-theme-btn:hover { opacity: 0.85; }
.sge-theme-btn.active { border-color: #4a90d9; box-shadow: 0 0 0 3px rgba(74,144,217,.25); }
.sge-theme-btn-light  { background: #f5f7ff; color: #314468; border-color: #dde3f0; }
.sge-theme-btn-dark   { background: #2a2e3f; color: #fff; border-color: #4a5068; }
.sge-theme-btn-trans  { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; }

/* ================================================================
   Destaque de linha em tabelas (#tabela) — casos de "conta vencida / não paga"
   -----------------------------------------------------------------
   Padrão único p/ o anti-padrão que existia espalhado como
   <tr style="background:#ffdddd"> (ou pastel) inline: no tema escuro a regra
   `.dark-theme .table td { color:#FFF !important }` (assets/css/style-dark.css)
   deixava o texto branco sobre fundo claro — ilegível. Aqui a classe vai no
   <tr>; tema claro mantém o pastel de sempre (só escurece textos de cor
   própria p/ AA); tema escuro escurece o fundo (o branco do tema volta a
   contrastar). custom.css é carregado depois de style-dark.css → ID + !important.
   Contraste AA (>=4.5:1) validado nos dois temas em todas as colunas.
   ================================================================ */

/* --- Cliente com receber/receber_sas vencido e não pago -----------------
   Usada por: sas/paginas/clientes/listar.php, painel/paginas/aniversariantes/listar.php */
#tabela > tbody > tr.linha-cliente-vencido > td        { background-color: #ffdddd !important; }
#tabela > tbody > tr.linha-cliente-vencido:hover > td  { background-color: #ffcccc !important; }
body:not(.dark-theme) #tabela > tbody > tr.linha-cliente-vencido > td.text-danger        { color: #9a1420 !important; } /* Nome  ~6.5:1 */
body:not(.dark-theme) #tabela > tbody > tr.linha-cliente-vencido > td .badge.text-danger { color: #8f1220 !important; } /* "Jurídica" ~7:1 */
body:not(.dark-theme) #tabela > tbody > tr.linha-cliente-vencido > td .badge.text-success{ color: #0a4a1f !important; } /* "Física" ~5.9:1 */
body.dark-theme #tabela > tbody > tr.linha-cliente-vencido > td         { background-color: #47212a !important; }
body.dark-theme #tabela > tbody > tr.linha-cliente-vencido:hover > td   { background-color: #572933 !important; }
body.dark-theme #tabela > tbody > tr.linha-cliente-vencido > td .badge.text-danger  { color: #ff9aa4 !important; } /* ~6.6:1 sobre #47212a */
body.dark-theme #tabela > tbody > tr.linha-cliente-vencido > td .badge.text-success { color: #7ee0a0 !important; } /* ~8:1 sobre #47212a */

/* --- Aluno inadimplente (visual mais discreto: tint + border-left + badge)
   Usada por: painel/paginas/alunos/listar.php. Condição igual à de cima, mas
   o tratamento visual é de propósito mais leve — classe própria. */
#tabela > tbody > tr.linha-aluno-inadimplente > td { background-color: rgba(220,53,69,.07) !important; }
body:not(.dark-theme) #tabela > tbody > tr.linha-aluno-inadimplente > td.text-danger { color: #9a1420 !important; } /* Nome ~6:1 */
body.dark-theme #tabela > tbody > tr.linha-aluno-inadimplente > td { background-color: rgba(220,53,69,.16) !important; }

/* --- Contas a pagar / receber, por status (movido dos <style> inline dessas 2 telas)
   Usada por: painel/paginas/pagar/listar.php, painel/paginas/receber/listar.php
   Valores mantidos: verde=pago, amarelo=vence hoje, rosa=vencida, pendente=sem fundo. */
#tabela > tbody > tr.tr-conta-pago    > td { background-color: #ddffe1 !important; }
#tabela > tbody > tr.tr-conta-hoje    > td { background-color: #fff8dd !important; }
#tabela > tbody > tr.tr-conta-vencida > td { background-color: #ffdddd !important; }
body:not(.dark-theme) #tabela > tbody > tr.tr-conta-pago    > td:not(:last-child) .text-danger,
body:not(.dark-theme) #tabela > tbody > tr.tr-conta-hoje    > td:not(:last-child) .text-danger,
body:not(.dark-theme) #tabela > tbody > tr.tr-conta-vencida > td:not(:last-child) .text-danger,
body:not(.dark-theme) #tabela > tbody > tr.tr-conta-pago    > td:not(:last-child).text-danger,
body:not(.dark-theme) #tabela > tbody > tr.tr-conta-hoje    > td:not(:last-child).text-danger,
body:not(.dark-theme) #tabela > tbody > tr.tr-conta-vencida > td:not(:last-child).text-danger { color: #9a1420 !important; }
body.dark-theme #tabela > tbody > tr.tr-conta-vencida,
body.dark-theme #tabela > tbody > tr.tr-conta-vencida > td  { background: #3b1616 !important; color: #ffb3b3 !important; }
body.dark-theme #tabela > tbody > tr.tr-conta-pago,
body.dark-theme #tabela > tbody > tr.tr-conta-pago > td     { background: #0d2b16 !important; color: #8fe0a0 !important; }
body.dark-theme #tabela > tbody > tr.tr-conta-hoje,
body.dark-theme #tabela > tbody > tr.tr-conta-hoje > td     { background: #2e2200 !important; color: #ffe47a !important; }
body.dark-theme #tabela > tbody > tr.tr-conta-pendente,
body.dark-theme #tabela > tbody > tr.tr-conta-pendente > td { background: transparent !important; }
body.dark-theme #tabela > tbody > tr.tr-conta-vencida > td:not(:last-child) .text-danger { color: #ffb3b3 !important; }
body.dark-theme #tabela > tbody > tr.tr-conta-hoje    > td:not(:last-child) .text-danger { color: #ffe47a !important; }
body.dark-theme #tabela > tbody > tr.tr-conta-pago    > td:not(:last-child) .text-danger { color: #8fe0a0 !important; }