:root {
    --sidebar-width: 280px;
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-light: #ecf0f1;
    --text-muted: #bdc3c7;
}

body {
    min-height: 100vh;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding-top: 20px;
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-header h3 {
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.menu-category {
    padding: 15px 25px 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.menu-item {
    display: block;
    padding: 12px 25px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
}

.menu-item i {
    width: 25px;
    font-size: 1.1rem;
    margin-right: 10px;
    text-align: center;
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: var(--accent-color);
    text-decoration: none;
}

/* Sidebar Custom Styling */
.sidebar-custom {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-custom.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-link {
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background-color: #f8f9fa;
}

.sidebar-link.active {
    background-color: #0d6efd !important;
    color: white !important;
}

/* Sidebar de Filtros (Direita) */
.sidebar-filters {
    position: fixed;
    top: 0;
    right: -350px; /* Escondida à direita */
    width: 320px;
    height: 100vh;
    background: #212529; /* Dark theme para combinar com o app */
    color: white;
    z-index: 3000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar-filters.active {
    right: 0;
}

.sidebar-filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 2999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-filters-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-filters h4 {
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #ccc;
}

.filter-group .form-control, .filter-group .form-select {
    background-color: #2c3034;
    border: 1px solid #444;
    color: white;
}

.filter-group .form-control:focus {
    background-color: #343a40;
    border-color: #0d6efd;
    color: white;
}

.filter-checkbox-list {
    max-height: 180px;
    overflow-y: auto;
    background-color: #2c3034;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 4px;
}

.filter-checkbox-list::-webkit-scrollbar {
    width: 6px;
}

.filter-checkbox-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.sidebar-filters-footer {
    margin-top: auto;
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }
    .sidebar.active {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
    }
}

/* Ajustes de Responsividade para o Módulo de Login Geral */
#container-email_senha {
    padding: 20px !important;
}

#logo1 {
    max-width: 250px !important; /* Limita o tamanho da logo gigante */
    height: auto !important;
    margin: 0 auto !important;
}

#container-form {
    width: 100% !important;
    max-width: 400px !important;
    margin-top: 20px !important;
}

@media (max-width: 576px) {
    #logo1 {
        max-width: 180px !important;
    }
    #container-form {
        width: 95% !important;
    }
}

/* --- ESTILIZAÇÃO GLOBAL DE TABELAS (TABLE_01) --- */
.treetable {
    color: #000000 !important;
    background-color: white; /* Garante fundo branco base */
}

.treetable td, .treetable th {
    color: #000000 !important;
}

/* Sobrescrever herança de classes text-white da plataforma */
.bg-dark .treetable, 
.bg-dark .treetable td, 
.bg-dark .treetable th {
    color: #000000 !important;
}

.treetable-body tr {
    background-color: #ffffff !important;
}

.treetable-body tr:nth-child(even) {
    background-color: #f2f2f2 !important;
}

.treetable-body tr:hover {
    background-color: #e9ecef !important;
}

/* --- ESTILIZAÇÃO GLOBAL DE PAGINAÇÃO (PAGINATION_01) --- */
.pag_01 {
    color: #000000 !important;
    background-color: #e9ecef !important; /* Cinza bem claro */
    border-radius: 8px;
    padding: 10px;
}

.pag_01 span, 
.pag_01 label, 
.pag_01 div {
    color: #000000 !important;
}

.bg-dark .pag_01, 
.bg-dark .pag_01 span, 
.bg-dark .pag_01 label {
    color: #000000 !important;
}

.bt_pag01 {
    border: none !important;
}


