@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* ============================================================
   LOGIN APED  ·  Lottie de marca (izq) + panel tipo "teléfono" (der)
   Vista standalone (Layout = null). El scope global es seguro aquí.
   ============================================================ */
* {
    box-sizing: border-box;
}

:root {
    --navy-900: #0a1228;
    --navy-800: #0e1830;
    --navy-700: #122039;
    --navy-600: #16233f;
    --navy-500: #1b2c4d;
    --panel: #0b0f1a;
    --amber: #f5b81e;
    --amber-bri: #ffc63d;
    --blue: #6f97d9;
    --line: rgba(255,255,255,.14);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Montserrat',-apple-system,"Segoe UI",Roboto,sans-serif;
    background: radial-gradient(120% 120% at 22% 30%, var(--navy-600) 0%, var(--navy-800) 50%, var(--navy-900) 100%);
    color: #fff;
    overflow-x: hidden;
}

.wrap {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    /* Centra el conjunto (Lottie + panel) como un grupo */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 5vw, 90px);
    padding: 40px;
}

/* halos de marca en el fondo */
.halo {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.halo--amber {
    width: 520px;
    height: 520px;
    top: -160px;
    left: 8%;
    background: radial-gradient(circle, rgba(245,184,30,.18), transparent 68%);
}

.halo--blue {
    width: 560px;
    height: 560px;
    bottom: -220px;
    left: 18%;
    background: radial-gradient(circle, rgba(111,151,217,.16), transparent 68%);
}

/* ===== LADO IZQUIERDO: Lottie de marca ===== */
.brand-side {
    position: relative;
    z-index: 2;
    flex: 0 1 600px;
    display: grid;
    place-items: center;
    min-width: 0;
}

.brand-lottie {
    width: min(100%,600px);
    aspect-ratio: 760/560;
}

/* ===== LADO DERECHO: panel "teléfono" ===== */
.panel {
    position: relative;
    z-index: 3;
    flex: 0 0 460px;
    width: 460px;
    max-width: 100%;
    max-height: calc(100vh - 64px);
    background: linear-gradient(180deg,#0c1018 0%, #0a0d15 60%, #090c13 100%);
    border-radius: 38px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 50px 130px rgba(3,7,18,.65), inset 0 0 0 1px rgba(255,255,255,.05);
    display: flex;
    flex-direction: column;
}

/* collage abstracto de marca (evoca la cuadrícula) */
.collage {
    position: relative;
    height: 206px;
    flex: none;
    overflow: hidden;
}

    .collage::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, transparent 30%, #0a0d15 92%);
    }

.tile {
    position: absolute;
    border-radius: 50%;
    filter: blur(.3px);
    opacity: .92;
}

    .tile.s1 {
        width: 78px;
        height: 78px;
    }

    .tile.s2 {
        width: 62px;
        height: 62px;
    }

    .tile.s3 {
        width: 50px;
        height: 50px;
    }

.ta {
    background: radial-gradient(circle at 35% 30%, #ffd27a, #f5a623 70%);
}

.tb {
    background: radial-gradient(circle at 35% 30%, #9cc0ff, #5a82c9 72%);
}

.tc {
    background: radial-gradient(circle at 35% 30%, #3a4a6e, #1b2c4d 75%);
}

.td {
    background: radial-gradient(circle at 35% 30%, #2a3552, #122039 75%);
}

.panel-logo {
    position: absolute;
    left: 50%;
    top: 150px;
    transform: translateX(-50%);
    z-index: 4;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 30px rgba(0,0,0,.45);
}

    .panel-logo img {
        width: 50px;
        height: 50px;
        display: block;
    }

.panel-body {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    padding: 50px 40px 36px;
}

.panel h1 {
    font-weight: 800;
    font-size: 33px;
    line-height: 1.12;
    letter-spacing: -.01em;
    text-align: center;
    margin: 0 0 6px;
    text-wrap: balance;
}

    .panel h1 .accent {
        color: var(--amber);
    }

.panel .lead {
    text-align: center;
    font-size: 13.5px;
    color: #9aa6bd;
    margin: 0 0 30px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 8px;
}

.inp-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .inp-wrap .lead-ico {
        position: absolute;
        left: 20px;
        width: 18px;
        height: 18px;
        color: #7e8aa3;
        pointer-events: none;
    }

.inp {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: #fff;
    background: rgba(255,255,255,.05);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 16px 20px 16px 48px;
    outline: none;
    transition: border-color .18s, background .18s, box-shadow .18s;
}

    .inp.has-toggle {
        padding-right: 52px;
    }

    .inp::placeholder {
        color: #8893aa;
    }

    .inp:focus {
        border-color: var(--amber);
        background: rgba(255,255,255,.08);
        box-shadow: 0 0 0 4px rgba(245,184,30,.16);
    }

.toggle-pass {
    position: absolute;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #8893aa;
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .toggle-pass:hover {
        color: #fff;
        background: rgba(255,255,255,.07);
    }

    .toggle-pass svg {
        width: 19px;
        height: 19px;
    }

.btn-primary {
    margin-top: 4px;
    width: 100%;
    font-family: inherit;
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: .01em;
    color: var(--navy-900);
    background: linear-gradient(180deg,var(--amber-bri),var(--amber));
    border: none;
    border-radius: 999px;
    padding: 17px;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(245,184,30,.34);
    transition: transform .15s, box-shadow .2s, filter .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

    .btn-primary svg {
        width: 18px;
        height: 18px;
        transition: transform .2s;
    }

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 38px rgba(245,184,30,.46);
        filter: brightness(1.03);
    }

        .btn-primary:hover svg {
            transform: translateX(3px);
        }

    .btn-primary:active {
        transform: translateY(0);
    }

.forgot {
    text-align: center;
    margin-top: 4px;
}

    .forgot a {
        font-size: 13px;
        font-weight: 600;
        color: #c7d0e2;
        text-decoration: none;
        border-bottom: 1px solid transparent;
    }

        .forgot a:hover {
            color: #fff;
            border-bottom-color: var(--amber);
        }

.panel-foot {
    text-align: center;
    font-size: 11px;
    line-height: 1.6;
    color: #6b758d;
    margin-top: 22px;
}

/* alerta (ViewBag.Error) */
.alert {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #ffb4b4;
    background: rgba(220,60,60,.12);
    border: 1px solid rgba(220,60,60,.30);
    border-radius: 14px;
    padding: 11px 14px;
    margin-bottom: 14px;
}

    .alert svg {
        width: 18px;
        height: 18px;
        flex: none;
    }

/* ===== Responsive ===== */
/* Tablet / pantallas medianas: se reduce el Lottie, el grupo sigue centrado */
@media (max-width:1040px) {
    .brand-side {
        flex-basis: 460px;
    }

    .panel {
        flex-basis: 420px;
        width: 420px;
    }
}

/* Celular: se apila la marca arriba y el panel abajo, a lo ancho */
@media (max-width:900px) {
    .wrap {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        padding: 0;
    }

    .brand-side {
        flex: none;
        width: 100%;
        height: 210px;
        padding: 30px 24px 6px;
    }

    .brand-lottie {
        width: min(70%,320px);
    }

    .panel {
        flex: none;
        width: 100%;
        max-width: 460px;
        max-height: none;
        margin: -6px auto 0;
        border-radius: 30px 30px 0 0;
        min-height: calc(100vh - 210px);
    }
}

/* Celular pequeño: ajustes finos de tipografía y espaciado */
@media (max-width:480px) {
    .brand-side {
        height: 180px;
        padding: 22px 20px 4px;
    }

    .panel-body {
        padding: 46px 26px 30px;
    }

    .panel h1 {
        font-size: 28px;
    }
}
