:root {
    --brand-color: #1d3557;
    --brand-accent: #e63946;
    --gradient-brand: linear-gradient(115deg, #1c2f8f 0%, #6a3fd0 50%, #d6249f 100%);
}

body {
    background-color: #f4f5f7;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    background: var(--gradient-brand);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    box-shadow: 2px 0 12px rgba(0,0,0,.12);
}

.sidebar-brand {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.2);
    text-align: center;
}

.sidebar-logo {
    max-width: 150px;
    width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

.sidebar-brand .text-muted {
    color: rgba(255,255,255,.75) !important;
}

.sidebar .nav-link {
    color: #fff;
    padding: 0.6rem 1.25rem;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-left: 3px solid transparent;
}

.sidebar .nav-link i {
    font-size: 1rem;
    width: 1.1rem;
    text-align: center;
    opacity: .95;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(255,255,255,.14);
    color: #fff;
    border-left-color: #fff;
}

.nav-section-title {
    display: block;
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: rgba(255,255,255,.7);
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.2);
}

.sidebar-user {
    color: rgba(255,255,255,.9) !important;
}

.sidebar-footer .btn-light {
    color: var(--brand-color);
    font-weight: 600;
    border: none;
}

.sidebar-footer .btn-light:hover {
    background-color: #fff;
    opacity: .92;
}

.sidebar-credit {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,.65);
    letter-spacing: .02em;
}

.content {
    min-height: 100vh;
}

.card-kpi {
    border: none;
    border-left: 4px solid var(--brand-color);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.card-kpi .kpi-value {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--brand-color);
}

.table thead {
    background-color: #eef1f5;
}

.badge-prioridad-A { background-color: #e63946; }
.badge-prioridad-B { background-color: #f4a261; }
.badge-prioridad-C { background-color: #2a9d8f; }

/* Botones primarios con el mismo degradado de marca */
.btn-primary {
    background: var(--gradient-brand);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(106, 63, 208, .25);
}

.btn-primary:hover,
.btn-primary:focus {
    filter: brightness(1.08);
    color: #fff;
    box-shadow: 0 3px 10px rgba(106, 63, 208, .35);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-color);
}

.login-card {
    width: 100%;
    max-width: 380px;
}

/* ===== Responsive / móvil ===== */

.mobile-topbar {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--gradient-brand);
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.mobile-toggle {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-topbar-logo {
    height: 32px;
    width: auto;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1045;
}

.sidebar-backdrop.show {
    display: block;
}

@media (max-width: 991.98px) {
    .mobile-topbar {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 1050;
        width: 82vw;
        max-width: 300px;
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 18px rgba(0,0,0,.25);
    }

    .content {
        width: 100%;
    }

    .container-fluid.py-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card-kpi .kpi-value {
        font-size: 1.35rem;
    }

    .table-responsive table {
        font-size: 0.88rem;
    }
}

@media (max-width: 575.98px) {
    .card-body {
        padding: 1rem;
    }
}

