/* ═══════════════════════════════════════════════════
   INVENTÁRIO TI — CSS Principal
   Arquivo: wwwroot/css/site.css
   ═══════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════
   CORES DO SISTEMA — altere aqui para customizar
   ═══════════════════════════════════════════ */
:root {
    --cor-sidebar:        #38B4FF;   /* fundo do menu lateral */
    --cor-sidebar-hover:  #A3E586;
    --cor-primaria:       #FE4445;   /* botões e destaques */
    --cor-primaria-hover: #FFCA7A;   /* botão ao passar o mouse */
    --cor-texto-logo:     #A3E586;
}
body {
    background-color: #f8f9fa;
}

/* ═══════════════════════════════
   SIDEBAR — menu lateral
   ═══════════════════════════════ */
.sidebar {
    min-height: 100vh;
    height: 100vh;          /* altura total da tela */
    background-color: var(--cor-sidebar);
    width: 240px;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 20px;
    z-index: 100;
    overflow-y: auto;       /* rola se o conteúdo for maior */
    overflow-x: hidden;
    transition: transform 0.3s ease;
}

/* Barra de rolagem discreta dentro do menu */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar .logo {
    color: var(--cor-texto-logo);
    font-size: 1.1rem;
    font-weight: bold;
    padding: 10px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 10px;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.75);
    padding: 10px 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: var(--cor-sidebar-hover);
}

.sidebar .nav-section {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 20px 5px;
}

/* ═══════════════════════════════
   TOPBAR
   ═══════════════════════════════ */
.topbar {
    background: white;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 99;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Botão hamburguer — só aparece no mobile */
.btn-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #1e3a5f;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
}

/* Overlay escuro quando menu abre no mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* ═══════════════════════════════
   LAYOUT DESKTOP (tela >= 768px)
   ═══════════════════════════════ */
@media (min-width: 768px) {
    .main-content {
        margin-left: 240px;
        padding: 30px;
    }

    .topbar {
        margin-left: 240px;
    }
}

/* ═══════════════════════════════
   LAYOUT MOBILE (tela < 768px)
   ═══════════════════════════════ */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.aberto {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .topbar {
        margin-left: 0;
        padding: 10px 15px;
    }

    .btn-menu-toggle {
        display: block;
    }
}

/* ═══════════════════════════════
   SOBRESCREVE CORES DO BOOTSTRAP
   ═══════════════════════════════ */
.btn-primary {
    background-color: var(--cor-primaria) !important;
    border-color: var(--cor-primaria) !important;
    color: white !important;
}
.btn-primary:hover {
    background-color: var(--cor-primaria-hover) !important;
    border-color: var(--cor-primaria-hover) !important;
}
.btn-outline-primary {
    color: var(--cor-primaria) !important;
    border-color: var(--cor-primaria) !important;
}
.btn-outline-primary:hover {
    background-color: var(--cor-primaria) !important;
    border-color: var(--cor-primaria) !important;
    color: white !important;
}
.badge.bg-primary {
    background-color: var(--cor-primaria) !important;
}