/* ==========================================================================
   STYLESLOGIN.CSS — Halaman Masuk / Login Penuh (2 Langkah)
   ========================================================================== */

body.login-open {
    overflow: hidden;
}

#login-page {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    background-color: #2c3e50;
    background-image: var(--login-bg), linear-gradient(135deg, #3498db, #2c3e50);
    background-size: cover;
    background-position: center top;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s;
}

#login-page.show {
    opacity: 1;
    visibility: visible;
}

#login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 30, 45, 0) 0%, rgba(20, 30, 45, 0) 65%, rgba(20, 30, 45, .3) 100%);
    pointer-events: none;
}

/* Sheet Box */
.lp-sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
    border-radius: 28px 28px 0 0;
    padding: 22px 22px calc(26px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
    transform: translateY(40px);
    transition: transform .5s cubic-bezier(.22, .61, .36, 1) .05s;
}

#login-page.show .lp-sheet {
    transform: none;
}

/* Indikator Langkah */
.lp-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.lp-step-bar {
    width: 36px;
    height: 5px;
    border-radius: 3px;
    background: #e3e8ee;
    transition: background .3s;
}

.lp-step-bar.active {
    background: linear-gradient(90deg, #3498db, #2c3e50);
}

.lp-step-label {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: #95a5a6;
}

.lp-step-pane {
    animation: lpPane .35s ease both;
}

@keyframes lpPane {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: none; }
}

.lp-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #2c3e50;
}

.lp-sub {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #7f8c8d;
}

.lp-note {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    color: #95a5a6;
}

.lp-note i {
    margin-right: 4px;
}

/* Langkah 1: Tombol Google */
.lp-google-wrap {
    position: relative;
    min-height: 48px;
    display: flex;
    justify-content: center;
}

.lp-google-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-google-btn {
    display: flex;
    justify-content: center;
    min-height: 48px;
    width: 100%;
    opacity: 0;
    transition: opacity .25s ease;
}

/* Langkah 2: Formulir Nama & WhatsApp */
.lp-field {
    position: relative;
    margin-bottom: 12px;
}

.lp-field > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    text-align: center;
    font-size: 15px;
    color: #9aa5b1;
    pointer-events: none;
}

.lp-input {
    width: 100%;
    height: 54px;
    padding: 0 16px 0 46px;
    border: 1.5px solid #e3e8ee;
    border-radius: 14px;
    background: #f7f9fb;
    color: #2c3e50;
    font-size: 16px;
    font-family: inherit;
    text-transform: none;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.lp-input:focus {
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, .15);
}

.lp-input.wa {
    padding-left: 84px;
}

.lp-prefix {
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    pointer-events: none;
}

.lp-hint {
    margin: 4px 4px 16px;
    font-size: 12px;
    line-height: 1.4;
    color: #95a5a6;
}

.lp-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(52, 152, 219, .35);
    transition: transform .15s, opacity .15s;
}

.lp-btn:active {
    transform: scale(.98);
}

.lp-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.lp-btn-spin {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lpSpin .8s linear infinite;
}

.lp-btn.loading .lp-btn-spin {
    display: inline-block;
}

.lp-link {
    display: block;
    width: 100%;
    margin-top: 14px;
    background: none;
    border: none;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: #3498db;
    cursor: pointer;
}

.lp-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fdecea;
    color: #c0392b;
    font-size: 13px;
    line-height: 1.4;
}

.lp-error i {
    margin-top: 2px;
}

.lp-error:empty {
    display: none;
}

/* Loading Overlay */
.lp-busy {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, .92);
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.lp-busy.show {
    display: flex;
}

.lp-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #e3e8ee;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: lpSpin .8s linear infinite;
}

@keyframes lpSpin {
    to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
    #login-page {
        justify-content: center;
        align-items: center;
    }
    .lp-sheet {
        width: min(440px, 100%);
        border-radius: 28px;
        padding-bottom: 28px;
    }
}