/* ============================================================
   BASE RESET
============================================================ */
html {
    height: 100% !important;
    background: #f1f5f9 !important;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
body.login-page {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    background: #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Source Sans 3', system-ui, sans-serif !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 1rem !important;
}

/* ============================================================
   BACKGROUND
============================================================ */
.lp-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 65% 55% at 10% 5%,  rgba(99,102,241,.10) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at 90% 92%,  rgba(6,182,212,.09)  0%, transparent 60%),
        radial-gradient(ellipse 80% 70% at 50% 50%,  rgba(255,255,255,.6)  0%, transparent 80%),
        #f1f5f9;
}

.lp-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(99,102,241,.12) 1px, transparent 1px);
    background-size: 36px 36px;
}

.lp-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    animation: blobFloat 14s ease-in-out infinite alternate;
}
.lp-blob-a {
    width: 500px; height: 500px;
    background: rgba(99,102,241,.13);
    top: -160px; left: -130px;
}
.lp-blob-b {
    width: 420px; height: 420px;
    background: rgba(6,182,212,.10);
    bottom: -120px; right: -100px;
    animation-delay: -7s;
}
.lp-blob-c {
    width: 260px; height: 260px;
    background: rgba(244,114,182,.09);
    top: 58%; left: 8%;
    animation-delay: -3s;
}
@keyframes blobFloat {
    0%   { transform: translate(0,0)       scale(1);    }
    100% { transform: translate(35px,25px) scale(1.10); }
}

/* ============================================================
   CARD
============================================================ */
.lp-card {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(900px, 100%);
    max-width: 100%;
    min-height: min(560px, calc(100dvh - 2rem));
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(99,102,241,.10),
        0 32px 72px rgba(99,102,241,.12),
        0 8px 24px  rgba(0,0,0,.07);
    animation: cardIn .65s cubic-bezier(.16,1,.3,1) both;
}
@keyframes cardIn {
    from { opacity:0; transform: scale(.96) translateY(24px); }
    to   { opacity:1; transform: scale(1)   translateY(0);    }
}

/* ── LEFT PANEL ── */
.lp-left {
    flex: 1;
    padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 5vw, 2.75rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(145deg, #6366f1 0%, #8b5cf6 52%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
}
.lp-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg width='52' height='52' viewBox='0 0 52 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.05'%3E%3Cpath d='M28 28v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM8 8V4H6v4H2v2h4v4h2V10h4V8H8z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.lp-left::after {
    content: '';
    position: absolute;
    top: -70px; right: -70px;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    pointer-events: none;
}

.lp-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
    position: relative;
    z-index: 1;
}
.lp-brand-box {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,.22);
    border: 1px solid rgba(255,255,255,.32);
    display: flex; align-items: center; justify-content: center;
}
.lp-brand-box i { font-size: 1.25rem; color: #fff; }
.lp-brand span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.2px;
}

.lp-hero {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}
.lp-eyebrow {
    font-size: .7rem;
    font-weight: 700;
    color: rgba(255,255,255,.65);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: .85rem;
}
.lp-hero h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.22;
    margin: 0 0 1rem;
    letter-spacing: -.5px;
}
.lp-hero p {
    font-size: .875rem;
    color: rgba(255,255,255,.65);
    line-height: 1.7;
    margin: 0;
    max-width: 270px;
}

.lp-stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.lp-stat-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.lp-stat-label {
    font-size: .68rem;
    color: rgba(255,255,255,.52);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-top: .18rem;
}
.lp-stat-sep {
    width: 1px; height: 30px;
    background: rgba(255,255,255,.2);
}

/* ── RIGHT PANEL ── */
.lp-right {
    width: min(400px, 44.5%);
    flex-shrink: 0;
    background: #ffffff;
    border-left: 1px solid rgba(99,102,241,.08);
    padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 5vw, 2.75rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* form header */
.lp-form-head { margin-bottom: 2rem; }
.lp-greeting {
    font-size: .7rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    margin-bottom: .45rem;
}
.lp-form-head h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 .35rem;
    letter-spacing: -.4px;
    line-height: 1.2;
}
.lp-form-head p {
    font-size: .84rem;
    color: #94a3b8;
    margin: 0;
}

/* error alert */
.lp-alert {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 3px solid #ef4444;
    border-radius: 10px;
    padding: .72rem .9rem;
    margin-bottom: 1.3rem;
    font-size: .83rem;
    color: #dc2626;
    position: relative;
}
.lp-alert i { flex-shrink:0; margin-top:1px; }
.lp-alert .btn-close {
    position: absolute;
    top: .5rem; right: .5rem;
    width: .7rem; height: .7rem;
}

/* field */
.lp-field { margin-bottom: 1.1rem; }
.lp-field-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .44rem;
}

/* input pill */
.lp-pill {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 11px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.lp-pill:focus-within {
    border-color: #6366f1;
    background: #fafbff;
    box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.lp-pill-icon {
    padding: 0 .88rem;
    color: #cbd5e1;
    font-size: .95rem;
    flex-shrink: 0;
    transition: color .2s;
}
.lp-pill:focus-within .lp-pill-icon { color: #6366f1; }
.lp-pill input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #0f172a;
    font-size: .9rem;
    padding: .8rem 0;
}
.lp-pill input::placeholder { color: #cbd5e1; }
.lp-pill-btn {
    background: transparent;
    border: none;
    padding: 0 .88rem;
    color: #cbd5e1;
    font-size: .95rem;
    cursor: pointer;
    transition: color .2s;
    display: flex;
    align-items: center;
    align-self: stretch;
    flex-shrink: 0;
}
.lp-pill-btn:hover { color: #6366f1; }

.lp-field-err {
    font-size: .76rem;
    color: #dc2626;
    margin-top: .32rem;
    display: flex;
    align-items: center;
    gap: .28rem;
    padding-left: .2rem;
}

/* remember */
.lp-remember {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .4rem 0 1.5rem;
    cursor: pointer;
    width: fit-content;
}
.lp-remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px; height: 16px;
    border-radius: 5px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background .15s, border-color .15s;
}
.lp-remember input[type="checkbox"]:checked {
    background: #6366f1;
    border-color: #6366f1;
}
.lp-remember input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat;
}
.lp-remember input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99,102,241,.22);
}
.lp-remember label {
    font-size: .84rem;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

/* submit button */
.lp-btn {
    width: 100%;
    padding: .85rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 11px;
    color: #fff;
    font-size: .93rem;
    font-weight: 700;
    letter-spacing: .2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(99,102,241,.35);
    transition: transform .15s, box-shadow .2s;
}
.lp-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .2s;
}
.lp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99,102,241,.45);
}
.lp-btn:hover::before { opacity: 1; }
.lp-btn:active        { transform: translateY(0); }
.lp-btn-arrow {
    font-size: 1.1rem;
    transition: transform .2s;
}
.lp-btn:hover .lp-btn-arrow { transform: translateX(4px); }

/* footer note */
.lp-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    margin-top: 1.4rem;
    font-size: .74rem;
    color: #cbd5e1;
}
.lp-note i { color: #a5b4fc; font-size: .82rem; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 720px) {
    body.login-page {
        align-items: flex-start !important;
        padding: .75rem !important;
    }

    .lp-card {
        flex-direction: column;
        width: min(420px, 100%);
        min-height: unset;
        border-radius: 22px;
        margin: auto;
    }
    .lp-left {
        padding: 2rem 2rem 1.75rem;
    }
    .lp-hero h2 { font-size: 1.55rem; }
    .lp-stats   { display: none; }
    .lp-right {
        width: 100%;
        border-left: none;
        border-top: 1px solid #f1f5f9;
        padding: 2rem;
    }
}

@media (max-width: 420px) {
    body.login-page {
        padding: .5rem !important;
    }

    .lp-card {
        border-radius: 18px;
    }

    .lp-left {
        padding: 1.5rem 1.25rem 1.35rem;
    }

    .lp-right {
        padding: 1.5rem 1.25rem;
    }

    .lp-form-head {
        margin-bottom: 1.5rem;
    }

    .lp-form-head h1 {
        font-size: 1.45rem;
    }

    .lp-pill input {
        font-size: .85rem;
    }

    .lp-remember {
        width: 100%;
        align-items: flex-start;
    }

    .lp-remember label {
        font-size: .8rem;
        line-height: 1.35;
    }

    .lp-note {
        text-align: center;
        line-height: 1.4;
    }
}

@media (max-height: 620px) and (orientation: landscape) {
    body.login-page {
        align-items: flex-start !important;
    }

    .lp-card {
        margin: .5rem auto;
    }

    .lp-left {
        padding-top: 1.5rem;
        padding-bottom: 1.25rem;
    }

    .lp-hero {
        padding: 1rem 0;
    }

    .lp-right {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}
