/* ============================================================
   Panel Lockers — Custom styles
   Base: Bootstrap 5.3
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1e2a3a;
    --sidebar-hover: #2d3f55;
    --topbar-height: 56px;
}

/* ── Body ───────────────────────────────────────────────────── */
body {
    background: #f0f2f5;
}

/* ── Sidebar ────────────────────────────────────────────────── */
#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform .3s ease;
}

#sidebar .sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    background: #111d2b;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    border-bottom: 1px solid #2d3f55;
}

#sidebar .nav-link {
    color: #a8b8cc;
    padding: .65rem 1.25rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .92rem;
    transition: background .2s, color .2s;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background: var(--sidebar-hover);
    color: #fff;
}

#sidebar .nav-section {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #5a7a9a;
    padding: 1rem 1.25rem .3rem;
}

/* ── Layout principal ───────────────────────────────────────── */
#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Topbar ─────────────────────────────────────────────────── */
#topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* ── Contenido de página ────────────────────────────────────── */
.page-content {
    padding: 1.75rem;
    flex: 1;
}

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-card {
    border: none;
    border-radius: .75rem;
}

.stat-card .card-body {
    padding: 1.25rem 1.5rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: .6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ── Dark theme ─────────────────────────────────────────────── */
[data-bs-theme="dark"] body {
    background: #111827;
}

[data-bs-theme="dark"] #sidebar {
    background: #0d1520;
    border-right: 1px solid #1a2840;
}

[data-bs-theme="dark"] #sidebar .sidebar-brand {
    background: #060d17;
    border-bottom-color: #1a2840;
}

[data-bs-theme="dark"] #topbar {
    background: #1e293b;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] #topbar .text-secondary,
[data-bs-theme="dark"] #topbar .text-muted {
    color: #94a3b8 !important;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.show {
        transform: translateX(0);
    }

    #main-content {
        margin-left: 0;
    }
}
