/* 1. RESET & VARIAVEIS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3AC163;
    --primary-hover: #2fa653;
    --bg-system: #f8f9fa; /* Cor cinza clara do fundo */
    --sidebar-width: 240px;
}

body {
    background-color: var(--bg-system);
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    overflow-x: hidden;
}

/* 2. ESTRUTURA PRINCIPAL (LAYOUT) */
.app {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: transparent; /* Permite ver o fundo do body */
}

.content {
    padding: 20px 30px;
    width: 100%;
    flex: 1;
    background: transparent !important; /* Remove qualquer fundo branco residual */
}

/* 3. COMPONENTES DE TOPO */
.topbar {
    background: #ffffff;
    padding: 16px 30px;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-name {
    font-weight: 600;
    font-size: 14px;
    color: #6b7280;
}

/* 4. MENU LATERAL */
.logo-area {
    text-align: center;
    margin-bottom: 30px;
}

.logo-img {
    max-width: 160px;
    width: 100%;
    height: auto;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu a i {
    width: 18px;
    height: 18px;
}

.menu a:hover, .menu a.active {
    background: #e8f8ef;
    color: var(--primary-color);
    font-weight: 600;
}

/* 5. CARDS & TABELAS */
.card {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Custom cards para o Dashboard (index.php) */
.custom-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px;
    transition: all 0.3s ease;
}

.custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Estilo de Tabelas Bootstrap Customizadas */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f9fafb;
    color: #6b7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* 6. BOTÕES E INPUTS */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(58, 193, 99, 0.2);
}

/* 7. UTILITÁRIOS */
.bg-light-success { background-color: #e8f8ef; }
.bg-light-info { background-color: #e0f2fe; }
.bg-light-warning { background-color: #fef3c7; }
.bg-light-danger { background-color: #fee2e2; }

.text-success { color: var(--primary-color) !important; }

.container-fluid {
    width: 100% !important;
    max-width: none !important;
}