/*
 * Shell nativo de EasyLoad (Shared/Shell, AppHeader, Index): header, menú lateral, buscador de módulos,
 * menú de usuario y página de inicio.
 *
 * Mismas reglas que ctl-ui.css: sin colores fijos fuera de la marca; todo sale de --ctl-* (escala neutra
 * del theme switcher) y --shell-acento (color primario elegido o el rojo EasyLoad por omisión).
 * Las reglas van bajo .shell-* para ganarle a la capa generada (html[data-tema] a, button…).
 */

#wrapper {
    height: 100vh;
}

.shell-shell {
    --shell-header: 60px;
    --shell-menu: 272px;
    --shell-riel: 60px;
    --shell-acento: var(--tema-acento, #940404);
    --shell-acento-suave: color-mix(in srgb, var(--shell-acento) 9%, transparent);
    --shell-acento-medio: color-mix(in srgb, var(--shell-acento) 16%, transparent);
    /* Texto e iconos sobre un fondo de acento: blanco u oscuro según el color elegido */
    --shell-acento-fg: var(--tema-primary-fg, #fff);
    --shell-menu-bg: var(--ctl-bg-sutil);
    --shell-transicion: .18s cubic-bezier(.2, .8, .2, 1);
    height: 100%;
    background: var(--ctl-bg);
}

/* Ancho del menú lateral (preferencia de usuario, ThemeSwitcher) */
html[data-tema-menu="estrecho"] .shell-shell { --shell-menu: 232px; }
html[data-tema-menu="ancho"] .shell-shell { --shell-menu: 320px; }

.shell-shell kbd {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--ctl-borde);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--ctl-bg);
    color: var(--ctl-tenue);
    font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    box-shadow: none;
}

.shell-shell button {
    font: inherit;
}

    /* Bootstrap 4 pinta el anillo del navegador en cualquier button:focus; aquí solo con teclado */
    .shell-shell button:focus:not(:focus-visible),
    .shell-shell a:focus:not(:focus-visible) {
        outline: none;
    }

/* =============================== Header =============================== */
.shell-shell .shell-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--shell-header);
    padding: 0 16px 0 10px;
    background: var(--ctl-bg);
    border-bottom: 1px solid var(--ctl-borde);
    box-shadow: inset 0 -3px 0 var(--shell-acento);
}

.shell-shell .shell-h-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ctl-texto-2);
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

    .shell-shell .shell-h-boton:hover {
        background: var(--ctl-bg-hover);
        color: var(--shell-acento);
    }

    .shell-shell .shell-h-boton svg {
        width: 22px;
        height: 22px;
    }

.shell-shell .shell-h-boton:focus-visible,
.shell-shell .shell-menu-buscar:focus-visible,
.shell-shell .shell-usuario-boton:focus-visible,
.shell-shell .shell-item:focus-visible,
.shell-shell .shell-riel-item:focus-visible,
.shell-shell .shell-colapsar:focus-visible {
    outline: 2px solid var(--shell-acento);
    outline-offset: -2px;
}

.shell-shell .shell-marca {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--ctl-texto-2);
    text-decoration: none;
}

    .shell-shell .shell-marca:hover {
        color: var(--ctl-texto-2);
        text-decoration: none;
    }

    .shell-shell .shell-marca img {
        width: 36px;
        height: 36px;
        object-fit: contain;
    }

/* Marca: letra y colores del encabezado original (Times en negrita); no cambia con el tema.
   La regla global de tema.css usa var(--tema-fuente) en todo, por eso aquí se fija esa variable. */
.shell-marca-texto {
    --tema-fuente: Times, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 700;
    color: #7c7c7c;
}

    .shell-marca-texto b {
        font-weight: 700;
        color: #940404;
    }

.shell-migas {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-left: 10px;
    padding-left: 16px;
    border-left: 1px solid var(--ctl-borde);
    color: var(--ctl-tenue);
    font-size: calc(13px * var(--ctl-fe, 1));
    white-space: nowrap;
    overflow: hidden;
}

    .shell-migas:empty {
        display: none;
    }

    .shell-migas span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .shell-migas strong {
        color: var(--ctl-texto);
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.shell-migas-sep {
    flex-shrink: 0;
    opacity: .5;
}

.shell-shell .shell-menu-buscar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: calc(100% - 20px);
    height: 36px;
    margin: 10px 10px 0;
    padding: 0 6px 0 12px;
    border: 1px solid var(--ctl-borde);
    border-radius: 10px;
    background: var(--ctl-bg-sutil);
    color: var(--ctl-tenue);
    font-size: calc(13px * var(--ctl-fe, 1));
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

    .shell-shell .shell-menu-buscar:hover {
        border-color: var(--ctl-borde-fuerte);
        background: var(--ctl-bg);
    }

    .shell-shell .shell-menu-buscar svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .shell-shell .shell-menu-buscar kbd {
        margin-left: auto;
    }

/* Buscador en línea del menú: filtra el árbol (mismo aspecto que el botón del buscador global) */
.shell-shell .shell-menu-filtro {
    cursor: text;
}

    .shell-shell .shell-menu-filtro:focus-within {
        border-color: var(--shell-acento);
        background: var(--ctl-bg);
    }

.shell-menu-filtro-entrada {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

    .shell-menu-filtro-entrada::placeholder {
        color: var(--ctl-tenue);
    }

.shell-menu-filtro-borrar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: calc(var(--easy-radio-base, 8px) * .75);
    background: transparent;
    color: var(--ctl-tenue);
    cursor: pointer;
}

    .shell-menu-filtro-borrar:hover {
        color: inherit;
        background: var(--ctl-bg);
    }

    .shell-menu-filtro-borrar svg {
        width: 14px;
        height: 14px;
    }

.shell-menu-filtro-vacio {
    display: block;
    margin: 14px 10px;
    color: var(--ctl-tenue);
    font-size: calc(13px * var(--ctl-fe, 1));
}

/* Botones de la cabecera (Reportar / Ayuda, empresa y usuario): mismo aspecto que los botones del toolbar de los grids
   (bloque "Botones de toolbar" al final): borde y fondo tenue desde el reposo, acento del tema en hover/abierto.
   Con !important y especificidad alta porque Syncfusion (.e-btn del Reportar) y la capa generada también los pintan. */
html body .shell-shell .shell-header .soporte-btn:not(.e-zz),
html body .shell-shell .shell-header .es-card:not(.e-zz),
html body .shell-shell .shell-header .shell-usuario-boton:not(.e-zz) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    min-height: 0;
    padding: 0 12px;
    border: 1px solid var(--ctl-borde) !important;
    border-radius: var(--ctl-radio, .375rem) !important;
    background: var(--ctl-bg-sutil) !important;
    color: var(--ctl-texto) !important;
    font-size: calc(13px * var(--ctl-fe, 1));
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none !important;
    transition: background-color .12s, border-color .12s, color .12s;
}

    html body .shell-shell .shell-header .soporte-btn:not(.e-zz):hover,
    html body .shell-shell .shell-header .soporte-btn:not(.e-zz):focus,
    html body .shell-shell .shell-header .es-card:not(.e-zz):hover,
    html body .shell-shell .shell-header .shell-usuario-boton:not(.e-zz):hover {
        border-color: var(--shell-acento) !important;
        background: var(--shell-acento-suave) !important;
        color: var(--ctl-texto) !important;
        box-shadow: none !important;
    }

    /* Abierto / presionado: el tinte sube */
    html body .shell-shell .shell-header .soporte-btn:not(.e-zz):active,
    html body .shell-shell .shell-header .es-card.es-card--open:not(.e-zz),
    html body .shell-shell .shell-header .shell-usuario-boton.activo:not(.e-zz) {
        border-color: var(--shell-acento) !important;
        background: var(--shell-acento-medio) !important;
        color: var(--ctl-texto) !important;
    }

    .shell-shell .shell-header .soporte-btn:focus-visible,
    .shell-shell .shell-header .es-card:focus-visible {
        outline: 2px solid var(--shell-acento);
        outline-offset: 1px;
    }

    /* Iconos en acento, como en el toolbar */
    html body .shell-shell .shell-header .soporte-btn .easy-grid-ico {
        flex: none;
        color: var(--shell-acento) !important;
    }

    html body .shell-shell .shell-header .soporte-btn .e-btn-icon,
    html body .shell-shell .shell-header .soporte-btn i {
        margin: 0;
        color: var(--shell-acento) !important;
        font-size: 14px;
    }

/* Selector de empresa (EmpresaSelectorComponent): logo, alias y lista con los colores del tema */
html body .shell-shell .shell-header .es-card:not(.e-zz) {
    padding: 0 10px 0 6px;
}

    .shell-shell .shell-header .es-card .es-logo-img,
    .shell-shell .shell-header .es-card .es-logo-placeholder {
        width: 26px;
        height: 26px;
        border-radius: 7px;
    }

    .shell-shell .shell-header .es-card .es-logo-img {
        background-color: #fff; /* los logos de empresa traen su propio fondo */
    }

    .shell-shell .shell-header .es-card .es-logo-placeholder {
        background: var(--shell-acento);
        color: var(--shell-acento-fg);
    }

    .shell-shell .shell-header .es-card .es-card-alias {
        color: inherit;
        font-size: inherit;
        font-weight: inherit;
    }

    .shell-shell .shell-header .es-card .es-chevron {
        color: var(--ctl-tenue);
        font-size: 11px;
    }

.shell-shell .shell-header .es-dropdown {
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    padding: 6px;
    border: 1px solid var(--ctl-borde);
    border-radius: 14px;
    background: var(--ctl-bg);
    color: var(--ctl-texto);
    box-shadow: var(--ctl-sombra);
    animation: shell-aparecer .14s ease-out;
}

.shell-shell .shell-header .es-dropdown-item {
    border-radius: 9px;
}

    .shell-shell .shell-header .es-dropdown-item:hover {
        background: var(--ctl-bg-hover);
    }

    .shell-shell .shell-header .es-dropdown-item.es-dropdown-item--active {
        background: var(--shell-acento-suave);
    }

.shell-shell .shell-header .es-di-alias {
    color: var(--ctl-texto);
    font-size: calc(13px * var(--ctl-fe, 1));
}

.shell-shell .shell-header .es-di-rfc {
    color: var(--ctl-tenue);
}

.shell-shell .shell-header .es-di-check {
    color: var(--shell-acento);
}

.shell-shell .shell-header .es-logo-placeholder-sm {
    border-radius: 7px;
    background: var(--shell-acento);
    color: var(--shell-acento-fg);
}

.shell-shell .shell-header .es-loading {
    color: var(--ctl-tenue);
}

.shell-h-acciones {
    display: flex;
    margin-left: auto;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ---------- Menú de usuario ---------- */
.shell-usuario {
    position: relative;
}

/* La base de la píldora está en el bloque de botones de la cabecera; aquí solo lo propio del avatar */
html body .shell-shell .shell-header .shell-usuario-boton:not(.e-zz) {
    padding: 0 10px 0 5px;
}

.shell-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ctl-bg-hover);
    box-shadow: 0 0 0 2px var(--shell-acento-medio);
}

    .shell-avatar.grande {
        width: 48px;
        height: 48px;
    }

.shell-usuario-nombre {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: calc(13px * var(--ctl-fe, 1));
    font-weight: 600;
}

.shell-usuario-caret {
    width: 14px;
    height: 14px;
    color: var(--ctl-tenue);
}

.shell-usuario-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1041;
    width: 300px;
    max-width: calc(100vw - 24px);
    padding: 6px;
    border: 1px solid var(--ctl-borde);
    border-radius: 14px;
    background: var(--ctl-bg);
    color: var(--ctl-texto);
    box-shadow: var(--ctl-sombra);
    font-size: calc(13px * var(--ctl-fe, 1));
    animation: shell-aparecer .14s ease-out;
}

.shell-shell .shell-usuario-ir {
    width: 100%;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ctl-texto);
    font-size: calc(13px * var(--ctl-fe, 1));
    text-align: left;
}

    .shell-shell .shell-usuario-ir:hover {
        background: var(--ctl-bg-hover);
    }

    .shell-usuario-ir svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        color: var(--ctl-tenue);
    }

.shell-usuario-ir-textos {
    display: flex;
    flex-direction: column;
}

    .shell-usuario-ir-textos small {
        color: var(--ctl-tenue);
        font-size: calc(12px * var(--ctl-fe, 1));
    }

.shell-usuario-cab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px 14px;
}

    .shell-usuario-cab div {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .shell-usuario-cab strong {
        font-size: calc(14px * var(--ctl-fe, 1));
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .shell-usuario-cab span {
        color: var(--ctl-tenue);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.shell-usuario-seccion {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border-top: 1px solid var(--ctl-borde);
}

.shell-usuario-fila {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.shell-usuario-etiqueta {
    color: var(--ctl-tenue);
    font-size: calc(11px * var(--ctl-fe, 1));
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.shell-usuario-acciones {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 6px;
    border-top: 1px solid var(--ctl-borde);
}

.shell-shell .shell-usuario-opcion {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ctl-texto);
    font-size: calc(13px * var(--ctl-fe, 1));
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

    .shell-shell .shell-usuario-opcion:hover {
        background: var(--ctl-bg-hover);
        color: var(--ctl-texto);
        text-decoration: none;
    }

    .shell-shell .shell-usuario-opcion.peligro {
        color: var(--ctl-peligro);
    }

        .shell-shell .shell-usuario-opcion.peligro:hover {
            background: color-mix(in srgb, var(--ctl-peligro) 10%, transparent);
        }

    .shell-shell .shell-usuario-opcion:disabled {
        opacity: .6;
        cursor: default;
    }

    .shell-usuario-opcion svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

/* Control segmentado (CultureSwitcher) */
.shell-segmento {
    display: flex;
    padding: 3px;
    border-radius: 9px;
    background: var(--ctl-bg-hover);
}

    .shell-shell .shell-segmento button {
        flex: 1;
        height: 28px;
        border: 0;
        border-radius: 7px;
        background: transparent;
        color: var(--ctl-texto-2);
        font-size: calc(13px * var(--ctl-fe, 1));
        font-weight: 500;
        cursor: pointer;
    }

        .shell-shell .shell-segmento button.sel {
            background: var(--ctl-bg);
            color: var(--ctl-texto);
            font-weight: 600;
            box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
        }

/* Interruptor nativo */
.shell-switch {
    appearance: none;
    position: relative;
    width: 36px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--ctl-borde-fuerte);
    cursor: pointer;
    transition: background-color .15s;
}

    .shell-switch::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
        transition: transform .15s;
    }

    .shell-switch:checked {
        background: var(--shell-acento);
    }

        .shell-switch:checked::after {
            transform: translateX(16px);
        }

    .shell-switch:focus-visible {
        outline: 2px solid var(--shell-acento);
        outline-offset: 2px;
    }

/* ============================ Menú lateral ============================ */
.shell-menu {
    position: fixed;
    top: var(--shell-header);
    bottom: 0;
    left: 0;
    z-index: 1020;
    display: flex;
    flex-direction: column;
    width: var(--shell-menu);
    background: var(--shell-menu-bg);
    border-right: 1px solid var(--ctl-borde);
    transition: width var(--shell-transicion), transform var(--shell-transicion);
}

.shell-colapsado .shell-menu {
    width: var(--shell-riel);
}

.shell-main {
    margin-left: var(--shell-menu);
    transition: margin-left var(--shell-transicion);
}

.shell-colapsado .shell-main {
    margin-left: var(--shell-riel);
}

.shell-contenido {
    height: calc(100vh - var(--shell-header));
    overflow-y: auto;
}

.shell-arbol,
.shell-riel,
.shell-menu-cargando {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 10px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--ctl-borde-fuerte) transparent;
}

.shell-etiqueta {
    display: block;
    margin: 14px 10px 6px;
    color: var(--ctl-tenue);
    font-size: calc(11px * var(--ctl-fe, 1));
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.shell-shell .shell-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    margin: 1px 0;
    padding: 7px 10px 7px calc(10px + var(--nivel, 0) * 12px);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ctl-texto-2);
    font-size: calc(13.5px * var(--ctl-fe, 1));
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .12s, color .12s;
}

    .shell-shell .shell-item:hover {
        background: var(--ctl-bg-hover);
        color: var(--ctl-texto);
        text-decoration: none;
    }

    .shell-shell .shell-item.contiene-activo {
        color: var(--ctl-texto);
        font-weight: 600;
    }

    .shell-shell .shell-item.activo {
        background: var(--shell-acento-suave);
        color: var(--shell-acento);
        font-weight: 600;
    }

        .shell-shell .shell-item.activo::before {
            content: "";
            position: absolute;
            top: 8px;
            bottom: 8px;
            left: 0;
            width: 3px;
            border-radius: 0 3px 3px 0;
            background: var(--shell-acento);
        }

.shell-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    flex-shrink: 0;
    /* Los íconos llevan el color del tema; la opción activa se distingue por el fondo, la barra y el texto */
    color: var(--shell-acento);
    font-size: calc(14px * var(--ctl-fe, 1));
    text-align: center;
}

    .shell-icono svg {
        width: 18px;
        height: 18px;
    }

.shell-item.activo .shell-icono,
.shell-item.contiene-activo .shell-icono {
    color: var(--shell-acento);
}

.shell-texto {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-chevron {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--ctl-tenue);
    transition: transform .15s;
}

    .shell-chevron.abierto {
        transform: rotate(90deg);
    }

.shell-externo {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: var(--ctl-tenue);
}

/* Subniveles con guía vertical a la altura del ícono del padre */
.shell-sub {
    position: relative;
    animation: shell-desplegar .14s ease-out;
}

    .shell-sub::before {
        content: "";
        position: absolute;
        top: 2px;
        bottom: 2px;
        left: calc(19px + var(--nivel, 0) * 12px);
        width: 1px;
        background: var(--ctl-borde);
    }

    .shell-sub .shell-item {
        min-height: 32px;
        font-size: calc(13px * var(--ctl-fe, 1));
    }

    .shell-sub .shell-icono {
        font-size: calc(12px * var(--ctl-fe, 1));
    }

/* ---------- Riel (menú colapsado) ---------- */
.shell-riel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 0 16px;
}

.shell-shell .shell-riel-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ctl-texto-2);
    font-size: calc(16px * var(--ctl-fe, 1));
    cursor: pointer;
    transition: background-color .12s, color .12s;
}

    .shell-shell .shell-riel-item svg {
        width: 19px;
        height: 19px;
    }

    .shell-shell .shell-riel-item > :is(i, svg) {
        color: var(--shell-acento);
    }

    .shell-shell .shell-riel-item:hover,
    .shell-shell .shell-riel-item.abierto {
        background: var(--ctl-bg-hover);
        color: var(--ctl-texto);
    }

    /* Como todos los íconos llevan el acento, la activa se marca con fondo más fuerte y contorno */
    .shell-shell .shell-riel-item.activo {
        background: var(--shell-acento-medio);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--shell-acento) 40%, transparent);
        color: var(--shell-acento);
    }

.shell-separador {
    width: 24px;
    height: 1px;
    margin: 4px 0;
    background: var(--ctl-borde);
}

.shell-panel-fondo {
    position: fixed;
    inset: var(--shell-header) 0 0 var(--shell-riel);
    z-index: 1018;
}

.shell-panel {
    position: fixed;
    top: var(--shell-header);
    bottom: 0;
    left: var(--shell-riel);
    z-index: 1019;
    display: flex;
    flex-direction: column;
    width: 280px;
    background: var(--ctl-bg);
    border-right: 1px solid var(--ctl-borde);
    box-shadow: var(--ctl-sombra);
    animation: shell-entrar-izq .16s ease-out;
}

.shell-panel-cab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 6px;
    color: var(--ctl-texto);
    font-size: calc(14px * var(--ctl-fe, 1));
    font-weight: 700;
}

    .shell-panel-cab i {
        color: var(--shell-acento);
    }

/* Con el menú contraído el buscador queda solo como ícono */
.shell-colapsado .shell-shell .shell-menu-buscar,
.shell-colapsado .shell-menu-buscar {
    justify-content: center;
    width: 40px;
    margin: 10px auto 0;
    padding: 0;
    border-color: transparent;
    background: transparent;
}

    .shell-colapsado .shell-menu-buscar .shell-menu-buscar-texto,
    .shell-colapsado .shell-menu-buscar kbd {
        display: none;
    }

/* ---------- Pie del menú ---------- */
.shell-menu-pie {
    padding: 8px 10px;
    border-top: 1px solid var(--ctl-borde);
}

.shell-shell .shell-colapsar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ctl-tenue);
    font-size: calc(13px * var(--ctl-fe, 1));
    text-align: left;
    cursor: pointer;
}

    .shell-shell .shell-colapsar:hover {
        background: var(--ctl-bg-hover);
        color: var(--ctl-texto);
    }

    .shell-colapsar svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        transition: transform var(--shell-transicion);
    }

        .shell-colapsar svg.girado {
            transform: rotate(180deg);
        }

.shell-colapsado .shell-menu-pie {
    padding: 8px 10px;
}

.shell-colapsado .shell-colapsar {
    justify-content: center;
    padding: 0;
}

    .shell-colapsado .shell-colapsar .shell-texto {
        display: none;
    }

/* ---------- Esqueleto de carga ---------- */
.shell-menu-cargando {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
}

.shell-esqueleto {
    display: block;
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--ctl-bg-hover) 25%, var(--ctl-borde) 50%, var(--ctl-bg-hover) 75%);
    background-size: 200% 100%;
    animation: shell-brillo 1.2s linear infinite;
}

    .shell-esqueleto:nth-child(3n) {
        width: 70%;
    }

    .shell-esqueleto:nth-child(3n+1) {
        width: 85%;
    }

/* ======================== Buscador de módulos ======================== */
.shell-buscador-fondo {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: color-mix(in srgb, var(--tema-n-950, #000) 35%, transparent);
    backdrop-filter: blur(2px);
    animation: shell-fundido .12s ease-out;
}

.shell-buscador {
    position: fixed;
    top: 12vh;
    left: 50%;
    z-index: 1061;
    display: flex;
    flex-direction: column;
    width: 640px;
    max-width: calc(100vw - 32px);
    max-height: 70vh;
    transform: translateX(-50%);
    border: 1px solid var(--ctl-borde);
    border-radius: 16px;
    background: var(--ctl-bg);
    color: var(--ctl-texto);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
    overflow: hidden;
    animation: shell-aparecer .14s ease-out;
}

.shell-buscador-entrada {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid var(--ctl-borde);
}

    .shell-buscador-entrada svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        color: var(--ctl-tenue);
    }

    .shell-buscador-entrada input {
        flex: 1;
        min-width: 0;
        height: 56px;
        border: 0;
        background: transparent;
        color: var(--ctl-texto);
        font-size: calc(16px * var(--ctl-fe, 1));
        outline: none;
    }

        .shell-buscador-entrada input::placeholder {
            color: var(--ctl-tenue);
        }

.shell-buscador-lista {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
}

.shell-buscador-grupo {
    display: block;
    padding: 6px 10px;
    color: var(--ctl-tenue);
    font-size: calc(11px * var(--ctl-fe, 1));
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.shell-buscador-vacio {
    padding: 32px 16px;
    color: var(--ctl-tenue);
    font-size: calc(14px * var(--ctl-fe, 1));
    text-align: center;
}

.shell-shell .shell-buscador-item,
.shell-buscador .shell-buscador-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ctl-texto);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

    .shell-buscador .shell-buscador-item.sel {
        background: var(--shell-acento-suave);
    }

.shell-buscador-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--ctl-borde);
    border-radius: 8px;
    background: var(--ctl-bg);
    color: var(--ctl-texto-2);
    font-size: calc(13px * var(--ctl-fe, 1));
}

.shell-buscador-item.sel .shell-buscador-icono {
    border-color: transparent;
    background: var(--shell-acento);
    color: var(--shell-acento-fg);
}

.shell-buscador-textos {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.shell-buscador-nombre {
    font-size: calc(14px * var(--ctl-fe, 1));
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shell-buscador-ruta {
    color: var(--ctl-tenue);
    font-size: calc(12px * var(--ctl-fe, 1));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shell-buscador-marca {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ctl-bg-hover);
    color: var(--ctl-tenue);
    font-size: calc(11px * var(--ctl-fe, 1));
    font-weight: 600;
}

.shell-buscador-pie {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    border-top: 1px solid var(--ctl-borde);
    background: var(--ctl-bg-sutil);
    color: var(--ctl-tenue);
    font-size: calc(12px * var(--ctl-fe, 1));
}

    .shell-buscador-pie span {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

/* El buscador se renderiza dentro de .shell-shell, pero por si se usa fuera */
.shell-buscador kbd {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--ctl-borde);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--ctl-bg);
    color: var(--ctl-tenue);
    font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    box-shadow: none;
}

/* ============================ Animaciones ============================ */
@keyframes shell-aparecer {
    from { opacity: 0; translate: 0 -4px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes shell-fundido {
    from { opacity: 0; }
}

@keyframes shell-desplegar {
    from { opacity: 0; translate: 0 -3px; }
}

@keyframes shell-entrar-izq {
    from { opacity: 0; translate: -8px 0; }
}

@keyframes shell-entrar-der {
    from { opacity: 0; translate: 8px 0; }
}

@keyframes shell-brillo {
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .shell-shell *,
    .shell-shell *::before,
    .shell-shell *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================ Responsivo ============================ */
@media (max-width: 1279.98px) {

}

@media (max-width: 1023.98px) {
    .shell-migas {
        display: none;
    }

    .shell-usuario-nombre,
    .shell-usuario-caret {
        display: none;
    }

    html body .shell-shell .shell-header .shell-usuario-boton:not(.e-zz) {
        padding: 0 5px;
    }
}

/* En pantallas chicas Reportar / Ayuda y la empresa quedan solo con icono o logo */
@media (max-width: 1023.98px) {
    .shell-shell .shell-header .soporte-btn-texto {
        display: none;
    }

    html body .shell-shell .shell-header .soporte-btn:not(.e-zz),
    html body .shell-shell .shell-header .es-card:not(.e-zz) {
        padding: 0 9px;
    }

    .shell-shell .shell-header .es-card-info,
    .shell-shell .shell-header .es-chevron {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .shell-shell .shell-header {
        gap: 4px;
        padding: 0 8px 0 4px;
    }

    .shell-marca-texto {
        display: none;
    }


    .shell-h-acciones {
        gap: 2px;
    }

    /* El menú es un panel sobre el contenido */
    .shell-menu,
    .shell-colapsado .shell-menu {
        top: 0;
        z-index: 1050;
        width: min(86vw, 300px);
        transform: translateX(-100%);
        box-shadow: none;
    }

    .shell-movil-abierto .shell-menu {
        transform: none;
        box-shadow: var(--ctl-sombra);
    }

    .shell-main,
    .shell-colapsado .shell-main {
        margin-left: 0;
    }

    .shell-menu-pie {
        display: none;
    }

    .shell-menu-fondo {
        position: fixed;
        inset: 0;
        z-index: 1049;
        background: color-mix(in srgb, var(--tema-n-950, #000) 40%, transparent);
        animation: shell-fundido .15s ease-out;
    }
}

/* ============================ Favoritos ============================ */
/* Cada opción del menú (ElMenuNodo) lleva la estrella para fijarla; los favoritos van arriba de los módulos. */
.shell-hoja {
    position: relative;
}

    .shell-shell .shell-hoja .shell-item {
        padding-right: 34px;
    }

.shell-shell .shell-estrella {
    position: absolute;
    top: 50%;
    right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ctl-tenue);
    opacity: 0;
    translate: 0 -50%;
    cursor: pointer;
    transition: opacity .12s, color .12s, background-color .12s;
}

    .shell-estrella svg {
        width: 14px;
        height: 14px;
    }

    .shell-hoja:hover .shell-estrella,
    .shell-shell .shell-estrella:focus-visible {
        opacity: 1;
    }

    .shell-shell .shell-estrella:hover {
        background: var(--ctl-bg-hover);
        color: var(--ctl-texto);
    }

    .shell-shell .shell-estrella.fijado {
        color: var(--shell-acento);
        opacity: .9;
    }

    /* En la sección de favoritos la estrella (quitar) solo aparece al pasar el mouse */
    .shell-shell .shell-fav:not(:hover) .shell-estrella.fijado:not(:focus-visible) {
        opacity: 0;
    }

.shell-fav {
    cursor: grab;
}

    .shell-fav.arrastrando {
        opacity: .45;
    }

    .shell-fav.destino::before {
        content: "";
        position: absolute;
        top: -1px;
        right: 8px;
        left: 8px;
        z-index: 1;
        height: 2px;
        border-radius: 2px;
        background: var(--shell-acento);
    }

.shell-shell a.shell-riel-item {
    text-decoration: none;
}

/* ================= Disposición del menú (preferencias del ThemeSwitcher) ================= */
/* ---------- Menú a la derecha (data-tema-menu-pos="derecha") ---------- */
html[data-tema-menu-pos="derecha"] .shell-header > .shell-h-boton:first-child {
    order: 99;
}

html[data-tema-menu-pos="derecha"] .shell-menu {
    right: 0;
    left: auto;
    border-right: 0;
    border-left: 1px solid var(--ctl-borde);
}

html[data-tema-menu-pos="derecha"] .shell-main {
    margin-right: var(--shell-menu);
    margin-left: 0;
    transition: margin-right var(--shell-transicion);
}

html[data-tema-menu-pos="derecha"] .shell-colapsado .shell-main {
    margin-right: var(--shell-riel);
}

html[data-tema-menu-pos="derecha"] .shell-shell .shell-item.activo::before {
    right: 0;
    left: auto;
    border-radius: 3px 0 0 3px;
}

html[data-tema-menu-pos="derecha"] .shell-colapsar svg {
    transform: scaleX(-1);
}

    html[data-tema-menu-pos="derecha"] .shell-colapsar svg.girado {
        transform: none;
    }

html[data-tema-menu-pos="derecha"] .shell-panel-fondo {
    inset: var(--shell-header) var(--shell-riel) 0 0;
}

html[data-tema-menu-pos="derecha"] .shell-panel {
    right: var(--shell-riel);
    left: auto;
    border-right: 0;
    border-left: 1px solid var(--ctl-borde);
    animation-name: shell-entrar-der;
}

/* ---------- Menú flotante (data-tema-menu-flot): riel que se despliega sobre el contenido al pasar el mouse ---------- */
/* No hay hamburguesa ni riel "contraído a mano" en este modo (ShellApp ignora el estado contraído).
   Animación: el menú siempre dibuja su contenido completo y el ancho lo recorta (overflow). Así los textos, el buscador y
   las flechas salen con el menú en lugar de aparecer antes de que termine de abrirse. */
@media (min-width: 768px) {
    html[data-tema-menu-flot] .shell-header > .shell-h-boton:first-child {
        display: none;
    }

    html[data-tema-menu-flot] .shell-shell .shell-main {
        margin-left: var(--shell-riel);
    }

    html[data-tema-menu-flot][data-tema-menu-pos="derecha"] .shell-shell .shell-main {
        margin-right: var(--shell-riel);
        margin-left: 0;
    }

    html[data-tema-menu-flot] .shell-shell .shell-menu {
        width: var(--shell-riel);
        overflow: hidden;
        transition: width .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s;
    }

        html[data-tema-menu-flot] .shell-shell .shell-menu:is(:hover, :focus-within) {
            width: var(--shell-menu);
            box-shadow: var(--ctl-sombra);
            transition-delay: .08s;
        }

        /* Todo lo que no es ícono queda sin cortar ni reacomodarse; el ancho del menú lo recorta */
        html[data-tema-menu-flot] .shell-shell .shell-menu :is(.shell-item, .shell-menu-buscar, .shell-colapsar) {
            overflow: hidden;
            white-space: nowrap;
        }

            html[data-tema-menu-flot] .shell-shell .shell-menu :is(.shell-item, .shell-menu-buscar) > * {
                flex-shrink: 0;
            }

        html[data-tema-menu-flot] .shell-shell .shell-menu :is(.shell-texto, .shell-menu-buscar-texto, .shell-menu-filtro-entrada, .shell-menu-filtro-borrar, .shell-chevron, .shell-externo, .shell-estrella, .shell-menu-buscar kbd) {
            opacity: 0;
            pointer-events: none;
            transition: opacity .12s;
        }

        html[data-tema-menu-flot] .shell-shell .shell-menu:is(:hover, :focus-within) :is(.shell-texto, .shell-menu-buscar-texto, .shell-menu-filtro-entrada, .shell-menu-filtro-borrar, .shell-chevron, .shell-externo, .shell-estrella, .shell-menu-buscar kbd) {
            opacity: 1;
            pointer-events: auto;
            transition: opacity .16s .1s;
        }

        /* Submenús y etiquetas cambian la altura: solo aparecen con el menú abierto, con un fundido */
        html[data-tema-menu-flot] .shell-shell .shell-menu:not(:hover):not(:focus-within) :is(.shell-sub, .shell-etiqueta) {
            display: none;
        }

        html[data-tema-menu-flot] .shell-shell .shell-menu:is(:hover, :focus-within) :is(.shell-sub, .shell-etiqueta) {
            animation: shell-fundido .18s .1s both;
        }

        html[data-tema-menu-flot] .shell-shell .shell-menu:not(:hover):not(:focus-within) .shell-favoritos {
            margin-bottom: 6px;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--ctl-borde);
        }

    html[data-tema-menu-flot] .shell-shell .shell-menu-pie {
        display: none;
    }
}


/* ---------- Acento del menú: el primario ajustado al fondo del menú (js/tema.js) ----------
 * Un primario casi negro en modo oscuro, o casi blanco en modo claro, dejaba invisibles la opción activa y
 * los íconos. tema.js calcula --tema-acento-sobre-claro/-oscuro con contraste mínimo de 4.5:1.
 * Va antes de los estilos de menú: a igual especificidad, "Oscuro" y "Color" ganan por orden. */
:is(.shell-menu, .shell-panel, .tema-vista-menu) {
    --shell-acento: var(--tema-acento-sobre-claro, var(--tema-acento, #940404));
    --shell-acento-suave: color-mix(in srgb, var(--shell-acento) 10%, transparent);
    --shell-acento-medio: color-mix(in srgb, var(--shell-acento) 18%, transparent);
    --shell-acento-fg: #fff;
}

html[data-tema-mode="dark"] :is(.shell-menu, .shell-panel, .tema-vista-menu) {
    --shell-acento: var(--tema-acento-sobre-oscuro, var(--tema-acento, #940404));
    --shell-acento-suave: color-mix(in srgb, var(--shell-acento) 16%, transparent);
    --shell-acento-medio: color-mix(in srgb, var(--shell-acento) 24%, transparent);
    --shell-acento-fg: #18181b;
}

/* ---------- Estilo del menú (data-tema-menu-estilo): se redefinen los tokens dentro del menú ---------- */
/* .tema-vista-menu es la miniatura de la vista previa del ThemeSwitcher. */
html[data-tema-menu-estilo="oscuro"] :is(.shell-menu, .shell-panel, .tema-vista-menu) {
    --shell-menu-bg: #18181b;
    --ctl-bg: #18181b;
    --ctl-bg-sutil: #18181b;
    --ctl-bg-hover: rgba(255, 255, 255, .08);
    --ctl-borde: rgba(255, 255, 255, .1);
    --ctl-borde-fuerte: rgba(255, 255, 255, .2);
    --ctl-texto: #fafafa;
    --ctl-texto-2: #d4d4d8;
    --ctl-tenue: #a1a1aa;
    /* El acento se aclara para conservar contraste sobre el fondo oscuro */
    --shell-acento: var(--tema-acento-sobre-oscuro, color-mix(in srgb, var(--tema-acento, #940404) 55%, #fff));
    --shell-acento-suave: color-mix(in srgb, var(--shell-acento) 16%, transparent);
    --shell-acento-medio: color-mix(in srgb, var(--shell-acento) 24%, transparent);
    --shell-acento-fg: #18181b;
    color-scheme: dark;
}

/* El color de marca se resuelve en .shell-shell, antes de redefinir --shell-acento dentro del menú */
html[data-tema-menu-estilo="primario"] .shell-shell {
    --shell-menu-marca: var(--shell-acento);
}

html[data-tema-menu-estilo="primario"] :is(.shell-menu, .shell-panel, .tema-vista-menu) {
    --shell-menu-fg: var(--tema-primary-fg, #fff);
    --shell-menu-bg: var(--shell-menu-marca);
    --ctl-bg: var(--shell-menu-marca);
    --ctl-bg-sutil: var(--shell-menu-marca);
    --ctl-bg-hover: color-mix(in srgb, var(--shell-menu-fg) 12%, transparent);
    --ctl-borde: color-mix(in srgb, var(--shell-menu-fg) 20%, transparent);
    --ctl-borde-fuerte: color-mix(in srgb, var(--shell-menu-fg) 32%, transparent);
    --ctl-texto: var(--shell-menu-fg);
    --ctl-texto-2: color-mix(in srgb, var(--shell-menu-fg) 88%, transparent);
    --ctl-tenue: color-mix(in srgb, var(--shell-menu-fg) 68%, transparent);
    --shell-acento: var(--shell-menu-fg);
    --shell-acento-suave: color-mix(in srgb, var(--shell-menu-fg) 18%, transparent);
    --shell-acento-medio: color-mix(in srgb, var(--shell-menu-fg) 26%, transparent);
    --shell-acento-fg: var(--shell-menu-marca);
}

/* ============================ Apariencia (drawer) ============================ */
/* Panel lateral del ThemeSwitcher (lo abre ElMenuUsuario). No oscurece el fondo: los cambios se ven en vivo. */
.shell-apariencia-fondo {
    position: fixed;
    inset: 0;
    z-index: 1060;
}

.shell-apariencia {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1061;
    display: flex;
    flex-direction: column;
    width: min(420px, 100vw);
    background: var(--ctl-bg);
    color: var(--ctl-texto);
    border-left: 1px solid var(--ctl-borde);
    box-shadow: var(--ctl-sombra);
    font-size: calc(13px * var(--ctl-fe, 1));
    outline: none;
    animation: shell-entrar-der .2s ease-out;
}

/* ============================ Responsivo (preferencias) ============================ */
@media (max-width: 767.98px) {
    html[data-tema-menu-pos="derecha"] .shell-menu,
    html[data-tema-menu-pos="derecha"] .shell-colapsado .shell-menu {
        transform: translateX(100%);
    }

    html[data-tema-menu-pos="derecha"] .shell-movil-abierto .shell-menu {
        transform: none;
    }

    html[data-tema-menu-pos="derecha"] .shell-main,
    html[data-tema-menu-pos="derecha"] .shell-colapsado .shell-main {
        margin-right: 0;
    }
}

/* ============================ Inicio (Index) ============================ */
.eli {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 8px 40px;
    color: var(--ctl-texto);
}

.inicio-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: stretch;
}

.inicio-bienvenida {
    position: relative;
    padding: 28px 32px;
    border: 1px solid var(--ctl-borde);
    border-radius: 18px;
    background:
        radial-gradient(120% 140% at 100% 0%, var(--shell-acento-medio) 0%, transparent 55%),
        var(--ctl-bg);
    overflow: hidden;
}

.inicio-fecha {
    margin: 0 0 6px;
    color: var(--ctl-tenue);
    font-size: calc(13px * var(--ctl-fe, 1));
    font-weight: 500;
}

.inicio-saludo {
    margin: 0;
    color: var(--ctl-texto);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
}

    .inicio-saludo:focus {
        outline: none;
    }

.inicio-sub {
    margin: 6px 0 20px;
    color: var(--ctl-texto-2);
    font-size: calc(15px * var(--ctl-fe, 1));
}

.shell-shell .inicio-buscar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 520px;
    height: 46px;
    padding: 0 10px 0 16px;
    border: 1px solid var(--ctl-borde-fuerte);
    border-radius: 12px;
    background: var(--ctl-bg);
    color: var(--ctl-tenue);
    font-size: calc(14px * var(--ctl-fe, 1));
    text-align: left;
    cursor: text;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    transition: border-color .15s, box-shadow .15s;
}

    .shell-shell .inicio-buscar:hover,
    .shell-shell .inicio-buscar:focus-visible {
        border-color: var(--shell-acento);
        box-shadow: 0 0 0 3px var(--shell-acento-suave);
        outline: none;
    }

    .inicio-buscar svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .inicio-buscar span {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.inicio-tc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 24px;
    border: 1px solid var(--ctl-borde);
    border-radius: 18px;
    background: var(--ctl-bg);
}

.inicio-tc-cab {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ctl-texto-2);
    font-size: calc(13px * var(--ctl-fe, 1));
    font-weight: 600;
}

    .inicio-tc-cab img {
        width: 28px;
        height: 20px;
        object-fit: cover;
        border-radius: 4px;
        box-shadow: 0 0 0 1px var(--ctl-borde);
    }

.inicio-tc-valor {
    display: block;
    color: var(--ctl-texto);
    font-size: 34px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.inicio-tc-pie {
    color: var(--ctl-tenue);
    font-size: calc(12px * var(--ctl-fe, 1));
}

.inicio-seccion {
    margin-top: 32px;
}

.inicio-titulo {
    margin: 0 0 12px;
    color: var(--ctl-texto);
    font-size: calc(15px * var(--ctl-fe, 1));
    font-weight: 700;
}

/* ---------- Recientes ---------- */
.inicio-recientes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.shell-shell .inicio-reciente {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--ctl-borde);
    border-radius: 12px;
    background: var(--ctl-bg);
    color: var(--ctl-texto);
    font-size: calc(13px * var(--ctl-fe, 1));
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

    .shell-shell .inicio-reciente:hover {
        border-color: var(--ctl-borde-fuerte);
        color: var(--ctl-texto);
        text-decoration: none;
        box-shadow: 0 4px 14px rgba(0, 0, 0, .07);
        transform: translateY(-1px);
    }

.inicio-reciente-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--shell-acento-suave);
    color: var(--shell-acento);
    font-size: calc(15px * var(--ctl-fe, 1));
}

.inicio-reciente-textos {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.inicio-reciente-nombre {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inicio-reciente-ruta {
    color: var(--ctl-tenue);
    font-size: calc(12px * var(--ctl-fe, 1));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Módulos ---------- */
.inicio-modulos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
}

.inicio-modulo {
    display: flex;
    flex-direction: column;
    padding: 18px 18px 12px;
    border: 1px solid var(--ctl-borde);
    border-radius: 16px;
    background: var(--ctl-bg);
    transition: border-color .15s, box-shadow .15s;
}

    .inicio-modulo:hover {
        border-color: var(--ctl-borde-fuerte);
        box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
    }

    .inicio-modulo ul {
        flex: 1;
        margin: 12px 0 0;
        padding: 0;
        list-style: none;
    }

.inicio-modulo-cab {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .inicio-modulo-cab h3 {
        margin: 0;
        color: var(--ctl-texto);
        font-size: calc(15px * var(--ctl-fe, 1));
        font-weight: 700;
    }

    .inicio-modulo-cab span {
        color: var(--ctl-tenue);
        font-size: calc(12px * var(--ctl-fe, 1));
    }

.inicio-modulo-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--shell-acento-suave);
    color: var(--shell-acento);
    font-size: 17px;
}

.shell-shell .inicio-enlace {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    margin: 0 -8px;
    width: calc(100% + 16px);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ctl-texto-2);
    font-size: calc(13px * var(--ctl-fe, 1));
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

    .shell-shell .inicio-enlace:hover {
        background: var(--ctl-bg-hover);
        color: var(--ctl-texto);
        text-decoration: none;
    }

    .inicio-enlace svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        color: var(--ctl-tenue);
        opacity: 0;
        transition: opacity .12s, transform .12s;
    }

    .inicio-enlace:hover svg {
        opacity: 1;
        transform: translateX(2px);
    }

.inicio-enlace-texto {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shell-shell .inicio-mas {
    align-self: flex-start;
    margin-top: 6px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: var(--shell-acento);
    font-size: calc(13px * var(--ctl-fe, 1));
    font-weight: 600;
    cursor: pointer;
}

    .shell-shell .inicio-mas:hover {
        text-decoration: underline;
    }

.inicio-esqueleto,
.inicio-esqueleto-tarjeta {
    border-radius: 8px;
    background: linear-gradient(90deg, var(--ctl-bg-hover) 25%, var(--ctl-borde) 50%, var(--ctl-bg-hover) 75%);
    background-size: 200% 100%;
    animation: shell-brillo 1.2s linear infinite;
}

.inicio-esqueleto {
    width: 60%;
}

.inicio-esqueleto-tarjeta {
    height: 230px;
    border: 0;
}

@media (max-width: 991.98px) {
    .inicio-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .eli {
        padding-top: 12px;
    }

    .inicio-bienvenida {
        padding: 20px;
    }

    .inicio-saludo {
        font-size: 24px;
    }

    .inicio-buscar kbd {
        display: none;
    }
}

/* ===================== Botones de toolbar (grids y demás) =====================
   Syncfusion pinta los botones del toolbar como texto plano sobre blanco y sólo los "arma" al pasar el cursor.
   Aquí se ven como botón desde el reposo, con el mismo lenguaje que los de la cabecera (borde, tinte y acento del tema).
   Va con especificidad alta y !important porque la capa generada (tema-generado.css) también los usa. */
html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-toolbar-items .e-toolbar-item:not(.e-separator) {
    margin: 4px 3px;
    background: transparent !important;
    border: 0 !important;
}

html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn:not(.e-zz) {
    height: calc(32px + var(--ctl-dens, 0px));
    min-height: 0;
    padding: 0 12px;
    border: 1px solid var(--ctl-borde) !important;
    border-radius: var(--ctl-radio, .375rem) !important;
    background: var(--ctl-bg-sutil) !important;
    color: var(--ctl-texto) !important;
    font-weight: 500;
    box-shadow: none !important;
    transition: background-color .12s, border-color .12s, color .12s;
}

html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn:not(.e-zz):hover,
html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn:not(.e-zz):focus {
    border: 1px solid var(--shell-acento, var(--ctl-primario)) !important;
    background: var(--shell-acento-suave, var(--ctl-bg-hover)) !important;
    color: var(--ctl-texto) !important;
    box-shadow: none !important;
}

html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn:not(.e-zz):active {
    border: 1px solid var(--shell-acento, var(--ctl-primario)) !important;
    background: var(--shell-acento-medio, var(--ctl-bg-hover)) !important;
    box-shadow: none !important;
}

html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-btn:not(.e-zz):focus-visible {
    outline: 2px solid var(--shell-acento, var(--ctl-primario));
    outline-offset: 1px;
}

/* Icono y texto: acento y color de texto del tema */
html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-tbar-btn.e-btn .e-icons,
html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-tbar-btn.e-btn .e-btn-icon {
    color: var(--shell-acento, var(--ctl-primario)) !important;
}

html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-tbar-btn-text {
    color: var(--ctl-texto) !important;
    font-size: calc(13px * var(--ctl-fe, 1));
}

/* Deshabilitado: se nota apagado (la capa anterior lo forzaba a opacidad plena) */
html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-toolbar-items .e-toolbar-item.e-overlay .e-tbar-btn.e-btn:not(.e-zz) {
    opacity: .5 !important;
    background: var(--ctl-bg-sutil) !important;
    border-color: var(--ctl-borde) !important;
    cursor: default;
}

/* La barra misma sigue la superficie del tema */
html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header),
html body .e-toolbar:not(.e-rte-toolbar):not(.e-tab-header) .e-toolbar-items {
    background: var(--ctl-bg) !important;
}
