/* Easy AIOU login — complete mobile + desktop */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

.auth-body {
    margin: 0;
    min-height: 100dvh;
    min-height: 100svh;
    font-family: Outfit, "Segoe UI", sans-serif;
    color: #12202e;
    background: #eef3f8;
    -webkit-font-smoothing: antialiased;
}

.auth-body *,
.auth-body *::before,
.auth-body *::after { box-sizing: border-box; }

.auth-shell {
    min-height: 100dvh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.auth-brand {
    background: #102033;
    color: #f4f7fb;
    padding: 14px 18px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
}

.auth-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.auth-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(160deg, #3d7cff, #1a4fd8);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.auth-logo strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.auth-logo span {
    display: block;
    font-size: 11px;
    color: #9cb0c9;
    font-weight: 500;
}

.auth-back {
    color: #c5d4e8;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
}

.auth-tagline,
.auth-brand p.sub,
.auth-steps-desk {
    display: none;
}

.auth-steps-mob {
    display: flex;
    gap: 6px;
    margin-top: 14px;
}

.auth-steps-mob i {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
}

.auth-steps-mob i.on { background: #7cb0ff; }

.auth-step-label {
    margin-top: 10px;
    font-size: 12px;
    color: #9cb0c9;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.auth-card {
    background: #fff;
    border-radius: 22px;
    padding: 28px 22px 22px;
    box-shadow: 0 18px 50px rgba(16, 32, 51, 0.08);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
}

.auth-card h1 {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 16px;
    font-weight: 700;
}

.instruct {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.5;
    color: #166534;
}
.instruct b { color: #102033; }

.sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.step {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.step.active { display: flex; }

.login-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.form-group {
    position: relative;
    margin-bottom: 14px;
}

.form-group label:not(.sr) {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4a5a6b;
    margin-bottom: 7px;
}

.input-wrapper { position: relative; }

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a8b9c;
    font-size: 15px;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 54px;
    border: 1.5px solid #d7e0ea;
    border-radius: 14px;
    padding: 0 14px 0 42px;
    font-size: 16px;
    font-family: inherit;
    background: #f7fafc;
    color: #12202e;
    -webkit-appearance: none;
    appearance: none;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #2f6fed;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.14);
}

.idcard {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #f4f8fc;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.idcard .av {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #102033;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.idcard strong { display: block; font-size: 16px; }
.idcard span {
    font-size: 12px;
    color: #6b7c8d;
    font-family: ui-monospace, monospace;
}

.how {
    display: grid;
    grid-template-columns: 1fr 18px 1fr 18px 1fr;
    align-items: stretch;
    gap: 0;
    margin: 0 0 14px;
    text-align: center;
}

.how .box {
    background: #f4f8fc;
    border-radius: 16px;
    padding: 12px 6px 10px;
    min-height: 68px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.how .box .ic {
    display: block;
    font-size: 13px;
    color: #1a4fd8;
    font-weight: 800;
    margin-bottom: 2px;
}

.how .box b {
    display: block;
    font-size: 13px;
    font-weight: 700;
    word-break: break-word;
}

.how .arr {
    color: #9cb0c9;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.biz {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ecfdf5;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.biz > i {
    color: #128c7e;
    font-size: 26px;
    flex-shrink: 0;
}

.biz > div { min-width: 0; }

.biz small {
    display: block;
    font-size: 11px;
    color: #5b6b7c;
    font-weight: 600;
}

.biz > div span {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #052e16;
}

.auth-cta {
    margin-top: auto;
    padding-top: 12px;
}

a.login-btn,
button.login-btn {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 14px;
    background: #1a4fd8;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1;
}

.login-btn:active { transform: scale(0.985); }
.login-btn:disabled { opacity: 0.65; cursor: wait; }

a.login-btn.wa,
.login-btn.wa {
    background: #128c7e;
    color: #fff;
}

.login-btn.ghost {
    background: #eef3f8;
    color: #1a4fd8;
    margin-top: 8px;
}

.tiny-link {
    display: block;
    width: 100%;
    margin-top: 12px;
    border: 0;
    background: none;
    color: #66788a;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    padding: 8px;
    text-decoration: none;
}

.error-message {
    display: none;
    background: #fdecec;
    color: #9b1c1c;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
    font-weight: 600;
}

.error-message.show { display: block; }

.fail-box,
.otp-dev {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.45;
}

.fail-box { background: #fdecec; color: #7f1d1d; }
.otp-dev { background: #fff6e5; color: #8a5800; }

.otp-row {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin: 8px 0 18px;
}

.otp-row input {
    flex: 1;
    min-width: 0;
    width: 0;
    height: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 1.5px solid #d7e0ea;
    border-radius: 12px;
    background: #f7fafc;
    font-family: inherit;
    color: #12202e;
    -webkit-appearance: none;
    appearance: none;
}

.otp-row input:focus {
    outline: none;
    border-color: #2f6fed;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.14);
}

.bio-card {
    background: #f4f8fc;
    border-radius: 16px;
    padding: 6px 16px;
    margin: 0 0 18px;
}

.bio-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2ebf3;
    font-size: 14px;
}

.bio-row:last-child { border-bottom: 0; }
.bio-label { color: #66788a; }
.bio-value { font-weight: 700; text-align: right; }

.fetch-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16, 32, 51, 0.55);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.fetch-overlay.on { display: flex; }

.fetch-panel {
    background: #fff;
    border-radius: 20px;
    padding: 28px 22px;
    width: min(360px, 100%);
    text-align: center;
}

.fetch-spin {
    width: 42px;
    height: 42px;
    border: 3px solid #d7e0ea;
    border-top-color: #1a4fd8;
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.fetch-panel h3 { margin: 0 0 6px; font-size: 18px; }
.fetch-panel p { margin: 0; color: #5b6b7c; font-size: 13px; }

.auth-foot {
    text-align: center;
    font-size: 11px;
    color: #8a9aab;
    margin-top: 14px;
}

@media (min-width: 880px) {
    .auth-main {
        padding: 40px;
        background:
            radial-gradient(900px 400px at 90% -10%, #dce8ff, transparent 60%),
            #eef3f8;
    }

    .auth-card {
        max-width: 420px;
        padding: 36px 32px 28px;
        border-radius: 24px;
    }

    .auth-card h1 { font-size: 30px; }

    a.login-btn:hover,
    button.login-btn:hover { background: #1644bc; color: #fff; }

    a.login-btn.wa:hover,
    .login-btn.wa:hover { background: #0f7a6e; color: #fff; }

    .login-btn.ghost:hover { background: #e2eaf3; color: #1a4fd8; }
}
