/* ===============================================================
   TI Stock – Folha de Estilos Personalizada
   Complementa o Bootstrap 5 com estilos específicos do sistema
   =============================================================== */

/* ------------------------------------------
   Layout Geral
   ------------------------------------------ */
html, body {
    height: 100%;
    font-size: .92rem;
}

#wrapper {
    min-height: 100vh;
}

#main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-body {
    flex-grow: 1;
}

/* ------------------------------------------
   Sidebar
   ------------------------------------------ */
#sidebar {
    width: 250px;
    min-width: 250px;
    transition: width .25s ease, min-width .25s ease;
}

#sidebar.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
}

/* Links do menu — usa classe própria, independente do Bootstrap */
.sidebar-link {
    display: block;
    padding: .45rem .75rem;
    color: #d0dcea !important;
    text-decoration: none;
    white-space: nowrap;
    font-size: .88rem;
    transition: background .15s ease, color .15s ease;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, .08);
    color: #ffffff !important;
}

.sidebar-link.active {
    background-color: rgba(77, 142, 240, .25);
    color: #ffffff !important;
    font-weight: 600;
}

/* Rótulos de seção (Estoque, Movimentações etc.) */
.sidebar-section-label {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8fa3b8;
    padding-top: .25rem;
    padding-bottom: .15rem;
}

/* Scrollbar fina na sidebar */
#sidebar .sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
#sidebar .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
    border-radius: 2px;
}

/* ------------------------------------------
   Cards de Métricas (Dashboard)
   ------------------------------------------ */
.card.border-start {
    border-left-width: 4px !important;
}

/* ------------------------------------------
   Tabelas
   ------------------------------------------ */
.table th {
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* ------------------------------------------
   Badges e Status
   ------------------------------------------ */
.badge {
    font-weight: 500;
    font-size: .72rem;
}

/* ------------------------------------------
   Alertas / Flash messages
   ------------------------------------------ */
.alert-sm {
    font-size: .85rem;
    padding: .4rem .75rem;
}

/* ------------------------------------------
   Responsividade — Mobile
   ------------------------------------------ */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        z-index: 1045;
        height: 100%;
        top: 0;
        left: 0;
        transform: translateX(0);
        transition: transform .25s ease;
    }

    #sidebar.collapsed {
        transform: translateX(-100%);
        width: 250px;
        min-width: 250px;
    }

    #main-content {
        width: 100%;
    }
}
