:root{--primary:#174ea6;--primary2:#2563eb;--accent:#7c3aed;--bg:#f4f7fb;--text:#172033;--muted:#6b7280;--card:#fff;--border:#e6ecf5;--success:#16a34a;--warning:#f59e0b;--danger:#dc2626}*{box-sizing:border-box}body{margin:0;background:linear-gradient(135deg,#f8fbff 0%,#eef4ff 100%);font-family:'Segoe UI',Arial,sans-serif;color:var(--text)}.app-shell{display:flex;min-height:100vh}.sidebar{width:270px;background:linear-gradient(180deg,#0b2b5c,#08345f 48%,#06213f);color:#fff;padding:22px 16px;position:fixed;inset:0 auto 0 0;box-shadow:6px 0 25px rgba(9,31,68,.18)}.brand{display:flex;gap:12px;align-items:center;margin-bottom:28px}.brand-icon{width:46px;height:46px;border-radius:16px;background:rgba(255,255,255,.16);display:grid;place-items:center;font-size:22px}.brand span{display:block;font-size:13px;color:#b9d2ff}.sidebar nav a{display:flex;align-items:center;gap:12px;color:#eaf2ff;text-decoration:none;padding:12px 14px;border-radius:13px;margin:5px 0;font-weight:600;font-size:14px}.sidebar nav a:hover,.sidebar nav a.active{background:linear-gradient(90deg,#3478ff,#5b8dff);color:#fff;box-shadow:0 10px 20px rgba(52,120,255,.25)}.content{margin-left:270px;width:calc(100% - 270px);padding:22px}.topbar{background:rgba(255,255,255,.88);backdrop-filter:blur(10px);border:1px solid var(--border);border-radius:22px;padding:20px 24px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 14px 36px rgba(17,42,92,.08);margin-bottom:22px}.topbar h1{margin:0;font-size:27px;font-weight:800}.topbar p{margin:4px 0 0;color:var(--muted)}.user-pill{background:#f2f6ff;border:1px solid #dce8ff;padding:10px 14px;border-radius:999px;display:flex;align-items:center;gap:8px;color:#153e75;font-weight:700}.card-modern{background:var(--card);border:1px solid var(--border);border-radius:22px;box-shadow:0 14px 34px rgba(17,42,92,.08);overflow:hidden;margin-bottom:22px}.card-modern .card-header{background:linear-gradient(90deg,var(--primary),var(--primary2));color:#fff;padding:16px 20px;font-weight:800}.card-modern .card-body{padding:22px}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.stat-card{background:#fff;border:1px solid var(--border);border-radius:20px;padding:20px;box-shadow:0 12px 30px rgba(17,42,92,.07)}.stat-card i{font-size:22px;color:var(--primary2);background:#eef5ff;border-radius:12px;padding:10px}.stat-card h3{font-size:32px;margin:12px 0 0}.stat-card p{color:var(--muted);margin:0;font-weight:600}.btn-primary-gradient{background:linear-gradient(90deg,var(--primary),var(--accent));border:none;color:#fff;border-radius:12px;padding:10px 16px;font-weight:800;box-shadow:0 10px 22px rgba(37,99,235,.25)}.btn-primary-gradient:hover{filter:brightness(.96);color:#fff}.form-control,.form-select{border:2px solid #e8eef7;border-radius:12px;padding:10px 12px}.form-control:focus,.form-select:focus{border-color:#7aa7ff;box-shadow:0 0 0 .25rem rgba(37,99,235,.12)}label{font-weight:700;color:#20304d}.table{vertical-align:middle}.table thead th{background:#f0f5ff;color:#123a75;border:0}.badge-soft{border-radius:999px;padding:7px 10px;font-weight:800}.soft-success{background:#e9f9ef;color:#13833e}.soft-warning{background:#fff6df;color:#a56500}.soft-danger{background:#ffeded;color:#b91c1c}.soft-info{background:#edf5ff;color:#1d4ed8}.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at top left,#dbeafe,transparent 35%),linear-gradient(135deg,#f7fbff,#eef4ff)}.login-card{width:min(440px,100%);background:#fff;border:1px solid var(--border);border-radius:28px;box-shadow:0 24px 60px rgba(17,42,92,.16);padding:32px}.login-brand{text-align:center;margin-bottom:24px}.login-brand i{font-size:44px;color:var(--primary2);background:#eef5ff;padding:16px;border-radius:22px}.feedback-box{border-left:5px solid var(--primary2);background:#f8fbff;border-radius:16px;padding:16px;margin-bottom:14px}.mini-muted{color:var(--muted);font-size:13px}@media(max-width:900px){.sidebar{position:relative;width:100%;height:auto}.app-shell{display:block}.content{margin-left:0;width:100%;padding:14px}.stat-grid{grid-template-columns:1fr}.topbar{display:block}.user-pill{margin-top:12px;width:max-content}}
/* Mejoras 2026 */
.modal-head-gradient{background:linear-gradient(90deg,var(--primary),var(--primary2));color:#fff}.modal-rounded{border:0;border-radius:24px;overflow:hidden}.section-chip{display:inline-flex;align-items:center;gap:8px;background:#eef5ff;color:#174ea6;border-radius:999px;padding:8px 12px;font-weight:900;font-size:13px;margin:10px 0 12px}.help-box{background:#f2f6ff;border:1px solid #dce8ff;border-radius:14px;padding:12px;color:#375073}.chart-card{background:#fff;border:1px solid var(--border);border-radius:24px;box-shadow:0 14px 34px rgba(17,42,92,.08);overflow:hidden;margin-bottom:22px}.chart-card-header{padding:18px 22px;background:linear-gradient(90deg,#eef5ff,#fff4f4);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.chart-card-title{font-size:20px;font-weight:900;margin:0;color:#071533;display:flex;align-items:center;gap:10px}.chart-wrap{height:330px;padding:22px}.chart-wrap-sm{height:270px;padding:18px}.filters-panel{background:#f6f8fc;border:1px solid var(--border);border-radius:20px;padding:18px;margin:18px 0}.pill{display:inline-flex;gap:8px;align-items:center;background:#f7f9fe;border:1px solid var(--border);border-radius:999px;padding:9px 13px;font-weight:900;color:#34415b}.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{display:inline-flex;align-items:center;gap:6px;background:#eef5ff;color:#1d4ed8;border:1px solid #dbeafe;padding:6px 9px;border-radius:999px;font-weight:750;font-size:12px}.doc-actions{display:flex;gap:7px;flex-wrap:wrap}.soft-muted{background:#f3f4f6;color:#4b5563}.status-inactive{opacity:.65}.aspect-card{background:#fbfdff;border:1px solid #e8eef7;border-radius:16px;padding:14px;height:100%}.aspect-title{font-weight:900;color:#20304d;font-size:14px}.acomp-hero{background:linear-gradient(135deg,#103f86,#2563eb 65%,#7c3aed);color:#fff;border-radius:26px;padding:24px;box-shadow:0 18px 42px rgba(37,99,235,.22);margin-bottom:22px}.acomp-hero h2{font-weight:900;margin:0 0 8px}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.btn-white{background:#fff;color:#174ea6;border:0;border-radius:14px;padding:11px 15px;font-weight:900;text-decoration:none;display:inline-flex;align-items:center;gap:8px}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.kpi{background:#fff;border:1px solid var(--border);border-radius:22px;padding:18px;box-shadow:0 12px 30px rgba(17,42,92,.07)}.kpi .icon{width:46px;height:46px;border-radius:16px;background:#eef5ff;color:#2563eb;display:grid;place-items:center;font-size:20px;margin-bottom:12px}.kpi h3{font-size:30px;font-weight:900;margin:0}.kpi p{margin:2px 0 0;color:#6b7280;font-weight:700}@media(max-width:1100px){.kpi-grid{grid-template-columns:repeat(2,1fr)}.chart-wrap{height:280px}}@media(max-width:650px){.kpi-grid{grid-template-columns:1fr}.chart-wrap{height:240px}.chart-card-title{font-size:17px}}
/* logo subdirección */
.login-brand .login-logo-img{
    width:160px !important;
    height:90px !important;

    max-width:160px !important;
    max-height:90px !important;

    min-width:160px !important;
    min-height:90px !important;

    object-fit:contain !important;
    display:block !important;
    margin:0 auto 14px auto !important;
}

/* Logo sidebar - seguro */
.brand-icon{
    width:70px !important;
    height:70px !important;

    min-width:70px !important;
    max-width:70px !important;

    min-height:70px !important;
    max-height:70px !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    background:#fff !important;
    border-radius:20px !important;
    padding:4px !important;
}

.brand-icon .sidebar-logo{
    width:52px !important;
    height:52px !important;

    max-width:52px !important;
    max-height:52px !important;

    object-fit:contain !important;
    display:block !important;
}

/* ===== ALERTAS FLOTANTES INSTITUCIONALES ===== */

.swal2-container{
    z-index:99999 !important;
}

.swal2-popup{
    width:420px !important;
    max-width:calc(100vw - 32px) !important;
    border-radius:22px !important;
    padding:0 !important;
    overflow:hidden !important;
    background:#ffffff !important;
    border:1px solid rgba(15,23,42,.08) !important;
    box-shadow:0 24px 70px rgba(0,59,113,.22) !important;
    font-family:'Segoe UI',Arial,sans-serif !important;
}

.swal2-title{
    margin:0 !important;
    padding:22px 24px 6px !important;
    color:#003b71 !important;
    font-size:1.25rem !important;
    font-weight:900 !important;
    line-height:1.25 !important;
}

.swal2-html-container{
    margin:0 !important;
    padding:0 24px 18px !important;
    color:#526b87 !important;
    font-size:.94rem !important;
    line-height:1.55 !important;
    font-weight:600 !important;
}

.swal2-actions{
    width:100% !important;
    margin:0 !important;
    padding:16px 24px 22px !important;
    display:flex !important;
    gap:10px !important;
    justify-content:center !important;
    background:#f8fbff !important;
    border-top:1px solid rgba(15,23,42,.06) !important;
}

.swal2-confirm,
.swal2-cancel,
.swal2-deny{
    min-width:118px !important;
    border:0 !important;
    border-radius:999px !important;
    padding:10px 18px !important;
    font-size:.92rem !important;
    font-weight:900 !important;
    box-shadow:none !important;
    outline:none !important;
}

.swal2-confirm{
    background:linear-gradient(135deg,#003b71,#0056a6) !important;
    color:#ffffff !important;
}

.swal2-cancel{
    background:#eef4fb !important;
    color:#526b87 !important;
}

.swal2-deny{
    background:#fff1f2 !important;
    color:#dc3545 !important;
}

.swal2-confirm:hover{
    filter:brightness(1.05) !important;
}

.swal2-cancel:hover{
    background:#e3edf7 !important;
}

.swal2-icon{
    margin:22px auto 0 !important;
    width:66px !important;
    height:66px !important;
    border-width:4px !important;
}

.swal2-icon.swal2-success{
    border-color:#198754 !important;
    color:#198754 !important;
}

.swal2-icon.swal2-warning{
    border-color:#ffc400 !important;
    color:#b88700 !important;
}

.swal2-icon.swal2-error{
    border-color:#dc3545 !important;
    color:#dc3545 !important;
}

.swal2-icon.swal2-info,
.swal2-icon.swal2-question{
    border-color:#0056a6 !important;
    color:#0056a6 !important;
}

.swal2-timer-progress-bar{
    background:linear-gradient(90deg,#003b71,#0056a6,#ffc400) !important;
}

.swal2-backdrop-show{
    background:rgba(15,23,42,.36) !important;
    backdrop-filter:blur(3px) !important;
}