/* ==========================================================================
   FESAEM — Intranet · Sistema de diseño
   Calma institucional (navy + blanco + aire) con una única firma:
   el espectro del mutualismo (7 colores) usado con máxima disciplina.
   Se carga DESPUÉS de Bootstrap 5.3 para tematizarlo vía variables.
   ========================================================================== */

:root {
    /* Marca */
    --navy: #1b2a63;
    --navy-700: #16235a;
    --navy-800: #0f1a45;
    --ink: #0f1730;
    --muted: #5b6478;
    --surface: #ffffff;
    --canvas: #f6f8fc;
    --line: #e3e8f2;
    --line-strong: #d4dbea;

    /* Espectro mutualista (bandera / chevron) */
    --sp-red: #e23b2e;
    --sp-orange: #f07f1b;
    --sp-yellow: #f6c020;
    --sp-green: #2ba84a;
    --sp-cyan: #35a9e0;
    --sp-blue: #2e5fc0;
    --sp-violet: #7c3fa6;

    /* Bandas duras de 7 colores para la línea/acento (firma) */
    --spectrum: linear-gradient(90deg,
        var(--sp-red) 0 14.285%, var(--sp-orange) 0 28.57%,
        var(--sp-yellow) 0 42.855%, var(--sp-green) 0 57.14%,
        var(--sp-cyan) 0 71.425%, var(--sp-blue) 0 85.71%,
        var(--sp-violet) 0 100%);

    /* Bandera en degradé: los 7 colores cruzados y mezclados en diagonal */
    --spectrum-soft: linear-gradient(120deg,
        var(--sp-red), var(--sp-orange), var(--sp-yellow),
        var(--sp-green), var(--sp-cyan), var(--sp-blue), var(--sp-violet));

    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 48, .05), 0 6px 16px -12px rgba(27, 42, 99, .22);
    --shadow: 0 2px 4px rgba(15, 23, 48, .05), 0 22px 45px -24px rgba(27, 42, 99, .34);

    /* Bootstrap: mapear la marca a sus tokens */
    --bs-primary: var(--navy);
    --bs-primary-rgb: 27, 42, 99;
    --bs-body-bg: var(--canvas);
    --bs-body-color: var(--ink);
    --bs-border-color: var(--line);
    --bs-link-color: var(--navy);
    --bs-link-hover-color: var(--navy-800);
    --bs-body-font-family: 'Public Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-emphasis-color: var(--ink);
}

/* -------- Base -------- */
body {
    background-color: var(--canvas);
    /* Aura mutualista: manchas de color muy suaves en las esquinas */
    background-image:
        radial-gradient(680px 460px at 8% -6%, rgba(53, 169, 224, .15), transparent 60%),
        radial-gradient(620px 520px at 100% 0%, rgba(124, 63, 166, .13), transparent 58%),
        radial-gradient(720px 560px at 88% 108%, rgba(240, 127, 27, .11), transparent 60%),
        radial-gradient(560px 480px at -6% 100%, rgba(43, 168, 74, .11), transparent 60%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: 'Public Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.006em;
}

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 {
    font-family: 'Archivo', 'Public Sans', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.text-muted { color: var(--muted) !important; }
a { text-decoration: none; }
a:hover { text-decoration: none; }

/* Ancho de lectura cómodo por defecto en el contenido */
.container { max-width: 1120px; }

/* -------- Firma: línea espectro -------- */
.fesaem-spectrum {
    height: 4px;
    width: 100%;
    background: var(--spectrum);
}
.fesaem-spectrum--thin { height: 3px; }

/* -------- Barra superior -------- */
.fesaem-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.fesaem-topbar__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: .6rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.fesaem-brand { display: inline-flex; align-items: center; }
.fesaem-brand img { height: 38px; width: auto; display: block; }
.fesaem-topbar__spacer { flex: 1 1 auto; }
.fesaem-topbar__actions { display: flex; align-items: center; gap: .5rem; }
.fesaem-user {
    display: none;
    font-size: .85rem;
    color: var(--muted);
    padding-right: .25rem;
}
@media (min-width: 576px) { .fesaem-user { display: inline; } }
.fesaem-user strong { color: var(--ink); font-weight: 600; }

/* -------- Botones -------- */
.btn {
    --bs-btn-border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: .5rem .95rem;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    --bs-btn-bg: var(--navy);
    --bs-btn-border-color: var(--navy);
    --bs-btn-hover-bg: var(--navy-800);
    --bs-btn-hover-border-color: var(--navy-800);
    --bs-btn-active-bg: var(--navy-800);
    --bs-btn-active-border-color: var(--navy-800);
    --bs-btn-disabled-bg: var(--navy);
    --bs-btn-disabled-border-color: var(--navy);
    box-shadow: 0 8px 18px -10px rgba(27, 42, 99, .55);
}

.btn-outline-primary {
    --bs-btn-color: var(--navy);
    --bs-btn-border-color: var(--line-strong);
    --bs-btn-hover-bg: var(--navy);
    --bs-btn-hover-border-color: var(--navy);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--navy);
    --bs-btn-active-border-color: var(--navy);
}

.btn-secondary {
    --bs-btn-bg: #eef2fb;
    --bs-btn-border-color: #eef2fb;
    --bs-btn-color: var(--navy);
    --bs-btn-hover-bg: #e4eaf7;
    --bs-btn-hover-border-color: #e4eaf7;
    --bs-btn-hover-color: var(--navy-800);
}

.btn-outline-secondary {
    --bs-btn-color: var(--muted);
    --bs-btn-border-color: var(--line-strong);
    --bs-btn-hover-bg: #f1f4fa;
    --bs-btn-hover-border-color: var(--line-strong);
    --bs-btn-hover-color: var(--ink);
}

.btn-link { --bs-btn-color: var(--navy); font-weight: 600; }

/* -------- Tarjetas -------- */
.card {
    --bs-card-border-color: var(--line);
    --bs-card-border-radius: var(--radius);
    --bs-card-bg: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card .card-body { padding: 1.35rem 1.5rem; }

/* -------- Formularios -------- */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--line-strong);
    padding: .55rem .8rem;
    color: var(--ink);
    background-color: #fff;
}
.form-control::placeholder { color: #9aa3b6; }
.form-control:focus, .form-select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 .22rem rgba(27, 42, 99, .14);
}
.form-label { font-weight: 600; font-size: .88rem; color: var(--ink); margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }
.form-check-input:focus { border-color: var(--navy); box-shadow: 0 0 0 .22rem rgba(27, 42, 99, .14); }

/* -------- Tablas -------- */
.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #f7f9fd;
    border-color: var(--line);
    vertical-align: middle;
}
.table > thead th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 1px solid var(--line-strong);
    padding-top: .75rem;
    padding-bottom: .75rem;
}
.table > tbody td { border-color: var(--line); padding-top: .7rem; padding-bottom: .7rem; }

/* -------- Badges / alerts / list-group -------- */
.badge.bg-danger { background-color: var(--sp-red) !important; }
.badge.bg-success { background-color: var(--sp-green) !important; }
.badge.bg-light { background-color: #eef2fb !important; color: var(--navy) !important; font-weight: 600; }

.alert { border-radius: var(--radius-sm); border: 1px solid transparent; }
.alert-success { background: #eaf7ee; border-color: #cfead7; color: #1c5e33; }
.alert-danger { background: #fdecea; border-color: #f6ccc7; color: #a12318; }
.alert-info { background: #eaf3fb; border-color: #cfe2f4; color: #1c4c78; }
.alert-warning { background: #fff6e6; border-color: #f6e2b8; color: #7a5410; }
/* Banner de no leídos sticky, tono cálido pero sobrio */
.alert-warning.rounded-0 { background: #fff8ea; border-left: 0; border-right: 0; }

.list-group-item { border-color: var(--line); }
.list-group-item-action:hover { background: #f7f9fd; }

/* -------- Encabezado de página con acento chevron -------- */
.fesaem-page-head { position: relative; padding-left: 1rem; }
.fesaem-page-head::before {
    content: "";
    position: absolute;
    left: 0; top: .15em; bottom: .15em;
    width: 5px;
    border-radius: 3px;
    background: var(--spectrum);
    background-size: 100% 100%;
}

/* -------- Grilla de módulos (dashboard) -------- */
.fesaem-modules {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: .85rem;
}
.fesaem-module {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease;
}
.fesaem-module:hover {
    color: var(--navy);
    border-color: var(--line-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.fesaem-module__chevron {
    flex: 0 0 auto;
    width: 26px; height: 18px;
    background: var(--spectrum);
    -webkit-mask: url("/img/chevron-mask.svg") center / contain no-repeat;
    mask: url("/img/chevron-mask.svg") center / contain no-repeat;
    opacity: .9;
}

/* -------- Accesibilidad -------- */
:focus-visible {
    outline: 3px solid rgba(27, 42, 99, .45);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .btn:active, .fesaem-module:hover { transform: none; }
}

/* ==========================================================================
   App shell — sidebar + appbar (navegación persistente)
   ========================================================================== */
.fesaem-shell { display: flex; min-height: 100dvh; }

.fesaem-sidebar {
    width: 264px; flex: 0 0 264px;
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100dvh;
}
.fesaem-sidebar__brand {
    padding: 1.4rem 1.25rem 1.3rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(53, 169, 224, .07), rgba(255, 255, 255, 0));
}
.fesaem-sidebar__brand img {
    height: 66px; width: auto; max-width: 100%; display: block;
    filter: drop-shadow(0 6px 12px rgba(27, 42, 99, .16));
}

.fesaem-nav {
    flex: 1; overflow-y: auto;
    padding: .85rem .7rem;
    display: flex; flex-direction: column; gap: 2px;
}
.fesaem-nav__group {
    padding: .9rem .7rem .35rem;
    font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: #9aa3b6;
}
.fesaem-nav__group:not(:first-child) { margin-top: .5rem; border-top: 1px solid var(--line); padding-top: .9rem; }

.fesaem-nav__item {
    position: relative;
    display: flex; align-items: center; gap: .7rem;
    padding: .58rem .7rem;
    border-radius: 10px;
    color: var(--muted); font-weight: 600; font-size: .925rem;
    letter-spacing: -0.01em;
}
.fesaem-nav__item:hover { background: #f3f6fc; color: var(--ink); }
.fesaem-nav__icon { display: inline-flex; width: 20px; height: 20px; color: #8b93a7; flex: 0 0 auto; }
.fesaem-nav__icon svg { width: 20px; height: 20px; }
.fesaem-nav__item:hover .fesaem-nav__icon { color: var(--navy); }
.fesaem-nav__item.is-active { background: linear-gradient(120deg, rgba(46, 95, 192, .13), rgba(124, 63, 166, .10)); color: var(--navy); }
.fesaem-nav__item.is-active .fesaem-nav__icon { color: var(--navy); }
.fesaem-nav__item.is-active::before {
    content: ""; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 62%; border-radius: 3px;
    background: linear-gradient(180deg,
        var(--sp-red), var(--sp-orange), var(--sp-yellow), var(--sp-green),
        var(--sp-cyan), var(--sp-blue), var(--sp-violet));
}

.fesaem-sidebar__foot {
    border-top: 1px solid var(--line);
    padding: .85rem; display: flex; flex-direction: column; gap: .6rem;
}
.fesaem-usercard { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.fesaem-usercard__avatar {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
    background: var(--navy); color: #fff;
    display: grid; place-items: center;
    font-family: 'Archivo', sans-serif; font-weight: 700;
}
.fesaem-usercard__meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.fesaem-usercard__meta strong { font-size: .85rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fesaem-usercard__meta small { color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fesaem-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fesaem-appbar {
    position: sticky; top: 0; z-index: 1010;
    display: flex; align-items: center; gap: .75rem;
    min-height: 56px; padding: .5rem 1.5rem;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.fesaem-appbar::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--spectrum-soft);
}
.fesaem-appbar__spacer { flex: 1 1 auto; }
.fesaem-burger { display: none; cursor: pointer; color: var(--navy); padding: .2rem; border-radius: 8px; }
.fesaem-burger svg { width: 26px; height: 26px; display: block; }
.fesaem-scrim { display: none; }
.fesaem-content { min-width: 0; }

/* Drawer en móvil / tablet angosta */
@media (max-width: 992px) {
    .fesaem-sidebar {
        position: fixed; top: 0; left: 0; z-index: 1050;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 0 0 50px rgba(15, 23, 48, .22);
    }
    .fesaem-nav-toggle:checked ~ .fesaem-shell .fesaem-sidebar { transform: translateX(0); }
    .fesaem-scrim {
        display: block; position: fixed; inset: 0; z-index: 1040;
        background: rgba(15, 23, 48, .5);
        opacity: 0; pointer-events: none; transition: opacity .2s ease;
    }
    .fesaem-nav-toggle:checked ~ .fesaem-shell .fesaem-scrim { opacity: 1; pointer-events: auto; }
    .fesaem-burger { display: inline-flex; }
}

/* ==========================================================================
   Stat tiles (inicio)
   ========================================================================== */
.fesaem-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 1rem;
}
.fesaem-stat {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, box-shadow .22s ease;
    /* Cada tarjeta recibe su color del espectro vía --c (default: navy) */
    --c: var(--navy);
}
.fesaem-stat::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--c);
}
.fesaem-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(15, 23, 48, .05),
                0 26px 40px -22px color-mix(in srgb, var(--c) 55%, transparent);
}
.fesaem-stat__ico {
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center; margin-bottom: .8rem;
    color: var(--c); background: color-mix(in srgb, var(--c) 13%, white);
}
.fesaem-stat__ico svg { width: 22px; height: 22px; }
.fesaem-stat__num {
    font-family: 'Archivo', sans-serif; font-weight: 800;
    font-size: 2.1rem; line-height: 1; color: var(--ink); letter-spacing: -0.02em;
}
.fesaem-stat__label { color: var(--muted); font-size: .82rem; margin-top: .4rem; }

/* ==========================================================================
   Botón "+" (admin ABMs)
   ========================================================================== */
.fesaem-add {
    display: inline-flex; align-items: center; justify-content: center;
    height: 42px; min-width: 42px; padding: 0 .65rem;
    background: linear-gradient(135deg, var(--navy), var(--sp-blue));
    color: #fff; border: 0; border-radius: 12px;
    font-family: 'Archivo', sans-serif; font-size: 1.45rem; font-weight: 700; line-height: 1;
    box-shadow: 0 12px 24px -12px rgba(27, 42, 99, .7);
    transition: transform .1s ease, box-shadow .2s ease, filter .15s ease;
}
.fesaem-add:hover { color: #fff; transform: translateY(-2px); filter: saturate(1.08); box-shadow: 0 18px 30px -14px rgba(27, 42, 99, .7); }
.fesaem-add:active { transform: translateY(0); }

/* ==========================================================================
   Estadísticas — barras, dona, timeline, ranking
   ========================================================================== */
.fesaem-est-bar-row { display: flex; align-items: center; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.fesaem-est-bar-row:last-child { border-bottom: 0; }
.fesaem-est-bar-row .name { flex: 0 0 42%; font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fesaem-est-bar { flex: 1; height: 12px; border-radius: 999px; background: #eef1f9; overflow: hidden; }
.fesaem-est-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--sp-blue), var(--sp-cyan)); }
.fesaem-est-bar-row .val { flex: 0 0 62px; text-align: right; font-weight: 700; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fesaem-est-bar-row--tema { padding: .35rem 0; border-bottom: 0; }
.fesaem-est-bar--tema { height: 10px; }
.fesaem-est-bar--tema > span { background: linear-gradient(90deg, var(--sp-violet), var(--sp-blue)); }
.fesaem-est-bar-row--tema .name { flex: 0 0 48%; font-weight: 500; font-size: .84rem; }
.fesaem-est-bar-row--tema .val { flex: 0 0 34px; }

.fesaem-est-donut {
    --p: 0;
    width: 122px; height: 122px; border-radius: 50%; flex: 0 0 auto;
    background: conic-gradient(var(--sp-green) calc(var(--p) * 1%), #eef1f9 0);
    display: grid; place-items: center;
}
.fesaem-est-donut::after { content: ""; width: 88px; height: 88px; border-radius: 50%; background: var(--surface); grid-area: 1 / 1; }
.fesaem-est-donut b { grid-area: 1 / 1; z-index: 1; font-family: 'Archivo', sans-serif; font-size: 1.4rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.fesaem-est-dotc { width: 12px; height: 12px; border-radius: 4px; flex: 0 0 auto; display: inline-block; }

.fesaem-est-tl { display: flex; gap: .85rem; padding: .65rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.fesaem-est-tl:last-child { border-bottom: 0; }
.fesaem-est-tl__dot { width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; }
.fesaem-est-tl__dot svg { width: 17px; height: 17px; }
.fesaem-est-tl__meta { min-width: 0; }
.fesaem-est-tl__meta b { font-size: .9rem; display: block; }
.fesaem-est-tl__meta p { margin: .1rem 0 0; color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fesaem-est-tl time { margin-left: auto; color: var(--muted); font-size: .78rem; white-space: nowrap; padding-left: .5rem; }

.fesaem-est-callout { background: color-mix(in srgb, var(--sp-orange) 8%, white); border: 1px solid color-mix(in srgb, var(--sp-orange) 22%, white); border-radius: var(--radius-sm); padding: .9rem 1.1rem; }
.fesaem-est-callout h3 { font-size: .9rem; margin-bottom: .5rem; color: #9a5510; }
.fesaem-est-chip { background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; padding: .3rem .7rem; font-size: .82rem; font-weight: 600; }

.fesaem-est-rank { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.fesaem-est-rank:last-child { border-bottom: 0; }
.fesaem-est-rank .pos { width: 24px; height: 24px; border-radius: 8px; background: #eef2fb; color: var(--navy); font-weight: 800; font-family: 'Archivo', sans-serif; display: grid; place-items: center; font-size: .82rem; flex: 0 0 auto; }
.fesaem-est-rank .name { flex: 1; font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fesaem-est-rank .val { color: var(--muted); font-weight: 700; font-size: .82rem; white-space: nowrap; }

/* ==========================================================================
   Eventos — feed tipo nota (carrusel + tarjetas + galería)
   ========================================================================== */
/* Ticker "últimas" (estilo breaking news) */
.fesaem-ticker {
    display: flex; align-items: stretch; background: #0f1730;
    border-radius: 14px; overflow: hidden; margin-bottom: 1.6rem; box-shadow: var(--shadow-sm);
}
.fesaem-ticker__tag {
    flex: 0 0 auto; display: flex; align-items: center; gap: .45rem;
    padding: .7rem 1.05rem; background: var(--spectrum-soft); color: #fff;
    font-family: 'Archivo', sans-serif; font-weight: 800; font-size: .8rem; letter-spacing: .03em;
    position: relative; z-index: 2;
}
.fesaem-ticker__tag::after {
    content: ""; position: absolute; right: -10px; top: 0; bottom: 0; width: 20px;
    background: #0f1730; transform: skewX(-18deg);
}
.fesaem-ticker__view { flex: 1; overflow: hidden; position: relative; min-width: 0; }
.fesaem-ticker__track {
    display: inline-flex; gap: 2.5rem; padding: .7rem 1.2rem; white-space: nowrap;
    animation: fesaem-tick 34s linear infinite;
}
.fesaem-ticker__view:hover .fesaem-ticker__track { animation-play-state: paused; }
.fesaem-ticker__track a {
    color: rgba(255, 255, 255, .9); text-decoration: none; font-size: .9rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: .5rem;
}
.fesaem-ticker__track a:hover { color: #fff; }
.fesaem-ticker__track .fesaem-ticker__bullet { color: var(--sp-yellow); font-size: .7rem; }
@keyframes fesaem-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .fesaem-ticker__track { animation: none; white-space: normal; flex-wrap: wrap; gap: 1rem; }
}

/* Carrusel */
.fesaem-evento-carousel {
    position: relative; border-radius: 24px; overflow: hidden;
    background: #0f1730; box-shadow: var(--shadow); margin-bottom: 2rem;
}
.fesaem-evento-carousel__track { display: flex; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.fesaem-evento-slide {
    position: relative; min-width: 100%; height: 340px; display: block;
    text-decoration: none; color: #fff;
}
.fesaem-evento-slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fesaem-evento-slide__scrim {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 48, .85), rgba(15, 23, 48, .3) 55%, transparent);
}
.fesaem-evento-slide__body { position: absolute; z-index: 2; left: 0; bottom: 0; padding: 2rem 2.2rem; max-width: 62%; }
.fesaem-evento-slide__body h2 { color: #fff; font-size: 1.7rem; margin: .6rem 0 .4rem; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.fesaem-evento-slide__body p { color: rgba(255, 255, 255, .92); margin: 0; }
.fesaem-evento-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35);
    color: #fff; padding: .3rem .7rem; border-radius: 999px; font-size: .74rem; font-weight: 700;
    backdrop-filter: blur(4px);
}
.fesaem-evento-carousel__dots { position: absolute; z-index: 3; bottom: 1.6rem; left: 2.2rem; display: flex; gap: .4rem; }
.fesaem-evento-carousel__dots button {
    width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .45);
    border: 0; cursor: pointer; padding: 0; transition: background .2s;
}
.fesaem-evento-carousel__dots button.is-on { width: 26px; background: #fff; }
.fesaem-evento-carousel__nav { position: absolute; z-index: 3; bottom: 1.3rem; right: 1.6rem; display: flex; gap: .5rem; }
.fesaem-evento-carousel__nav button {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; font-size: 1.4rem; line-height: 1;
    backdrop-filter: blur(4px);
}

/* Grilla de tarjetas */
.fesaem-evento-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}
@media (max-width: 860px) { .fesaem-evento-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .fesaem-evento-grid { grid-template-columns: 1fr; } }
.fesaem-evento-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink);
    display: flex; flex-direction: column; transition: transform .16s ease, box-shadow .22s ease;
}
.fesaem-evento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.fesaem-evento-cover { position: relative; height: 158px; }
.fesaem-evento-cover img { width: 100%; height: 100%; object-fit: cover; }
.fesaem-evento-cover__fallback {
    display: grid; place-items: center; width: 100%; height: 100%;
    background: var(--spectrum-soft); color: rgba(255, 255, 255, .8);
}
.fesaem-evento-cover__fallback svg { width: 34px; height: 34px; }
.fesaem-evento-date {
    position: absolute; z-index: 2; top: .7rem; left: .7rem; background: #fff;
    border-radius: 11px; padding: .3rem .55rem; text-align: center; line-height: 1; box-shadow: var(--shadow-sm);
}
.fesaem-evento-date b { display: block; font-family: 'Archivo', sans-serif; font-size: 1.15rem; color: var(--navy); }
.fesaem-evento-date span { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.fesaem-evento-card__body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.fesaem-evento-card__body h3 { font-size: 1.05rem; line-height: 1.25; }
.fesaem-evento-card__body p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.fesaem-evento-card__more { margin-top: auto; padding-top: .3rem; color: var(--navy); font-weight: 700; font-size: .85rem; }

/* Galería del detalle */
.fesaem-evento-gallery { position: relative; background: #0f1730; }
.fesaem-evento-gallery__stage { position: relative; height: 340px; }
.fesaem-evento-gallery__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fesaem-evento-gallery__dots { position: absolute; z-index: 3; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: .4rem; }
.fesaem-evento-gallery__dots button {
    width: 9px; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, .5);
    border: 0; cursor: pointer; padding: 0; transition: background .2s;
}
.fesaem-evento-gallery__dots button.is-on { width: 26px; background: #fff; }

@media (prefers-reduced-motion: reduce) {
    .fesaem-evento-carousel__track { transition: none; }
}

/* Convenios */
.fesaem-convenio-badge {
    position: absolute; z-index: 2; top: .7rem; left: .7rem;
    background: #fff; border-radius: 8px; padding: .3rem .55rem;
    font-size: .68rem; font-weight: 800; color: var(--navy); box-shadow: var(--shadow-sm);
}
.fesaem-convenio-refs { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.fesaem-convenio-chip {
    background: #fff; border: 1px solid var(--line-strong); border-radius: 999px;
    padding: .4rem .8rem; font-size: .85rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: .45rem;
}
.fesaem-convenio-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sp-green); flex: 0 0 auto; }

/* Destacado de convenios en el inicio de la mutual */
.fesaem-convenio-destacado {
    position: relative; overflow: hidden; border-radius: 22px;
    padding: 1.5rem 1.7rem; color: #fff; margin-bottom: 1.4rem;
    background: var(--spectrum-soft); box-shadow: 0 24px 46px -24px rgba(46, 95, 192, .6);
}
.fesaem-convenio-destacado::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(105deg, rgba(15, 23, 48, .5), rgba(15, 23, 48, .08) 60%);
}
.fesaem-convenio-destacado > * { position: relative; z-index: 1; }
.fesaem-convenio-destacado__eye { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; opacity: .95; }
.fesaem-convenio-destacado h2 { color: #fff; font-size: 1.45rem; margin: .3rem 0 .35rem; }
.fesaem-convenio-destacado p { margin: 0 0 1rem; max-width: 56ch; opacity: .95; }
.fesaem-convenio-destacado .btn-hero { background: #fff; color: var(--navy); }

/* ==========================================================================
   Dashboard — Accesos rápidos + Actividad reciente
   ========================================================================== */
.fesaem-dash-cols {
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.2rem; margin-top: 1.4rem;
}
@media (max-width: 900px) { .fesaem-dash-cols { grid-template-columns: 1fr; } }
.fesaem-card-title { font-size: 1.02rem; margin-bottom: 1rem; }

.fesaem-feed__row {
    display: flex; align-items: flex-start; gap: .85rem;
    padding: .8rem 0; border-bottom: 1px solid var(--line);
}
.fesaem-feed__row:last-child { border-bottom: 0; }
.fesaem-feed__row:first-child { padding-top: 0; }
.fesaem-feed__dot {
    width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
    display: grid; place-items: center; color: #fff; background: var(--c, var(--navy));
}
.fesaem-feed__dot svg { width: 19px; height: 19px; }
.fesaem-feed__meta { min-width: 0; }
.fesaem-feed__meta b { font-size: .92rem; display: block; }
.fesaem-feed__meta p { margin: .1rem 0 0; color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fesaem-feed__row time { color: var(--muted); font-size: .76rem; margin-left: auto; white-space: nowrap; padding-left: .5rem; }

.fesaem-quick { display: grid; gap: .7rem; }
.fesaem-quick .fesaem-module small {
    color: var(--muted); font-weight: 500; display: block; font-size: .76rem;
}

/* ==========================================================================
   Encabezado de página con degradé (banda reutilizable)
   ========================================================================== */
.fesaem-band {
    position: relative; overflow: hidden; border-radius: 20px;
    padding: 1.5rem 1.7rem; color: #fff; margin-bottom: 1.5rem;
    background: var(--spectrum-soft); box-shadow: 0 20px 42px -24px rgba(46, 95, 192, .55);
}
.fesaem-band::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(115deg, rgba(15, 23, 48, .58), rgba(15, 23, 48, .12) 60%, rgba(255, 255, 255, .08));
}
.fesaem-band > * { position: relative; z-index: 1; }
.fesaem-band__eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; opacity: .92; }
.fesaem-band h1 { color: #fff; font-size: 1.7rem; margin: .25rem 0 .3rem; text-shadow: 0 2px 14px rgba(15, 23, 48, .25); }
.fesaem-band p { margin: 0; opacity: .95; max-width: 62ch; }
.fesaem-band__actions { margin-top: 1.1rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* ==========================================================================
   Hero — bandera en degradé (encabezado del inicio)
   ========================================================================== */
.fesaem-hero {
    position: relative; overflow: hidden;
    border-radius: 24px; padding: 2rem 2.15rem;
    color: #fff; margin-bottom: 1.6rem;
    background: var(--spectrum-soft);
    box-shadow: 0 26px 50px -26px rgba(46, 95, 192, .6);
}
.fesaem-hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(105deg, rgba(15, 23, 48, .44), rgba(15, 23, 48, .06) 55%, rgba(255, 255, 255, .14));
}
.fesaem-hero > * { position: relative; z-index: 1; }
.fesaem-hero__eyebrow {
    font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
    font-weight: 700; opacity: .92;
}
.fesaem-hero h1, .fesaem-hero .h1 {
    color: #fff; font-size: 2rem; font-weight: 800; margin: .3rem 0 .45rem;
    text-shadow: 0 2px 14px rgba(15, 23, 48, .25);
}
.fesaem-hero p { margin: 0; max-width: 52ch; opacity: .96; }
.fesaem-hero__cta { margin-top: 1.15rem; display: flex; gap: .65rem; flex-wrap: wrap; }
.fesaem-hero .badge { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .4); color: #fff; }

/* Botones sobre el hero */
.btn-hero {
    background: #fff; color: var(--navy); border: 0;
    box-shadow: 0 10px 22px -12px rgba(15, 23, 48, .5);
}
.btn-hero:hover { background: #fff; color: var(--navy-800); transform: translateY(-1px); }
.btn-hero-ghost {
    background: rgba(255, 255, 255, .16); color: #fff;
    border: 1px solid rgba(255, 255, 255, .5); backdrop-filter: blur(4px);
}
.btn-hero-ghost:hover { background: rgba(255, 255, 255, .26); color: #fff; }
