/*!
 * SB Admin 2 - Layout (adaptado para Bootstrap 5)
 * Basado en Start Bootstrap SB Admin 2
 */
:root {
    --sb-sidebar-width: 14rem;
    --sb-topbar-height: 4.375rem;
    --sb-gray-100: #f8f9fc;
    --sb-gray-200: #eaecf4;
    --sb-gray-300: #dddfeb;
    --sb-gray-800: #5a5c69;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

.text-gray-800 { color: var(--sb-gray-800) !important; }
.text-gray-600 { color: #858796 !important; }

#wrapper {
    display: flex;
}

#wrapper #content-wrapper {
    background-color: var(--sb-gray-100);
    width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#wrapper #content-wrapper #content {
    flex: 1 0 auto;
}

/* Sidebar */
.sidebar {
    width: var(--sb-sidebar-width);
    min-height: 100vh;
    flex-shrink: 0;
}

.sidebar .sidebar-brand {
    height: var(--sb-topbar-height);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar .sidebar-brand .sidebar-brand-icon {
    font-size: 1.5rem;
}

.sidebar hr.sidebar-divider {
    margin: 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar .sidebar-heading {
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 1rem;
    margin-top: 0.5rem;
}

.sidebar .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    width: 100%;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 0.85rem;
}

.sidebar .nav-item .nav-link i {
    font-size: 0.85rem;
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar .nav-item .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item.active .nav-link {
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-dark .sidebar-brand {
    color: #fff;
}

.bg-gradient-primary {
    background: linear-gradient(180deg, var(--color-primary, #C6143D) 10%, #8a0f2b 100%);
    background-size: cover;
}

/* Topbar */
.topbar {
    height: var(--sb-topbar-height);
}

.topbar .navbar-search {
    width: 20rem;
}

.topbar .dropdown-menu {
    font-size: 0.85rem;
}

.topbar.navbar-light .navbar-nav .nav-link {
    color: var(--sb-gray-800);
}

.img-profile {
    height: 2rem;
    width: 2rem;
}

/* Cards SB style */
.card {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1) !important;
}

.card .card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid var(--sb-gray-200);
}

.border-left-primary { border-left: 0.25rem solid var(--color-primary, #C6143D) !important; }

/* Sticky footer */
footer.sticky-footer {
    padding: 1.5rem 0;
    flex-shrink: 0;
    font-size: 0.8rem;
}

/* Sidebar toggle - mobile */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1050;
        margin-left: calc(-1 * var(--sb-sidebar-width));
        transition: margin 0.25s ease;
    }

    #wrapper.toggled .sidebar {
        margin-left: 0;
    }

    #wrapper.toggled::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
}

/* Module cards hover (gestión tienda) */
.hover-shadow:hover {
    transform: translateY(-5px);
    transition: 0.3s;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.transition { transition: 0.3s; }

/* Login */
.bg-login-image {
    background: url('/img/logo-sin-fondo.png') center;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 10rem;
}
