/* MODO ESCURO
   Só vale com body.tema-escuro. As cores vêm das variáveis de padrao.css;
   aqui ficam AdminLTE, Bootstrap, plugins e as cores fixas das telas. */

/* BASE */
body.tema-escuro,
.tema-escuro .content-wrapper,
.tema-escuro .right-side{
    background-color: var(--cfg-fundo-pagina);
    color: var(--cfg-texto);
}
.tema-escuro .content-header > h1,
.tema-escuro .box-title{
    color: var(--cfg-texto);
}
.tema-escuro .content-header > h1 > small,
.tema-escuro .breadcrumb > li > a,
.tema-escuro .text-muted,
.tema-escuro .help-block{
    color: var(--cfg-texto-suave);
}
.tema-escuro .breadcrumb > .active{
    color: var(--cfg-texto-suave);
}
/* Celular/tablet: o AdminLTE dá fundo cinza-claro fixo ao breadcrumb */
@media (max-width: 991px){
    .tema-escuro .content-header > .breadcrumb{
        background: var(--cfg-fundo-neutro);
    }
    .tema-escuro .content-header > .breadcrumb li:before{
        color: var(--cfg-texto-suave);
    }
}
.tema-escuro hr{
    border-color: var(--cfg-borda);
}
.tema-escuro .close{
    color: #fff;
    text-shadow: none;
}
.tema-escuro .loadStartGiro{
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: var(--cfg-primaria);
    border-right-color: var(--cfg-primaria);
}

/* Preto vira branco: links do skin preto (que são #333) */
:where(.tema-escuro).skin-black a,
:where(.tema-escuro).skin-black-light a{
    color: var(--cfg-primaria);
}
:where(.tema-escuro).skin-black a:hover,
:where(.tema-escuro).skin-black a:active,
:where(.tema-escuro).skin-black a:focus,
:where(.tema-escuro).skin-black-light a:hover,
:where(.tema-escuro).skin-black-light a:active,
:where(.tema-escuro).skin-black-light a:focus{
    color: #fff;
}
.tema-escuro.skin-black .menuLateral .sidebar-menu > li.active > a > .fa{
    background: rgba(0, 0, 0, 0.08);
}
.tema-escuro.skin-black .loginMarca{
    background: linear-gradient(150deg, #2c3b41, #1e282c 135%);
}

/* FORMULÁRIOS */
:where(.tema-escuro) .form-control,
:where(.tema-escuro) .input-group-addon{
    background-color: var(--cfg-fundo-cartao);
    border-color: var(--cfg-borda);
    color: var(--cfg-texto);
}
:where(.tema-escuro) .input-group-addon{
    background-color: var(--cfg-fundo-suave);
}
:where(.tema-escuro) .form-control::placeholder{
    color: #6f7b87;
}
:where(.tema-escuro) .form-control[disabled],
:where(.tema-escuro) .form-control[readonly],
:where(.tema-escuro) .form-control.disabled,
:where(.tema-escuro) fieldset[disabled] .form-control{
    background-color: var(--cfg-fundo-suave);
    color: var(--cfg-texto);
}
:where(.tema-escuro) select.form-control option{
    background: var(--cfg-fundo-cartao);
    color: var(--cfg-texto);
}
:where(.tema-escuro) .btn-default{
    background-color: var(--cfg-fundo-neutro);
    border-color: #46505a;
    color: var(--cfg-texto);
}
:where(.tema-escuro) .btn-default:hover,
:where(.tema-escuro) .btn-default:focus,
:where(.tema-escuro) .btn-default:active,
:where(.tema-escuro) .btn-default.active,
:where(.tema-escuro) .open > .dropdown-toggle.btn-default{
    background-color: #39424b;
    border-color: #56616c;
    color: #fff;
}

/* TABELAS */
:where(.tema-escuro) .table > thead > tr > th,
:where(.tema-escuro) .table > tbody > tr > th,
:where(.tema-escuro) .table > tfoot > tr > th,
:where(.tema-escuro) .table > thead > tr > td,
:where(.tema-escuro) .table > tbody > tr > td,
:where(.tema-escuro) .table > tfoot > tr > td,
:where(.tema-escuro) .table-bordered,
:where(.tema-escuro) .table-bordered > thead > tr > th,
:where(.tema-escuro) .table-bordered > tbody > tr > td{
    border-color: var(--cfg-borda);
}
:where(.tema-escuro) .table-striped > tbody > tr,
:where(.tema-escuro) .table-striped > tbody > tr:nth-of-type(odd){
    background-color: var(--cfg-fundo-bloco);
}
:where(.tema-escuro) .table-hover > tbody > tr:hover{
    background-color: var(--cfg-fundo-neutro);
}
/* Celular: o Bootstrap dá borda #ddd ao .table-responsive (o DataTables cria um em volta da tabela) */
@media screen and (max-width: 767px){
    .tema-escuro .table-responsive{
        border-color: var(--cfg-borda);
    }
}
:where(.tema-escuro) div.dataTables_processing{
    background: var(--cfg-fundo-cartao);
    border-color: var(--cfg-borda);
    color: var(--cfg-texto);
}

/* CAIXAS, ABAS E LISTAS (AdminLTE / Bootstrap) */
:where(.tema-escuro) .box,
:where(.tema-escuro) .box-footer,
:where(.tema-escuro) .nav-tabs-custom,
:where(.tema-escuro) .nav-tabs-custom > .tab-content,
:where(.tema-escuro) .list-group-item,
:where(.tema-escuro) .popover{
    background: var(--cfg-fundo-cartao);
    border-color: var(--cfg-borda);
    color: var(--cfg-texto);
}
:where(.tema-escuro) .box-header.with-border,
:where(.tema-escuro) .box-footer,
:where(.tema-escuro) .nav-tabs,
:where(.tema-escuro) .nav-tabs-custom > .nav-tabs{
    border-color: var(--cfg-borda);
}
:where(.tema-escuro) .well,
:where(.tema-escuro) .panel,
:where(.tema-escuro) .panel-default > .panel-heading{
    background: var(--cfg-fundo-bloco);
    border-color: var(--cfg-borda);
    color: var(--cfg-texto);
}
:where(.tema-escuro) .nav-tabs > li > a,
:where(.tema-escuro) .nav-tabs-custom > .nav-tabs > li > a{
    color: var(--cfg-texto-suave);
}
:where(.tema-escuro) .nav-tabs > li > a:hover{
    background: var(--cfg-fundo-neutro);
    border-color: var(--cfg-borda);
}
:where(.tema-escuro) .nav-tabs > li.active > a,
:where(.tema-escuro) .nav-tabs > li.active > a:hover,
:where(.tema-escuro) .nav-tabs > li.active > a:focus,
:where(.tema-escuro) .nav-tabs-custom > .nav-tabs > li.active > a{
    background: var(--cfg-fundo-cartao);
    border-color: var(--cfg-borda);
    border-bottom-color: transparent;
    color: var(--cfg-texto);
}
:where(.tema-escuro) .pagination > li > a,
:where(.tema-escuro) .pagination > li > span{
    background: var(--cfg-fundo-cartao);
    border-color: var(--cfg-borda);
    color: var(--cfg-texto);
}
:where(.tema-escuro) .pagination > li > a:hover,
:where(.tema-escuro) .pagination > li > a:focus{
    background: var(--cfg-fundo-neutro);
}
:where(.tema-escuro) .pagination > .disabled > a,
:where(.tema-escuro) .pagination > .disabled > a:hover,
.tema-escuro .cfgTabelaDados .pagination > .disabled > a{
    background: var(--cfg-fundo-cartao);
    color: #5d6873;
}
:where(.tema-escuro) .label-default{
    background: var(--cfg-fundo-neutro);
    color: var(--cfg-texto);
}

/* MENUS SUSPENSOS */
:where(.tema-escuro) .dropdown-menu{
    background: var(--cfg-fundo-cartao);
    border-color: var(--cfg-borda);
}
:where(.tema-escuro) .dropdown-menu > li > a{
    color: var(--cfg-texto);
}
:where(.tema-escuro) .dropdown-menu > li > a:hover,
:where(.tema-escuro) .dropdown-menu > li > a:focus{
    background: var(--cfg-fundo-neutro);
    color: #fff;
}
:where(.tema-escuro) .dropdown-menu > .divider{
    background: var(--cfg-borda);
}

/* MODAIS */
:where(.tema-escuro) .modal-content{
    background: var(--cfg-fundo-cartao);
    border-color: var(--cfg-borda);
    color: var(--cfg-texto);
}
:where(.tema-escuro) .modal-header,
:where(.tema-escuro) .modal-footer{
    border-color: var(--cfg-borda);
}
:where(.tema-escuro) .modal-body{
    background-color: var(--cfg-fundo-pagina);
    border-color: var(--cfg-borda);
}
:where(.tema-escuro) .modal-footer{
    background-color: var(--cfg-fundo-cartao);
}

/* ALERTIFY */
.tema-escuro .alertify .ajs-dialog,
.tema-escuro .alertify .ajs-header{
    background: var(--cfg-fundo-cartao);
    color: var(--cfg-texto);
}
.tema-escuro .alertify .ajs-header{
    border-bottom-color: var(--cfg-borda);
}
.tema-escuro .alertify .ajs-footer{
    background: var(--cfg-fundo-suave);
    border-top-color: var(--cfg-borda);
}
.tema-escuro .alertify .ajs-commands button{
    filter: invert(1);
}
.tema-escuro .cfgDialog .ajs-dialog .ajs-footer .ajs-buttons .ajs-cancel{
    border-color: #46505a;
}

/* SELECT2 */
:where(.tema-escuro) .select2-container--default .select2-selection--single,
:where(.tema-escuro) .select2-container--default .select2-selection--multiple,
:where(.tema-escuro) .select2-dropdown{
    background: var(--cfg-fundo-cartao);
    border-color: var(--cfg-borda);
    color: var(--cfg-texto);
}
:where(.tema-escuro) .select2-container--default .select2-selection--single .select2-selection__rendered{
    color: var(--cfg-texto);
}
:where(.tema-escuro) .select2-container--default.select2-container--disabled .select2-selection--single,
:where(.tema-escuro) .select2-container--default.select2-container--disabled .select2-selection--multiple{
    background: var(--cfg-fundo-suave);
}
:where(.tema-escuro) .select2-container--default .select2-search--dropdown .select2-search__field,
:where(.tema-escuro) .select2-container--default .select2-search--inline .select2-search__field{
    background: var(--cfg-fundo-cartao);
    border-color: var(--cfg-borda);
    color: var(--cfg-texto);
}
:where(.tema-escuro) .select2-container--default .select2-results__option[aria-disabled=true]{
    color: var(--cfg-texto-suave);
}

/* CKEDITOR (aviso e notificações) */
.tema-escuro{
    --ck-color-base-background: var(--cfg-fundo-cartao);
    --ck-color-base-foreground: var(--cfg-fundo-suave);
    --ck-color-base-border: var(--cfg-borda);
    --ck-color-text: var(--cfg-texto);
    --ck-color-toolbar-background: var(--cfg-fundo-suave);
    --ck-color-toolbar-border: var(--cfg-borda);
    --ck-color-button-default-hover-background: var(--cfg-fundo-neutro);
    --ck-color-button-default-active-background: var(--cfg-fundo-neutro);
    --ck-color-button-on-background: var(--cfg-fundo-neutro);
    --ck-color-button-on-hover-background: #39424b;
    --ck-color-button-on-color: var(--cfg-texto);
    --ck-color-split-button-hover-background: var(--cfg-fundo-neutro);
    --ck-color-dropdown-panel-background: var(--cfg-fundo-cartao);
    --ck-color-dropdown-panel-border: var(--cfg-borda);
    --ck-color-panel-background: var(--cfg-fundo-cartao);
    --ck-color-panel-border: var(--cfg-borda);
    --ck-color-input-background: var(--cfg-fundo-cartao);
    --ck-color-input-border: var(--cfg-borda);
    --ck-color-input-text: var(--cfg-texto);
    --ck-color-list-background: var(--cfg-fundo-cartao);
    --ck-color-list-button-hover-background: var(--cfg-fundo-neutro);
    --ck-color-labeled-field-label-background: var(--cfg-fundo-cartao);
    --ck-color-tooltip-background: #000;
}
.tema-escuro .ck-content{
    color: var(--cfg-texto);
}

/* INTRO.JS E GRÁFICO */
.tema-escuro .introjs-tooltip{
    background-color: var(--cfg-fundo-cartao);
    color: var(--cfg-texto);
}
.tema-escuro .homeGrafico .morris-hover.morris-default-style{
    background: rgba(29, 35, 41, 0.97);
    color: var(--cfg-texto-suave);
}

/* PAINEL DE APARÊNCIA */
.tema-escuro .control-sidebar-light{
    color: var(--cfg-texto);
}

/* CORES FIXAS DAS TELAS: tons mais claros para ler no fundo escuro */
.tema-escuro .cfgSelo.sucesso{ background: rgba(0, 166, 90, 0.18);   color: #4fd394; }
.tema-escuro .cfgSelo.alerta { background: rgba(219, 139, 11, 0.2);  color: #f2b552; }
.tema-escuro .cfgSelo.perigo { background: rgba(221, 75, 57, 0.2);   color: #f38b7d; }

.tema-escuro .cfgDica,
.tema-escuro .neSelo{
    background: rgba(240, 173, 78, 0.12);
    color: #e9c47e;
}
.tema-escuro .cfgReenvio,
.tema-escuro .cfgPagina .cfgReenvio .btn{
    color: #f2b552;
}
.tema-escuro .cfgPagina .cfgReenvio .btn:hover,
.tema-escuro .cfgPagina .cfgReenvio .btn:focus{
    color: #fff;
}
.tema-escuro .excAviso,
.tema-escuro .loginAviso.erro{
    color: #f3a196;
}
.tema-escuro .loginAviso.sucesso{
    color: #6fd9a4;
}
.tema-escuro .plSem{
    color: #f38b7d;
}
.tema-escuro .limGrupo > .fa{
    color: #f2b552;
}

/* Bordas e trilhos cinza-claro */
.tema-escuro .cfgOpcao,
.tema-escuro .empModulo,
.tema-escuro .histResumoItem{
    border-left-color: #4a545e;
}
.tema-escuro .cfgOpcao.ativo,
.tema-escuro .empModulo.ativo{
    border-left-color: var(--cfg-sucesso);
}
.tema-escuro .histResumoItem.sucesso{ border-left-color: var(--cfg-sucesso); }
.tema-escuro .histResumoItem.perigo { border-left-color: #dd4b39; }
.tema-escuro .empModulo.pendente{
    border-left-color: #f39c12;
    background: rgba(243, 156, 18, 0.08);
}
.tema-escuro .usoItem.desativado{
    border-left-color: #4a545e;
}
.tema-escuro .plCard:not(.destaque){
    border-top-color: #4a545e;
}
.tema-escuro .cfgSwitch:not([aria-checked="true"]),
.tema-escuro .painelSwitch:not(:checked){
    background: #4a545e;
}
.tema-escuro .cfgLiberar input[type="checkbox"]:not(:checked){
    border-color: #5d6873;
}
.tema-escuro .usoBarra,
.tema-escuro .manBarra{
    background: var(--cfg-fundo-neutro);
}
.tema-escuro .avModalBotao:not(.principal){
    border-color: #46505a;
}

/* BOTÃO SOL/LUA E ESCOLHA NO PAINEL */
.temaSol{
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    vertical-align: middle;
}
.temaIconeSol{
    display: none;
}
.tema-escuro .temaIconeSol{
    display: inline-block;
}
.tema-escuro .temaIconeLua{
    display: none;
}
