﻿

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

:root {
    /* Marca */
    --navy-900: #0c1322;
    --navy-800: #0f1729;
    --navy-700: #16213a;
    --navy-600: #1e2c49;
    --amber: #f5a623;
    --amber-strong: #ffb524;
    --amber-deep: #d98a14;
    /* Claros cálidos */
    --paper: #ffffff;
    --paper-2: #faf9f7;
    --ink: #16213a;
    --ink-soft: #586075;
    --ink-faint: #8b93a6;
    --line: #e9e7e1;
    --field: #f6f5f2;
    --danger: #c0392b;
    --danger-bg: #fcecea;
    --radius: 26px;
    --r-field: 13px;
    --shadow: 0 40px 90px -30px rgba(12,19,34,.45), 0 12px 30px -18px rgba(12,19,34,.3);
}

/* El scope se limita a .login-split para no chocar con Bootstrap */
.login-split * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Manrope",system-ui,sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: var(--ink);
    background: radial-gradient(900px 600px at 12% 8%, #eef1f6 0%, rgba(238,241,246,0) 55%), radial-gradient(800px 700px at 92% 95%, #f3ede2 0%, rgba(243,237,226,0) 50%), #eceae5;
    -webkit-font-smoothing: antialiased;
}

/* ============ TARJETA SPLIT ============ */
.login-split {
    width: min(1080px,100%);
}

.login-split__card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 640px;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

@keyframes cardIn {
    from {
        transform: translateY(22px) scale(.99);
    }

    to {
        transform: none;
    }
}

/* ============ LADO IZQUIERDO ============ */
.login-split__left {
    position: relative;
    background: radial-gradient(120% 120% at 100% 0%, #1d2c4a 0%, rgba(29,44,74,0) 45%), linear-gradient(160deg,var(--navy-700) 0%,var(--navy-900) 100%);
    color: #fff;
    padding: 48px 46px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
}

    .login-split__left::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
        background-size: 22px 22px;
        -webkit-mask-image: linear-gradient(160deg,#000 0%,transparent 75%);
        mask-image: linear-gradient(160deg,#000 0%,transparent 75%);
        z-index: -1;
    }

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(46px);
    z-index: -1;
    opacity: .5;
}

.orb--amber {
    width: 300px;
    height: 300px;
    right: -90px;
    bottom: -70px;
    background: radial-gradient(circle,var(--amber) 0%,rgba(245,166,35,0) 70%);
    animation: float1 11s ease-in-out infinite;
}

.orb--blue {
    width: 260px;
    height: 260px;
    left: -80px;
    top: -60px;
    background: radial-gradient(circle,#2f4f8f 0%,rgba(47,79,143,0) 70%);
    animation: float2 13s ease-in-out infinite;
}

@keyframes float1 {
    0%,100% {
        transform: translate(0,0);
    }

    50% {
        transform: translate(-26px,-20px);
    }
}

@keyframes float2 {
    0%,100% {
        transform: translate(0,0);
    }

    50% {
        transform: translate(22px,18px);
    }
}

.left-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 14px;
}

    .brand-mark img {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        display: block;
        box-shadow: 0 14px 30px -10px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
        animation: logoFloat 6s ease-in-out infinite;
    }

@keyframes logoFloat {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.brand-mark .b-name {
    font-family: "Sora",ui-sans-serif,system-ui,sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .14em;
}

.brand-mark .b-sub {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    letter-spacing: .04em;
    margin-top: 2px;
}

.left-hero {
    margin-top: auto;
    margin-bottom: 26px;
}

    .left-hero h1 {
        font-family: "Sora",ui-sans-serif,system-ui,sans-serif;
        font-weight: 600;
        font-size: 36px;
        line-height: 1.12;
        letter-spacing: -.01em;
        text-wrap: balance;
    }

        .left-hero h1 .accent {
            color: var(--amber-strong);
        }

.left-caption {
    margin-top: 18px;
    font-size: 15.5px;
    line-height: 1.6;
    color: rgba(255,255,255,.66);
    max-width: 34ch;
}

.left-foot {
    display: flex;
    gap: 24px;
    margin-top: 30px;
}

.trust {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: rgba(255,255,255,.7);
}

    .trust svg {
        width: 17px;
        height: 17px;
        color: var(--amber-strong);
        flex: none;
    }

@keyframes rise {
    from {
        transform: translateY(16px);
    }

    to {
        transform: none;
    }
}

/* ============ LADO DERECHO (FORM) ============ */
.login-split__right {
    background: var(--paper);
    padding: 54px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.right-inner {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .13em;
    color: var(--amber-deep);
    background: #fdf3e1;
    padding: 6px 13px;
    border-radius: 999px;
    margin-bottom: 22px;
}

    .pill .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--amber);
    }

.title {
    font-family: "Sora",ui-sans-serif,system-ui,sans-serif;
    font-weight: 600;
    font-size: 30px;
    letter-spacing: -.015em;
}

.subtitle {
    color: var(--ink-soft);
    font-size: 15px;
    margin-top: 8px;
    margin-bottom: 26px;
}

/* Alerta de error (compatible con .alert de Bootstrap, pero con estilo propio) */
.login-split .alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(192,57,43,.18);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    padding: 11px 13px;
    border-radius: 11px;
    margin-bottom: 20px;
    animation: shake .4s ease;
}

    .login-split .alert svg {
        width: 17px;
        height: 17px;
        flex: none;
        margin-top: 1px;
    }

@keyframes shake {
    0%,100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-5px);
    }

    40% {
        transform: translateX(5px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }
}

.field {
    margin-bottom: 17px;
}

.lbl {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 7px;
}

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

    .inp-wrap > svg.lead {
        position: absolute;
        left: 14px;
        width: 18px;
        height: 18px;
        color: var(--ink-faint);
        pointer-events: none;
        transition: color .2s;
    }

.inp {
    width: 100%;
    height: 50px;
    background: var(--field);
    border: 1.5px solid transparent;
    border-radius: var(--r-field);
    padding: 0 14px 0 42px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--ink);
    transition: border-color .2s, background .2s, box-shadow .2s;
}

    .inp::placeholder {
        color: var(--ink-faint);
    }

    .inp:focus {
        outline: none;
        background: #fff;
        border-color: var(--amber);
        box-shadow: 0 0 0 4px rgba(245,166,35,.14);
    }

.inp-wrap:focus-within > svg.lead {
    color: var(--amber-deep);
}

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

.toggle-pass {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-faint);
    border-radius: 8px;
    transition: color .2s,background .2s;
}

    .toggle-pass:hover {
        color: var(--ink);
        background: rgba(0,0,0,.04);
    }

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

.btn-login {
    width: 100%;
    height: 52px;
    margin-top: 8px;
    font-family: "Sora",ui-sans-serif,system-ui,sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .01em;
    color: #1a1204;
    background: linear-gradient(180deg,var(--amber-strong) 0%,var(--amber) 100%);
    border: none;
    border-radius: var(--r-field);
    cursor: pointer;
    box-shadow: 0 12px 24px -10px rgba(245,166,35,.65);
    transition: transform .15s, box-shadow .2s, filter .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 32px -12px rgba(245,166,35,.7);
        filter: brightness(1.03);
    }

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

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

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

.foot {
    margin-top: 30px;
    font-size: 12px;
    color: var(--ink-faint);
    text-align: center;
    line-height: 1.5;
}

/* ============ RESPONSIVE ============ */
@media (max-width:820px) {
    body {
        padding: 0;
    }

    .login-split {
        height: 100%;
    }

    .login-split__card {
        grid-template-columns: 1fr;
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .login-split__left {
        padding: 40px 34px 36px;
        min-height: 300px;
    }

    .left-hero h1 {
        font-size: 30px;
    }

    .login-split__right {
        padding: 40px 28px;
    }
}

@media (max-width:480px) {
    .left-foot {
        flex-direction: column;
        gap: 12px;
    }
}

/* Animaciones de entrada solo si el navegador las permite */
@media (prefers-reduced-motion:no-preference) {
    .login-split__card {
        animation: cardIn .8s cubic-bezier(.16,1,.3,1) both;
    }

    .brand-mark {
        animation: rise .7s .15s cubic-bezier(.16,1,.3,1) both;
    }

    .left-hero {
        animation: rise .7s .3s cubic-bezier(.16,1,.3,1) both;
    }

    .left-foot {
        animation: rise .7s .45s cubic-bezier(.16,1,.3,1) both;
    }

    .pill {
        animation: rise .6s .2s cubic-bezier(.16,1,.3,1) both;
    }

    .title {
        animation: rise .6s .28s cubic-bezier(.16,1,.3,1) both;
    }

    .subtitle {
        animation: rise .6s .34s cubic-bezier(.16,1,.3,1) both;
    }

    .form-login {
        animation: rise .6s .4s cubic-bezier(.16,1,.3,1) both;
    }
}
