:root {
    --azul: #082e63;
    --azul-oscuro: #041b3d;
    --rojo: #e31837;
    --turquesa: #24c8dc;
    --texto: #102b50;
    --gris: #60738c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--texto);
    background: #eef4fb;
}

.login {
    display: grid;
    grid-template-columns: 54% 46%;
    min-height: 100vh;
}

/* PANEL INSTITUCIONAL */

.identidad {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 50px clamp(30px, 5vw, 85px);
    color: white;
    background:
        radial-gradient(circle at 50% 35%, #1574c8 0%, transparent 52%),
        linear-gradient(145deg, #06204b, #07529a 65%, #03152f);
}

.identidad::before {
    content: "";
    position: absolute;
    width: 650px;
    height: 650px;
    border: 1px solid #ffffff1c;
    border-radius: 50%;
    right: -260px;
    top: -150px;
    box-shadow:
        0 0 0 90px #ffffff06,
        0 0 0 180px #ffffff04;
    pointer-events: none;
}

.identidad::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 130%;
    right: -80px;
    top: -15%;
    transform: rotate(-34deg);
    background: linear-gradient(
        90deg,
        transparent 20%,
        #e3183733 21%,
        #e31837 24%,
        #a50020 27%,
        transparent 29%
    );
    pointer-events: none;
}

.identidad-contenido {
    position: relative;
    z-index: 1;
    max-width: 740px;
    margin: auto 0;
}

.logo-institucional {
    display: block;
    width: min(100%, 610px);
    max-height: 410px;
    object-fit: contain;
    margin: 0 auto 25px;
    filter: drop-shadow(0 15px 22px #00000050);
}

.etiqueta {
    margin: 15px 0 8px;
    color: #c8e2ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.identidad h1 {
    margin: 0 0 15px;
    font-size: clamp(35px, 4vw, 60px);
    letter-spacing: -2px;
}

.identidad h1 span {
    color: var(--turquesa);
}

.descripcion {
    max-width: 600px;
    font-size: 16px;
    line-height: 1.8;
    color: #e4eefb;
}

.valores {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 35px;
    padding-top: 22px;
    border-top: 1px solid #ffffff3b;
    color: #e4eefb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.valores span::before {
    content: "◆";
    color: #ff4261;
    margin-right: 8px;
}

/* PANEL DE ACCESO */

.acceso {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px clamp(22px, 4vw, 75px);
    background:
        radial-gradient(circle at 100% 0%, #dbeafa, transparent 38%),
        #f3f7fc;
}

.formulario {
    width: 100%;
    max-width: 510px;
    padding: clamp(28px, 3vw, 48px);
    border: 1px solid #ffffff;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 65px #092f631c;
}

.emblema {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: #eaf3ff;
    color: var(--azul);
    font-size: 28px;
    font-weight: 800;
}

.distintivo {
    display: inline-block;
    margin-top: 23px;
    padding: 8px 14px;
    border-radius: 25px;
    background: #e9f2ff;
    color: var(--azul);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.formulario h2 {
    margin: 20px 0 8px;
    font-size: clamp(30px, 3vw, 42px);
    letter-spacing: -1px;
}

.subtitulo {
    margin: 0 0 32px;
    color: var(--gris);
    font-size: 14px;
    line-height: 1.7;
}

.campo {
    margin-bottom: 22px;
}

.campo label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.control {
    position: relative;
}

.control input {
    width: 100%;
    min-height: 56px;
    padding: 14px 55px 14px 18px;
    border: 1px solid #cbd9ea;
    border-radius: 11px;
    background: #fff;
    color: var(--texto);
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}

.control input:focus {
    outline: none;
    border-color: #2384db;
    box-shadow: 0 0 0 4px #2384db1c;
}

.mostrar {
    position: absolute;
    right: 10px;
    top: 8px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--azul);
    cursor: pointer;
}

.mostrar:hover {
    background: #eef4fb;
}

.mostrar svg {
    width: 21px;
    height: 21px;
}

.boton {
    width: 100%;
    min-height: 57px;
    margin-top: 5px;
    border: 0;
    border-radius: 11px;
    color: white;
    background: linear-gradient(105deg, #0756a2, #172e66 45%, #e31837);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .6px;
    cursor: pointer;
    transition: transform .2s, filter .2s;
}

.boton:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.boton:focus-visible,
.mostrar:focus-visible {
    outline: 3px solid #42a5f5;
    outline-offset: 3px;
}

.alerta {
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #f1bdc7;
    border-radius: 10px;
    background: #fff1f4;
    color: #9d1730;
    font-size: 13px;
}

.error {
    margin-top: 7px;
    color: #ad1732;
    font-size: 12px;
}

.seguridad {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 27px;
    padding: 17px;
    border: 1px solid #cfe7db;
    border-radius: 11px;
    background: #f1faf5;
    color: #176747;
}

.seguridad strong {
    display: block;
    font-size: 13px;
}

.seguridad small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.5;
}

.pie {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5edf5;
    color: #7a8da4;
    font-size: 11px;
    line-height: 1.8;
    text-align: center;
}

/* RESPONSIVE */

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

    .identidad {
        padding: 35px 25px;
    }

    .identidad-contenido {
        text-align: center;
    }

    .logo-institucional {
        max-width: 360px;
        max-height: 250px;
    }

    .descripcion {
        margin-left: auto;
        margin-right: auto;
    }

    .valores {
        justify-content: center;
    }

    .acceso {
        padding: 35px 20px;
    }
}

@media (max-width: 520px) {
    .identidad {
        padding: 28px 20px;
    }

    .logo-institucional {
        max-width: 270px;
        max-height: 210px;
    }

    .identidad h1 {
        font-size: 36px;
    }

    .descripcion {
        font-size: 13px;
    }

    .valores {
        gap: 10px;
        font-size: 10px;
    }

    .formulario {
        padding: 26px 20px;
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .boton,
    .control input {
        transition: none;
    }
}


/* SIDICOBACH - DISTRIBUCION RESPONSIVA CONSOLIDADA */

@media (min-width: 951px) {

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

    .login {
        display: grid;
        grid-template-columns: 53% 47%;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
    }

    .identidad,
    .acceso {
        height: 100%;
        min-height: 0;
        box-sizing: border-box;
    }

    .identidad {
        padding: 16px clamp(28px, 4vw, 65px);
    }

    .identidad-contenido {
        width: 100%;
        margin: auto 0;
    }

    .logo-institucional {
        width: min(100%, 440px);
        max-height: 30vh;
        object-fit: contain;
        margin: 0 auto 10px;
    }

    .etiqueta {
        margin: 8px 0 5px;
    }

    .identidad h1 {
        font-size: clamp(32px, 3vw, 46px);
        line-height: 1.12;
        margin: 0 0 8px;
    }

    .descripcion {
        font-size: 14px;
        line-height: 1.5;
        margin: 8px 0;
    }

    .valores {
        margin-top: 14px;
        padding-top: 12px;
    }

    .acceso {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px clamp(20px, 3vw, 50px);
    }

    .formulario {
        width: 100%;
        max-width: 510px;
        padding: 20px 32px;
        margin: 0 auto;
        border-radius: 20px;
    }

    .emblema {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .distintivo {
        margin-top: 12px;
        padding: 6px 12px;
    }

    .formulario h2 {
        margin: 10px 0 5px;
        font-size: 34px;
    }

    .subtitulo {
        margin-bottom: 16px;
        font-size: 13px;
    }

    .campo {
        margin-bottom: 12px;
    }

    .campo label {
        margin-bottom: 6px;
    }

    .control input {
        min-height: 48px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .mostrar {
        top: 4px;
    }

    .boton {
        min-height: 48px;
        margin-top: 2px;
    }

    .seguridad {
        margin-top: 14px;
        padding: 11px 13px;
    }

    .pie {
        margin-top: 12px;
        padding-top: 10px;
    }
}

/* Evitar recortar el formulario en pantallas bajas */

@media (min-width: 951px) and (max-height: 720px) {
    .login {
        height: auto;
        min-height: 100vh;
    }

    .identidad,
    .acceso {
        height: auto;
        min-height: 100vh;
    }

    .logo-institucional {
        max-height: 210px;
    }

    .formulario {
        padding: 16px 26px;
    }
}


/* ============================================
   SIDICOBACH - IDENTIDAD VISUAL Y RELOJ
   ============================================ */

.identidad {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(ellipse at 40% 38%,
            rgba(0, 166, 255, .28), transparent 52%),
        linear-gradient(145deg, #061b3c 0%,
            #07519a 52%, #041a39 100%);
}

.identidad::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        linear-gradient(135deg,
            transparent 70%, rgba(224, 20, 54, .85) 70.3%,
            rgba(224, 20, 54, .85) 71%, transparent 71.3%);
    opacity: .7;
}

.logo-institucional {
    display: block;
    filter: drop-shadow(0 12px 25px rgba(0, 0, 0, .18));
}

.formulario {
    box-shadow:
        0 18px 55px rgba(15, 45, 85, .12),
        0 4px 14px rgba(15, 45, 85, .05);
}

.control input {
    transition: border-color .2s, box-shadow .2s;
}

.control input:focus {
    border-color: #0873d1;
    box-shadow: 0 0 0 4px rgba(8, 115, 209, .11);
}

.boton {
    transition: transform .2s, box-shadow .2s;
}

.boton:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 59, 111, .2);
}

.reloj-institucional {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    max-width: 100%;
    margin: 20px auto 0;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px;
    background: rgba(5, 27, 59, .35);
    color: #fff;
    backdrop-filter: blur(10px);
}

.reloj-icono {
    font-size: 30px;
    color: #37d7e8;
}

.reloj-datos {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reloj-etiqueta {
    font-size: 9px;
    letter-spacing: 2px;
    color: #a9d9f5;
    font-weight: 700;
}

#reloj-hora {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

#reloj-fecha {
    font-size: 11px;
    color: #d8eaf9;
    text-transform: capitalize;
}

@media (min-width: 951px) {
    .identidad-contenido {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .reloj-institucional {
        margin-top: 16px;
    }
}

@media (max-width: 950px) {
    .reloj-institucional {
        margin: 20px auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .boton,
    .control input {
        transition: none;
    }
}


/* SIDICOBACH - PRESENTACION DEL LOGOTIPO 3D */

.logo-institucional {
    display: block;
    width: min(100%, 450px);
    height: auto;
    max-height: 29vh;
    object-fit: contain;
    margin: 0 auto 10px;
    background: transparent;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .18));
}

@media (max-width: 950px) {
    .logo-institucional {
        width: min(100%, 380px);
        max-height: none;
    }
}


/* ==================================================
   SIDICOBACH - REFINAMIENTO VISUAL INSTITUCIONAL
   ================================================== */

@media (min-width: 951px) {

    .identidad-contenido {
        width: 100%;
    }

    .logo-institucional {
        width: min(100%, 490px);
        max-height: 33vh;
        object-fit: contain;
        margin: 0 auto 14px;
        filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .16));
    }

    .reloj-institucional {
        margin-top: 16px;
    }
}

/* Emblema institucional del formulario */

.emblema.emblema-logo {
    width: 54px;
    height: 54px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    background: #edf4ff;
}

.emblema-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 950px) {

    .logo-institucional {
        width: min(100%, 410px);
        height: auto;
        object-fit: contain;
    }

    .emblema.emblema-logo {
        width: 48px;
        height: 48px;
    }
}
