/* ============================================================
   CONFIGURAÇÕES GERAIS - APTUS ULTRA-SLIM (VERSÃO FINAL)
   ============================================================ */
:root {
    --azul-aptus: #003366;
    --azul-hover: #002244;
    --cinza-fundo: #f4f7f6;
    --branco: #ffffff;
    --navbar-height: 42px;    /* Altura da barra superior */
    --sidebar-width: 190px;   /* Largura do menu aberto */
    --sidebar-mini: 55px;     /* Largura do menu encolhido */
    --font-base: 0.82rem;     /* Fonte compacta corporativa */
}

body {
    background-color: var(--cinza-fundo);
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    font-size: var(--font-base);
    overflow-x: hidden;
}

/* NAVBAR (TOPO) */
.navbar {
    min-height: var(--navbar-height) !important;
    padding: 0 1rem !important;
    background-color: #212529 !important; /* bg-dark */
}
.navbar-brand img { height: 24px !important; }
.navbar-brand span { font-size: 0.95rem; font-weight: bold; }

/* ESTRUTURA DO LAYOUT */
#wrapper {
    display: flex;
    width: 100%;
    transition: all 0.25s ease;
}

#sidebar-wrapper {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--branco);
    border-right: 1px solid #dee2e6;
    height: calc(100vh - var(--navbar-height));
    transition: all 0.25s ease;
    position: sticky;
    top: var(--navbar-height);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ESTADO ENCOLHIDO (TOGGLED) */
#wrapper.toggled #sidebar-wrapper {
    width: var(--sidebar-mini);
    min-width: var(--sidebar-mini);
}

#wrapper.toggled .sidebar-text {
    display: none !important;
}

/* CENTRALIZAÇÃO DOS ÍCONES NO MODO MINI */
#wrapper.toggled .list-group-item {
    justify-content: center;
    padding: 0.6rem 0;
}
#wrapper.toggled .list-group-item i {
    margin: 0 !important;
    font-size: 1.2rem;
}

/* CONTEÚDO PRINCIPAL */
#page-content-wrapper {
    flex: 1;
    width: 100%;
    padding: 15px 20px;
    background-color: var(--cinza-fundo);
    transition: all 0.25s ease;
}

/* ITENS DO MENU (SIDEBAR) */
#sidebar-wrapper .list-group-item {
    font-size: 0.82rem;
    color: #444;
    padding: 0.5rem 1rem;
    border-left: 3px solid transparent !important;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: 0.2s;
}
#sidebar-wrapper .list-group-item i { font-size: 1rem; }
#sidebar-wrapper .list-group-item:hover {
    background-color: #f8f9fa;
    color: var(--azul-aptus);
    border-left: 3px solid var(--azul-aptus) !important;
}

/* CARDS INDICADORES (DASHBOARD) */
.row-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.card-indicador {
    flex: 1;
    min-width: 160px;
    border-radius: 6px;
    padding: 12px 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.card-indicador:hover { transform: translateY(-2px); }

/* CORES DOS CARDS */
.bg-aptus-blue { background-color: var(--azul-aptus) !important; color: white !important; }
.bg-aptus-green { background-color: #198754 !important; color: white !important; }
.bg-aptus-orange { background-color: #fd7e14 !important; color: white !important; }

.card-title-custom {
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.85;
    margin-bottom: 3px;
}
.card-value-custom {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

/* BOTÕES */
.btn-aptus {
    background-color: var(--azul-aptus);
    color: white !important;
    border: none;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}
.btn-aptus:hover {
    background-color: var(--azul-hover);
    transform: translateY(-1px);
}
.btn-aptus i { font-size: 0.9rem; }

/* TELA DE LOGIN (ESTRUTURA CENTRALIZADA) */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: var(--cinza-fundo);
}
.login-card {
    width: 100%;
    max-width: 320px;
    padding: 2rem;
    background: var(--branco);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
}
.login-card img { max-width: 150px; margin-bottom: 1.5rem; }
.login-card .btn-aptus {
    width: 100%; /* Botão grande apenas no login */
    margin-top: 15px;
    padding: 0.6rem;
}

/* TABELAS COMPACTAS */
.table-aptus { font-size: 0.8rem; background: var(--branco); border-radius: 6px; }
.table-aptus th { background-color: #f8f9fa; padding: 8px 12px !important; color: #555; }
.table-aptus td { padding: 8px 12px !important; vertical-align: middle; }

/* FORMULÁRIOS */
.form-label { font-size: 0.75rem; font-weight: 600; color: #555; margin-bottom: 3px; }
.form-control-sm { font-size: 0.8rem; }

/* TÍTULOS */
h2 { font-size: 1.3rem; font-weight: 700; color: #333; margin-bottom: 20px; }

/* SCROLLBAR SLIM */
#sidebar-wrapper::-webkit-scrollbar { width: 4px; }
#sidebar-wrapper::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }