@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root{
    --primary:#1e3a5f;
    --primary-strong:#15304f;
    --accent:#38bdf8;
    --accent-2:#7dd3fc;
    --accent-soft:#e0f2fe;
    --bg:#f6fafc;
    --bg-2:#eef5fa;
    --card:rgba(255,255,255,0.86);
    --card-line:rgba(255,255,255,0.90);
    --text:#334155;
    --muted:#64748b;
    --line:#d9e6ef;
    --white:#ffffff;
    --danger:#dc2626;
    --danger-bg:#fee2e2;
    --shadow-soft:0 20px 45px rgba(15,23,42,0.08);
    --shadow-card:0 30px 60px rgba(30,58,95,0.14);
    --shadow-button:0 18px 34px rgba(56,189,248,0.26);
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    min-height:100%;
}

body{
    font-family:'Poppins',sans-serif;
    color:var(--text);
    background:
        radial-gradient(circle at top left, rgba(56,189,248,0.16), transparent 24%),
        radial-gradient(circle at bottom right, rgba(125,211,252,0.18), transparent 20%),
        linear-gradient(135deg, #f8fbfd 0%, #eef5fa 50%, #f7fbfe 100%);
}

a{
    text-decoration:none;
}

button,
input{
    font-family:'Poppins',sans-serif;
}

.login-layout{
    min-height:100vh;
    display:grid;
    grid-template-columns:1.15fr 0.85fr;
    align-items:stretch;
}

/* =========================================
   PANEL IZQUIERDO
   ========================================= */

.login-showcase{
    position:relative;
    padding:54px 64px;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    flex-direction:column;
    overflow:hidden;
}

.login-showcase::before{
    content:"";
    position:absolute;
    inset:36px;
    border-radius:34px;
    background:linear-gradient(145deg, rgba(255,255,255,0.84), rgba(255,255,255,0.56));
    border:1px solid rgba(255,255,255,0.92);
    box-shadow:var(--shadow-soft);
    backdrop-filter:blur(10px);
}

.login-showcase::after{
    content:"";
    position:absolute;
    width:760px;
    height:760px;
    right:-90px;
    top:40px;
    background:url('/assets/img/logo-watermark.png') center/contain no-repeat;
    opacity:0.12;
    filter:grayscale(10%);
    mix-blend-mode:multiply;
    pointer-events:none;
    transform:none;
    animation:floatLogo 8s ease-in-out infinite;
}

.showcase-inner{
    position:relative;
    z-index:2;
    max-width:620px;
    padding-top:6px;
    animation:fadeSlideUp 0.8s ease both;
}

.showcase-badge{
    display:inline-flex;
    align-items:center;
    min-height:46px;
    padding:0 18px;
    border-radius:999px;
    background:rgba(56,189,248,0.10);
    color:var(--primary);
    border:1px solid rgba(56,189,248,0.18);
    font-weight:700;
    font-size:0.95rem;
    box-shadow:0 10px 20px rgba(56,189,248,0.08);
    margin-bottom:44px;
    transition:all .35s ease;
}

.showcase-badge:hover{
    transform:translateY(-1px);
    box-shadow:0 14px 26px rgba(56,189,248,0.12);
    background:rgba(56,189,248,0.14);
}

.showcase-copy{
    position:relative;
}

.showcase-copy h1{
    font-size:3.1rem;
    line-height:1.02;
    color:var(--primary);
    font-weight:800;
    letter-spacing:-1.2px;
    margin-bottom:24px;
    max-width:560px;
}

.showcase-copy p{
    font-size:1.03rem;
    line-height:1.95;
    color:var(--muted);
    max-width:530px;
}

.showcase-copy::after{
    content:"";
    position:absolute;
    width:110px;
    height:4px;
    left:0;
    bottom:-26px;
    border-radius:999px;
    background:linear-gradient(90deg, var(--accent), rgba(56,189,248,0.15));
}

/* =========================================
   PANEL DERECHO
   ========================================= */

.login-form-side{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:32px;
}

.login-card{
    width:100%;
    max-width:440px;
    background:var(--card);
    border:1px solid var(--card-line);
    border-radius:30px;
    padding:34px 30px 24px;
    box-shadow:var(--shadow-card);
    backdrop-filter:blur(14px);
    position:relative;
    overflow:hidden;
    animation:fadeSlideUp 0.9s ease both;
    transition:transform .35s ease, box-shadow .35s ease;
}

.login-card:hover{
    transform:translateY(-4px);
    box-shadow:0 36px 70px rgba(30,58,95,0.18);
}

.login-card::before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(180deg, rgba(255,255,255,0.28), transparent 22%);
    pointer-events:none;
}

.login-card::after{
    content:"";
    position:absolute;
    width:220px;
    height:220px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(56,189,248,0.14), transparent 68%);
    top:-120px;
    right:-80px;
    pointer-events:none;
}

.card-header,
.alert-error,
.login-form,
.card-footer{
    position:relative;
    z-index:2;
}

.brand-small{
    width:54px;
    height:54px;
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg, var(--accent-soft), var(--white));
    color:var(--primary);
    font-weight:800;
    font-size:1rem;
    box-shadow:0 14px 28px rgba(56,189,248,0.14);
    margin-bottom:18px;
    border:1px solid rgba(56,189,248,0.18);
    overflow:hidden;
    transition:transform .3s ease, box-shadow .3s ease;
}

.brand-small:hover{
    transform:translateY(-2px);
    box-shadow:0 18px 30px rgba(56,189,248,0.18);
}

.brand-small img{
    width:28px;
    height:28px;
    object-fit:contain;
    opacity:0.95;
}

.card-header{
    margin-bottom:24px;
}

.card-header h2{
    font-size:2rem;
    color:var(--primary);
    font-weight:800;
    letter-spacing:-0.5px;
    margin-bottom:8px;
}

.card-header p{
    color:var(--muted);
    font-size:0.95rem;
    line-height:1.7;
}

/* =========================================
   ALERTAS
   ========================================= */

.alert-error{
    display:flex;
    align-items:flex-start;
    gap:10px;
    background:var(--danger-bg);
    color:var(--danger);
    border:1px solid #fecaca;
    border-radius:16px;
    padding:14px 16px;
    margin-bottom:18px;
    font-size:0.93rem;
    font-weight:600;
}

/* =========================================
   FORMULARIO
   ========================================= */

.login-form{
    display:grid;
    gap:18px;
}

.form-group label{
    display:block;
    margin-bottom:8px;
    color:var(--primary);
    font-size:0.9rem;
    font-weight:700;
}

.input-wrap{
    position:relative;
}

.input-wrap > i:first-child{
    position:absolute;
    left:15px;
    top:50%;
    transform:translateY(-50%);
    color:#94a3b8;
    font-size:0.95rem;
    transition:color .25s ease;
}

.input-wrap input{
    width:100%;
    height:56px;
    border:1.6px solid var(--line);
    background:rgba(255,255,255,0.96);
    color:var(--text);
    border-radius:18px;
    outline:none;
    padding:0 16px 0 46px;
    font-size:0.96rem;
    transition:.25s ease;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.55);
}

.input-wrap input:focus{
    border-color:var(--accent);
    background:#fff;
    box-shadow:0 0 0 4px rgba(56,189,248,0.14);
}

.password-wrap input{
    padding-right:54px;
}

.toggle-password{
    position:absolute;
    right:8px;
    top:50%;
    transform:translateY(-50%);
    width:40px;
    height:40px;
    border:none;
    background:transparent;
    color:#64748b;
    border-radius:12px;
    cursor:pointer;
    transition:.2s ease;
}

.toggle-password:hover{
    background:#f1f5f9;
    color:var(--primary);
}

/* =========================================
   BOTONES
   ========================================= */

.btn-login{
    width:100%;
    height:56px;
    border:none;
    border-radius:18px;
    background:linear-gradient(135deg, #55c8f8, #38bdf8);
    color:var(--primary-strong);
    font-weight:800;
    font-size:0.98rem;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    cursor:pointer;
    transition:.28s ease;
    margin-top:4px;
    box-shadow:var(--shadow-button);
}

.btn-login:hover{
    transform:translateY(-2px);
    box-shadow:0 24px 40px rgba(56,189,248,0.32);
}

.card-footer{
    margin-top:22px;
    padding-top:18px;
    border-top:1px solid rgba(226,232,240,0.82);
    display:flex;
    justify-content:center;
}

.home-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-height:46px;
    padding:0 18px;
    border-radius:14px;
    background:rgba(248,250,252,0.94);
    border:1px solid var(--line);
    color:var(--primary);
    font-weight:700;
    font-size:0.92rem;
    transition:.25s ease;
}

.home-link:hover{
    border-color:var(--accent);
    background:#f0f9ff;
    transform:translateY(-1px);
}

/* =========================================
   ANIMACIONES
   ========================================= */

@keyframes fadeSlideUp{
    from{
        opacity:0;
        transform:translateY(18px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes floatLogo{
    0%{
        transform:translateY(0px);
    }
    50%{
        transform:translateY(-10px);
    }
    100%{
        transform:translateY(0px);
    }
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1180px){
    .login-layout{
        grid-template-columns:1fr;
    }

    .login-showcase{
        min-height:380px;
        padding:32px 24px 94px;
    }

    .login-showcase::before{
        inset:22px;
        border-radius:28px;
    }

    .login-showcase::after{
        width:500px;
        height:500px;
        right:-70px;
        top:30px;
        opacity:0.11;
    }

    .showcase-inner{
        padding-top:16px;
    }

    .showcase-badge{
        margin-bottom:32px;
    }

    .showcase-copy h1{
        font-size:2.3rem;
    }

    .login-form-side{
        padding:0 18px 34px;
        margin-top:-58px;
        position:relative;
        z-index:4;
    }
}

@media (max-width: 640px){
    .login-showcase{
        min-height:320px;
        padding:24px 16px 84px;
    }

    .login-showcase::before{
        inset:14px;
        border-radius:22px;
    }

    .login-showcase::after{
        width:300px;
        height:300px;
        right:-20px;
        top:70px;
        opacity:0.09;
    }

    .showcase-inner{
        padding-top:6px;
    }

    .showcase-badge{
        min-height:40px;
        padding:0 14px;
        font-size:0.84rem;
        margin-bottom:24px;
    }

    .showcase-copy h1{
        font-size:1.8rem;
        line-height:1.08;
        margin-bottom:16px;
        max-width:320px;
    }

    .showcase-copy p{
        font-size:0.93rem;
        line-height:1.72;
        max-width:320px;
    }

    .showcase-copy::after{
        width:84px;
        bottom:-20px;
    }

    .login-form-side{
        padding:0 12px 22px;
        margin-top:-46px;
    }

    .login-card{
        padding:24px 18px 18px;
        border-radius:22px;
    }

    .brand-small{
        width:48px;
        height:48px;
        border-radius:16px;
        margin-bottom:14px;
    }

    .card-header h2{
        font-size:1.6rem;
    }

    .input-wrap input,
    .btn-login{
        height:52px;
    }

    .home-link{
        width:100%;
    }
}