/* ------------------------------------------------------------------
   Sistemas GLI 2027 — panel con menú lateral
   ------------------------------------------------------------------ */

:root {
    --lat-fondo: #2b2b52;
    --lat-fondo-2: #23233f;
    --lat-texto: #c9c9de;
    --lat-activo: #F89E32;
}

.cuerpo-panel { margin: 0; background: var(--fondo); }

.panel-marco { display: flex; min-height: 100vh; }

/* ------------------------------ lateral ------------------------------ */

.lateral {
    width: 250px;
    flex: 0 0 250px;
    background: var(--lat-fondo);
    color: var(--lat-texto);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.lateral-marca {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 18px;
    background: var(--lat-fondo-2);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.marca-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--blanco);
    color: var(--azul);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: .82rem;
    letter-spacing: .5px;
    flex: 0 0 auto;
}

.marca-texto { color: var(--blanco); font-weight: bold; font-size: .98rem; }

.lateral-perfil {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--naranja);
    color: var(--blanco);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: .8rem;
    flex: 0 0 auto;
}

.perfil-datos { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.perfil-datos strong {
    color: var(--blanco);
    font-size: .8rem;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.perfil-datos small { font-size: .7rem; color: rgba(255, 255, 255, .55); }

.lateral-nav { flex: 1; padding: 10px 0 18px; }

.lateral-grupo {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: rgba(255, 255, 255, .38);
    padding: 16px 18px 6px;
}

.lateral-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 18px;
    color: var(--lat-texto);
    text-decoration: none;
    font-size: .87rem;
    border-left: 3px solid transparent;
}

.lateral-nav a:hover { background: rgba(255, 255, 255, .06); color: var(--blanco); }

.lateral-nav a.activo {
    background: rgba(248, 158, 50, .14);
    color: var(--blanco);
    border-left-color: var(--lat-activo);
    font-weight: bold;
}

.lateral-nav .ic { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; opacity: .85; }
.lateral-nav a.activo .ic { opacity: 1; }

.lateral-pie { padding: 14px 18px 18px; border-top: 1px solid rgba(255, 255, 255, .07); }

.lateral-pie .boton-salir {
    width: 100%;
    font-family: inherit;
    font-size: .8rem;
    color: var(--blanco);
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .28);
    border-radius: var(--radio);
    padding: 9px;
    cursor: pointer;
}
.lateral-pie .boton-salir:hover { background: rgba(255, 255, 255, .12); border-color: var(--blanco); }

/* ------------------------------ cuerpo ------------------------------ */

.panel-cuerpo { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.barra-superior {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--blanco);
    border-bottom: 1px solid var(--gris-claro);
    padding: 0 22px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.boton-menu {
    display: none;
    font-size: 1.2rem;
    line-height: 1;
    background: transparent;
    border: 1.5px solid var(--gris-claro);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--grafito);
}

.barra-titulo { font-size: 1.05rem; font-weight: bold; color: var(--grafito); }

.barra-version {
    margin-left: auto;
    font-size: .72rem;
    color: var(--gris);
    background: var(--fondo);
    border: 1px solid var(--gris-claro);
    border-radius: 20px;
    padding: 4px 11px;
}

/* 2026-09-22 -- Ruben: "ocupa todo el ancho". El contenido estaba topado a 1240px y en
   una pantalla ancha sobraban margenes a los lados mientras la tabla del estado de
   cuenta se cortaba. Ahora usa todo lo que haya, con su respiro de 24px a cada lado. */
.panel-cuerpo .contenedor { flex: 1; max-width: none; width: 100%; padding: 26px 24px 40px; }

/* ------------------------------ móvil ------------------------------ */

@media (max-width: 900px) {
    .boton-menu { display: inline-block; }
    .lateral {
        position: fixed;
        z-index: 20;
        left: -260px;
        transition: left .18s ease;
        box-shadow: 0 0 30px rgba(0, 0, 0, .3);
    }
    .lateral.abierto { left: 0; }
    .panel-cuerpo .contenedor { padding: 18px 14px 32px; }
}

/* ------------------------------------------------------------------
   Azulejos del Menú SAAI
   ------------------------------------------------------------------ */

.rejilla-azulejos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.azulejo {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--blanco);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    border-left: 4px solid var(--azul-claro);
    padding: 17px 18px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease, transform .15s ease;
}

.azulejo:hover {
    box-shadow: 0 5px 22px rgba(55, 52, 53, .17);
    transform: translateY(-2px);
    border-left-color: var(--naranja);
}

.azulejo-destacado { border-left-color: var(--naranja); }

.azulejo-icono {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: #eeeef6;
    color: var(--azul);
    display: flex;
    align-items: center;
    justify-content: center;
}

.azulejo:hover .azulejo-icono { background: #fdf1e0; color: var(--naranja-oscuro); }
.azulejo-icono svg { width: 21px; height: 21px; fill: currentColor; }

.azulejo-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.azulejo-texto strong { font-size: .95rem; color: var(--azul); }
.azulejo-texto small { font-size: .75rem; color: var(--gris); }

.azulejo-conteo {
    margin-left: auto;
    padding-left: 10px;
    font-size: 1.28rem;
    font-weight: bold;
    color: var(--grafito);
    white-space: nowrap;
}

@media (max-width: 560px) {
    .rejilla-azulejos { grid-template-columns: 1fr; }
}

.migaja { margin: 0 0 12px; font-size: .8rem; }
.migaja a { color: var(--gris); text-decoration: none; }
.migaja a:hover { color: var(--azul); text-decoration: underline; }

.azulejo-pendiente { opacity: .55; cursor: default; border-left-color: var(--gris-claro); }
.azulejo-pendiente:hover { transform: none; box-shadow: var(--sombra); border-left-color: var(--gris-claro); }
.azulejo-pendiente:hover .azulejo-icono { background: #eeeef6; color: var(--azul); }

/* Logo blanco del menu lateral. Al plegarse el menu en pantallas
   chicas la marca se achica con el, sin deformarse. */
.marca-img {
    display: block;
    width: 100%;
    max-width: 190px;
    height: auto;
    /* El contenedor manda: si el menu se angosta, el logo se achica con el
       en vez de salirse por el costado. */
    min-width: 0;
    object-fit: contain;
}

.lateral-marca { overflow: hidden; }
