/* public/css/style.css */
:root {
    --primary-color: #0d6efd;
    --sidebar-bg: #fdfdfd; /* Dark Gray */
    --sidebar-width: 260px;
    --bg-light: #f4f6f9;
    --text-muted: #6c757d;
}

body {
    background-color: var(--bg-light);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

/* --- WRAPPER (Controla o layout) --- */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    transition: all 0.3s;
}

/* --- SIDEBAR --- */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    min-height: 100vh;
    transition: all 0.3s;
    z-index: 1000;
}

#sidebar .sidebar-header {
    padding: 20px;
   background: rgba(4, 4, 4, 0.64);
    font-weight: bold;
    letter-spacing: 1px;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 1rem;
    display: block;
    color: #000000;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: 0.2s;
}

#sidebar ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

#sidebar ul li a.active {
    background: rgba(13, 110, 253, 0.15);
    border-left-color: var(--primary-color);
    color: #fff;
}

/* --- CONTENT --- */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
}

/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 768px) {
    /* Esconde a sidebar jogando ela para a esquerda */
    #sidebar {
        margin-left: calc(var(--sidebar-width) * -1); 
        position: fixed; /* Fixa para sobrepor */
        top: 0;          /* Cola no topo */
        left: 0;         /* Cola na esquerda */
        height: 100vh;   /* Força ocupar 100% da altura da tela visível */
        width: var(--sidebar-width);
        overflow-y: auto; /* IMPORTANTE: Permite rolar o menu para ver itens escondidos */
        z-index: 9999;    /* Garante que fica acima de qualquer outro elemento */
    }

    /* Quando a classe 'active' é adicionada via JS, a sidebar aparece */
    #sidebar.active {
        margin-left: 0;
        box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    }
    
    /* Overlay escuro quando menu abre */
    #overlay {
        display: none;
        position: fixed;
        width: 100vw;
        height: 100vh;
        top: 0;
        left: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998; /* Fica logo abaixo do menu (9999) */
        opacity: 0;
        transition: all 0.5s ease-in-out;
    }
    
    #overlay.active {
        display: block;
        opacity: 1;
    }
}