/* Estilos para Página de Configurações */

/* Layout geral */
body {
    background-color: #f8f9fa !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333 !important;
}

.container-fluid {
    padding: 0 15px;
}

/* Header da página */
.page-header {
    background: linear-gradient(135deg,  #1E3A8A 0%, #2563EB 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center !important;
    align-items: center !important;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0.5rem 0 0 0 !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Tabs de navegação */
.nav-tabs {
    border-bottom: 3px solid #e9ecef;
    margin-bottom: 0;
    background: white;
    border-radius: 12px 12px 0 0;
    padding: 0 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 8px 8px 0 0;
    margin-right: 4px;
    padding: 15px 25px;
    font-weight: 600;
    color: #6c757d;
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    background: #f8f9fa;
    color: #495057;
    transform: translateY(-2px);
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #012870 0%, #012870 100%);
    color: white;
    border-color: #012870;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.nav-tabs .nav-link i {
    font-size: 1.1rem;
    margin-right: 8px;
}

/* Conteúdo das tabs */
.tab-content {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #012870 0%, #012870 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    border: none;
    padding: 1.5rem;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
}

.card-body {
    padding: 2rem;
}

/* Seções de configuração */
.config-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.config-section:hover {
    background: #ffffff;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.config-section h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.config-section h6 i {
    color: #007bff;
    margin-right: 8px;
}

.config-section p {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Botões */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #012870 0%, #012870 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #012870 0%, #012870 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    color: white;
}

.btn-outline-primary {
    border: 2px solid #007bff;
    color: #007bff;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    color: white;
    transform: translateY(-2px);
}

/* Tabelas */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Estados vazios */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #012870 0%, #012870 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Notificações */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
    margin-left: auto;
}

.notification-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .nav-tabs .nav-link {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .nav-tabs .nav-link i {
        display: none;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .config-section {
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0 10px;
    }
    
    .page-header {
        padding: 1.5rem 0;
        margin-bottom: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .nav-tabs {
        padding: 0 0.5rem;
    }
    
    .nav-tabs .nav-link {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .config-section {
        padding: 0.75rem;
    }
    
    .config-section h6 {
        font-size: 1rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 0.875rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease;
}

.config-section {
    animation: fadeInUp 0.6s ease;
}

.config-section:nth-child(1) { animation-delay: 0.1s; }
.config-section:nth-child(2) { animation-delay: 0.2s; }
.config-section:nth-child(3) { animation-delay: 0.3s; }
.config-section:nth-child(4) { animation-delay: 0.4s; }

/* Melhorias de acessibilidade */
.btn:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-control:focus {
    transform: translateY(-1px);
}

/* Estilos específicos para Equipamentos e Módulos */
.equipamentos-list, .modulos-list {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
}

.equipamentos-list::-webkit-scrollbar, .modulos-list::-webkit-scrollbar {
    width: 6px;
}

.equipamentos-list::-webkit-scrollbar-track, .modulos-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.equipamentos-list::-webkit-scrollbar-thumb, .modulos-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.equipamentos-list::-webkit-scrollbar-thumb:hover, .modulos-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Cards de estatísticas */
.card.bg-primary, .card.bg-success, .card.bg-info, .card.bg-warning {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.bg-primary:hover, .card.bg-success:hover, .card.bg-info:hover, .card.bg-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Ações rápidas */
.card.border-primary .card-header {
    background: linear-gradient(135deg, #012870 0%, #012870 100%) !important;
}

/* Badges personalizados */
.badge.fs-6 {
    font-size: 1rem !important;
    padding: 0.5rem 0.75rem;
}

/* Lista de equipamentos por categoria */
.equipamentos-list h6.text-primary {
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.equipamentos-list .ms-3 > div {
    border-left: 3px solid #e9ecef;
    padding-left: 10px;
    margin-bottom: 5px;
}

.equipamentos-list .ms-3 > div:hover {
    background-color: rgba(0, 123, 255, 0.05);
    border-left-color: #007bff;
}

/* Lista de módulos */
.modulos-list > div:hover {
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 5px;
}

/* Botões de ação */
.btn.w-100 {
    transition: all 0.3s ease;
}

.btn.w-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsividade para equipamentos */
@media (max-width: 768px) {
    .equipamentos-list, .modulos-list {
        max-height: 300px !important;
    }
    
    .card.bg-primary, .card.bg-success, .card.bg-info, .card.bg-warning {
        margin-bottom: 1rem;
    }
    
    .btn.w-100 {
        margin-bottom: 0.5rem;
    }
}

/* Estilos para modais de módulos e tipos */
.module-item, .equipment-type-item {
    transition: all 0.3s ease;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 5px;
}

.module-item:hover, .equipment-type-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateX(5px);
}

.module-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0.1);
}

.btn-group .btn {
    margin: 0 2px;
}

/* Melhorias nos modais */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: linear-gradient(135deg, #012870 0%, #012870 100%);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Estilos para inputs de cor */
input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsividade para modais */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 15px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* Dark Mode */
body[data-theme="dark"] {
    background-color: #111827 !important;
    color: #FFFFFF !important;
}

body[data-theme="dark"] .page-header {
    background: linear-gradient(135deg, #012870 0%, #012870 100%);
}

body[data-theme="dark"] .nav-tabs {
    background: #1F2937;
    border-bottom-color: #374151;
}

body[data-theme="dark"] .nav-tabs .nav-link {
    color: #E5E7EB;
}

body[data-theme="dark"] .nav-tabs .nav-link:hover {
    background: #374151;
    color: #FFFFFF;
}

body[data-theme="dark"] .nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
    color: #FFFFFF;
}

body[data-theme="dark"] .tab-content {
    background: #1F2937;
    color: #FFFFFF;
}

body[data-theme="dark"] .card {
    background-color: #1F2937 !important;
    color: #FFFFFF;
    border-color: #374151;
}

body[data-theme="dark"] .card-header {
    background: linear-gradient(135deg, #374151 0%, #1F2937 100%);
}

body[data-theme="dark"] .card-body {
    background: #1F2937;
    color: #FFFFFF;
}

body[data-theme="dark"] .config-section {
    background-color: #1F2937 !important;
    border-color: #374151;
    color: #FFFFFF;
}

body[data-theme="dark"] .config-section:hover {
    background-color: #374151 !important;
    border-color: #4B5563;
}

body[data-theme="dark"] .config-section h6 {
    color: #FFFFFF;
}

body[data-theme="dark"] .config-section p {
    color: #E5E7EB;
}

body[data-theme="dark"] .data-table {
    background-color: #1F2937 !important;
    color: #FFFFFF;
}

body[data-theme="dark"] .data-table th {
    background: #374151 !important;
    color: #FFFFFF;
    border-bottom-color: #4B5563;
}

body[data-theme="dark"] .data-table td {
    color: #E5E7EB;
    border-bottom-color: #374151;
}

body[data-theme="dark"] .data-table tbody tr:hover {
    background-color: #374151 !important;
}

body[data-theme="dark"] .form-group label {
    color: #FFFFFF;
}

body[data-theme="dark"] .form-control {
    background-color: #1F2937;
    border-color: #4B5563;
    color: #FFFFFF;
}

body[data-theme="dark"] .form-control:focus {
    background-color: #374151;
    border-color: #3B82F6;
    color: #FFFFFF;
}

body[data-theme="dark"] .form-select {
    background-color: #1F2937;
    border-color: #4B5563;
    color: #FFFFFF;
}

body[data-theme="dark"] .modal-content {
    background-color: #1F2937 !important;
    color: #FFFFFF;
}

body[data-theme="dark"] .modal-header {
    background: linear-gradient(135deg, #374151 0%, #1F2937 100%);
}

body[data-theme="dark"] .modal-body {
    background: #1F2937;
    color: #FFFFFF;
}

body[data-theme="dark"] .modal-footer {
    background: #1F2937;
    border-top-color: #374151;
}

body[data-theme="dark"] .empty-state {
    color: #E5E7EB;
}

body[data-theme="dark"] .notification-content {
    background-color: #1F2937;
    color: #FFFFFF;
    border: 1px solid #374151;
}

/* Estilos para checkboxes no modo escuro */
body[data-theme="dark"] .permissao-checkbox {
    border-color: #86888d !important;
    background-color: #1F2937 !important;
}

body[data-theme="dark"] .permissao-checkbox:checked {
    background-color: #3B82F6 !important;
    border-color: #3B82F6 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
}

body[data-theme="dark"] .form-check-input {
    border-color: #86888d !important;
    background-color: #1F2937 !important;
}

body[data-theme="dark"] .form-check-input:checked {
    background-color: #3B82F6 !important;
    border-color: #3B82F6 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
}

/* Estilos para switches (form-switch) no modo claro */
.form-check-input[type="checkbox"].form-switch {
    border: 2px solid #163047 !important;
}

.form-check-input[type="checkbox"].form-switch:checked {
    background-color: #030405 !important;
    border-color: #181a1f !important;
}

/* Estilos para switches no modo escuro */
body[data-theme="dark"] .form-check-input[type="checkbox"].form-switch {
    border-color: #86888d !important;
    background-color: #374151 !important;
}

body[data-theme="dark"] .form-check-input[type="checkbox"].form-switch:checked {
    background-color: #d61717 !important;
    border-color: #3B82F6 !important;
}

/* Estilos para checkboxes de permissões */
.permissao-checkbox {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
    width: 18px !important;
    height: 18px !important;
    margin-right: 8px !important;
    border: 2px solid #6c757d !important;
    border-radius: 4px !important;
    background-color: #ffffff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    transition: all 0.2s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    flex-shrink: 0 !important;
}

.permissao-checkbox:checked {
    background-color: #3B82F6 !important;
    border-color: #3B82F6 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
}

.permissao-checkbox:hover {
    border-color: #495057 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

.permissao-checkbox:focus {
    outline: 2px solid #007bff !important;
    outline-offset: 2px !important;
    border-color: #007bff !important;
}

/* Estilos para form-check-input padrão do Bootstrap */
.form-check-input {
    border: 2px solid #6c757d !important;
    border-radius: 4px !important;
    background-color: #ffffff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    transition: all 0.2s ease !important;
    width: 18px !important;
    height: 18px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.form-check-input:checked {
    background-color: #3B82F6 !important;
    border-color: #3B82F6 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
}

.form-check-input:hover {
    border-color: #495057 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

.form-check-label {
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none;
    position: relative;
    z-index: 1;
}

.form-check {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

#permissoesContainer {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1 !important;
    -webkit-user-select: none;
    user-select: none;
}

#permissoesContainer * {
    pointer-events: auto !important;
}

#permissoesContainer .form-check {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1 !important;
}

#permissoesContainer .form-check-input {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
    opacity: 1 !important;
    visibility: visible !important;
    border: 2px solid #6c757d !important;
    background-color: #ffffff !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

#permissoesContainer .form-check-input:checked {
    background-color: #3B82F6 !important;
    border-color: #3B82F6 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
}

#permissoesContainer .form-check-input:hover {
    border-color: #495057 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

#permissoesContainer .form-check-label {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Garantir que nenhum elemento sobreponha os checkboxes */
#permissoesContainer .row {
    pointer-events: auto !important;
}

#permissoesContainer .col-md-6 {
    pointer-events: auto !important;
}

#permissoesContainer .mb-4 {
    pointer-events: auto !important;
}

/* Remover qualquer overlay invisível */
#permissoesContainer::before,
#permissoesContainer::after {
    display: none !important;
    pointer-events: none !important;
}

/* Estilos específicos para checkboxes no modal de usuário - Modo Claro */
#usuarioModal .form-check-input,
#usuarioModal .permissao-checkbox {
    border: 2px solid #6c757d !important;
    background-color: #ffffff !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
}

#usuarioModal .form-check-input:checked,
#usuarioModal .permissao-checkbox:checked {
    background-color: #3B82F6 !important;
    border-color: #3B82F6 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 12px !important;
}

#usuarioModal .form-check-input:hover,
#usuarioModal .permissao-checkbox:hover {
    border-color: #495057 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

#usuarioModal .form-check-input:focus,
#usuarioModal .permissao-checkbox:focus {
    outline: 2px solid #007bff !important;
    outline-offset: 2px !important;
    border-color: #007bff !important;
}

#usuarioModal .form-check-label {
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none !important;
    position: relative !important;
    z-index: 1 !important;
    color: inherit !important;
}

#usuarioModal .form-check {
    position: relative !important;
    z-index: 1 !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}