/* ============================================================================
   SIITS · Telecafé — pantallas de acceso (ingreso y recuperación de contraseña)
   ========================================================================= */

:root {
    --ac-morado-900: #1c1033;
    --ac-morado-800: #2b1a52;
    --ac-morado-700: #3d2275;
    --ac-morado-600: #4c2c92;
    --ac-morado-500: #6440b5;
    --ac-cian: #00a0e3;
    --ac-ink: #1f2430;
    --ac-muted: #6b7280;
    --ac-line: #e6e8ef;
    --ac-danger: #d9534f;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--ac-ink);
    background: #f5f6fa;
    -webkit-font-smoothing: antialiased;
}

.ac-shell {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    min-height: 100vh;
}

/* ---------- Panel de marca ------------------------------------------------ */

.ac-marca {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 4rem;
    color: #fff;
    /* Color solido de respaldo bajo los degradados: si el navegador no los pinta, el texto
       blanco conserva un fondo oscuro debajo. */
    background-color: var(--ac-morado-900);
    background-image:
        radial-gradient(1100px 620px at 12% 8%, rgba(100, 64, 181, .55), transparent 60%),
        radial-gradient(900px 560px at 88% 92%, rgba(0, 160, 227, .38), transparent 62%),
        linear-gradient(150deg, var(--ac-morado-900) 0%, var(--ac-morado-800) 45%, var(--ac-morado-700) 100%);
}

/* Trama sutil para que el fondo no se vea plano */
.ac-marca::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 30% 40%, #000 10%, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 10%, transparent 78%);
    pointer-events: none;
}

.ac-marca__contenido {
    position: relative;
    max-width: 30rem;
    margin: auto 0;
}

.ac-logo {
    /* El logotipo es morado sobre transparente; sobre el panel oscuro se pasa a blanco.
       Se deja a su altura nativa (40 px) para que no se vea reescalado. */
    position: relative;
    /* El panel es un flex en columna: sin esto el logo se estira a todo el ancho. */
    align-self: flex-start;
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .95;
}

/* Simbolo institucional como marca de agua, para dar profundidad al panel */
.ac-marca__filigrana {
    position: absolute;
    right: -6rem;
    bottom: -7rem;
    width: 34rem;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: .055;
    pointer-events: none;
    user-select: none;
}

.ac-marca__eyebrow {
    display: inline-block;
    margin-top: 2.5rem;
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, .62);
}

.ac-marca__titulo {
    margin: .6rem 0 0;
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.025em;
}

.ac-marca__texto {
    margin: 1rem 0 0;
    font-size: 1.02rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .78);
}

.ac-modulos {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2rem;
    padding: 0;
    list-style: none;
}

.ac-modulos li {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .85rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 550;
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(6px);
}

.ac-marca__pie {
    position: relative;
    font-size: .78rem;
    color: rgba(255, 255, 255, .5);
    line-height: 1.6;
}

/* ---------- Panel del formulario ----------------------------------------- */

.ac-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: #fff;
}

.ac-form {
    width: 100%;
    max-width: 25rem;
}

.ac-logo-movil {
    display: none;
    height: 38px;
    margin-bottom: 1.75rem;
}

.ac-form__titulo {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.ac-form__sub {
    margin: .4rem 0 2rem;
    color: var(--ac-muted);
    font-size: .94rem;
}

/* Campo con etiqueta flotante */
.ac-campo {
    position: relative;
    margin-bottom: 1.05rem;
}

.ac-campo input {
    width: 100%;
    height: 3.35rem;
    padding: 1.35rem 2.9rem .5rem 2.75rem;
    font-size: .97rem;
    color: var(--ac-ink);
    background: #fbfbfd;
    border: 1.5px solid #dfe3ec;
    border-radius: 11px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.ac-campo input:hover {
    border-color: #cbd1e0;
}

.ac-campo input:focus {
    background: #fff;
    border-color: var(--ac-morado-500);
    box-shadow: 0 0 0 4px rgba(100, 64, 181, .13);
}

.ac-campo label {
    position: absolute;
    top: 50%;
    left: 2.75rem;
    transform: translateY(-50%);
    font-size: .97rem;
    color: #9aa1b1;
    pointer-events: none;
    transition: all .16s ease;
}

/* La etiqueta sube cuando el campo tiene foco o contenido */
.ac-campo input:focus + label,
.ac-campo input:not(:placeholder-shown) + label {
    top: .72rem;
    transform: none;
    font-size: .7rem;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ac-morado-600);
}

.ac-campo__icono {
    position: absolute;
    top: 50%;
    left: .95rem;
    transform: translateY(-50%);
    color: #a9b0c0;
    font-size: .95rem;
    pointer-events: none;
    transition: color .16s ease;
}

.ac-campo input:focus ~ .ac-campo__icono {
    color: var(--ac-morado-600);
}

.ac-ver-clave {
    position: absolute;
    top: 50%;
    right: .5rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9aa1b1;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.ac-ver-clave:hover {
    color: var(--ac-morado-600);
    background: #f2effa;
}

.ac-campo--error input {
    border-color: var(--ac-danger);
    background: #fff7f7;
}

.ac-campo--error input:focus {
    box-shadow: 0 0 0 4px rgba(217, 83, 79, .14);
}

.ac-error {
    display: block;
    margin-top: .4rem;
    font-size: .8rem;
    color: var(--ac-danger);
}

/* Aviso general */
.ac-aviso {
    display: flex;
    gap: .6rem;
    padding: .8rem .95rem;
    margin-bottom: 1.35rem;
    border-radius: 10px;
    font-size: .87rem;
    line-height: 1.45;
    border-left: 4px solid transparent;
}

.ac-aviso--error {
    background: #fdeceb;
    border-left-color: var(--ac-danger);
    color: #8a2b28;
}

.ac-aviso--ok {
    background: #e9f8f1;
    border-left-color: #17a673;
    color: #0d5c40;
}

/* Fila inferior */
.ac-fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .35rem 0 1.5rem;
}

.ac-recordar {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    color: #4a5163;
    cursor: pointer;
    user-select: none;
}

.ac-recordar input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--ac-morado-600);
    cursor: pointer;
}

.ac-enlace {
    font-size: .88rem;
    font-weight: 550;
    color: var(--ac-morado-600);
    text-decoration: none;
}

.ac-enlace:hover {
    color: var(--ac-morado-700);
    text-decoration: underline;
}

/* Botón */
.ac-boton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 3.05rem;
    font-size: .97rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--ac-morado-600), var(--ac-morado-700));
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    transition: transform .06s ease, box-shadow .18s ease, filter .18s ease;
    box-shadow: 0 6px 18px rgba(76, 44, 146, .28);
}

.ac-boton:hover {
    filter: brightness(1.07);
    box-shadow: 0 8px 24px rgba(76, 44, 146, .36);
}

.ac-boton:active {
    transform: translateY(1px);
}

.ac-boton[disabled] {
    opacity: .72;
    cursor: progress;
}

.ac-pie-form {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ac-line);
    font-size: .8rem;
    color: var(--ac-muted);
    line-height: 1.6;
}

/* ---------- Adaptación a pantallas pequeñas ------------------------------ */

@media (max-width: 991.98px) {
    .ac-shell {
        grid-template-columns: 1fr;
    }

    .ac-marca {
        padding: 2.25rem 1.75rem;
        min-height: auto;
    }

    .ac-marca__contenido {
        margin: 0;
        max-width: none;
    }

    .ac-marca__eyebrow {
        margin-top: 1.5rem;
    }

    .ac-marca__titulo {
        font-size: 1.85rem;
    }

    .ac-marca__texto,
    .ac-modulos {
        display: none;
    }

    .ac-marca__pie {
        display: none;
    }

    .ac-panel {
        padding: 2.25rem 1.5rem 3rem;
    }
}

@media (max-width: 575.98px) {
    .ac-marca {
        display: none;
    }

    .ac-logo-movil {
        display: block;
        filter: none;
    }

    .ac-panel {
        min-height: 100vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
