/* ==========================================================================
   Pantallas de acceso (solicitud de admisión y panel administrativo).
   Las rutas de imágenes son relativas a /css/.
   ========================================================================== */

:root {
    --verde: #0a6b3d;
    --verde-oscuro: #075230;
    --verde-claro: #e7f2ec;
    --gris-panel: #d9dadb;
    --gris-campo: #f1f2f2;
    --texto: #1d2321;
    --texto-suave: #5b6462;
    --rojo: #b3261e;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--texto);
    background: #fff;
}

.pantalla {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
    min-height: 100vh;
}

/* ---------- Panel izquierdo ---------- */
.panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 32px 140px;
    overflow: hidden;
}

.panel__contenido {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 470px;
}

.marca {
    display: block;
    width: 100%;
    max-width: 330px;
    height: auto;
    margin: 0 auto 26px;
}

.lema {
    margin: 0 0 34px;
    text-align: center;
    font-size: clamp(1.05rem, 2.1vw, 1.45rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--verde);
}

.lema__sub {
    display: block;
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--texto-suave);
}

.onda {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: 100%;
    pointer-events: none;
    user-select: none;
}

/* ---------- Tarjeta ---------- */
.tarjeta {
    padding: 26px 26px 30px;
    border-radius: 22px;
    background: var(--gris-panel);
}

.tarjeta__titulo {
    display: block;
    margin: 0 0 14px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
}

/* ---------- Selector cédula / pasaporte ---------- */
.tipos {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.tipo {
    flex: 1 1 0;
    cursor: pointer;
}

.tipo input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.tipo__cara {
    display: block;
    padding: 11px 8px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #fff;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--texto-suave);
    transition: background .15s, color .15s, border-color .15s;
}

.tipo input:checked + .tipo__cara {
    border-color: var(--verde);
    background: var(--verde);
    color: #fff;
}

.tipo input:focus-visible + .tipo__cara {
    outline: 3px solid var(--verde-oscuro);
    outline-offset: 2px;
}

.tipo:hover input:not(:checked) + .tipo__cara {
    border-color: var(--verde);
    color: var(--verde);
}

/* ---------- Campos ---------- */
.grupo {
    margin-bottom: 16px;
}

.grupo__etiqueta {
    display: block;
    margin: 0 0 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--texto);
}

.campo {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--texto);
    text-align: center;
    letter-spacing: .02em;
}

.campo--texto {
    text-align: left;
    letter-spacing: normal;
}

.campo::placeholder {
    color: #9aa3a1;
    letter-spacing: normal;
}

.campo:focus {
    outline: none;
    border-color: var(--verde);
}

.campo[readonly] {
    background: var(--gris-campo);
    cursor: not-allowed;
}

/* Campo de contraseña con botón de visibilidad */
.campo-con-boton {
    position: relative;
}

.campo-con-boton .campo {
    padding-right: 54px;
}

.ojo {
    position: absolute;
    top: 50%;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    transform: translateY(-50%);
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--texto-suave);
    cursor: pointer;
}

.ojo:hover { color: var(--verde); }

.ojo:focus-visible {
    outline: 3px solid var(--verde);
    outline-offset: 0;
}

.ojo svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Mensajes ---------- */
.error,
.alerta {
    margin: 10px 2px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rojo);
    text-align: center;
}

.error {
    display: none;
}

.error.visible {
    display: block;
}

.alerta {
    padding: 11px 14px;
    border-radius: 14px;
    background: #fdecea;
}

/* ---------- Botón ---------- */
.boton {
    width: 100%;
    margin-top: 18px;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    background: var(--verde);
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.boton:hover { background: var(--verde-oscuro); }

.boton:focus-visible {
    outline: 3px solid var(--verde-oscuro);
    outline-offset: 3px;
}

/* ---------- Pie del panel ---------- */
.ayuda {
    margin: 16px 0 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--texto-suave);
}

.enlace {
    color: var(--verde);
    font-weight: 600;
    text-decoration: none;
}

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

/* ---------- Foto ---------- */
.foto {
    background: var(--verde-claro) url('../imgx/hero-admisiones.jpg') center / cover no-repeat;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .pantalla {
        grid-template-columns: 1fr;
        grid-template-rows: 190px auto;
    }

    .foto { grid-row: 1; }

    .panel {
        grid-row: 2;
        padding: 32px 20px 110px;
    }

    .marca {
        max-width: 250px;
        margin-bottom: 20px;
    }

    .lema { margin-bottom: 26px; }
}

@media (max-width: 420px) {
    .tarjeta {
        padding: 20px 18px 24px;
        border-radius: 18px;
    }

    .tipos { flex-direction: column; }
}
