*, *::before, *::after { box-sizing: border-box; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000;
    background-image:
        radial-gradient(ellipse at 70% 5%,  rgba(0,102,255,.3)  0%, transparent 45%),
        radial-gradient(ellipse at 10% 95%, rgba(0,60,200,.22)  0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(0,20,80,.8)    0%, transparent 80%);
    overflow: hidden;
    position: relative;
    font-family: inherit;
}

/* decorative blobs */
body::before {
    content: '';
    position: fixed;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(0,102,255,.2) 0%, transparent 65%);
    top: -150px; right: -150px;
    border-radius: 50%; pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0,60,200,.18) 0%, transparent 65%);
    bottom: -110px; left: -110px;
    border-radius: 50%; pointer-events: none;
}


/* loading overlay */
.loading {
    position: fixed; inset: 0; z-index: 9999;
    background: #000;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.animasi {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* card */
.box {
    background: #fff;
    width: calc(100% - 32px);
    max-width: 348px;
    border-radius: 22px;
    box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
    overflow: hidden;
    position: relative; z-index: 1;
    padding: 28px 28px 22px;
    animation: lgIn .45s cubic-bezier(.22,1,.36,1) both;
}
@keyframes lgIn {
    from { transform: translateY(28px) scale(.97); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* logo area */
.lg-logo {
    text-align: center;
    margin-bottom: 16px;
}
.lg-icon-wrap {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #4338ca, #7c3aed);
    border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    box-shadow: 0 6px 18px rgba(99,102,241,.45);
    margin-bottom: 10px;
}
.lg-app-name {
    font-size: 18px; font-weight: 800; color: #1e293b; letter-spacing: -.3px; line-height: 1.2;
}
.lg-sub {
    font-size: 12px; color: #94a3b8; margin-top: 2px;
}

/* divider */
.lg-divider {
    height: 1px; background: #f1f5f9; margin: 0 0 16px;
}

/* inputs */
.lg-field { margin-bottom: 12px; }
.lg-label {
    display: block; font-size: 13px; font-weight: 600;
    color: #475569; margin-bottom: 7px;
}
.lg-input-wrap { position: relative; }
.lg-input {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px; color: #1e293b;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-input:focus {
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.lg-input.is-invalid {
    border-color: #ef4444;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}
.lg-input-pass { padding-right: 44px; }
.lg-showhide {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: #94a3b8; font-size: 14px; padding: 4px;
    transition: color .15s; line-height: 1;
}
.lg-showhide:hover { color: #6366f1; }
.lg-error {
    font-size: 12px; color: #ef4444; margin-top: 5px;
    display: block; min-height: 16px;
}

/* button */
.lg-btn {
    width: 100%; margin-top: 6px;
    background: linear-gradient(135deg, #4338ca, #7c3aed);
    color: #fff; border: none;
    border-radius: 12px; padding: 13px;
    font-size: 15px; font-weight: 700; letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(99,102,241,.4);
    transition: opacity .15s, transform .1s, box-shadow .15s;
}
.lg-btn:hover { opacity: .92; box-shadow: 0 8px 24px rgba(99,102,241,.5); }
.lg-btn:active { transform: scale(.98); opacity: .8; }
.lg-btn:disabled { opacity: .6; cursor: not-allowed; }

/* support */
.lg-support {
    text-align: center; margin-top: 14px;
    font-size: 13px; color: #94a3b8;
}
.lg-support a {
    color: #6366f1; text-decoration: none; font-weight: 600;
}
.lg-support a:hover { text-decoration: underline; }

/* spinner inside button */
.lg-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
    margin-top: -2px;
}

/* version badge */
.lg-version {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.4);
    letter-spacing: 1px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .box {
        width: 100%; max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        padding: 48px 24px 32px;
        animation: none;
    }
}
