@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/jakarta.faces.resource/fonts/inter-400.woff2.xhtml") format("woff2");
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/jakarta.faces.resource/fonts/inter-500.woff2.xhtml") format("woff2");
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/jakarta.faces.resource/fonts/inter-600.woff2.xhtml") format("woff2");
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/jakarta.faces.resource/fonts/inter-700.woff2.xhtml") format("woff2");
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    color: #1c2b3a;
    background: #f4f7fb url("/jakarta.faces.resource/img/fondo-app.jpg.xhtml") center / cover no-repeat fixed;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

button, input, .boton {
    font-family: Inter, sans-serif;
}

.icono {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* Ingreso */
.pagina-login {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background:
        linear-gradient(rgba(244, 247, 251, 0.72), rgba(244, 247, 251, 0.72)),
        url("/jakarta.faces.resource/img/fondo-app.jpg.xhtml") center / cover no-repeat fixed;
}

.login-marco {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: 1.15rem;
    align-items: stretch;
    padding: 1.15rem 1.15rem 0.65rem;
}

.login-portada {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    min-height: 0;
}

.login-visual {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 2.4rem 2.5rem;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(16, 43, 80, 0.18) 0%, rgba(16, 43, 80, 0.78) 100%),
        url("/jakarta.faces.resource/img/fondo.png.xhtml") center 42% / cover no-repeat;
}

.login-visual-contenido {
    position: relative;
    z-index: 2;
    max-width: 40%;
}

.login-figura {
    position: absolute;
    z-index: 2;
    right: clamp(-5.5rem, calc((980px - 100vw) * 0.16 - 1rem), -0.85rem);
    bottom: 0;
    width: min(56%, 540px);
    max-height: 88%;
    aspect-ratio: 485 / 402;
    pointer-events: none;
}

.login-estudiante {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right bottom;
}

.login-kicker,
.login-visual h2,
.login-visual p,
.login-puntos li {
    text-shadow: 0 1px 8px rgba(8, 20, 40, 0.45);
}

.login-kicker {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.login-visual h2 {
    margin-top: 0.7rem;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.filete {
    width: 48px;
    height: 3px;
    margin: 1rem 0;
    border-radius: 999px;
    background: #e99a35;
}

.login-visual p {
    max-width: 36ch;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.login-puntos {
    list-style: none;
    margin: 1.4rem 0 0;
    padding: 0;
}

.login-puntos li {
    position: relative;
    margin-top: 0.55rem;
    padding-left: 1rem;
    font-size: 14px;
    font-weight: 500;
}

.login-puntos li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e99a35;
}

.login-panel {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0;
    background: transparent;
    overflow: auto;
}

.login-tarjeta {
    width: min(420px, 100%);
    margin-inline: auto;
    padding: 1.7rem 1.6rem 1.25rem;
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(16, 43, 80, 0.06);
}

.login-tarjeta input[type="text"],
.login-tarjeta input[type="password"] { height: 36px; }

.logo-login {
    display: block;
    width: 104px;
    height: auto;
    margin: 0 auto 0.85rem;
}

.login-tarjeta h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #102b50;
}

.login-tarjeta .bajada {
    margin-top: 0.15rem;
    margin-bottom: 0.7rem;
    color: #5c6b80;
    font-size: 13px;
}

.captcha-fila {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.captcha-img {
    width: 148px;
    height: 44px;
    border: 1px solid #d5deea;
    border-radius: 8px;
    background: #f4f7fb;
}

.icono-recarga {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.separador {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.55rem 0 0.45rem;
    color: #8b9aab;
    font-size: 13px;
    font-weight: 500;
}

.separador::before,
.separador::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #d5deea;
}

.separador span {
    color: #8b9aab;
    line-height: 1;
}

.accion-bloque { display: flex; width: 100%; }

.accion-bloque .boton { width: 100%; }

a.boton.boton-outlook {
    gap: 0.55rem;
    margin-top: 0.35rem;
    background: #fff;
    color: #1c2b3a;
    border: 1px solid #d5deea;
}

a.boton.boton-outlook:hover { background: #f4f7fb; color: #1c2b3a; }

.logo-ms { width: 16px; height: 16px; flex-shrink: 0; }

a.boton.boton-icono {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    background: #fff;
    color: #102b50;
    border: 1px solid #d5deea;
}

a.boton.boton-icono:hover { background: #f4f7fb; color: #102b50; }

.enlace-soporte {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: fit-content;
    margin: 0.7rem auto 0;
    color: #245b9e;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.enlace-soporte:hover { text-decoration: underline; }

.clave-nueva { max-width: 440px; }

.clave-nueva .campo { margin-bottom: 0.75rem; }

/* Aplicación */
.app {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.marco { display: flex; height: 100%; min-height: 0; overflow: hidden; }

.sidebar {
    width: 232px;
    flex: 0 0 232px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: sticky;
    top: 0;
    padding: 0.85rem 0.7rem 0.75rem;
    background: #102b50;
    color: #fff;
    transition: width 0.2s ease, flex-basis 0.2s ease;
}

.placa-logo {
    background: #fff;
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.85rem;
}

.placa-logo img { display: block; width: 100%; height: auto; }

.nav-lateral { display: grid; gap: 0.15rem; }

.nav-lateral a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 38px;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.84);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-lateral a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.nav-lateral a.activo { background: #245b9e; color: #fff; }

.nav-lateral a:focus-visible,
.contraer:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.contraer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 36px;
    margin-top: auto;
    padding: 0.35rem 0.7rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    font-weight: 500;
}

.contraer:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

body.menu-contraido .sidebar { width: 72px; flex-basis: 72px; padding-inline: 0.5rem; }
body.menu-contraido .placa-logo { padding: 0.35rem; }
body.menu-contraido .placa-logo img { height: 36px; width: auto; margin: 0 auto; object-fit: contain; }
body.menu-contraido .nav-lateral a,
body.menu-contraido .contraer { justify-content: center; padding-inline: 0; }
body.menu-contraido .nav-texto {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
body.menu-contraido .contraer .icono { transform: rotate(180deg); }

.columna { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: auto; }

.topbar {
    height: 60px;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e6edf5;
    position: sticky;
    top: 0;
    z-index: 20;
}

.reloj {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    margin: 0;
    color: #5c6b80;
    font-size: 13px;
    white-space: nowrap;
}

.reloj strong {
    color: #102b50;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.avisos { position: relative; }

.boton-aviso {
    position: relative;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    background: #fff;
    color: #102b50;
}

.boton-aviso:hover,
.boton-aviso[aria-expanded="true"] { background: #f4f7fb; color: #102b50; }

.aviso-cuenta {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e99a35;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    box-shadow: 0 0 0 1px rgba(233, 154, 53, 0.35);
}

.avisos-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    width: min(320px, 78vw);
    padding: 0.7rem 0.75rem 0.45rem;
    border: 1px solid #e6edf5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(16, 43, 80, 0.12);
    z-index: 30;
}

.avisos-panel[hidden] { display: none; }

.avisos-titulo {
    margin: 0 0 0.4rem;
    color: #102b50;
    font-size: 13px;
    font-weight: 700;
}

.avisos-vacio { margin: 0 0 0.35rem; color: #5c6b80; font-size: 13px; }

.avisos-lista {
    max-height: 260px;
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}

.avisos-lista a {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.5rem 0.35rem;
    border-top: 1px solid #eef2f6;
    color: inherit;
    text-decoration: none;
}

.aviso-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
}

.aviso-icono .icono { width: 16px; height: 16px; }

.aviso-vencido { background: #fff4e5; color: #9a5b10; }

.aviso-proximo { background: #e8eef6; color: #245b9e; }

.aviso-texto { min-width: 0; }

.avisos-lista a:hover { background: #f7f9fc; }

.avisos-lista strong {
    display: block;
    color: #102b50;
    font-size: 13px;
}

.avisos-lista .aviso-texto span {
    display: block;
    color: #5c6b80;
    font-size: 12px;
}

.perfil { justify-self: end; }

.topbar-titulo { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }

.topbar h1 {
    font-size: 18px;
    font-weight: 600;
    color: #102b50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-movil {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: #f4f7fb;
    color: #102b50;
    cursor: pointer;
}

.menu-movil:hover { background: #e7eef6; color: #102b50; }

.perfil { display: flex; align-items: center; gap: 0.4rem; }

.cuenta { position: relative; }

.cuenta-boton {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.15rem 0.45rem 0.15rem 0.15rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #102b50;
}

.cuenta-boton .icono { width: 16px; height: 16px; color: #5c6b80; transform: rotate(-90deg); transition: transform 0.15s ease; }
.cuenta-boton[aria-expanded="true"] { background: #f4f7fb; border-color: #e6edf5; }
.cuenta-boton[aria-expanded="true"] .icono { transform: rotate(90deg); }
.cuenta-boton:hover { background: #f4f7fb; color: #102b50; }

.cuenta-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 180px;
    padding: 0.35rem;
    border: 1px solid #e6edf5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(16, 43, 80, 0.12);
    z-index: 30;
}

.cuenta-panel[hidden] { display: none; }
.cuenta-panel form { margin: 0; }

.cuenta-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 34px;
    padding: 0.3rem 0.5rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #102b50;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: left;
}

.cuenta-item:hover { background: #f4f7fb; color: #102b50; }

.perfil-datos { display: flex; align-items: center; gap: 0.65rem; }

a.perfil-datos {
    padding: 0.2rem 0.4rem 0.2rem 0.2rem;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

a.perfil-datos:hover { background: #f4f7fb; }

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: block;
    overflow: hidden;
    background: #e8eef6;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.perfil-texto { display: flex; flex-direction: column; line-height: 1.25; }

.perfil-texto strong { font-size: 14px; font-weight: 600; color: #102b50; }

.perfil-texto span { font-size: 12px; font-weight: 500; color: #5c6b80; }

.salir { margin: 0; }

.contenido { flex: none; overflow: visible; padding: 1.25rem 1.5rem 1rem; }

.contenido-interno { max-width: 1120px; }

.pagina {
    margin-bottom: 1.25rem;
    padding: 0.95rem 1.15rem 1.05rem;
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 12px;
}

.pagina-fila {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.pagina-fila .boton { flex-shrink: 0; }

.pagina h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #102b50;
}

.migas {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
    color: #5c6b80;
    font-size: 14px;
    font-weight: 500;
}

.migas a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #245b9e;
    text-decoration: none;
}

.migas a:hover { text-decoration: underline; }

.migas .icono { width: 16px; height: 16px; }

.migas .actual {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #102b50;
    font-weight: 700;
}

.miga-sep { color: #8b9aab; }

.perfil-hero {
    position: relative;
    margin-top: 0.25rem;
    padding: 0 1.5rem 1.6rem;
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(16, 43, 80, 0.04);
    overflow: hidden;
}

.perfil-hero-fondo {
    height: 96px;
    margin: 0 -1.5rem 0;
    background:
        linear-gradient(100deg, rgba(16, 43, 80, 0.55), rgba(36, 91, 158, 0.28)),
        linear-gradient(90deg, #1a4a86, #6f93b8 42%, #c4b49a 78%, #8e7d6b);
}

.perfil-avatar-grande {
    width: 112px;
    height: 112px;
    margin: -56px auto 0.85rem;
    border-radius: 50%;
    overflow: hidden;
    background: #e8eef6;
    border: 4px solid #fff;
    box-shadow: 0 6px 18px rgba(16, 43, 80, 0.12);
}

.foto-perfil {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.perfil-elige {
    margin-top: 0.85rem;
    color: #5c6b80;
    font-size: 13px;
    font-weight: 600;
}

table.avatares,
table.avatares tbody {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    width: auto;
    max-width: 460px;
    margin: 0.75rem auto 0.2rem;
}

table.avatares tr,
table.avatares td {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
}

a.avatar-opcion {
    display: block;
    width: 58px;
    height: 58px;
    min-height: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    overflow: hidden;
    background: #e8eef6;
    line-height: 0;
}

a.avatar-opcion img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

a.avatar-opcion:hover { border-color: #245b9e; }

a.avatar-opcion.seleccionada {
    border-color: #102b50;
    box-shadow: 0 0 0 3px rgba(36, 91, 158, 0.28);
}

.perfil-hero h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #102b50;
}

.perfil-correo {
    margin-top: 0.35rem;
    color: #102b50;
    font-size: 16px;
    font-weight: 600;
}

.perfil-columnas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-top: 1.5rem;
    align-items: start;
}

.perfil-columnas h3 {
    margin-bottom: 0.55rem;
    font-size: 18px;
    font-weight: 700;
    color: #102b50;
}

.perfil-subtitulo { margin-top: 1.35rem; }

.ficha {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ficha th,
.ficha td {
    padding: 0.75rem 0.85rem;
    border: 1px solid #e6edf5;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    font-weight: 500;
}

.ficha th {
    width: 46%;
    color: #102b50;
    font-weight: 700;
}

.ficha a { color: #245b9e; font-weight: 600; }

.ficha a:hover { text-decoration: none; }

.pagina .pista,
.pista {
    margin-top: 0.35rem;
    color: #5c6b80;
    font-size: 15px;
}

.cortina { display: none; }

/* Carga */
.pantalla-carga {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    background: #fff;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.pantalla-carga.salida {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.carga-texto {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.spinner {
    width: 72px;
    height: 72px;
    position: relative;
}

.spinner span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    background: #e4e8ee;
    animation: punto 0.9s linear infinite;
}

.spinner span:nth-child(1) { --g: 0deg; animation-delay: 0s; }
.spinner span:nth-child(2) { --g: 45deg; animation-delay: -0.1125s; }
.spinner span:nth-child(3) { --g: 90deg; animation-delay: -0.225s; }
.spinner span:nth-child(4) { --g: 135deg; animation-delay: -0.3375s; }
.spinner span:nth-child(5) { --g: 180deg; animation-delay: -0.45s; }
.spinner span:nth-child(6) { --g: 225deg; animation-delay: -0.5625s; }
.spinner span:nth-child(7) { --g: 270deg; animation-delay: -0.675s; }
.spinner span:nth-child(8) { --g: 315deg; animation-delay: -0.7875s; }

@keyframes punto {
    0% { background: #102B50; transform: rotate(var(--g)) translateY(-28px); }
    12.5% { background: #FFC400; transform: rotate(var(--g)) translateY(-28px); }
    28% { background: #9aa8b8; transform: rotate(var(--g)) translateY(-28px); }
    55% { background: #d5dde6; transform: rotate(var(--g)) translateY(-28px); }
    100% { background: #eef2f6; transform: rotate(var(--g)) translateY(-28px); }
}

.zona { position: relative; }

.vista-real {
    opacity: 0;
    pointer-events: none;
}

body.listo .vista-real {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.28s ease;
}

.esqueleto-vista {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.listo .esqueleto-vista {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hueso {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, #e7eef5 0%, #f8fafc 42%, #e7eef5 80%);
    background-size: 220% 100%;
    animation: brillo 1.25s ease-in-out infinite;
}

@keyframes brillo {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.linea { height: 12px; }
.linea-lg { width: 72%; }
.linea-md { width: 46%; }
.linea-sm { width: 28%; }
.cuadro { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto; }
.circulo { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; }
.pastilla { width: 72px; height: 22px; border-radius: 999px; flex: 0 0 auto; }
.campo-hueso { height: 42px; }
.campo-ancho { grid-column: 1 / -1; }
.boton-hueso { width: 148px; height: 40px; }
.portada { width: 46px; height: 64px; border-radius: 6px; flex: 0 0 auto; }
.portada-mini { width: 32px; height: 44px; }
.avatar-hueso { width: 112px; height: 112px; border-radius: 50%; margin: 0.5rem auto 0.8rem; }
.ficha-hueso { height: 46px; }

.esq-metrica {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    min-height: 84px;
    padding: 0.85rem 0.9rem;
}

.esq-bloque,
.esq-informe,
.esq-perfil {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.15rem 1.2rem 1.25rem;
}

.esq-informe { min-height: 240px; }
.esq-perfil { align-items: center; padding-top: 1.6rem; padding-bottom: 1.8rem; }
.esq-perfil .linea { align-self: center; }

.esq-campos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.esq-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.esq-cabecera .campo-hueso { width: 220px; max-width: 46%; }

.esq-portadas { display: flex; gap: 0.75rem; }

.esq-barras {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    height: 92px;
}

.esq-barras-bajas { height: 72px; }

.barra { flex: 1; height: 100%; border-radius: 6px 6px 2px 2px; }
.barra:nth-child(1) { height: 46%; }
.barra:nth-child(2) { height: 78%; }
.barra:nth-child(3) { height: 58%; }
.barra:nth-child(4) { height: 92%; }
.barra:nth-child(5) { height: 40%; }

.fila-esqueleto {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
}

.huesos { flex: 1; display: grid; gap: 0.4rem; min-width: 0; }
.esq-fichas { display: grid; gap: 0.55rem; }

.esq-bloque + .esq-bloque { margin-top: 1rem; }

/* Tarjetas y métricas */
.metricas {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.metrica {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 43, 80, 0.04);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.metrica:hover {
    border-color: #c5d4e8;
    box-shadow: 0 10px 28px rgba(16, 43, 80, 0.07);
}

.metrica:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(36, 91, 158, 0.28);
}

.metrica-icono {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #eef3f9;
    color: #245b9e;
}

.metrica-azul .metrica-icono { background: #e8f0fa; color: #245b9e; }
.metrica-verde .metrica-icono { background: #e7f7f4; color: #0f9d8a; }
.metrica-marino .metrica-icono { background: #eef2f7; color: #102b50; }
.metrica-ambar .metrica-icono { background: #fff6e8; color: #c4841d; }
.metrica-ambar strong { color: #9a5b10; }

.metrica-cuerpo { min-width: 0; }

.metrica strong {
    display: block;
    margin-top: 0.05rem;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #102b50;
}

.metrica em {
    display: block;
    margin: 0;
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: #6b7c90;
}

.metrica small {
    display: block;
    margin-top: 0.12rem;
    font-size: 12px;
    font-weight: 500;
    color: #8a97a8;
}

.rejilla {
    display: grid;
    grid-template-columns: 1.45fr 0.8fr;
    gap: 1rem;
    margin-top: 1rem;
}

.reportes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tarjeta {
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 43, 80, 0.04);
}

.tarjeta + .tarjeta,
.bloque + .bloque { margin-top: 1rem; }

.tarjeta-cabeza {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #eef2f6;
}

.tarjeta-cabeza h3,
.informe h3 {
    font-size: 18px;
    font-weight: 600;
    color: #102b50;
}

.tarjeta-cuerpo { padding: 1.15rem 1.2rem 1.25rem; }

.informe { padding: 1.35rem 1.3rem 1.3rem; }

.informe-icono {
    width: 40px;
    height: 40px;
    margin-bottom: 0.9rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #eef3f9;
    color: #245b9e;
}

.informe p {
    margin: 0.4rem 0 1.1rem;
    color: #5c6b80;
    font-size: 14px;
}

.accesos { display: grid; gap: 0.4rem; padding: 0.55rem; }

.accesos a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e6edf5;
    border-radius: 10px;
    background: #fff;
    color: #102b50;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.accesos a:hover { background: #f7f9fc; border-color: #c5d4e8; }

.accesos a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(36, 91, 158, 0.28);
}

.acceso-icono {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #eef3f9;
    color: #245b9e;
}

.accesos small {
    display: block;
    margin-top: 0.05rem;
    font-size: 12px;
    font-weight: 400;
    color: #6b7c90;
}

.panel-vencidos .tarjeta-cabeza { padding: 0.7rem 0.9rem; }
.panel-vencidos .tarjeta-cabeza h3 { font-size: 15px; }
.panel-vencidos .datos th,
.panel-vencidos .datos td { padding: 0.38rem 0.65rem; font-size: 13px; }

.boton-gestionar {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.1rem 0.55rem;
    border: 1px solid #d5deea;
    border-radius: 7px;
    background: #fff;
    color: #102b50;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.boton-gestionar:hover { background: #f4f7fb; }
.boton-gestionar:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(36, 91, 158, 0.28); }

/* Formularios */
.campos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.15rem;
}

.campo-completo { grid-column: 1 / -1; }

.campo label,
.control-etiqueta {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 13px;
    font-weight: 500;
    color: #3e4e63;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"] {
    width: 100%;
    max-width: none;
    height: 42px;
    padding: 0 0.8rem;
    border: 1px solid #d5deea;
    border-radius: 8px;
    background: #fff;
    color: #102b50;
    font-size: 14px;
    font-weight: 400;
}

input::placeholder { color: #8b9aab; }

input:focus {
    outline: none;
    border-color: #245b9e;
    box-shadow: 0 0 0 3px rgba(36, 91, 158, 0.16);
}

.control { position: relative; }

.control .icono {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    color: #5c6b80;
    transform: translateY(-50%);
    pointer-events: none;
}

.control input { padding-left: 2.45rem; }

.ayuda {
    display: block;
    margin-top: 0.3rem;
    font-size: 13px;
    color: #5c6b80;
}

.acciones { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.mensaje-error {
    display: block;
    margin-top: 0.35rem;
    color: #9f2c2c;
    font-size: 13px;
    font-weight: 500;
}

/* Botones */
.boton,
button,
input[type="submit"] {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.55rem 0.95rem;
    border: 0;
    border-radius: 8px;
    background: #102b50;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.boton:hover,
button:hover,
input[type="submit"]:hover { background: #245b9e; }

.boton:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(36, 91, 158, 0.28);
}

.boton-bloque { width: 100%; }

.boton.boton-secundario,
input[type="submit"].boton-secundario {
    background: #fff;
    color: #102b50;
    border: 1px solid #d5deea;
}

.boton.boton-secundario:hover,
input[type="submit"].boton-secundario:hover { background: #f4f7fb; color: #102b50; }

.boton:disabled,
button:disabled,
input[type="submit"]:disabled {
    opacity: 0.45;
    cursor: default;
    background: #102b50;
}

.boton:disabled:hover,
button:disabled:hover,
input[type="submit"]:disabled:hover { background: #102b50; }

.boton-compacto { min-height: 32px; padding: 0.3rem 0.7rem; font-size: 13px; }

.boton-apagado { opacity: 0.45; cursor: default; pointer-events: none; }

.boton.boton-exito,
a.boton.boton-exito { background: #0f9d8a; }

.boton.boton-exito:hover,
a.boton.boton-exito:hover { background: #0c8574; }

.boton.boton-texto,
a.boton.boton-texto {
    background: transparent;
    color: #102b50;
    border: 0;
    padding-inline: 0.55rem;
}

.boton.boton-texto:hover,
a.boton.boton-texto:hover { background: #f4f7fb; color: #102b50; }

a.boton.boton-icono,
a.boton.boton-icono:hover {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    background: #fff;
    color: #102b50;
    border: 1px solid #d5deea;
}

.login-tarjeta .campo + .campo { margin-top: 0.55rem; }

.login-tarjeta .acciones { margin-top: 0.65rem; }

.nota-linea { margin: 0; }

.accion { position: relative; display: inline-flex; color: #fff; }

.accion > svg {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    pointer-events: none;
}

.accion .boton,
.accion button,
.accion input[type="submit"] {
    position: relative;
    z-index: 0;
    padding-left: 2.35rem;
}

.accion.secundaria { color: #102b50; }

/* Avisos */
ul.mensajes {
    list-style: none;
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
}

.alerta {
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font-size: 14px;
    font-weight: 500;
}

.alerta-ok { background: #e7f7f4; color: #0b6e62; border: 1px solid #b7e6df; }

.alerta-aviso { background: #fff6e8; color: #8a5a12; border: 1px solid #f3d7a8; }

.alerta-error { background: #fdecec; color: #8e1d1d; border: 1px solid #f3c7c7; }

.alerta-fila {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.alerta-fila p { margin: 0; }

/* Tablas */
.tabla-herramientas {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}

.buscador {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: min(320px, 100%);
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    background: #f4f7fb;
    color: #5c6b80;
}

.buscador:focus-within {
    border-color: #245b9e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(36, 91, 158, 0.16);
}

.buscador input {
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.buscador input:focus { border: 0; box-shadow: none; }

.tabla-scroll { overflow-x: auto; }

.datos { width: 100%; border-collapse: collapse; font-size: 14px; }

.datos th {
    padding: 0.75rem 0.9rem;
    background: #f4f7fb;
    color: #3e4e63;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #e6edf5;
}

.datos td {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid #eef2f6;
    color: #1c2b3a;
    vertical-align: middle;
}

.datos tbody tr:hover td { background: #f8fafc; }

.datos tbody tr:last-child td { border-bottom: 0; }

.tabla-pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid #eef2f6;
}

.conteo { font-size: 13px; font-weight: 500; color: #5c6b80; }

.paginas { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.paginas button {
    min-width: 34px;
    min-height: 34px;
    height: 34px;
    padding: 0 0.6rem;
    border: 1px solid #e6edf5;
    background: #fff;
    color: #102b50;
    font-size: 13px;
    font-weight: 500;
}

.paginas button:hover:not(:disabled) { background: #f4f7fb; color: #102b50; }

.paginas button.activa {
    background: #102b50;
    border-color: #102b50;
    color: #fff;
}

.paginas button:disabled { opacity: 0.45; cursor: default; }

.estado {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.estado-ok { background: #e7f7f4; color: #0b7a6c; }

.estado-alerta { background: #fff4e5; color: #9a5b10; }

.estado-quieto { background: #eef2f6; color: #3e4e63; }

.vacio {
    padding: 1.8rem 1.2rem;
    text-align: center;
    color: #5c6b80;
    font-size: 14px;
}

.nota { margin-top: 0.75rem; color: #3e4e63; font-size: 14px; }

.enlace {
    color: #245b9e;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.enlace:hover { text-decoration: underline; }

.tecnico {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid #eef2f6;
}

.tecnico .nota { margin: 0 auto 0 0; }

.pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
    margin-top: 0.5rem;
    min-height: 0;
    padding: 0.75rem 1.5rem 0.9rem;
    border-top: 1px solid #e6edf5;
    background: transparent;
    color: #6b7c90;
    font-size: 12px;
    font-weight: 500;
}

.pie a { color: #5c6b80; text-decoration: none; }

.pagina-login .pie {
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    margin-top: 0.7rem;
    border-top: 0;
    background: transparent;
    padding: 0 0.2rem 0.15rem;
}

.pie-contacto,
.pie-social,
.redes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.pie-contacto { gap: 1.25rem; }

.pie-social { gap: 0.75rem; }

.pie-dato { display: inline-flex; align-items: center; gap: 0.45rem; }

.pie-dato:hover,
.redes a:hover { opacity: 0.82; }

.redes { gap: 0.15rem; }

.redes a {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

@media (max-width: 1080px) {
    .metricas { grid-template-columns: 1fr 1fr; }
    .rejilla, .reportes, .perfil-columnas { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
    .menu-movil { display: inline-flex; }

    .contraer { display: none; }
    body.menu-contraido .sidebar { width: 232px; flex-basis: 232px; }
    body.menu-contraido .nav-texto { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    body.menu-contraido .placa-logo img { height: auto; width: 100%; }
    body.menu-contraido .nav-lateral a,
    body.menu-contraido .contraer { justify-content: flex-start; padding-inline: 0.7rem; }

    .sidebar {
        position: fixed;
        z-index: 40;
        width: 232px;
        flex-basis: 232px;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        box-shadow: none;
    }

    body.menu-abierto .sidebar {
        transform: none;
        box-shadow: 12px 0 40px rgba(16, 43, 80, 0.25);
    }

    .cortina {
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(16, 43, 80, 0.45);
    }

    body.menu-abierto .cortina { display: block; }

    .login-marco {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        row-gap: 0.85rem;
        column-gap: 0;
        padding: 0.85rem 0.85rem 0.65rem;
        overflow: auto;
    }

    .login-portada,
    .login-panel,
    .pagina-login .pie {
        grid-column: 1;
        grid-row: auto;
        margin-top: 0;
    }

    .login-portada { min-height: 210px; }

    .login-visual {
        align-items: flex-end;
        border-radius: 14px;
        padding: 1.4rem;
    }

    .login-figura { display: none; }
    .login-visual-contenido { max-width: 72%; }

    .login-panel { padding: 0; }
}

@media (max-width: 720px) {
    .contenido { padding: 1rem; }
    .topbar { padding: 0 0.85rem; height: 60px; grid-template-columns: 1fr auto; }
    .reloj { display: none; }
    .perfil-texto { display: none; }
    .campos, .metricas, .esq-campos { grid-template-columns: 1fr; }
    .campo-ancho { grid-column: auto; }
    .fila-esqueleto { flex-wrap: wrap; }
    .esq-portadas { overflow: hidden; }
    .tabla-pie, .tecnico, .tabla-herramientas { flex-direction: column; align-items: stretch; }
    .pagina h2, .login-visual h2, .login-tarjeta h1, .metrica strong { font-size: 24px; }
    .pagina-fila { flex-direction: column; align-items: stretch; }
    .prestamo-columnas,
    .fechas-prestamo,
    .detalle-libro,
    .detalle-datos { grid-template-columns: 1fr; }
    .dev-herramientas { flex-direction: column; align-items: stretch; }
    .dev-herramientas .buscador { max-width: none; }
    .control-linea { flex-direction: column; align-items: stretch; }
    .ficha-datos { grid-template-columns: 1fr; }
    .login-portada { min-height: 180px; }
    .login-visual { padding: 1.25rem; }
    .login-panel { padding: 0; }
    .login-tarjeta { padding: 1.35rem 1.1rem 1.1rem; }
    .pie { padding: 0.75rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pantalla-carga,
    .esqueleto-vista,
    .vista-real,
    .spinner span,
    .hueso {
        animation: none;
        transition: none;
    }
}

.etiqueta-campo {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.etiqueta-campo label { margin-bottom: 0; }

.pista-isbn { position: relative; display: inline-flex; }

button.boton-pista {
    width: 1.5rem;
    height: 1.5rem;
    min-height: 0;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: #245b9e;
}

button.boton-pista:hover { background: #eef3f9; color: #102b50; }

.icono-info { width: 18px; height: 18px; display: block; }

.pista-isbn .tooltip {
    display: none;
    position: absolute;
    z-index: 6;
    top: calc(100% + 0.45rem);
    left: 0;
    width: min(320px, 72vw);
    padding: 0.85rem;
    background: #fff;
    border: 1px solid #d5deea;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(16, 43, 80, 0.14);
}

.pista-isbn:hover .tooltip,
.pista-isbn:focus-within .tooltip { display: block; }

.tooltip p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #3e4e63;
}

.dibujo-isbn { display: block; width: 100%; height: auto; margin-top: 0.65rem; }

.control-linea { display: flex; align-items: center; gap: 0.55rem; }

.control-linea .control { flex: 1; }

.dato-fijo {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 0.8rem 0 2.45rem;
    border: 1px solid #d5deea;
    border-radius: 8px;
    background: #f4f7fb;
    color: #102b50;
}

.coincidencias { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.55rem; }

a.coincidencia,
.coincidencia.deshabilitada {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    width: 100%;
    min-height: 0;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d5deea;
    border-radius: 8px;
    background: #fff;
    color: #102b50;
    text-align: left;
    text-decoration: none;
    font-weight: 600;
}

a.coincidencia span,
.coincidencia.deshabilitada span {
    color: #5c6b80;
    font-size: 13px;
    font-weight: 400;
}

a.coincidencia:hover { background: #f4f7fb; color: #102b50; }

.coincidencia.deshabilitada { opacity: 0.55; cursor: default; background: #f7f9fb; }

.libros-elegidos {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

table.libros-elegidos,
table.libros-elegidos tbody {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

table.libros-elegidos tr,
table.libros-elegidos td {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
}

.libro-elegido {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid #d5deea;
    border-radius: 8px;
    background: #f4f7fb;
}

.libro-elegido h4 { margin: 0; color: #102b50; font-size: 14px; line-height: 1.25; }

.libro-elegido > div { flex: 1; min-width: 0; }

.libro-elegido .ayuda { margin-top: 0.05rem; font-size: 12px; }

.libro-elegido .estado { margin-top: 0.2rem; }

.libro-elegido .boton { min-height: 32px; padding: 0 0.7rem; }

.cupo-libros { margin: 0 0 0.55rem; }

.ficha-estudiante {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.75rem;
    padding: 0.95rem 1rem 1rem;
    border: 1px solid #e6edf5;
    border-radius: 12px;
    background: #fff;
}

.ficha-cabeza {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.ficha-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #e8eef6;
    color: #245b9e;
}

.ficha-icono .icono { width: 20px; height: 20px; }

.ficha-identidad { min-width: 0; flex: 1; }

.ficha-identidad strong {
    display: block;
    color: #102b50;
    font-size: 15px;
    line-height: 1.3;
}

.ficha-identidad span {
    display: block;
    margin-top: 0.05rem;
    color: #5c6b80;
    font-size: 12px;
}

.ficha-cabeza > .estado { margin-left: auto; flex-shrink: 0; }

.ficha-datos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.1rem;
}

.ficha-datos p { margin: 0; }

.ficha-datos p:last-child { grid-column: 1 / -1; }

.ficha-datos > p > span:not(.estado) {
    display: block;
    margin-bottom: 0.15rem;
    color: #5c6b80;
    font-size: 12px;
}

.ficha-datos strong {
    color: #102b50;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.portada-tabla {
    width: 42px;
    height: 62px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #d5deea;
    background: #f4f7fb;
}

.rejilla-libros {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 0.75rem;
    margin-top: 0.8rem;
}

.prestamo-columnas {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 1.25rem 1.5rem;
    align-items: start;
}

.prestamo-col { min-width: 0; }

.coincidencias-scroll {
    max-height: 340px;
    overflow: auto;
    margin-top: 0.45rem;
}

table.lista-libros,
table.lista-libros tbody {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

table.lista-libros tr,
table.lista-libros td {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
}

a.fila-libro,
.fila-libro.deshabilitada {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    min-height: 0;
    padding: 0.45rem 0.7rem;
    border: 1px solid #d5deea;
    border-radius: 8px;
    background: #fff;
    color: #102b50;
    text-align: left;
    text-decoration: none;
    font-weight: 600;
}

.fila-libro .fila-datos {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.05rem;
}

.fila-libro .fila-datos strong {
    font-size: 14px;
    line-height: 1.3;
}

a.fila-libro .fila-datos span,
.fila-libro.deshabilitada .fila-datos span {
    color: #5c6b80;
    font-size: 12px;
    font-weight: 400;
}

a.fila-libro:hover {
    border-color: #245b9e;
    background: #f4f7fb;
    color: #102b50;
}

.fila-libro.deshabilitada { opacity: 0.55; cursor: default; }

.fila-libro .estado { margin-left: auto; flex-shrink: 0; }

.fila-libro .portada-lista,
.fila-libro .portada-vacia {
    width: 36px;
    height: 52px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
    font-size: 16px;
}

.fechas-prestamo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.prestamo-col .acciones { margin-top: 1rem; }

a.tarjeta-libro,
.tarjeta-libro.deshabilitada {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-height: 0;
    padding: 0.65rem;
    border: 1px solid #d5deea;
    border-radius: 10px;
    background: #fff;
    color: #102b50;
    text-align: left;
    text-decoration: none;
    font-weight: 600;
}

a.tarjeta-libro span,
.tarjeta-libro.deshabilitada span {
    color: #5c6b80;
    font-size: 12px;
    font-weight: 400;
}

a.tarjeta-libro:hover { border-color: #245b9e; background: #f4f7fb; color: #102b50; }

.tarjeta-libro.deshabilitada { opacity: 0.55; cursor: default; }

.portada-tarjeta,
.portada-elegida,
.portada-vacia {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 6px;
    background: #e8eef6;
}

.portada-elegida { width: 40px; height: 56px; flex-shrink: 0; }

.portada-vacia {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #102b50;
    font-size: 28px;
    font-weight: 700;
}

.pagina-compacta { margin-bottom: 0.75rem; padding: 0.7rem 1rem 0.75rem; }
.pagina-compacta h2 { font-size: 22px; }
.pagina-compacta .pista { margin-top: 0.15rem; }
.pagina-compacta .migas { margin-bottom: 0.4rem; }

.devoluciones,
.tabla-admin { padding: 0.75rem 0.85rem 0; }

.tabla-admin .tabla-herramientas { padding: 0 0 0.65rem; }
.tabla-admin .buscador { height: 32px; max-width: 360px; }
.tabla-admin .datos { font-size: 13px; }
.tabla-admin .datos th,
.tabla-admin .datos td { padding: 0.35rem 0.6rem; }
.tabla-admin .tabla-pie { padding: 0.45rem 0.15rem 0.55rem; }
.tabla-admin .paginas button { min-width: 30px; min-height: 30px; height: 30px; font-size: 12px; }
.tabla-admin .tecnico { padding: 0.4rem 0.15rem 0.65rem; }
.tabla-admin .retraso { display: block; margin-top: 0.12rem; }

.dev-resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.dev-resumen p {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0;
    padding: 0.22rem 0.55rem;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    background: #f4f7fb;
    color: #5c6b80;
    font-size: 12px;
}

.dev-resumen strong { color: #102b50; font-size: 13px; font-weight: 700; }
.dev-vencido strong { color: #9a5b10; }
.dev-plazo strong { color: #0b7a6c; }

.dev-herramientas {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.65rem;
}

.dev-herramientas .buscador { flex: 1; max-width: 360px; height: 32px; margin: 0; }

.filtros-dev { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.filtro {
    min-height: 30px;
    padding: 0.2rem 0.65rem;
    border: 1px solid #e6edf5;
    border-radius: 999px;
    background: #fff;
    color: #3e4e63;
    font-size: 12px;
    font-weight: 600;
}

.filtro.activo { background: #102b50; border-color: #102b50; color: #fff; }
.filtro:hover { border-color: #c5d2e2; background: #f4f7fb; color: #3e4e63; }
.filtro.activo:hover { background: #102b50; color: #fff; }

.dev-tabla { font-size: 13px; }

.dev-tabla th,
.dev-tabla td { padding: 0.38rem 0.6rem; }

.dev-tabla th button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.dev-tabla th button:hover { background: transparent; color: #102b50; }
.dev-tabla th button.activo { color: #102b50; }
.dev-tabla th button.activo::after { content: "↑"; font-size: 10px; }
.dev-tabla th button.activo.desc::after { content: "↓"; }

.dev-col-exp { width: 2.1rem; padding-right: 0; }
.dev-col-accion { width: 7.2rem; text-align: right; white-space: nowrap; }

.dev-persona strong {
    display: block;
    color: #102b50;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.dev-persona span {
    display: block;
    color: #6b7c90;
    font-size: 11px;
    line-height: 1.25;
}

.dev-libro { color: #102b50; font-weight: 600; }

.dev-tabla .dev-principal:hover td { background: #f7f9fc; }
.dev-tabla .dev-detalle { display: none; }
.dev-grupo.abierta .dev-detalle { display: table-row; }

.dev-detalle td {
    padding: 0.28rem 0.7rem 0.45rem 2.3rem;
    background: #f8fafc;
    color: #5c6b80;
    font-size: 12px;
}

.dev-detalle span { margin-right: 1rem; }
.dev-detalle strong { color: #102b50; font-weight: 600; }
.retraso { color: #9a5b10; font-size: 12px; font-weight: 600; white-space: nowrap; }

.devoluciones .expandir {
    width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b7c90;
}

.devoluciones .expandir svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dev-grupo.abierta .expandir svg { transform: rotate(180deg); }
.devoluciones .expandir:hover { background: #e7eef8; color: #102b50; }

.boton-devolver {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 28px;
    padding: 0.15rem 0.55rem;
    border: 1px solid #d7ebe4;
    border-radius: 7px;
    background: #f4fbf8;
    color: #0b7a6c;
    font-size: 12px;
    font-weight: 600;
}

.boton-devolver:hover { background: #e7f7f4; }
.boton-devolver .icono { width: 14px; height: 14px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.devoluciones .tabla-pie { padding: 0.45rem 0.15rem 0.55rem; }
.devoluciones .paginas button { min-width: 30px; min-height: 30px; height: 30px; font-size: 12px; }

.devolver-real {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-fondo {
    position: absolute;
    inset: 0;
    background: rgba(16, 43, 80, 0.45);
}

.modal-caja {
    position: relative;
    width: min(420px, 100%);
    padding: 1.25rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(16, 43, 80, 0.2);
}

.modal-caja h3 { margin: 0 0 0.4rem; color: #102b50; }
.modal-caja p { margin: 0 0 1rem; color: #3e4e63; }
.modal-caja .acciones { justify-content: flex-end; }
.modal-caja { z-index: 1; }

button.modal-fondo {
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: rgba(16, 43, 80, 0.45);
    cursor: pointer;
}

button.modal-fondo:hover { background: rgba(16, 43, 80, 0.45); }

.modal-libro {
    width: min(760px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
}

.modal-x {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #3e4e63;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.modal-x:hover { background: #f4f7fb; color: #102b50; }

.detalle-libro {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 1rem;
    align-items: start;
    padding-right: 1.6rem;
}

.detalle-libro h3 { margin-bottom: 0.15rem; }
.detalle-libro .ayuda { margin: 0; }

.portada-detalle {
    width: 108px;
    height: 156px;
    object-fit: cover;
    border-radius: 8px;
}

.detalle-datos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 0.85rem;
}

.detalle-datos p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.detalle-datos span { font-size: 12px; color: #6b7c90; }
.modal-libro h4 { margin: 1.15rem 0 0.65rem; color: #102b50; font-size: 15px; }
.codigo-linea { display: block; margin-top: 0.1rem; color: #6b7c90; font-size: 12px; }
.datos-compacta { font-size: 13px; }

.acceso-aviso { margin: 0 0 1rem; }

.acceso-campos { grid-template-columns: minmax(0, 1.35fr) minmax(140px, 0.7fr) minmax(0, 1.35fr); }

.acceso-campos .campo-ancho { grid-column: auto; }

.acceso-form .acciones { margin-top: 1rem; }

.clave-entrega {
    display: grid;
    gap: 0.1rem;
    margin-top: 0.95rem;
    padding: 0.85rem 1rem;
    border: 1px solid #f3d7a8;
    border-radius: 10px;
    background: #fff6e8;
}

.clave-entrega span {
    color: #8a5a12;
    font-size: 12px;
    font-weight: 600;
}

.clave-entrega strong {
    color: #102b50;
    font-size: 20px;
    letter-spacing: 0.08em;
}

.clave-entrega p {
    margin: 0.2rem 0 0;
    color: #8a5a12;
    font-size: 13px;
    font-weight: 500;
}

.persona {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #102b50;
    font-weight: 600;
}

.persona img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #e8eef6;
}

.correo-cuenta { color: #3e4e63; }

.filtro-avisos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filtro-avisos select {
    height: 36px;
    min-width: 180px;
    padding: 0 0.7rem;
    border: 1px solid #d5deea;
    border-radius: 8px;
    background: #fff;
    color: #102b50;
    font-size: 13px;
}

a.revocar,
a.restaurar {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

a.revocar { color: #9f2c2c; }

a.restaurar { color: #245b9e; }

a.revocar:hover,
a.restaurar:hover { text-decoration: underline; }

.oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

@media (max-width: 860px) {
    .acceso-campos { grid-template-columns: 1fr; }
}

.boton-ojo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #d5deea;
    border-radius: 8px;
    background: #fff;
    color: #102b50;
    text-decoration: none;
}

.boton-ojo:hover { background: #f4f7fb; border-color: #245b9e; }

.datos td.columna-ojo,
.datos th.columna-ojo { text-align: center; width: 5.5rem; }
