/* ===============================
   CONFIGURAÇÃO GLOBAL
================================*/
:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #2563eb;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --success-dark: #15803d;
    --content-bg: #f1f5f9;
}

body {
    background: var(--content-bg);
    font-family: 'Segoe UI', system-ui;
    overflow-x: hidden;
}

/* ===============================
   SIDEBAR
================================*/
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--sidebar-bg);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

/* LOGO */
.logo-container {
    text-align: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-container img {
    width: 80px;
    background: white;
    padding: 6px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.logo-container h6 {
    margin: 0;
    font-weight: 700;
}

.logo-container small {
    color: var(--text-muted);
}

/* MENU */
.sidebar .nav {
    flex: 1;
    padding: 1rem;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
}

.sidebar a:hover {
    background: var(--sidebar-hover);
}

.sidebar a.active {
    background: var(--sidebar-active);
}

.sidebar i {
    width: 22px;
    text-align: center;
}

.sidebar small {
    color: var(--text-muted);
    padding: 1rem 1rem 0.3rem;
    display: block;
    font-size: 11px;
    text-transform: uppercase;
}

/* USER INFO */
.user-info {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===============================
   FINANCEIRO & METRICAS
================================*/
.finance-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.finance-stat {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    border-bottom: 4px solid var(--sidebar-active);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.finance-stat.danger { border-bottom-color: #ef4444; }
.finance-stat.success { border-bottom-color: #10b981; }
.finance-stat.warning { border-bottom-color: #f59e0b; }

.finance-stat small {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
}

.finance-stat h3 {
    margin: 0.5rem 0 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sidebar-bg);
}

/* ===============================
   CONTEÚDO
================================*/
.content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

/* TOP BAR */
.navbar-top {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===============================
   MOBILE
================================*/
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {

    .sidebar {
        transform: translateX(-100%);
        transition: 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 1rem;
    }
}
