/* ============================================================================
   Prueba Técnica AHVA — estilos según diseño Figma "Prueba ASP.Net (OFICIAL)"
   Tokens exactos extraídos por API: rojo #9A1413, azul #0056AC (disabled
   #92B6DB), texto #181A1C / #515D68 / #747D86, borde inputs #C9CDD0,
   radios 6px (inputs/botones) y 8px (tarjetas). Fuente del diseño: Qanelas
   (comercial) → alternativa similar: Poppins.
   ========================================================================== */

:root {
    --rojo-header: #9A1413;
    --azul-primario: #0056AC;
    --azul-deshabilitado: #92B6DB;
    --azul-enlace: #0156AC;
    --texto: #181A1C;
    --texto-secundario: #515D68;
    --texto-placeholder: #747D86;
    --borde-input: #C9CDD0;
    --fondo-pagina: #F8F8F8;
    --error: #C01722;
    --verde-activo: #158F40;
}

* { font-family: 'Poppins', 'Segoe UI', sans-serif; }

body {
    background-color: var(--fondo-pagina);
    color: var(--texto);
    min-height: 100vh;
    margin: 0;
}

/* ---------------------------------------------------------------------------
   Pantallas públicas (activación / login / bloqueada)
   -------------------------------------------------------------------------*/
.pagina-publica {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: url('/img/bg-illustration.svg');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
}

.header-publico {
    background: var(--rojo-header);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.header-logo { height: 40px; }

.btn-ayuda {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.contenido-publico {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 56px;
    padding-bottom: 40px;
}

.tarjeta {
    background: #FEFEFE;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    width: 100%;
    max-width: 500px;
    padding: 40px 48px;
}

/* Toggle DNI / CE */
.toggle-documento {
    display: flex;
    border: 1px solid var(--texto-placeholder);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
}

.toggle-documento button {
    flex: 1;
    border: none;
    background: #FEFEFE;
    color: var(--texto-secundario);
    font-size: 16px;
    padding: 10px 0;
    cursor: pointer;
    transition: background .15s;
}

.toggle-documento button.activo {
    background: var(--texto-placeholder);
    color: #FEFEFE;
}

/* Campos */
.campo { margin-bottom: 20px; }

.campo label {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--texto);
}

.grupo-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--borde-input);
    border-radius: 6px;
    background: #FEFEFE;
    padding: 0 14px;
    height: 48px;
}

.grupo-input:focus-within { border-color: var(--azul-primario); }

.grupo-input i { color: var(--texto-placeholder); font-size: 18px; }

.grupo-input input {
    border: none;
    outline: none;
    flex: 1;
    padding: 0 10px;
    font-size: 16px;
    color: var(--texto);
    background: transparent;
}

.grupo-input input::placeholder { color: var(--texto-placeholder); }

.btn-ojo {
    background: none;
    border: none;
    color: var(--texto-placeholder);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
}

/* Estado de error (borde rojo + mensaje bajo el campo) */
.campo.con-error .grupo-input { border: 2px solid var(--error); }

.mensaje-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--error);
    font-size: 13px;
    margin-top: 6px;
}

.enlace {
    color: var(--azul-enlace);
    font-size: 15px;
    text-decoration: none;
}

.enlace:hover { text-decoration: underline; color: var(--azul-enlace); }

/* Botón primario */
.btn-primario {
    width: 100%;
    background: var(--azul-primario);
    color: #FEFEFE;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 500;
    padding: 13px 0;
    margin-top: 16px;
    transition: background .15s;
}

.btn-primario:hover:not(:disabled) { background: #004a94; color: #fff; }

.btn-primario:disabled { background: var(--azul-deshabilitado); }

/* Tarjeta de ayuda */
.tarjeta-ayuda {
    background: #FEFEFE;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    width: 100%;
    max-width: 500px;
    margin-top: 28px;
    padding: 22px 32px;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 16px;
    color: var(--texto-secundario);
}

.tarjeta-ayuda img { width: 56px; height: 56px; }

/* Tarjetas centradas (activación / bloqueada) */
.tarjeta-centrada { text-align: center; }

.tarjeta-centrada .icono { width: 130px; margin: 8px auto 24px; display: block; }

.tarjeta-centrada h1 {
    font-size: 26px;
    font-weight: 600;
    color: var(--texto);
    margin-bottom: 24px;
}

.tarjeta-centrada p {
    font-size: 16px;
    color: var(--texto);
    margin-bottom: 12px;
}

.tarjeta-centrada .detalle { color: var(--texto-secundario); font-size: 15px; }

/* Toast sesión expirada (abajo a la derecha, como el diseño) */
.toast-expirada {
    position: fixed;
    right: 0;
    bottom: 90px;
    background: #E8F1FB;
    border-left: 5px solid var(--azul-primario);
    border-bottom: 3px solid var(--azul-primario);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    padding: 20px 28px 20px 22px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    max-width: 560px;
    font-size: 16px;
    color: var(--texto);
    z-index: 1050;
}

.toast-expirada i { color: var(--azul-primario); font-size: 20px; margin-top: 2px; }

/* Footer institucional */
.footer-logos {
    display: flex;
    justify-content: flex-end;
    padding: 10px 24px;
    background: #F8F8F8;
    border-top: 1px solid #ECECEC;
}

.footer-logos img { height: 52px; }

/* ---------------------------------------------------------------------------
   Pantalla de perfil (autenticada)
   -------------------------------------------------------------------------*/
.layout-app { display: flex; min-height: 100vh; }

.sidebar {
    width: 76px;
    background: #FEFEFE;
    border-right: 1px solid #ECECEC;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 14px;
    gap: 6px;
    flex-shrink: 0;
}

.sidebar a, .sidebar button {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    border-radius: 10px;
    color: #3d444b;
    font-size: 19px;
    margin-bottom: 4px;
    text-decoration: none;
}

.sidebar a.activo { background: #FBEAEA; color: var(--rojo-header); }

.sidebar a:hover { background: #F3F4F6; }

.sidebar .hamburguesa { margin-bottom: 28px; }

.zona-principal { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.header-app {
    background: var(--rojo-header);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    color: #FEFEFE;
    flex-shrink: 0;
}

.header-app .acciones { display: flex; align-items: center; gap: 22px; }

.header-app .icono-header {
    color: #FEFEFE;
    background: none;
    border: none;
    font-size: 20px;
    position: relative;
    cursor: pointer;
}

.badge-notif {
    position: absolute;
    top: -7px;
    right: -12px;
    background: #006DDB;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 100px;
    padding: 2px 5px;
    line-height: 1;
}

.header-app .usuario { text-align: left; line-height: 1.25; }

.header-app .usuario .nombre { font-size: 15px; font-weight: 500; }

.header-app .usuario .rol { font-size: 12.5px; opacity: .85; }

.contenido-app { flex: 1; padding: 22px 36px 40px; }

.miga { font-size: 13.5px; color: var(--texto-secundario); margin-bottom: 6px; }

.titulo-pagina { font-size: 32px; font-weight: 600; margin-bottom: 22px; }

.tarjeta-perfil {
    background: #FEFEFE;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
    padding: 34px 40px;
}

.cabecera-perfil { display: flex; align-items: center; gap: 24px; margin-bottom: 26px; }

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #C4D8F8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    color: #4E7FD0;
    flex-shrink: 0;
}

.cabecera-perfil h2 { font-size: 24px; font-weight: 600; margin: 0; display: inline; }

.badge-activo {
    background: #E4F4EA;
    color: var(--verde-activo);
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    padding: 3px 10px;
    margin-left: 12px;
    vertical-align: middle;
}

.cabecera-perfil .cargo { font-size: 16px; color: var(--texto-secundario); margin: 4px 0 2px; }

.cabecera-perfil .entidad { font-size: 14.5px; color: var(--texto-secundario); }

/* Tabs */
.tabs-perfil {
    display: flex;
    border-bottom: 1px solid #E2E5E8;
    margin-bottom: 28px;
}

.tabs-perfil button {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 16.5px;
    color: var(--texto-secundario);
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.tabs-perfil button.activo {
    color: var(--azul-enlace);
    font-weight: 500;
    border-bottom-color: var(--azul-enlace);
}

/* Grid de datos */
.grid-datos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px 40px;
}

@media (max-width: 992px) { .grid-datos { grid-template-columns: 1fr; } }

.dato label { font-size: 15px; color: var(--texto); display: block; margin-bottom: 7px; }

.dato label .opcional { color: var(--texto-secundario); font-size: 13px; }

.dato .valor {
    background: #F6F6F6;
    border-radius: 6px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    font-size: 15.5px;
    color: #3A4148;
}

.dato .valor.editable { background: #FEFEFE; border: 1px solid var(--borde-input); }

.dato .valor .bi-pencil { color: var(--azul-enlace); font-size: 15px; }

.pie-app {
    background: #F8F8F8;
    border-top: 1px solid #ECECEC;
    padding: 10px 28px;
    display: flex;
    justify-content: flex-start;
}

.pie-app img { height: 52px; }

/* Modal de expiración de sesión */
.modal-expiracion .modal-content {
    border: none;
    border-radius: 8px;
    padding: 8px 6px;
}

.modal-expiracion .modal-body { display: flex; gap: 16px; }

.icono-advertencia {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #E9A400;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.modal-expiracion h5 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }

.modal-expiracion p { color: var(--texto); font-size: 15.5px; margin: 0; }

.btn-extender {
    background: #E9A400;
    border: none;
    color: #1d1d1f;
    font-weight: 600;
    border-radius: 6px;
    padding: 9px 18px;
}

.btn-extender:hover { background: #d29400; }
