:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: #f7f3ea;
}

* {
    box-sizing: border-box;
}

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

body,
button,
input {
    font-family: inherit;
}

button,
input {
    font-size: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #f7f3ea;
    -webkit-font-smoothing: antialiased;
}

.fondo-pagina {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(135deg, #e0f2fe 0%, #f7f3ea 42%, #fffcf5 100%);
}

.fondo-pagina::before,
.fondo-pagina::after {
    position: absolute;
    content: "";
    border-radius: 50%;
}

.fondo-pagina::before {
    top: -176px;
    right: -128px;
    width: 460px;
    height: 460px;
    border: 58px solid rgba(31, 111, 235, 0.08);
}

.fondo-pagina::after {
    bottom: -160px;
    left: -128px;
    width: 370px;
    height: 370px;
    background: rgba(31, 111, 235, 0.045);
}

.contenedor-acceso {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tarjeta-acceso {
    width: 100%;
    max-width: 1240px;
}

.panel-marca {
    position: relative;
    min-height: 216px;
    overflow: hidden;
    padding: 20px 20px 44px;
    color: #fff;
    border-radius: 30px;
    background-color: #071a2f;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
        linear-gradient(135deg, #071a2f 0%, #123c69 62%, #0f766e 100%);
    background-size: 30px 30px, auto;
    box-shadow: 0 18px 50px rgba(18, 60, 105, 0.2);
}

.circulo-marca {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.circulo-superior {
    top: -96px;
    right: -80px;
    width: 288px;
    height: 288px;
    background: rgba(31, 111, 235, 0.2);
    box-shadow: 0 0 110px 18px rgba(31, 111, 235, 0.22);
}

.circulo-inferior {
    bottom: -160px;
    left: -128px;
    width: 350px;
    height: 350px;
    border: 48px solid rgba(255, 255, 255, 0.07);
}

.contenido-marca {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 160px;
    flex-direction: column;
    justify-content: space-between;
}

.marca {
    display: flex;
    align-items: center;
}

.contenedor-logotipo {
    display: flex;
    width: 48px;
    height: 48px;
    flex: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(31, 111, 235, 0.28);
}

.contenedor-logotipo img {
    width: 100%;
    height: 100%;
    border-radius: 13px;
    object-fit: cover;
}

.nombre-marca {
    display: flex;
    margin-left: 12px;
    flex-direction: column;
}

.nombre-marca strong {
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.22em;
}

.nombre-marca small {
    margin-top: 6px;
    color: #38bdf8;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.22em;
}

.resumen-movil p {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
}

.etiqueta-punto-venta,
.etiqueta-acceso {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.etiqueta-punto-venta {
    padding: 8px 12px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.presentacion-marca,
.funciones-principales,
.recibo-decorativo {
    display: none;
}

.panel-formulario {
    position: relative;
    z-index: 2;
    margin-top: -24px;
    padding: 32px 20px;
    border: 1px solid #e9dfcf;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 20px 46px rgba(23, 32, 51, 0.1), 0 12px 52px rgba(31, 111, 235, 0.1);
}

.contenido-formulario {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.etiqueta-acceso {
    gap: 10px;
    padding: 8px 12px;
    color: #123c69;
    border: 1px solid rgba(31, 111, 235, 0.2);
    border-radius: 999px;
    background: #e0f2fe;
}

.etiqueta-acceso i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1f6feb;
}

h1 {
    margin: 20px 0 0;
    font-size: 29px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.descripcion-formulario {
    margin: 10px 0 0;
    color: #65758b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}

form {
    margin-top: 28px;
}

.grupo-campo + .grupo-campo {
    margin-top: 20px;
}

.grupo-campo label {
    display: block;
    margin-bottom: 10px;
    color: #405b6d;
    font-size: 13px;
    font-weight: 800;
}

.grupo-campo input {
    width: 100%;
    padding: 16px;
    color: #172033;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid #e9dfcf;
    border-radius: 16px;
    outline: none;
    background: #fffcf5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.grupo-campo input::placeholder {
    color: #65758b;
    font-weight: 600;
}

.grupo-campo input:focus {
    border-color: #1f6feb;
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.1);
}

.campo-contrasena {
    position: relative;
}

.campo-contrasena input {
    padding-right: 56px;
}

.campo-contrasena button {
    position: absolute;
    top: 4px;
    right: 4px;
    bottom: 4px;
    display: flex;
    width: 48px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #65758b;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.campo-contrasena button:hover {
    color: #123c69;
    background: #e0f2fe;
}

.campo-contrasena button:focus-visible {
    outline: 2px solid #1f6feb;
    outline-offset: 1px;
}

.campo-contrasena svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.8;
}

.hidden {
    display: none;
}

.mensaje-error {
    display: flex;
    margin-top: 16px;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    color: #991b1b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
}

.mensaje-error svg {
    width: 19px;
    height: 19px;
    flex: none;
    stroke-width: 1.8;
}

.mensaje-error p {
    margin: 0;
}

.boton-entrar {
    display: flex;
    width: 100%;
    min-height: 56px;
    margin-top: 28px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    border: 0;
    border-radius: 16px;
    background: #123c69;
    box-shadow: 0 13px 30px rgba(31, 111, 235, 0.28);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.boton-entrar:hover {
    transform: translateY(-2px);
    background: #1f6feb;
    box-shadow: 0 16px 34px rgba(31, 111, 235, 0.34);
}

.boton-entrar:focus-visible {
    outline: 4px solid rgba(31, 111, 235, 0.25);
    outline-offset: 2px;
}

.boton-entrar svg {
    width: 19px;
    height: 19px;
    stroke-width: 2;
    transition: transform 0.2s;
}

.boton-entrar:hover svg {
    transform: translateX(4px);
}

.aviso-seguridad {
    display: flex;
    margin-top: 20px;
    align-items: flex-start;
    gap: 10px;
    color: #65758b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.aviso-seguridad svg {
    width: 17px;
    height: 17px;
    flex: none;
    color: #123c69;
    stroke-width: 1.8;
}

.aviso-seguridad p {
    margin: 0;
}

.pie-movil {
    margin: 0;
    padding: 16px;
    color: #65758b;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.025em;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #172033;
    box-shadow: 0 0 0 1000px #fffcf5 inset;
    transition: background-color 5000s ease-in-out 0s;
}

@media (min-width: 640px) {
    .panel-marca {
        min-height: 240px;
        padding: 28px 28px 44px;
    }

    .contenedor-logotipo {
        width: 56px;
        height: 56px;
    }

    .nombre-marca {
        margin-left: 16px;
    }

    .nombre-marca strong {
        font-size: 18px;
    }

    .panel-formulario {
        padding: 40px 32px;
    }

    h1 {
        font-size: 34px;
    }
}

@media (min-width: 1024px) {
    .contenedor-acceso {
        padding: 24px 32px;
    }

    .tarjeta-acceso {
        display: grid;
        min-height: min(800px, calc(100vh - 48px));
        grid-template-columns: 11fr 9fr;
        overflow: hidden;
        border: 1px solid #e9dfcf;
        border-radius: 36px;
        background: #fffcf5;
        box-shadow: 0 28px 70px rgba(23, 32, 51, 0.12), 0 18px 90px rgba(31, 111, 235, 0.09);
    }

    .panel-marca {
        min-height: 100%;
        padding: 44px 48px;
        border-radius: 0;
        box-shadow: none;
    }

    .contenido-marca {
        min-height: 100%;
    }

    .contenedor-logotipo {
        width: 62px;
        height: 62px;
        padding: 3px;
        border-radius: 19px;
    }

    .contenedor-logotipo img {
        border-radius: 16px;
    }

    .nombre-marca strong {
        font-size: 20px;
        letter-spacing: 0.3em;
    }

    .nombre-marca small {
        margin-top: 8px;
        font-size: 9px;
        letter-spacing: 0.28em;
    }

    .resumen-movil {
        display: none;
    }

    .presentacion-marca {
        display: block;
    }

    .presentacion-marca h2 {
        max-width: 450px;
        margin: 24px 0 0;
        font-size: 50px;
        font-weight: 800;
        line-height: 0.98;
        letter-spacing: -0.042em;
    }

    .presentacion-marca p {
        max-width: 470px;
        margin: 24px 0 0;
        color: #eaf4f7;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.6;
    }

    .funciones-principales {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .funciones-principales span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        font-size: 11px;
        font-weight: 700;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 15px;
        background: rgba(23, 32, 51, 0.4);
    }

    .funciones-principales svg {
        width: 16px;
        height: 16px;
        color: #a7f3d0;
        stroke-width: 1.8;
    }

    .panel-formulario {
        display: flex;
        margin-top: 0;
        align-items: center;
        padding: 48px 56px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    h1 {
        margin-top: 24px;
        font-size: 38px;
    }

    form {
        margin-top: 36px;
    }

    .aviso-seguridad {
        margin-top: 24px;
    }

    .pie-movil {
        display: none;
    }
}

@media (min-width: 1280px) {
    .recibo-decorativo {
        position: absolute;
        top: 41%;
        right: 32px;
        display: block;
        width: 144px;
        padding: 20px;
        transform: rotate(3deg);
        border: 1px solid rgba(167, 243, 208, 0.15);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.035);
    }

    .cabecera-recibo {
        display: flex;
        margin-bottom: 20px;
        align-items: center;
        justify-content: space-between;
    }

    .cabecera-recibo i {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: rgba(167, 243, 208, 0.3);
    }

    .cabecera-recibo b {
        width: 40px;
        height: 8px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.1);
    }

    .recibo-decorativo > span {
        display: block;
        height: 6px;
        margin-top: 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.1);
    }

    .recibo-decorativo > span:nth-of-type(1) {
        width: 80%;
    }

    .recibo-decorativo > span:nth-of-type(2) {
        width: 60%;
    }

    .recibo-decorativo > span:nth-of-type(3) {
        width: 66%;
    }

    .codigo-barras {
        height: 32px;
        margin-top: 28px;
        opacity: 0.4;
        background: repeating-linear-gradient(90deg, #a7f3d0 0 1px, transparent 1px 5px, #a7f3d0 5px 7px, transparent 7px 11px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
