/* ================================================================
   ESCAEL — site.css v3
   Fuente: Plus Jakarta Sans
   Paleta: navy #0D3F8F · azul #1565C0 · cyan #0EA5E9
   Fondo:  #EAF3FF (azul hielo)
   ================================================================ */

/* ── Google Fonts ────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* ── Variables ─────────────────────────────────────────────────── */
:root {
    /* Paleta ESCAEL — extraída de los flyers */
    --navy-950: #061530;
    --navy-900: #0A2147;
    --navy-800: #0D3F8F; /* sidebar, headers oscuros */
    --navy-700: #1158BA;
    --navy-600: #1565C0; /* azul principal */
    --navy-500: #1976D2;
    --blue-400: #42A5F5;
    --blue-300: #90CAF9;
    --blue-100: #DBEAFE;
    --blue-50: #EAF3FF; /* fondo app — azul hielo */
    /* Cyan — del flyer masterclass y taller */
    --cyan-500: #0EA5E9;
    --cyan-400: #38BDF8;
    --cyan-300: #7DD3FC;
    --cyan-100: #E0F7FA;
    /* Semánticos */
    --green-600: #16A34A;
    --green-100: #DCFCE7;
    --amber-500: #F59E0B;
    --amber-100: #FEF3C7;
    --red-600: #DC2626;
    --red-100: #FEE2E2;
    --indigo-600: #4F46E5;
    --indigo-100: #E0E7FF;
    /* Texto — nunca negro puro */
    --text-heading: #0A2147; /* navy 900 */
    --text-body: #1E293B;
    --text-muted: #64748B;
    --text-subtle: #94A3B8;
    /* Neutros */
    --white: #FFFFFF;
    --surface: #F8FAFC; /* fondo app — limpio y alineado con página principal */
    --card-bg: #FFFFFF;
    --border: #E2E8F0;
    --border-soft: #F1F5F9;
    /* Layout */
    --sidebar-w: 268px;
    --sidebar-c: 64px; /* collapsed */
    --header-h: 60px;
    /* Radii */
    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-full: 9999px;
    /* Shadows — tintadas en navy para coherencia */
    --sh-xs: 0 1px 3px rgba(13,63,143,.06);
    --sh-sm: 0 2px 8px rgba(13,63,143,.08);
    --sh-md: 0 4px 18px rgba(13,63,143,.11);
    --sh-lg: 0 8px 32px rgba(13,63,143,.14);
    --sh-navy: 0 4px 20px rgba(13,63,143,.28);
    --t: .18s cubic-bezier(.4,0,.2,1);
}

/* ── Base ───────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans',system-ui,-apple-system,sans-serif;
    background: var(--surface);
    color: var(--text-body);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--navy-600);
    text-decoration: none;
    transition: color var(--t);
}

    a:hover {
        color: var(--navy-800);
    }

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.2;
}

img {
    max-width: 100%;
    height: auto;
}

*:focus-visible {
    outline: 2px solid var(--cyan-500);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

/* ── Mesh backgrounds ───────────────────────────────────────────── */
/* Azul hielo con blobs suaves — mismo espíritu que los flyers */
.mesh-app {
    background-color: var(--surface);
    background-image: radial-gradient(ellipse 70% 55% at 12% 35%, rgba(13,63,143,.09) 0%,transparent 65%), radial-gradient(ellipse 55% 50% at 88% 18%, rgba(14,165,233,.07) 0%,transparent 65%), radial-gradient(ellipse 45% 55% at 58% 88%, rgba(79,70,229,.05) 0%,transparent 65%);
}
/* Hero oscuro tipo flyers */
.mesh-hero {
    background-color: var(--navy-800);
    background-image: radial-gradient(ellipse 80% 60% at 15% 55%, rgba(14,165,233,.28) 0%,transparent 65%), radial-gradient(ellipse 60% 55% at 82% 18%, rgba(17,88,186,.35) 0%,transparent 65%), radial-gradient(ellipse 45% 50% at 50% 95%, rgba(79,70,229,.15) 0%,transparent 65%);
}
/* Secciones intermedias azul medio */
.mesh-mid {
    background-color: var(--navy-700);
    background-image: radial-gradient(ellipse 70% 50% at 8% 50%, rgba(14,165,233,.22) 0%,transparent 60%), radial-gradient(ellipse 55% 55% at 92% 22%, rgba(56,189,248,.15) 0%,transparent 60%);
}

/* ── Botones ────────────────────────────────────────────────────── */
.btn-navy {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: var(--navy-900);
    color: #fff;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: .86rem;
    padding: .54rem 1.3rem;
    cursor: pointer;
    transition: var(--t);
    box-shadow: 0 2px 8px rgba(10,37,64,.18);
    white-space: nowrap;
}

    .btn-navy:hover {
        background: var(--navy-950);
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(10,37,64,.25);
    }

    .btn-navy:active {
        transform: none;
    }

.btn-cyan {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: var(--cyan-500);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: .88rem;
    padding: .58rem 1.35rem;
    cursor: pointer;
    transition: var(--t);
    box-shadow: 0 4px 16px rgba(14,165,233,.35);
    white-space: nowrap;
}

    .btn-cyan:hover {
        background: #0284C7;
        color: #fff;
        transform: translateY(-1px);
    }

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #fff;
    color: var(--navy-800);
    border: none;
    border-radius: var(--r-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: .88rem;
    padding: .58rem 1.35rem;
    cursor: pointer;
    transition: var(--t);
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    white-space: nowrap;
}

    .btn-white:hover {
        background: var(--blue-50);
        transform: translateY(-1px);
    }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(255,255,255,.13);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: var(--r-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: .88rem;
    padding: .55rem 1.3rem;
    cursor: pointer;
    transition: var(--t);
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

    .btn-ghost:hover {
        background: rgba(255,255,255,.22);
        border-color: rgba(255,255,255,.55);
    }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #FFFFFF;
    color: var(--navy-900);
    border: 1px solid #CBD5E1;
    border-radius: var(--r-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: .86rem;
    padding: .52rem 1.25rem;
    cursor: pointer;
    transition: var(--t);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(10,37,64,.03);
}

    .btn-outline:hover {
        background: #F0F9FF;
        color: var(--navy-700);
        border-color: #93C5FD;
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(10,37,64,.08);
    }

.btn-sm {
    font-size: .8rem;
    padding: .4rem 1rem;
}

.btn-xs {
    font-size: .74rem;
    padding: .3rem .75rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    transition: box-shadow var(--t);
}

    .card:hover {
        box-shadow: var(--sh-md);
    }

.card-header {
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    color: inherit;
    background-color: transparent;
}

.card-title {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}

.card-body {
    padding: 1.25rem;
}

.card-body-sm {
    padding: .85rem 1.25rem;
}

/* Glass card (sobre fondos oscuros) */
.card-glass {
    background: rgba(255,255,255,.11);
    border: 1.5px solid rgba(255,255,255,.2);
    border-radius: var(--r-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    padding: .22rem .7rem;
    border-radius: var(--r-full);
    font-size: .71rem;
    font-weight: 700;
    white-space: nowrap;
    font-family: inherit;
}

.btn-ed-nav .badge {
    background: #EEF2FF;
    color: #0D3F8F;
    border: 1px solid #C7D2FE;
    font-size: .72rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 9999px;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.btn-ed-nav:hover .badge {
    background: #0D3F8F;
    color: #FFFFFF;
    border-color: #0D3F8F;
}

.btn-ed-nav.active .badge {
    background: #0D3F8F;
    color: #FFFFFF;
    border-color: #0D3F8F;
}

.badge-navy {
    background: var(--blue-100);
    color: var(--navy-800);
}

.badge-cyan {
    background: var(--cyan-100);
    color: #0369A1;
}

.badge-green {
    background: var(--green-100);
    color: var(--green-600);
}

.badge-amber {
    background: var(--amber-100);
    color: #92400E;
}

.badge-red {
    background: var(--red-100);
    color: var(--red-600);
}

.badge-gray {
    background: #EFF6FF;
    color: var(--text-muted);
}

.badge-indigo {
    background: var(--indigo-100);
    color: var(--indigo-600);
}

/* ── Stat card ──────────────────────────────────────────────────── */
.stat {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-val {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-heading);
}

.stat-lbl {
    font-size: .74rem;
    color: var(--text-muted);
    margin-top: .12rem;
}

/* ── Progress ───────────────────────────────────────────────────── */
.prog {
    height: 5px;
    border-radius: 3px;
    background: var(--blue-100);
    overflow: hidden;
}

.prog-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--navy-600);
    transition: width .5s ease;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.app-shell {
    display: flex;
    min-height: 100dvh;
}

.sidebar {
    width: var(--sidebar-w);
    background: #08214D;
    background-image: 
        radial-gradient(ellipse 90% 45% at 0% 8%, rgba(14, 165, 233, 0.32) 0%, transparent 55%),
        radial-gradient(ellipse 70% 35% at 100% 45%, rgba(56, 189, 248, 0.20) 0%, transparent 50%),
        radial-gradient(ellipse 90% 50% at 20% 92%, rgba(37, 99, 235, 0.35) 0%, transparent 60%),
        linear-gradient(180deg, #061B3A 0%, #0A2F6E 36%, #0D3F8F 72%, #061833 100%);
    min-height: 100dvh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width var(--t), transform var(--t);
    box-shadow: 4px 0 24px rgba(6, 24, 51, 0.35);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Brand strip */
.sb-brand {
    height: auto;
    min-height: 125px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem 1rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,0.02);
}

.sb-brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 8px;
    width: 100%;
}

.sb-brand-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    background: #FFFFFF;
    padding: 3px;
    box-shadow: 0 4px 16px rgba(0,0,0,.3), 0 0 0 2px rgba(255,255,255,0.25);
    transition: transform var(--t);
    flex-shrink: 0;
}

.sb-brand-link:hover .sb-brand-img {
    transform: scale(1.06);
}

.sb-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg,var(--cyan-500),var(--blue-400));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .88rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(14,165,233,.4);
}

.sb-brand-name {
    line-height: 1.2;
    overflow: hidden;
    text-align: center;
    transition: opacity var(--t),max-width var(--t);
    max-width: 100%;
}

    .sb-brand-name strong {
        display: block;
        font-size: 1.35rem;
        font-weight: 900;
        color: #fff;
        letter-spacing: .06em;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }

    .sb-brand-name span {
        display: block;
        font-size: .68rem;
        font-weight: 600;
        color: rgba(255,255,255,.6);
        text-transform: uppercase;
        letter-spacing: .04em;
    }

/* Nav scroll */
.sb-nav {
    flex: 1;
    overflow-y: auto;
    padding: .65rem 0;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}

    .sb-nav::-webkit-scrollbar {
        width: 3px;
    }

    .sb-nav::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.12);
        border-radius: 2px;
    }

/* Section label */
.sb-section {
    font-size: .61rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    padding: .85rem 1.1rem .25rem;
    white-space: nowrap;
    transition: opacity var(--t),height var(--t);
}

.sb-section:first-of-type {
    padding-top: .35rem;
}

/* Link */
.sb-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .52rem .85rem;
    margin: .05rem .5rem;
    border-radius: var(--r-sm);
    color: rgba(255,255,255,.62);
    font-size: .85rem;
    font-weight: 500;
    transition: var(--t);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    font-family: inherit;
    background: none;
    border: none;
    width: calc(100% - 1rem);
    text-align: left;
}

    .sb-link:hover {
        background: rgba(255,255,255,.09);
        color: rgba(255,255,255,.95);
    }

    .sb-link.deshabilitado,
    .sb-link.deshabilitado:hover {
        opacity: .42;
        cursor: not-allowed;
        pointer-events: none;
        background: transparent;
        color: rgba(255,255,255,.45);
    }

    .sb-link.active {
        background: rgba(14,165,233,.22); /* cyan tint — como el acento de los flyers */
        color: #fff;
        font-weight: 600;
    }

        .sb-link.active::before {
            content: '';
            position: absolute;
            left: calc(-.5rem - 1px);
            top: 20%;
            bottom: 20%;
            width: 3px;
            background: var(--cyan-400);
            border-radius: 0 2px 2px 0;
        }

.sb-link-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sb-link-text {
    flex: 1;
    transition: opacity var(--t);
}

.sb-link-badge {
    background: var(--cyan-500);
    color: #fff;
    border-radius: var(--r-full);
    font-size: .64rem;
    font-weight: 800;
    padding: .08rem .42rem;
    flex-shrink: 0;
}

/* User strip */
.sb-user {
    padding: .8rem 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-shrink: 0;
}

.sb-user-info {
    flex: 1;
    overflow: hidden;
    transition: opacity var(--t);
}

.sb-user-name {
    font-size: .82rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-user-role {
    font-size: .67rem;
    color: rgba(255,255,255,.42);
}

.panel-cursos {
    position: fixed;
    top: 0;
    bottom: 0;
    left: var(--sidebar-w);
    width: min(380px, calc(100vw - var(--sidebar-w)));
    background: #fff;
    z-index: 1100;
    display: none;
    flex-direction: column;
    box-shadow: 8px 0 28px rgba(15, 23, 42, .16);
    border-right: 1px solid #E2E8F0;
    color: #0F172A;
}
.panel-cursos.abierto { display: flex; }
.panel-cursos-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.15rem .85rem;
    border-bottom: 1px solid #E2E8F0;
}
.panel-cursos-cabecera h2 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    color: #1E293B;
}
.panel-cursos-cerrar {
    width: 34px;
    height: 34px;
    border: 2px solid #1D4ED8;
    border-radius: 8px;
    background: #fff;
    color: #1E293B;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.panel-cursos-todos {
    display: block;
    padding: .95rem 1.15rem;
    color: #1D4ED8;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid #E2E8F0;
}
.panel-cursos-todos:hover { background: #F8FAFC; }
.panel-cursos-lista {
    flex: 1;
    overflow-y: auto;
}
.panel-curso {
    display: block;
    padding: .95rem 1.15rem .85rem;
    text-decoration: none;
    border-bottom: 1px solid #EEF2F6;
}
.panel-curso:hover, .panel-curso.activo { background: #F8FAFC; }
.panel-curso strong {
    display: block;
    color: #1D4ED8;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
}
.panel-curso span {
    display: block;
    margin-top: .28rem;
    color: #64748B;
    font-size: .84rem;
    line-height: 1.35;
}
.panel-cursos-vacio {
    margin: 0;
    padding: 1rem 1.15rem;
    color: #64748B;
    font-size: .9rem;
}
.panel-cursos-nota {
    margin: 0;
    padding: 1rem 1.15rem 1.25rem;
    border-top: 1px solid #E2E8F0;
    color: #334155;
    font-size: .92rem;
    line-height: 1.45;
}
@media (max-width: 1024px) {
    .panel-cursos {
        left: 0;
        width: min(380px, 100vw);
        z-index: 1200;
    }
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #fff;
    font-weight: 800;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #E0F2FE;
    box-shadow: 0 2px 6px rgba(10,37,64,.12);
}

/* Collapsed state (tablet) */
.sidebar.collapsed {
    width: var(--sidebar-c);
}

    .sidebar.collapsed .sb-brand {
        min-height: auto;
        padding: .75rem 0;
    }

    .sidebar.collapsed .sb-brand-img {
        width: 38px;
        height: 38px;
    }

    .sidebar.collapsed .sb-brand-name,
    .sidebar.collapsed .sb-link-text,
    .sidebar.collapsed .sb-link-badge,
    .sidebar.collapsed .sb-section,
    .sidebar.collapsed .sb-user-info {
        opacity: 0;
        max-width: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .sidebar.collapsed .sb-link {
        justify-content: center;
        padding: .52rem 0;
        margin: .05rem auto;
        width: 44px;
    }

        .sidebar.collapsed .sb-link.active::before {
            display: none;
        }

    .sidebar.collapsed .sb-user {
        justify-content: center;
    }

/* Mobile hidden */
.sb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,33,71,.55);
    z-index: 999;
    backdrop-filter: blur(2px);
}

    .sb-overlay.show {
        display: block;
    }

/* ── App header ─────────────────────────────────────────────────── */
.app-header {
    height: var(--header-h);
    background: var(--white);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 950; /* por encima del sidebar para que el dropdown no quede detrás */
    box-shadow: var(--sh-xs);
}

.app-header-title {
    font-weight: 700;
    font-size: .95rem;
    color: var(--text-heading);
    flex: 1;
}

.hdr-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: .95rem;
    cursor: pointer;
    transition: var(--t);
    position: relative;
    flex-shrink: 0;
}

    .hdr-btn:hover {
        background: var(--blue-50);
        color: var(--navy-700);
        border-color: var(--blue-300);
    }

    .hdr-btn .dot {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 7px;
        height: 7px;
        background: var(--red-600);
        border-radius: 50%;
        border: 1.5px solid var(--white);
    }

.hdr-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: .35rem .9rem;
    font-size: .82rem;
    color: var(--text-subtle);
    cursor: pointer;
    transition: var(--t);
    white-space: nowrap;
}

    .hdr-search:hover {
        border-color: var(--blue-400);
        background: var(--blue-50);
    }

    .hdr-search kbd {
        font-size: .65rem;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 4px;
        padding: .08rem .3rem;
        color: var(--text-subtle);
    }

/* ── App main ───────────────────────────────────────────────────── */
.app-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    transition: margin-left var(--t);
    background: var(--surface);
    background-image: radial-gradient(ellipse 60% 50% at 90% 10%,rgba(13,63,143,.06) 0%,transparent 70%), radial-gradient(ellipse 50% 45% at 5% 85%,rgba(14,165,233,.04) 0%,transparent 70%);
}

.app-content {
    padding: 1.4rem;
    flex: 1;
}

/* ── Public navbar ──────────────────────────────────────────────── */
.pub-nav {
    background: rgba(234,243,255,.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--t),box-shadow var(--t);
}

    .pub-nav.scrolled {
        background: rgba(255,255,255,.97);
        box-shadow: 0 2px 18px rgba(13,63,143,.08);
    }

.nav-inner {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .6rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--navy-800),var(--cyan-500));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    color: #fff;
    box-shadow: 0 2px 10px rgba(13,63,143,.3);
}

.brand-text strong {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1;
}

.brand-text em {
    display: block;
    font-style: normal;
    font-size: .97rem;
    font-weight: 800;
    color: var(--navy-800);
    letter-spacing: .01em;
    line-height: 1.2;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .1rem;
    list-style: none;
    padding: 0;
    margin: 0 auto;
}

    .nav-links a {
        display: flex;
        align-items: center;
        gap: .35rem;
        padding: .38rem .78rem;
        border-radius: var(--r-sm);
        color: var(--text-muted);
        font-size: .85rem;
        font-weight: 600;
        transition: var(--t);
        white-space: nowrap;
    }

        .nav-links a:hover {
            color: var(--navy-700);
            background: var(--blue-100);
        }

        .nav-links a.active {
            color: var(--navy-800);
            background: var(--blue-100);
            font-weight: 700;
        }

    .nav-links i {
        font-size: .85rem;
    }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: .4rem;
    color: var(--text-body);
    font-size: 1.3rem;
    cursor: pointer;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: .2rem;
    padding: .65rem 1.5rem 1rem;
    border-top: 1px solid var(--border-soft);
}

    .nav-mobile.open {
        display: flex;
    }

    .nav-mobile a {
        display: flex;
        align-items: center;
        gap: .55rem;
        padding: .58rem .85rem;
        border-radius: var(--r-sm);
        color: var(--text-body);
        font-size: .9rem;
        font-weight: 600;
        transition: var(--t);
    }

        .nav-mobile a:hover {
            background: var(--blue-100);
            color: var(--navy-800);
        }

/* ── Hero público ───────────────────────────────────────────────── */
.hero {
    padding: clamp(3.5rem,8vw,6rem) 0 clamp(4rem,9vw,7rem);
    position: relative;
    overflow: hidden;
    color: #fff;
}

    .hero::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--surface);
        clip-path: ellipse(55% 100% at 50% 100%);
        pointer-events: none;
    }

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--r-full);
    padding: .28rem .9rem;
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 1rem;
    backdrop-filter: blur(6px);
}

.hero-h1 {
    font-size: clamp(1.9rem,5vw,3.1rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1rem;
    letter-spacing: -.02em;
}

    .hero-h1 em {
        font-style: normal;
        color: var(--cyan-400);
    }

.hero-sub {
    font-size: clamp(.9rem,2vw,1.05rem);
    opacity: .85;
    line-height: 1.75;
    max-width: 500px;
    margin: 0;
}

/* ── Login box (hero) ───────────────────────────────────────────── */
.login-box {
    background: rgba(255,255,255,.11);
    border: 1.5px solid rgba(255,255,255,.22);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    backdrop-filter: blur(12px);
    max-width: 400px;
    margin-top: 1.75rem;
}

    .login-box label {
        font-size: .72rem;
        font-weight: 700;
        color: rgba(255,255,255,.7);
        display: block;
        margin-bottom: .3rem;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

.login-input {
    width: 100%;
    background: rgba(255,255,255,.13);
    border: 1.5px solid rgba(255,255,255,.22);
    color: #fff;
    border-radius: var(--r-sm);
    padding: .58rem .85rem;
    font-size: .88rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--t);
    margin-bottom: .55rem;
}

    .login-input::placeholder {
        color: rgba(255,255,255,.45);
    }

    .login-input:focus {
        border-color: rgba(255,255,255,.55);
    }

/* ── Form Inputs universales y corrección de contraste ────────────── */
.form-input,
.form-select,
.form-textarea,
.modal .login-input,
.modal-content .login-input,
.card .login-input,
.staff-content .login-input,
.admin-content .login-input,
.student-content .login-input,
form:not(.auth-form):not(.hero-form) .login-input {
    width: 100%;
    background: #FFFFFF !important;
    border: 1.5px solid #CBD5E1 !important;
    color: #0F172A !important;
    border-radius: 8px !important;
    padding: .58rem .85rem !important;
    font-size: .88rem !important;
    font-family: inherit !important;
    outline: none !important;
    transition: all .2s ease !important;
    margin-bottom: .55rem !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

.form-input.has-currency-prefix,
.login-input.has-currency-prefix,
.has-currency-prefix {
    padding-left: 2.75rem !important;
}

.form-input::placeholder,
.form-textarea::placeholder,
.modal .login-input::placeholder,
.modal-content .login-input::placeholder,
.card .login-input::placeholder,
.staff-content .login-input::placeholder,
.admin-content .login-input::placeholder,
.student-content .login-input::placeholder,
form:not(.auth-form):not(.hero-form) .login-input::placeholder {
    color: #94A3B8 !important;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.modal .login-input:focus,
.modal-content .login-input:focus,
.card .login-input:focus,
.staff-content .login-input:focus,
.admin-content .login-input:focus,
.student-content .login-input:focus,
form:not(.auth-form):not(.hero-form) .login-input:focus {
    border-color: #0D3F8F !important;
    box-shadow: 0 0 0 3px rgba(13,63,143,.15) !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
}

.form-select option,
select.form-input option,
.card select.login-input option,
.staff-content select.login-input option,
.admin-content select.login-input option,
.student-content select.login-input option,
form:not(.auth-form):not(.hero-form) select.login-input option {
    background: #FFFFFF !important;
    color: #0F172A !important;
    padding: 6px 10px !important;
}

.form-label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: .35rem;
    letter-spacing: .01em;
}

/* ── Section wrapper ────────────────────────────────────────────── */
.section {
    padding: clamp(3rem,6vw,5rem) 0;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-tag {
    display: inline-block;
    font-size: .71rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--navy-700);
    background: var(--blue-100);
    border-radius: var(--r-full);
    padding: .24rem .8rem;
    margin-bottom: .55rem;
}

.section-tag-light {
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.15);
}

.section-h2 {
    font-size: clamp(1.4rem,3vw,2rem);
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.2;
    margin: 0 0 .55rem;
    letter-spacing: -.01em;
}

.section-h2-light {
    color: #fff;
}

.section-lead {
    color: var(--text-muted);
    font-size: .97rem;
    line-height: 1.75;
    margin: 0;
}

/* ── Feature card ───────────────────────────────────────────────── */
.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-xs);
    padding: 1.25rem;
    transition: var(--t);
}

    .feature-card:hover {
        box-shadow: var(--sh-md);
        transform: translateY(-2px);
    }

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: .9rem;
}

.feature-title {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text-heading);
    margin-bottom: .3rem;
}

.feature-desc {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── News card ──────────────────────────────────────────────────── */
.news-card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-xs);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--t);
}

    .news-card:hover {
        box-shadow: var(--sh-md);
        transform: translateY(-2px);
    }

.news-thumb {
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
}

.news-body {
    padding: 1.05rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .38rem;
}

.news-cat {
    font-size: .69rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--navy-700);
}

.news-title {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text-heading);
    line-height: 1.4;
    flex: 1;
}

.news-date {
    font-size: .72rem;
    color: var(--text-subtle);
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* ── Session row (dashboard) ────────────────────────────────────── */
.session-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--border-soft);
}

    .session-row:last-child {
        border-bottom: none;
    }

.date-pill {
    background: var(--blue-100);
    color: var(--navy-800);
    border-radius: var(--r-sm);
    padding: .38rem .5rem;
    text-align: center;
    flex-shrink: 0;
    min-width: 46px;
}

    .date-pill.today {
        background: var(--navy-800);
        color: #fff;
    }

.date-pill-d {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
}

.date-pill-m {
    font-size: .58rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: .75;
}

/* ── Announcement row ───────────────────────────────────────────── */
.ann-row {
    display: flex;
    gap: .75rem;
    padding: .68rem 0;
    border-bottom: 1px solid var(--border-soft);
}

    .ann-row:last-child {
        border-bottom: none;
    }

.ann-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: .15rem;
    line-height: 1.35;
}

.ann-body {
    font-size: .78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.ann-time {
    font-size: .7rem;
    color: var(--text-subtle);
    margin-top: .2rem;
    display: flex;
    align-items: center;
    gap: .25rem;
}

/* ── Today card (hero del dashboard) ───────────────────────────── */
.today-card {
    border-radius: var(--r-xl);
    padding: 1.4rem 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

    .today-card::before {
        content: '';
        position: absolute;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        background: rgba(255,255,255,.06);
        top: -60px;
        right: -50px;
    }

.today-label {
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    opacity: .72;
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.today-title {
    font-size: 1.12rem;
    font-weight: 800;
    margin-bottom: .3rem;
    line-height: 1.25;
}

.today-meta {
    font-size: .82rem;
    opacity: .82;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.today-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

/* ── Quick actions ──────────────────────────────────────────────── */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(82px,1fr));
    gap: .55rem;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .38rem;
    padding: .8rem .45rem;
    border-radius: var(--r-md);
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--sh-xs);
    cursor: pointer;
    transition: var(--t);
    text-decoration: none;
}

    .quick-item:hover {
        border-color: var(--blue-400);
        box-shadow: var(--sh-md);
        background: var(--blue-50);
        transform: translateY(-1px);
    }

.quick-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.quick-label {
    font-size: .71rem;
    font-weight: 700;
    color: var(--text-body);
    text-align: center;
    line-height: 1.3;
}

/* ── Monthly state cards ────────────────────────────────────────── */
.state-card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    padding: 1.05rem;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.state-card-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .92rem;
    flex-shrink: 0;
}

.state-card-label {
    font-size: .74rem;
    font-weight: 700;
    color: var(--text-muted);
}

.state-card-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.15;
}

.state-card-sub {
    font-size: .76rem;
    color: var(--text-muted);
}

/* ── Subscription section ───────────────────────────────────────── */
.sub-wrap {
    border-radius: var(--r-xl);
    padding: clamp(1.75rem,4vw,2.75rem);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.sub-plan {
    background: rgba(255,255,255,.1);
    border: 1.5px solid rgba(255,255,255,.2);
    border-radius: var(--r-md);
    padding: 1.15rem 1rem;
    text-align: center;
    transition: var(--t);
    cursor: pointer;
}

    .sub-plan:hover, .sub-plan.on {
        background: rgba(255,255,255,.2);
        border-color: rgba(255,255,255,.5);
    }

.sub-price {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
}

    .sub-price sup {
        font-size: .85rem;
        font-weight: 700;
        vertical-align: super;
        font-family: inherit;
    }

.sub-free {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    opacity: .65;
    text-transform: uppercase;
}

/* ── Footer público ─────────────────────────────────────────────── */
.pub-footer {
    padding: 3.5rem 0 1.5rem;
    color: rgba(255,255,255,.72);
}

    .pub-footer .inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1.5rem;
    }

    .pub-footer a {
        color: rgba(255,255,255,.58);
        font-size: .84rem;
        display: block;
        margin-bottom: .32rem;
        transition: var(--t);
    }

        .pub-footer a:hover {
            color: var(--cyan-400);
        }

.footer-col-label {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    margin-bottom: .6rem;
}

.footer-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,.08);
    margin: 2rem 0 1rem;
}

.footer-socials a {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,.1);
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.65);
    font-size: .88rem;
    margin-right: .4rem;
    margin-bottom: .4rem;
    transition: var(--t);
}

    .footer-socials a:hover {
        background: rgba(255,255,255,.2);
        color: #fff;
    }

/* ── Dropdown fix ───────────────────────────────────────────────── */
/* El header tiene z-index:950, el dropdown debe superarlo */
.app-header .dropdown-menu {
    z-index: 1100 !important;
    border-radius: var(--r-md);
    border: 1px solid var(--border-soft);
    box-shadow: var(--sh-lg);
    font-family: 'Plus Jakarta Sans',sans-serif;
    font-size: .84rem;
    padding: .4rem;
    min-width: 175px;
}

.app-header .dropdown-item {
    border-radius: var(--r-sm);
    padding: .5rem .85rem;
    color: var(--text-body);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .55rem;
    transition: var(--t);
}

.app-header .dropdown-item.deshabilitado {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

    .app-header .dropdown-item:hover {
        background: var(--blue-50);
        color: var(--navy-800);
    }

    .app-header .dropdown-item.text-danger:hover {
        background: var(--red-100);
    }

.app-header .dropdown-divider {
    border-color: var(--border-soft);
    margin: .3rem 0;
}

/* ── Link-more ──────────────────────────────────────────────────── */
.link-more {
    font-size: .8rem;
    font-weight: 700;
    color: var(--navy-700);
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    transition: var(--t);
}

    .link-more:hover {
        color: var(--navy-900);
        gap: .42rem;
    }

/* ── Responsive ─────────────────────────────────────────────────── */
/* Tablet portrait (768–1024) */
@media(max-width:1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.mobile-open {
            transform: translateX(0);
            width: var(--sidebar-w);
        }

    .app-main {
        margin-left: 0 !important;
    }

    .sidebar.collapsed .sb-link-text,
    .sidebar.collapsed .sb-section,
    .sidebar.collapsed .sb-brand-name,
    .sidebar.collapsed .sb-user-info {
        opacity: 1 !important;
        max-width: 160px !important;
        overflow: visible !important;
    }

    .sidebar.collapsed .sb-link {
        justify-content: flex-start;
        padding: .52rem .85rem;
        margin: .05rem .5rem;
        width: calc(100% - 1rem);
    }

    .sidebar.collapsed .sb-user {
        justify-content: flex-start;
    }
}
/* Mobile */
@media(max-width:767px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    .app-content {
        padding: 1rem;
    }

    .hero-h1 {
        font-size: 1.72rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    .section-inner {
        padding: 0 1rem;
    }

    .nav-inner {
        padding: .5rem 1rem;
    }

    .quick-grid {
        grid-template-columns: repeat(4,1fr);
    }

    .today-card {
        padding: 1.1rem;
    }

    .login-box {
        max-width: 100%;
    }
}
/* Small mobile */
@media(max-width:479px) {
    .hero-h1 {
        font-size: 1.5rem;
    }

    .btn-navy, .btn-ghost, .btn-white, .btn-outline {
        width: 100%;
        justify-content: center;
    }
}
/* Large desktop */
@media(min-width:1280px) {
    .section-inner, .nav-inner {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.fade-up {
    animation: fadeUp .4s ease both;
}

.d1 {
    animation-delay: .07s;
}

.d2 {
    animation-delay: .14s;
}

.d3 {
    animation-delay: .21s;
}

/* ── Fix: headings dentro de hero forzados a blanco ── */
.hero h1, .hero h2, .hero h3, .hero p {
    color: #fff;
}

.hero-h1 {
    color: #fff !important;
}

    .hero-h1 em {
        color: #38BDF8 !important;
        font-style: normal;
    }

.hero-sub {
    color: rgba(255,255,255,.85) !important;
}

.hero-eyebrow {
    color: rgba(255,255,255,.92);
}

/* ── Responsive mejorado ── */
/* Mobile < 480px */
@media(max-width:479px) {
    .hero {
        padding: 2.5rem 0 3rem;
    }

    .hero-inner {
        padding: 0 1rem;
    }

    .hero-h1 {
        font-size: 1.65rem !important;
    }

    .login-box {
        padding: 1rem;
    }

    .login-input {
        font-size: .85rem;
    }

    .section-inner {
        padding: 0 1rem;
    }

    .section-h2 {
        font-size: 1.25rem;
    }
}
/* Mobile 480-767px */
@media(min-width:480px) and (max-width:767px) {
    .hero-h1 {
        font-size: 2rem !important;
    }

    .section-h2 {
        font-size: 1.45rem;
    }
}
/* Tablet 768-1024px */
@media(min-width:768px) and (max-width:1024px) {
    .hero-h1 {
        font-size: 2.2rem !important;
    }

    .section-h2 {
        font-size: 1.6rem;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE COMPLETO — Android, iPhone, iPad, Tablet
   ══════════════════════════════════════════════ */

/* ── iPhone SE / Android pequeño (< 380px) ── */
@media(max-width:380px) {
    .hero-h1 {
        font-size: 1.5rem !important;
    }

    .nav-inner {
        padding: .5rem .85rem;
    }

    .hero-inner > div {
        gap: 1.25rem !important;
    }

    .login-box {
        padding: .9rem;
    }

    .login-input {
        padding: .5rem .75rem;
        font-size: .83rem;
    }

    .btn-white, .btn-navy, .btn-cyan {
        padding: .5rem 1rem;
        font-size: .82rem;
    }

    .section {
        padding: 2rem 0;
    }

    .section-inner {
        padding: 0 .85rem;
    }
}

/* ── iPhone / Android estándar (381–479px) ── */
@media(max-width:479px) {
    .hero {
        padding: 2.5rem 0 3rem;
    }

    .hero-h1 {
        font-size: 1.65rem !important;
        letter-spacing: -.01em;
    }

    .hero-sub {
        font-size: .9rem;
    }

    .section-h2 {
        font-size: 1.2rem;
    }

    #heroPreview {
        display: none !important;
    }

    .hero-inner > div {
        grid-template-columns: 1fr !important;
    }
    /* Features: 2 col en móvil pequeño */
    div[style*="minmax(210px"] {
        grid-template-columns: repeat(2,1fr) !important;
    }
    /* Programs: 1 col */
    div[style*="minmax(270px"] {
        grid-template-columns: 1fr !important;
    }
    /* Stats hero en fila */
    .hero-inner div[style*="display:flex;gap:2rem"] {
        gap: 1.25rem !important;
    }
    /* Sub grid */
    .sub-inner {
        grid-template-columns: 1fr !important;
    }

    .sub-grid-wrap {
        padding: 1.35rem !important;
    }
}

/* ── iPhone Plus / Android grande (480–767px) ── */
@media(min-width:480px) and (max-width:767px) {
    .hero-h1 {
        font-size: 2rem !important;
    }

    #heroPreview {
        display: none !important;
    }

    .hero-inner > div {
        grid-template-columns: 1fr !important;
    }

    .section-h2 {
        font-size: 1.4rem;
    }

    div[style*="minmax(210px"] {
        grid-template-columns: repeat(2,1fr) !important;
    }

    div[style*="minmax(270px"] {
        grid-template-columns: repeat(2,1fr) !important;
    }

    .sub-inner {
        grid-template-columns: 1fr !important;
    }
}

/* ── iPad mini / Tablet portrait (768–1023px) ── */
@media(min-width:768px) and (max-width:1023px) {
    .hero-h1 {
        font-size: 2.2rem !important;
    }

    #heroPreview {
        display: none !important;
    }

    .hero-inner > div {
        grid-template-columns: 1fr !important;
        max-width: 600px;
    }

    .login-box {
        max-width: 520px;
    }

    .section-h2 {
        font-size: 1.55rem;
    }

    div[style*="minmax(210px"] {
        grid-template-columns: repeat(3,1fr) !important;
    }

    div[style*="minmax(270px"] {
        grid-template-columns: repeat(2,1fr) !important;
    }

    .sub-inner {
        grid-template-columns: 1fr !important;
    }

    .fg {
        grid-template-columns: 1fr 1fr !important;
    }
    /* Sidebar en tablet */
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.mobile-open {
            transform: translateX(0);
        }

    .app-main {
        margin-left: 0 !important;
    }
}

/* ── iPad / Tablet landscape (1024–1199px) ── */
@media(min-width:1024px) and (max-width:1199px) {
    .hero-h1 {
        font-size: 2.5rem !important;
    }

    .section-h2 {
        font-size: 1.7rem;
    }

    div[style*="minmax(210px"] {
        grid-template-columns: repeat(4,1fr) !important;
    }

    div[style*="minmax(270px"] {
        grid-template-columns: repeat(3,1fr) !important;
    }

    .app-main {
        margin-left: var(--sidebar-w);
    }
}

/* ── Desktop (1200px+) ── */
@media(min-width:1200px) {
    #heroPreview {
        display: block !important;
    }

    .hero-inner > div {
        grid-template-columns: 1fr auto !important;
    }
}

/* ── Touch devices: quitar hover effects que se quedan pegados ── */
@media(hover:none) {
    .feature-card:hover, .news-card:hover, .card:hover {
        box-shadow: var(--sh-sm) !important;
        transform: none !important;
    }

    .btn-navy:hover, .btn-cyan:hover, .btn-white:hover {
        transform: none !important;
    }
}


/* ==========================================
   SIDEBAR ESCAEL - MENÚ AGRUPADO
   ========================================== */

.sidebar {
  --sb-subtext: #c2d5f3;
  --sb-hover: rgba(255, 255, 255, .07);
  --sb-selected: rgba(255, 255, 255, .12);
}

  /* Secciones */
  .sidebar .sb-section {
    padding: 20px 16px 8px;
    color: #91b2e2;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .1em;
  }

  /* Enlaces y botones de primer nivel */
  .sidebar .sb-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: calc(100% - 14px);
    min-height: 42px;
    margin: 2px 7px;
    padding: 10px 12px;
    color: var(--sb-subtext);
    background: transparent;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
  }

    .sidebar .sb-link:hover {
      color: #fff;
      background: var(--sb-hover);
    }

    .sidebar .sb-link.active {
      color: #fff;
      background: rgba(255, 255, 255, .14);
      box-shadow: inset 3px 0 #83baff;
    }

  .sidebar .sb-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 19px;
    font-size: 1rem;
  }

  .sidebar .sb-link-text {
    flex: 1;
    min-width: 0;
  }

  /* Grupos */
  .sidebar .sb-group {
    width: 100%;
    min-width: 0;
  }

  .sidebar .sb-group-toggle {
    appearance: none;
    -webkit-appearance: none;
  }

    .sidebar .sb-group-toggle[aria-expanded="true"] {
      color: #fff;
      background: var(--sb-hover);
    }

  .sidebar .sb-group-arrow {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: .72rem;
    opacity: .75;
    transition: transform .2s ease;
  }

  .sidebar .sb-group.is-open > .sb-group-toggle .sb-group-arrow {
    transform: rotate(180deg);
  }

  /* Submenús */
  .sidebar .sb-submenu {
    display: none;
    padding: 3px 0 7px;
  }

  .sidebar .sb-group.is-open > .sb-submenu {
    display: block;
    animation: sb-submenu-in .16s ease-out;
  }

@keyframes sb-submenu-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Elementos internos */
.sidebar .sb-sublink {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 28px);
  min-height: 37px;
  margin: 2px 7px 2px 21px;
  padding: 8px 11px 8px 15px;
  color: var(--sb-subtext);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: .79rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

  .sidebar .sb-sublink > i {
    flex: 0 0 17px;
    font-size: .9rem;
    text-align: center;
  }

  .sidebar .sb-sublink > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .sidebar .sb-sublink:hover {
    color: #fff;
    background: var(--sb-hover);
  }

  .sidebar .sb-sublink.active {
    color: #fff;
    background: var(--sb-selected);
    font-weight: 700;
  }

    .sidebar .sb-sublink.active::before {
      position: absolute;
      top: 8px;
      bottom: 8px;
      left: 0;
      width: 3px;
      border-radius: 3px;
      background: #83baff;
      content: "";
    }

  /* Opciones deshabilitadas */
  .sidebar .sb-sublink.deshabilitado {
    opacity: .45;
    cursor: not-allowed;
  }

  /* Focus accesible */
  .sidebar .sb-link:focus-visible,
  .sidebar .sb-sublink:focus-visible {
    outline: 2px solid #9acaff;
    outline-offset: -2px;
  }

/* Evitar animaciones si el usuario las desactiva */
@media (prefers-reduced-motion: reduce) {
  .sidebar .sb-link,
  .sidebar .sb-sublink,
  .sidebar .sb-group-arrow {
    transition: none;
  }

  .sidebar .sb-group.is-open > .sb-submenu {
    animation: none;
  }
}


/* ================================================================
   DASHBOARD UNIFICADO MULTI-ROL (ADMIN, COORDINADOR, DOCENTE, TESORERIA, SUPERADMIN, ALUMNO)
   ================================================================ */
.hdr-btn.hdr-btn-wa {
    color: #25D366;
}
.hdr-btn.hdr-btn-wa:hover {
    background: #F0FDF4;
    border-color: #BBF7D0;
    color: #16A34A;
}

.dash {
    display: grid;
    gap: 1.25rem;
}

.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: .25rem;
}

.dash-hero h1 {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--text-heading);
    margin: 0;
    letter-spacing: -0.02em;
}

.dash-hero p {
    margin: .25rem 0 0;
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 500;
}

.dash-quick {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
}

.dash-quick a, .dash-quick button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.kpi {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.05rem 1.2rem;
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
    box-shadow: 0 1px 3px rgba(10,37,64,0.03);
}

a.kpi:hover {
    border-color: #93C5FD;
    box-shadow: 0 4px 16px rgba(10,37,64,0.08);
    transform: translateY(-1px);
}

.kpi-ico {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.kpi-lbl {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}

.kpi-val {
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--text-heading);
    line-height: 1.15;
    margin: 3px 0 2px;
}

.kpi-sub {
    font-size: .76rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dash-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.dash-stack {
    display: grid;
    gap: 1.25rem;
}

@media (max-width: 1100px) {
    .dash-cols {
        grid-template-columns: 1fr;
    }
}

.dash-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(10,37,64,0.03);
}

.dash-card-h {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .95rem 1.25rem;
    border-bottom: 1px solid var(--border-soft);
}

.dash-card-h h2 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-card-h a {
    font-size: .78rem;
    font-weight: 700;
    color: var(--navy-800);
    text-decoration: none;
    white-space: nowrap;
}

.dash-card-h a:hover {
    color: var(--navy-600);
}

.dash-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem;
    border-top: 1px solid #F8FAFC;
    font-size: .85rem;
}

.dash-row:first-child {
    border-top: 0;
}

.dash-row .t {
    font-weight: 700;
    color: var(--text-heading);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-row .s {
    font-size: .76rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-empty {
    padding: 1.75rem 1rem;
    text-align: center;
    color: var(--text-subtle);
    font-size: .85rem;
}

.alert-list a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem;
    border-top: 1px solid #F8FAFC;
    text-decoration: none;
    color: var(--text-heading);
    font-size: .86rem;
    font-weight: 600;
    transition: background .15s ease;
}

.alert-list a:first-child {
    border-top: 0;
}

.alert-list a:hover {
    background: #F8FAFC;
}

.alert-list .n {
    margin-left: auto;
    font-weight: 900;
    font-size: 1rem;
}

.bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 170px;
    padding: 1rem 1.25rem .25rem;
    border-bottom: 1px solid var(--border);
    margin: 0 1.25rem;
    padding-left: 0;
    padding-right: 0;
}

.bar-col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

.bar {
    width: min(36px, 70%);
    background: var(--navy-800);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: background .18s;
}

.bar-col:hover .bar {
    background: var(--navy-600);
}

.bar-val {
    font-size: .72rem;
    font-weight: 800;
    color: #334155;
    margin-bottom: 4px;
}

.bar-lbls {
    display: flex;
    gap: 12px;
    margin: 0 1.25rem;
    padding: .45rem 0 1rem;
}

.bar-lbls span {
    flex: 1;
    text-align: center;
    font-size: .72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.rank-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    margin-top: 5px;
    overflow: hidden;
}

.rank-bar > div {
    height: 100%;
    background: var(--navy-800);
    border-radius: 3px;
}

.time-pill {
    font-size: .74rem;
    font-weight: 800;
    color: var(--navy-800);
    background: #EFF6FF;
    border-radius: 8px;
    padding: 3px 8px;
    white-space: nowrap;
}

.role-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.role-quick-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.35rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
    text-decoration: none;
    color: var(--text-heading);
    transition: all .18s ease;
    box-shadow: 0 1px 3px rgba(10,37,64,0.03);
}

.role-quick-card:hover {
    border-color: #93C5FD;
    box-shadow: 0 6px 20px rgba(10,37,64,0.08);
    transform: translateY(-2px);
    color: var(--navy-800);
}

.role-quick-card .ico {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
    transition: transform .18s;
}

.role-quick-card:hover .ico {
    transform: scale(1.08);
}

.role-quick-card .lbl {
    font-size: .95rem;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0;
}

.role-quick-card .desc {
    font-size: .78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}


/* ================================================================
   SIDEBAR CONTRAÍBLE (ESTILO MENÚ SANDWICH) Y PERSISTENCIA
   ================================================================ */
.hdr-toggle-sidebar {
    cursor: pointer;
    transition: all .18s ease;
}
.hdr-toggle-sidebar:hover {
    background: #F0F9FF !important;
    color: #0284C7 !important;
    border-color: #93C5FD !important;
    transform: scale(1.04);
}

@media (min-width: 1025px) {
    .sidebar.collapsed {
        width: var(--sidebar-c) !important;
    }
    .sidebar.collapsed ~ .app-main,
    .app-main.sidebar-collapsed {
        margin-left: var(--sidebar-c) !important;
    }
    .sidebar.collapsed .sb-brand {
        min-height: auto !important;
        padding: .85rem 0 !important;
    }
    .sidebar.collapsed .sb-brand-img {
        width: 38px !important;
        height: 38px !important;
        padding: 1px !important;
    }
    .sidebar.collapsed .sb-brand-name,
    .sidebar.collapsed .sb-link-text,
    .sidebar.collapsed .sb-link-badge,
    .sidebar.collapsed .sb-section,
    .sidebar.collapsed .sb-user-info,
    .sidebar.collapsed .sb-group-arrow,
    .sidebar.collapsed .sb-user a {
        display: none !important;
        opacity: 0 !important;
    }
    .sidebar.collapsed .sb-link {
        justify-content: center !important;
        padding: 10px 0 !important;
        margin: 3px auto !important;
        width: 44px !important;
        min-height: 42px !important;
        border-radius: 10px !important;
    }
    .sidebar.collapsed .sb-link.active {
        box-shadow: none !important;
        background: rgba(14, 165, 233, 0.35) !important;
    }
    .sidebar.collapsed .sb-submenu {
        display: none !important;
    }
    .sidebar.collapsed .sb-user {
        justify-content: center !important;
        padding: .75rem 0 !important;
    }
}

/* ================================================================
   ADAPTABILIDAD COMPLETA (RESPONSIVE PARA MÓVIL, TABLET Y DESKTOP)
   ================================================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px !important;
        box-shadow: 8px 0 32px rgba(6, 24, 51, 0.45);
    }
    .sidebar.mobile-open {
        transform: translateX(0) !important;
        z-index: 1100 !important;
    }
    .app-main {
        margin-left: 0 !important;
    }
    .sb-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(6, 24, 51, 0.6);
        backdrop-filter: blur(4px);
        z-index: 1050;
    }
    .sb-overlay.show {
        display: block;
    }
    .dash-cols {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 0 1rem !important;
        gap: .5rem !important;
    }
    .app-header-title {
        font-size: .95rem !important;
    }
    .app-content {
        padding: 1rem .85rem !important;
    }
    .dash {
        gap: 1rem !important;
    }
    .dash-hero {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: .85rem !important;
    }
    .dash-hero h1 {
        font-size: 1.35rem !important;
    }
    .dash-hero p {
        font-size: .8rem !important;
    }
    .dash-quick {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        gap: .5rem !important;
    }
    .dash-quick a, .dash-quick button {
        justify-content: center !important;
        padding: .5rem .75rem !important;
        font-size: .8rem !important;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: .75rem !important;
    }
    .kpi {
        padding: .85rem .75rem !important;
        gap: .65rem !important;
        flex-direction: column !important;
    }
    .kpi-ico {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.2rem !important;
        border-radius: 10px !important;
    }
    .kpi-lbl {
        font-size: .65rem !important;
    }
    .kpi-val {
        font-size: 1.35rem !important;
    }
    .kpi-sub {
        font-size: .7rem !important;
    }
    .dash-card-h {
        padding: .85rem 1rem !important;
    }
    .dash-card-h h2 {
        font-size: .88rem !important;
    }
    .dash-row {
        padding: .7rem 1rem !important;
    }
    .role-quick-grid {
        grid-template-columns: 1fr !important;
        gap: .75rem !important;
    }
    .role-quick-card {
        padding: 1rem .9rem !important;
    }
    .bars {
        height: 140px !important;
        margin: 0 .75rem !important;
        gap: 8px !important;
    }
    .bar {
        width: min(28px, 75%) !important;
    }
    .bar-lbls {
        margin: 0 .75rem !important;
        gap: 8px !important;
    }
    .bar-lbls span {
        font-size: .65rem !important;
    }
    .alert-list a {
        padding: .7rem 1rem !important;
        font-size: .82rem !important;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
    .kpi {
        flex-direction: row !important;
        align-items: center !important;
    }
    .dash-quick {
        grid-template-columns: 1fr !important;
    }
}

.dash-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
@media (max-width: 768px) {
    .dash-grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* ================================================================
   DISEÑO PERSONALIZADO Y DINÁMICO DE PERFIL (SIDEBAR & HEADER) v2
   ================================================================ */

/* ── Tarjeta Superior de Usuario en Sidebar (Horizontal, Aireada) ── */
.sb-profile-card {
    margin: .85rem .85rem .95rem;
    padding: 1.05rem .95rem;
    border-radius: 18px;
    background: linear-gradient(145deg, #0b224d 0%, #061633 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: .7rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: var(--t);
}

.sb-profile-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.sb-profile-card + .sb-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: .65rem;
}

/* Fila de identidad (Avatar + Info en línea horizontal) */
.sb-profile-identity {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.sb-profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.sb-profile-avatar-link {
    position: relative;
    display: block;
    text-decoration: none;
    outline: none;
}

.sb-profile-avatar-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #38BDF8 0%, #2563EB 55%, #1E40AF 100%);
    box-shadow: 0 4px 14px rgba(6, 21, 48, 0.4), 0 0 0 2px rgba(56, 189, 248, 0.2);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sb-profile-avatar-link:hover .sb-profile-avatar-ring {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.5), 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.sb-profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #0A2147;
    border: 1.5px solid #08214D;
    display: block;
}

.sb-profile-avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #0D3F8F 0%, #092352 100%);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sb-profile-status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22C55E;
    border: 2px solid #08214D;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.75);
}

.sb-profile-edit-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0EA5E9;
    color: #fff;
    font-size: .62rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #08214D;
    opacity: 0;
    transform: scale(0.75);
    transition: var(--t);
    box-shadow: 0 2px 5px rgba(0,0,0,.3);
}

.sb-profile-avatar-link:hover .sb-profile-edit-badge {
    opacity: 1;
    transform: scale(1);
}

.sb-profile-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .12rem;
}

.sb-profile-greeting {
    font-size: .7rem;
    font-weight: 700;
    color: #FDE047;
    display: flex;
    align-items: center;
    gap: .3rem;
    line-height: 1.2;
}

.sb-profile-greeting i {
    font-size: .82rem;
    color: #FBBF24;
}

.sb-profile-name {
    font-size: .88rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-profile-badge {
    display: inline-flex;
    align-items: center;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7DD3FC;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(125, 211, 252, 0.22);
    padding: .1rem .45rem;
    border-radius: 6px;
    align-self: flex-start;
    margin-top: .1rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Frase del día integrada (Cita sutil, no botón) */
.sb-profile-quote {
    padding: .48rem .65rem;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border-left: 2.5px solid #38BDF8;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    line-height: 1.35;
    position: relative;
    z-index: 1;
}

.sb-profile-quote i {
    color: #38BDF8;
    font-size: .82rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.sb-profile-quote-text {
    font-size: .71rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
}

/* ── Menú de Navegación del Sidebar (Espaciado y Limpio) ────────── */
.sb-nav {
    flex: 1;
    overflow-y: auto;
    padding: .4rem 0 .9rem;
    overscroll-behavior: contain;
}

.sb-section {
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    padding: .85rem 1.15rem .35rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.sb-section::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.sb-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .62rem .9rem;
    margin: .22rem .75rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: .85rem;
    font-weight: 500;
    transition: var(--t);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    background: none;
    border: none;
    width: calc(100% - 1.5rem);
    text-align: left;
}

.sb-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    transform: translateX(2px);
}

.sb-link.active {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.24) 0%, rgba(13, 63, 143, 0.16) 100%);
    color: #FFFFFF;
    font-weight: 700;
    border: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.18);
}

.sb-link.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 22%;
    bottom: 22%;
    width: 4px;
    background: #38BDF8;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px #38BDF8;
}

.sb-link-icon {
    font-size: 1.08rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    color: #93C5FD;
    transition: color var(--t);
}

.sb-link:hover .sb-link-icon,
.sb-link.active .sb-link-icon {
    color: #38BDF8;
}

/* ── Esquina Inferior del Sidebar: Sello ESCAEL + Acciones ─────── */
.sb-footer-corner {
    margin: .5rem .75rem .85rem;
    padding: .7rem .85rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    flex-shrink: 0;
    transition: var(--t);
}

.sb-footer-corner:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-color: rgba(125, 211, 252, 0.25);
}

.sb-footer-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    text-decoration: none;
    flex: 1;
}

.sb-footer-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    background: #FFFFFF;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.sb-footer-meta {
    min-width: 0;
    flex: 1;
    transition: opacity var(--t);
}

.sb-footer-title {
    font-size: .8rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: .03em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-footer-sub {
    font-size: .67rem;
    font-weight: 600;
    color: #7DD3FC;
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: .28rem;
}

.sb-footer-sub-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38BDF8;
    display: inline-block;
}

.sb-footer-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
}

.sb-corner-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: .95rem;
    text-decoration: none;
    transition: var(--t);
}

.sb-corner-btn:hover {
    background: rgba(14, 165, 233, 0.28);
    color: #FFFFFF;
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-1px);
}

.sb-corner-btn.sb-corner-logout:hover {
    background: rgba(239, 68, 68, 0.28);
    color: #FCA5A5;
    border-color: rgba(248, 113, 113, 0.5);
}

/* ── Ajustes en Modo Colapsado (Tablet / Mini Sidebar) ──────────── */
.sidebar.collapsed .sb-profile-card {
    margin: .6rem auto;
    padding: .45rem;
    width: 48px;
}

.sidebar.collapsed .sb-profile-quote,
.sidebar.collapsed .sb-profile-meta,
.sidebar.collapsed .sb-footer-meta,
.sidebar.collapsed .sb-footer-brand {
    display: none;
}

.sidebar.collapsed .sb-profile-avatar-ring {
    width: 40px;
    height: 40px;
}

.sidebar.collapsed .sb-footer-corner {
    margin: .4rem auto .65rem;
    padding: .35rem;
    width: 46px;
    justify-content: center;
}

.sidebar.collapsed .sb-footer-actions {
    flex-direction: column;
    gap: .25rem;
}

/* ── Top Header: Chip de Saludo y Menú de Perfil ─────────────────── */
.hdr-greeting-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .32rem .78rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid #BAE6FD;
    color: #0369A1;
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
}

.hdr-greeting-pill i {
    font-size: .92rem;
    color: #0284C7;
}

.hdr-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .28rem .65rem .28rem .32rem;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(10, 33, 71, 0.05);
    cursor: pointer;
    transition: var(--t);
    user-select: none;
}

.hdr-user-trigger:hover,
.hdr-user-trigger[aria-expanded="true"] {
    background: #F8FAFC;
    border-color: #93C5FD;
    box-shadow: 0 3px 10px rgba(13, 63, 143, 0.1);
}

.hdr-user-trigger::after {
    display: none !important;
}

.hdr-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #DBEAFE;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #FFFFFF;
    font-weight: 800;
    font-size: .78rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hdr-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    text-align: left;
}

.hdr-user-name {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-heading);
    max-width: 145px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hdr-user-role {
    font-size: .66rem;
    font-weight: 600;
    color: var(--text-muted);
}

.hdr-user-caret {
    font-size: .78rem;
    color: var(--text-muted);
    transition: transform var(--t);
}

.hdr-user-trigger[aria-expanded="true"] .hdr-user-caret {
    transform: rotate(180deg);
    color: var(--navy-700);
}

.hdr-profile-dropdown {
    min-width: 250px !important;
    padding: .5rem !important;
    border-radius: 16px !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 12px 32px rgba(10, 33, 71, 0.15) !important;
    background: #FFFFFF !important;
    margin-top: .45rem !important;
}

.hdr-dropdown-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .75rem;
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    border-radius: 12px;
    margin-bottom: .35rem;
    border: 1px solid #E2E8F0;
}

.hdr-dropdown-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 8px rgba(13, 63, 143, 0.15);
    background: linear-gradient(135deg, var(--navy-900), var(--navy-600));
    color: #FFFFFF;
    font-weight: 800;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hdr-dropdown-info {
    min-width: 0;
    flex: 1;
}

.hdr-dropdown-name {
    font-size: .84rem;
    font-weight: 800;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hdr-dropdown-role {
    font-size: .7rem;
    font-weight: 600;
    color: var(--navy-600);
    margin-top: .08rem;
}

.hdr-profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
    border-radius: 10px;
    font-size: .83rem;
    font-weight: 600;
    color: var(--text-body);
    transition: var(--t);
}

.hdr-profile-dropdown .dropdown-item i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.hdr-profile-dropdown .dropdown-item:hover {
    background: #F1F5F9;
    color: var(--navy-800);
}

.hdr-profile-dropdown .dropdown-item.text-danger:hover {
    background: #FEF2F2;
    color: #DC2626 !important;
}


/* ================================================================
   PÁGINA DE PERFIL MODERNA (STAFF Y ALUMNOS)
   ================================================================ */

.profile-container {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cabecera del Perfil con Banner Panorámico Azul y Letras Blancas */
.profile-hero-card {
    background: linear-gradient(135deg, #04142B 0%, #0B3577 48%, #0284C7 100%);
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.32);
    box-shadow: 0 12px 36px rgba(4, 18, 43, 0.22);
    overflow: hidden;
    position: relative;
    padding: 2rem 2.2rem;
}

.profile-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 12% 25%, rgba(255, 255, 255, 0.14) 0%, transparent 40%),
        radial-gradient(circle at 88% 75%, rgba(56, 189, 248, 0.26) 0%, transparent 50%);
    pointer-events: none;
}

.profile-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.profile-hero-identity {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.profile-avatar-giant-wrap {
    position: relative;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    padding: 3.5px;
    background: linear-gradient(135deg, #38BDF8 0%, #2563EB 50%, #1E40AF 100%);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.45);
    flex-shrink: 0;
}

.profile-avatar-giant-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #FFFFFF;
    border: 3px solid rgba(255, 255, 255, 0.95);
    display: block;
}

.profile-avatar-giant-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #0A2147 0%, #1565C0 100%);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 2.1rem;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.95);
}

.profile-avatar-edit-trigger {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0284C7;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2.5px solid #FFFFFF;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    transition: transform .18s ease, background .18s ease;
}

.profile-avatar-edit-trigger:hover {
    background: #0369A1;
    transform: scale(1.1);
}

.profile-hero-title-box {
    min-width: 0;
}

.profile-hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: rgba(56, 189, 248, 0.25);
    color: #E0F2FE;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: .2rem .65rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    margin-bottom: .35rem;
}

.profile-hero-title {
    margin: 0 0 .5rem 0;
    font-size: 1.7rem;
    font-weight: 800;
    color: #FFFFFF !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(2, 6, 23, 0.45);
}

.profile-hero-chips {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.profile-chip-glass {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 500;
    color: #F8FAFC;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: .28rem .75rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

.profile-chip-glass strong {
    color: #FFFFFF;
    font-weight: 700;
}

.profile-hero-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.btn-hero-glass {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    font-weight: 700;
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: .65rem 1.15rem;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
    backdrop-filter: blur(8px);
}

.btn-hero-glass:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.6);
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

.btn-hero-glass-danger {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    font-weight: 700;
    color: #FECACA !important;
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.42);
    padding: .65rem 1.15rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s ease;
    backdrop-filter: blur(8px);
}

.btn-hero-glass-danger:hover {
    background: rgba(239, 68, 68, 0.42);
    border-color: rgba(239, 68, 68, 0.7);
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

/* Tarjetas rápidas de estado de cuenta */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.profile-stat-card {
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
    padding: 1rem 1.15rem;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.04);
    display: flex;
    align-items: center;
    gap: .85rem;
    transition: transform var(--t), box-shadow var(--t);
}

.profile-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(10, 37, 64, 0.08);
}

.profile-stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.profile-stat-icon-blue {
    background: #EFF6FF;
    color: #1D4ED8;
}

.profile-stat-icon-green {
    background: #ECFDF5;
    color: #059669;
}

.profile-stat-icon-amber {
    background: #FFFBEB;
    color: #D97706;
}

.profile-stat-icon-purple {
    background: #F5F3FF;
    color: #7C3AED;
}

.profile-stat-meta {
    min-width: 0;
}

.profile-stat-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .15rem;
}

.profile-stat-value {
    font-size: .95rem;
    font-weight: 800;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bloques de Formulario del Perfil */
.profile-card-section {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 16px rgba(10, 37, 64, 0.05);
    padding: 1.75rem;
}

.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.35rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid #F1F5F9;
}

.profile-section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: .55rem;
}

.profile-section-subtitle {
    margin: .25rem 0 0;
    font-size: .8rem;
    color: var(--text-muted);
}

.profile-input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-input-with-icon i.input-icon-lead {
    position: absolute;
    left: 12px;
    color: #94A3B8;
    font-size: 1.05rem;
    pointer-events: none;
    transition: color var(--t);
}

.profile-input-with-icon input.form-control,
.profile-input-with-icon input.form-input {
    padding-left: 2.45rem !important;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid #CBD5E1;
    font-size: .86rem;
    font-weight: 500;
    transition: border-color var(--t), box-shadow var(--t);
    width: 100%;
}

.profile-input-with-icon input:focus {
    border-color: #0284C7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.profile-input-with-icon input:focus ~ i.input-icon-lead {
    color: #0284C7;
}

.profile-pwd-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 6px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color var(--t);
}

.profile-pwd-toggle:hover {
    color: var(--navy-800);
}

.profile-readonly-field {
    background-color: #F8FAFC !important;
    color: #475569 !important;
    cursor: not-allowed;
    border-style: dashed !important;
}

/* Barra de fortaleza de contraseña */
.password-meter-wrap {
    margin-top: .45rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.password-meter-bar {
    height: 4px;
    background: #E2E8F0;
    border-radius: 2px;
    overflow: hidden;
}

.password-meter-fill {
    height: 100%;
    width: 0;
    transition: width .3s ease, background-color .3s ease;
    border-radius: 2px;
}

.password-meter-text {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Aviso de soporte para documento protegido con enlace a WhatsApp */
.profile-dni-support-box {
    margin-top: .65rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: .85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.profile-dni-support-text {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
}

.profile-dni-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: #10B981;
    color: #FFFFFF !important;
    font-size: .8rem;
    font-weight: 700;
    padding: .5rem .95rem;
    border-radius: 9px;
    text-decoration: none;
    transition: background var(--t), transform var(--t);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    width: fit-content;
}

.profile-dni-whatsapp-btn:hover {
    background: #059669;
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

.profile-dni-whatsapp-btn i.ph-whatsapp-logo {
    font-size: 1.15rem;
}

/* ==========================================================================
   ESCAEL PREMIUM MODALS & DIALOGS DESIGN SYSTEM
   Modern, cohesive visual language for ALL modals (Bootstrap, SweetAlert2,
   and Custom Portal overlays)
   ========================================================================== */

/* ── 1. BOOTSTRAP MODALS ── */
.modal-backdrop {
    background-color: rgba(6, 21, 48, 0.68) !important;
    backdrop-filter: blur(8px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(130%) !important;
    transition: opacity 0.25s ease-in-out !important;
}

.modal-backdrop.show {
    opacity: 1 !important;
}

.modal.fade .modal-dialog {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease !important;
    transform: scale(0.96) translateY(12px) !important;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0) !important;
}

.modal-content {
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 60px -12px rgba(6, 21, 48, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.8) inset !important;
    background: #FFFFFF !important;
    overflow: hidden !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
}

.modal-header {
    padding: 1.25rem 1.6rem !important;
    border-bottom: 1px solid #EDF2F7 !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #FBFDFF 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.modal-header .modal-title,
.modal-title {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #0A2147 !important;
    letter-spacing: -0.015em !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    margin: 0 !important;
}

.modal-header .modal-title i,
.modal-title i {
    color: #0D3F8F !important;
    font-size: 1.25rem !important;
}

.modal-header .btn-close,
.modal-dialog .btn-close {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    background-color: #F1F5F9 !important;
    opacity: 0.75 !important;
    border: 1px solid #E2E8F0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

.modal-header .btn-close:hover,
.modal-dialog .btn-close:hover {
    opacity: 1 !important;
    background-color: #E2E8F0 !important;
    transform: rotate(90deg) !important;
}

.modal-body {
    padding: 1.5rem 1.6rem !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 0.92rem !important;
    color: #334155 !important;
    line-height: 1.6 !important;
}

.modal-footer {
    padding: 1rem 1.6rem !important;
    border-top: 1px solid #EDF2F7 !important;
    background: #F8FAFC !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

/* ── 2. SWEETALERT2 MODALS (Swal.fire) ── */
.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
    background: rgba(6, 21, 48, 0.68) !important;
    backdrop-filter: blur(8px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(130%) !important;
}

.swal2-popup {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    border-radius: 20px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 25px 70px -12px rgba(6, 21, 48, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.9) inset !important;
    padding: 2.2rem 1.85rem !important;
    background: #FFFFFF !important;
    max-width: 480px !important;
}

.swal2-popup.swal2-toast {
    padding: 0.85rem 1.25rem !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 30px -6px rgba(6, 21, 48, 0.22) !important;
    max-width: fit-content !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.swal2-title {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: #0A2147 !important;
    letter-spacing: -0.015em !important;
    padding: 0 0 0.4rem 0 !important;
    margin: 0 !important;
}

.swal2-html-container {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 0.94rem !important;
    color: #475569 !important;
    line-height: 1.58 !important;
    margin: 0.65rem 0 1.35rem 0 !important;
}

.swal2-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    margin-top: 1.4rem !important;
    width: 100% !important;
}

.swal2-actions button,
.swal2-styled {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    padding: 0.65rem 1.5rem !important;
    border-radius: 10px !important;
    border: none !important;
    outline: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #0D3F8F 0%, #1565C0 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(13, 63, 143, 0.32) !important;
}

.swal2-confirm:hover {
    background: linear-gradient(135deg, #0A2F6B 0%, #0D3F8F 100%) !important;
    box-shadow: 0 6px 20px rgba(13, 63, 143, 0.45) !important;
    transform: translateY(-1px) !important;
}

.swal2-cancel {
    background: #F1F5F9 !important;
    color: #475569 !important;
    border: 1px solid #CBD5E1 !important;
}

.swal2-cancel:hover {
    background: #E2E8F0 !important;
    color: #1E293B !important;
    transform: translateY(-1px) !important;
}

.swal2-deny {
    background: #EF4444 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
}

.swal2-deny:hover {
    background: #DC2626 !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Iconos de SweetAlert2 estilizados */
.swal2-icon {
    width: 4.25rem !important;
    height: 4.25rem !important;
    margin: 0.5rem auto 1.25rem !important;
    border-width: 3px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

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

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #10B981 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border: 3px solid rgba(16, 185, 129, 0.25) !important;
}

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

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #EF4444 !important;
}

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

.swal2-icon.swal2-info {
    border-color: #0D3F8F !important;
    color: #0D3F8F !important;
}

.swal2-icon.swal2-question {
    border-color: #0EA5E9 !important;
    color: #0EA5E9 !important;
}

.swal2-input,
.swal2-textarea,
.swal2-select {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
    border: 1.5px solid #CBD5E1 !important;
    padding: 0.65rem 0.95rem !important;
    color: #0F172A !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
    border-color: #0D3F8F !important;
    box-shadow: 0 0 0 4px rgba(13, 63, 143, 0.12) !important;
    outline: none !important;
}

/* ── 3. MODALES CUSTOM Y OVERLAYS DEL PORTAL ── */
.modal-overlay,
.asistencia-modal-overlay,
.nos-modal-backdrop,
div[id^="modal"][style*="position:fixed"],
div[id^="modal"][style*="position: fixed"] {
    background: rgba(6, 21, 48, 0.68) !important;
    backdrop-filter: blur(8px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(130%) !important;
    transition: opacity 0.25s ease-in-out !important;
}

.modal-card,
.asistencia-modal-container,
.nos-modal-dialog,
div[id^="modal"] > div[style*="background:#FFF"],
div[id^="modal"] > div[style*="background: #FFF"],
div[id^="modal"] > div[style*="background:#fff"],
div[id^="modal"] > div[style*="background: #fff"] {
    border-radius: 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 25px 60px -12px rgba(6, 21, 48, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.8) inset !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    overflow: hidden !important;
}

/* Botones de cerrar en modales custom */
.btn-modal-close,
.asistencia-btn-close,
.nos-modal-close,
button[onclick*="cerrarModal"],
button[onclick*="closeModal"] {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
    background: #F1F5F9 !important;
    border: 1px solid #E2E8F0 !important;
    color: #64748B !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    line-height: 1 !important;
}

.btn-modal-close:hover,
.asistencia-btn-close:hover,
.nos-modal-close:hover,
button[onclick*="cerrarModal"]:hover,
button[onclick*="closeModal"]:hover {
    background: #E2E8F0 !important;
    color: #0F172A !important;
    transform: rotate(90deg) !important;
}

