
:root {
    --cor-menu: #19191a;
    --cor-textos-dark:  #F4FAFF;
    --cor-subtitle: #F4FAFF;
    --cor-text-menu: #F4FAFF;
    --cor-icon-menu: #fff;
    --cor-background-hover: #f8f8f829;
    --cor-text-secundary: #333333;
    --cor-sub-secundary: #B0B0B0;
    
}


.global-style {
    font-family: 'Ubuntu', sans-serif!important;
}

.global-style .navbar.fixed-top + .page-body-wrapper {
    background-color: var(--cor-menu) !important;
}

.global-style .navbar .navbar-brand-wrapper {
    background-color: var(--cor-menu) !important;
}

.global-style .navbar .navbar-menu-wrapper {
    background-color: var(--cor-menu) !important;
    /* box-shadow: 12px 4px 16px #c9c9c947; */
}

.global-style .sidebar {
    background-color: var(--cor-menu) !important;
    /* box-shadow: 14px 0px 10px #c9c9c947!important; */
}

.global-style .content-wrapper {
    /* background-color: #f1f5f9 !important; */
    background-color: #f0f2f7 !important;
}

.global-style .font-weight-bold {
    color: var(--cor-textos-dark) !important;
}

.global-style .text-secondary {
    color:  var(--cor-subtitle) !important;
}

.global-style .sidebar .nav .nav-item .nav-link .menu-title {
    color:  var(--cor-text-menu) !important;
    font-family: 'Ubuntu', sans-serif !important;
    font-weight: 100;
    border-radius: 35px!important;
}

.global-style .sidebar .nav .nav-item .nav-link i.menu-icon:before{
    color:  var(--cor-icones) !important;
    border-radius: 35px!important;
}

.global-style .sidebar .nav .nav-item:hover{
    background: var(--cor-background-hover) !important;
    color: #0f1431 !important;
    border-radius: 35px;
    margin-right: 3px;
}

.nome-user-dropdown{
    color: var(--cor-text-secundary) !important;
}

.email-user-dropdown{
    color: var(--cor-sub-secundary) !important;
    font-size: 11px;
}

.navbar .navbar-menu-wrapper .navbar-nav .nav-item.dropdown .dropdown-menu.navbar-dropdown {
    margin-top: 6px;
    width: 210px;
    margin-left: -149px;
    border-top: 4px solid var(--cor-menu)!important;
}

.fi {
    cursor: pointer;
}

.icon-menu-principal{
    color: #F4FAFF!important
}

.navbar .default-layout-navbar{
    background-color: var(--cor-menu)!important;
}

.fixed-top {
    background-color: var(--cor-menu)!important;
}


@media(max-width: 768px){
    .navbar .navbar-menu-wrapper .navbar-nav .nav-item.dropdown .dropdown-menu.navbar-dropdown {
        margin-left: 18px !important;
    }
}

/* Oculta o menu lateral por padrão no mobile */
@media (max-width: 991.98px) {
    .sidebar-icon-only .sidebar {
        width: 0px!important;
    }

    .sidebar-offcanvas {
        position: fixed;
        left: 0px;
        top: 0;
        width: 86vw;
        height: 100vh !important;
        transition: left 0.3s ease;
        z-index: 999;
        opacity: 0.9;
    }

    .show-sidebar .sidebar-offcanvas {
        left: 0;
    }

    .global-style .sidebar{
        margin-top: 70px;
    }
}

/* ================================
   ESTILOS DE CHECKBOX CUSTOMIZADOS
   ================================ */

/* Container do checkbox */
.checkbox-label {
    display: flex !important;
    align-items: center !important;
    position: relative;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    line-height: 1.6;
    margin-bottom: 15px;
    padding: 5px 0;
    gap: 0 !important;
    width: 100%;
}

/* Esconder o checkbox padrão */
.checkbox-label input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    cursor: pointer;
    height: 0 !important;
    width: 0 !important;
    left: -9999px !important;
    pointer-events: none;
}

/* Criar checkbox customizado */
.checkbox-label .checkmark {
    display: inline-block !important;
    position: relative !important;
    height: 22px !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    background-color: #fff !important;
    border: 2px solid #ddd !important;
    border-radius: 5px !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    margin-right: 15px !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
}

/* Hover do checkbox */
.checkbox-label:hover .checkmark {
    border-color: #3498db !important;
    background-color: #f0f8ff !important;
}

/* Quando o checkbox estiver marcado */
.checkbox-label input:checked ~ .checkmark {
    background-color: #3498db !important;
    border-color: #3498db !important;
}

/* Criar o checkmark/indicador (escondido quando não marcado) */
.checkbox-label .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Mostrar o checkmark quando marcado */
.checkbox-label input:checked ~ .checkmark:after {
    display: block !important;
}

/* Estilo do checkmark/tick */
.checkbox-label .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Checkbox desabilitado */
.checkbox-label input:disabled ~ .checkmark {
    background-color: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
    cursor: not-allowed !important;
}

.checkbox-label input:disabled {
    cursor: not-allowed;
}

.checkbox-label input:disabled ~ .checkmark:after {
    border-color: #999;
}

/* Texto do label */
.checkbox-label > span:not(.checkmark),
.checkbox-label > text {
    flex: 1;
    display: inline-block;
}

/* Grupo de checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    padding: 10px 0;
}

/* Checkboxes dentro de config-group */
.config-group .checkbox-label {
    margin-bottom: 10px;
    width: 100%;
}

/* Variação de cores */
.checkbox-label.checkbox-success input:checked ~ .checkmark {
    background-color: #27ae60 !important;
    border-color: #27ae60 !important;
}

.checkbox-label.checkbox-warning input:checked ~ .checkmark {
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
}

.checkbox-label.checkbox-danger input:checked ~ .checkmark {
    background-color: #e74c3c !important;
    border-color: #e74c3c !important;
}

/* ================================
   ESTILOS DE CHECKBOX PADRÃO
   (para checkboxes sem .checkbox-label)
   ================================ */

/* Estilizar checkboxes nativos */
input[type="checkbox"]:not(.checkbox-label input[type="checkbox"]) {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    border: 2px solid #ddd !important;
    border-radius: 5px !important;
    background-color: #fff !important;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease !important;
    vertical-align: middle;
    margin-right: 15px !important;
    margin-top: 0;
    margin-bottom: 0;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* Hover dos checkboxes nativos */
input[type="checkbox"]:not(.checkbox-label input[type="checkbox"]):hover {
    border-color: #3498db !important;
    background-color: #f0f8ff !important;
}

/* Checkbox marcado */
input[type="checkbox"]:not(.checkbox-label input[type="checkbox"]):checked {
    background-color: #3498db !important;
    border-color: #3498db !important;
}

/* Checkmark do checkbox nativo */
input[type="checkbox"]:not(.checkbox-label input[type="checkbox"]):checked::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    display: block;
}

/* Checkbox desabilitado */
input[type="checkbox"]:not(.checkbox-label input[type="checkbox"]):disabled {
    background-color: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
    cursor: not-allowed !important;
}

/* Focus dos checkboxes */
input[type="checkbox"]:not(.checkbox-label input[type="checkbox"]):focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Labels ao lado de checkboxes nativos */
label:has(> input[type="checkbox"]):not(.checkbox-label) {
    display: inline-flex !important;
    align-items: center !important;
    cursor: pointer;
    user-select: none;
    gap: 12px;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Melhorar espaçamento em formulários */
.form-group input[type="checkbox"],
.config-group input[type="checkbox"]:not(.checkbox-label input[type="checkbox"]) {
    margin-top: 2px;
    margin-bottom: 2px;
}

/* Select após checkbox-label */
.checkbox-label + select,
.checkbox-group select {
    margin-left: 37px;
    margin-top: 10px;
    margin-bottom: 15px;
    width: auto;
    max-width: 350px;
    display: block;
    padding: 8px 12px;
}

/* Config group - espaçamento especial */
.config-group {
    margin-bottom: 30px;
    padding: 5px 0;
}

.config-group > label:not(.checkbox-label) {
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
    color: #2c3e50;
    font-size: 15px;
}

/* Garantir quebra de linha adequada */
.checkbox-group .checkbox-label {
    display: flex !important;
    width: 100%;
    flex-wrap: nowrap;
}

/* Espaçamento entre checkbox e select */
.checkbox-group .checkbox-label + select {
    margin-top: 8px;
}

/* Small text abaixo dos grupos */
.config-group .form-text {
    margin-top: 8px;
    margin-left: 37px;
    font-size: 13px;
    color: #6c757d;
    display: block;
}

/* ================================
   AJUSTES ESPECÍFICOS PARA MODAIS
   ================================ */

/* Modal de configurações avançadas */
#modalConfigAvancadas .checkbox-label {
    align-items: center !important;
}

#modalConfigAvancadas .checkbox-group {
    padding-left: 0 !important;
}

/* Garantir que labels de formulário tenham estrutura correta */
.modal-body label.checkbox-label,
.config-advanced-tabs label.checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
}

.modal-body .checkmark,
.config-advanced-tabs .checkmark {
    margin-right: 15px !important;
}

/* Checkboxes em formulários de modal */
.modal .checkbox-label {
    min-height: 28px;
}

/* Tabs dentro do modal */
.config-advanced-tabs .tab-content {
    padding: 20px 10px;
}

/* H4 dentro das tabs */
.config-advanced-tabs h4 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* ================================
   AJUSTES ADICIONAIS
   ================================ */

/* Garantir que nada sobrescreva os estilos */
.checkbox-label * {
    box-sizing: border-box;
}

/* Prevenir quebra indesejada de texto */
.checkbox-label > span:not(.checkmark) {
    word-break: break-word;
    line-height: 1.6;
}

/* Ajuste fino para alinhamento */
.checkbox-group > .checkbox-label:first-child {
    margin-top: 0;
}

.checkbox-group > .checkbox-label:last-child {
    margin-bottom: 0;
}

/* ================================
   AJUSTES PARA SWEETALERT2 TOAST
   ================================ */

/* Esconder elementos desnecessários do toast */
.swal2-toast .swal2-checkbox,
.swal2-toast .swal2-radio,
.swal2-toast .swal2-input,
.swal2-toast .swal2-file,
.swal2-toast .swal2-textarea,
.swal2-toast .swal2-select,
.swal2-toast .swal2-range,
.swal2-toast .swal2-validation-message,
.swal2-toast .swal2-html-container,
.swal2-toast .swal2-footer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Garantir que apenas o título e ícone apareçam */
.swal2-toast .swal2-title {
    display: block !important;
}

.swal2-toast .swal2-icon {
    display: flex !important;
}