/* ============================================================
   WHATISBIOPLUS — Professional Pastel Auth UI
   UI-only redesign: keep POST names / OTP IDs / auth logic intact
   ============================================================ */
:root {
    --auth-purple: #7651b5;
    --auth-purple-dark: #4d3278;
    --auth-lilac: #eee5ff;
    --auth-pink: #ef8fbb;
    --auth-pink-soft: #fff0f7;
    --auth-white: #ffffff;
    --auth-text: #2f2638;
    --auth-muted: #776f80;
    --auth-line: #eadff2;
    --auth-bg: #fffafe;
    --auth-success: #398b71;
}

.login-wrapper {
    min-height: calc(100vh - 72px);
    padding: clamp(24px, 4vw, 56px) 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 12%, rgba(223, 204, 255, .72), transparent 30%),
        radial-gradient(circle at 92% 18%, rgba(255, 213, 233, .74), transparent 31%),
        radial-gradient(circle at 82% 88%, rgba(239, 229, 255, .86), transparent 34%),
        linear-gradient(145deg, #fff 0%, #fff8fc 46%, #f7f0ff 100%);
}

.bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shape { position: absolute; border-radius: 999px; filter: blur(2px); opacity: .8; }
.shape-1 { width: 220px; height: 220px; background: rgba(166,126,220,.10); top: 7%; left: 4%; }
.shape-2 { width: 300px; height: 300px; background: rgba(239,143,187,.09); right: 3%; bottom: 3%; }

.auth-wrapper {
    width: min(100%, 1080px);
    position: relative;
    z-index: 2;
    transition: width .25s ease;
}
.auth-wrapper.is-register { width: min(100%, 1180px); }

.auth-card {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(300px, 36%) minmax(0, 1fr);
    overflow: hidden;
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(118,81,181,.13);
    border-radius: 30px;
    box-shadow: 0 24px 70px rgba(77,50,120,.14);
}

.auth-aside {
    padding: 42px 36px;
    min-height: 590px;
    color: var(--auth-purple-dark);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 20% 14%, rgba(255,255,255,.92), transparent 22%),
        linear-gradient(155deg, #efe6ff 0%, #f8e9f3 56%, #fff 115%);
    border-right: 1px solid rgba(118,81,181,.10);
}
.auth-aside::after {
    content: '';
    position: absolute;
    width: 180px; height: 180px;
    right: -70px; bottom: 55px;
    border-radius: 50%;
    background: rgba(239,143,187,.13);
}
.auth-brand { position: relative; z-index: 1; }
.auth-brand-logo {
    width: 76px; height: 76px;
    object-fit: cover;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(118,81,181,.12);
    box-shadow: 0 12px 28px rgba(77,50,120,.12);
    margin-bottom: 24px;
}
.auth-brand-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px; border-radius: 999px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(118,81,181,.13);
    color: var(--auth-purple);
    font-size: .78rem; font-weight: 700;
    margin-bottom: 14px;
}
.auth-brand h2 { font-size: clamp(1.65rem, 2.8vw, 2.25rem); font-weight: 800; line-height: 1.28; margin: 0 0 12px; }
.auth-brand p { color: #6e5d7e; line-height: 1.75; margin: 0; font-size: .96rem; }
.auth-benefits { display: grid; gap: 12px; margin-top: 32px; position: relative; z-index: 1; }
.auth-benefit {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,.66);
    border: 1px solid rgba(118,81,181,.10);
    border-radius: 16px; padding: 12px 14px;
    font-size: .9rem; font-weight: 600; color: #59456e;
}
.auth-benefit i {
    width: 34px; height: 34px; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--auth-purple), var(--auth-pink));
}
.auth-aside-foot { position: relative; z-index: 1; color: #8c799b; font-size: .78rem; }

.auth-content {
    padding: clamp(30px, 4vw, 52px);
    min-width: 0;
    background: #fff;
}
.auth-section { display: none; animation: authFade .22s ease; }
.auth-section.active { display: block; }
@keyframes authFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.auth-login-inner { width: min(100%, 470px); margin: 0 auto; padding-top: 8px; }
.auth-heading { margin-bottom: 28px; }
.auth-heading-kicker { color: var(--auth-pink); font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.auth-heading h1, .auth-heading h3 { color: var(--auth-text); font-size: clamp(1.55rem, 2.4vw, 2rem); font-weight: 800; margin: 0 0 7px; }
.auth-heading p { color: var(--auth-muted); margin: 0; line-height: 1.6; font-size: .94rem; }

.form-label { color: #51445e; font-size: .86rem; font-weight: 700; margin-bottom: 7px; }
.form-control {
    min-height: 50px;
    border: 1.5px solid var(--auth-line);
    border-radius: 14px;
    padding: 12px 15px;
    color: var(--auth-text);
    background: #fff;
    box-shadow: 0 2px 0 rgba(77,50,120,.015);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-control:hover { border-color: #d8c8e8; }
.form-control:focus {
    border-color: #9d7ac9;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(118,81,181,.10);
}
.form-control::placeholder { color: #aaa1b1; }

.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 48px; }
.password-toggle {
    position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; border-radius: 10px;
    color: #84758e; background: transparent; display: grid; place-items: center;
}
.password-toggle:hover { color: var(--auth-purple); background: var(--auth-lilac); }

.form-check-input:checked { background-color: var(--auth-purple); border-color: var(--auth-purple); }
.auth-link { color: var(--auth-purple); text-decoration: none; font-weight: 700; }
.auth-link:hover { color: var(--auth-purple-dark); text-decoration: underline; }

.btn-main {
    min-height: 52px;
    border: 0; border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #7651b5 0%, #9569c7 54%, #d67fab 135%);
    box-shadow: 0 10px 24px rgba(118,81,181,.22);
    font-size: 1rem; font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease;
}
.btn-main:hover:not(:disabled) { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(118,81,181,.27); }
.btn-main:disabled { color: #9f97a5; background: #ebe8ed; box-shadow: none; }

.btn-create-account {
    min-height: 50px; border-radius: 14px;
    color: #9b4f79;
    background: var(--auth-pink-soft);
    border: 1.5px solid #f3c5da;
    font-weight: 800;
    transition: .18s ease;
}
.btn-create-account:hover { color: #79405e; background: #ffe6f1; border-color: #eca9c8; transform: translateY(-1px); }

.divider { display: flex; align-items: center; gap: 12px; color: #aaa1b1; margin: 22px 0; font-size: .8rem; }
.divider::before, .divider::after { content: ''; height: 1px; background: #eee8f2; flex: 1; }

.register-topbar {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
    padding-bottom: 20px; margin-bottom: 24px;
    border-bottom: 1px solid #f0eaf3;
}
.register-back {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px;
    border: 1px solid #eadff2; background: #fff; color: #6f6179;
    display: grid; place-items: center;
}
.register-back:hover { background: var(--auth-lilac); color: var(--auth-purple); }

.profile-row {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 18px; margin-bottom: 24px;
    border-radius: 18px; background: linear-gradient(135deg, #faf6ff, #fff5fa);
    border: 1px solid #eee3f5;
}
.profile-upload-wrapper { margin: 0; flex: 0 0 auto; }
.profile-upload-box {
    width: 88px; height: 88px; border-radius: 24px;
    background: #fff; border: 1.5px dashed #b79bd8;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative; overflow: hidden; transition: .18s ease;
}
.profile-upload-box:hover { border-style: solid; background: #fcf9ff; transform: translateY(-1px); }
.profile-upload-box img { width: 100%; height: 100%; object-fit: cover; display: none; }
.profile-upload-icon { color: var(--auth-purple); font-size: 1.45rem; }
.profile-row-text h6 { color: #4c3d59; font-weight: 800; margin-bottom: 4px; }
.profile-row-text p { color: #8b8092; font-size: .82rem; margin: 0; line-height: 1.5; }

.form-section-title {
    display: flex; align-items: center; gap: 9px;
    margin: 10px 0 2px;
    padding: 10px 12px;
    color: #5b466f;
    background: linear-gradient(90deg, #f7f1ff, #fff7fb);
    border: 1px solid #eee1f4;
    border-radius: 13px;
    font-size: .9rem; font-weight: 800;
}
.form-section-title i { color: var(--auth-purple); }

.btn-outline-custom {
    min-height: 50px; padding-inline: 18px; white-space: nowrap;
    border: 1.5px solid #bda2da; color: var(--auth-purple);
    background: #faf7ff; border-radius: 14px; font-weight: 800;
}
.btn-outline-custom:hover { color: #fff; background: var(--auth-purple); border-color: var(--auth-purple); }
.otp-group { display: flex; gap: 9px; }
.otp-group .form-control { flex: 1 1 auto; min-width: 0; }

.otp-panel {
    padding: 18px;
    border: 1px solid #eadff2;
    border-radius: 18px;
    background: #fdfaff;
    margin-bottom: 8px;
}
.otp-box-container { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.otp-input {
    width: 44px; height: 52px; text-align: center;
    border-radius: 12px; border: 1.5px solid #dfd1eb;
    background: #fff; color: var(--auth-purple-dark);
    font-size: 1.25rem; font-weight: 800; outline: none;
}
.otp-input:focus { border-color: #9d7ac9; box-shadow: 0 0 0 4px rgba(118,81,181,.10); }
.resend-btn { color: var(--auth-purple); text-decoration: none; cursor: pointer; font-size: .82rem; font-weight: 700; }
.resend-btn.disabled { color: #b0a8b5; pointer-events: none; }
.btn-verify-otp { border: 0; border-radius: 12px; background: #6f9f90; color: #fff; font-weight: 800; padding: 9px 16px; }

.terms-box {
    margin: 24px 0 16px; padding: 15px 16px;
    border-radius: 16px; background: #fff7fb;
    border: 1px solid #f3d9e6;
}
.terms-box .form-check-label { color: #655b69; font-size: .82rem; line-height: 1.65; }
#otp_success_msg { border: 1px solid #cfe8df; background: #effaf6; color: #34755f; border-radius: 13px; }

@media (max-width: 991.98px) {
    .auth-card { grid-template-columns: 280px minmax(0, 1fr); }
    .auth-aside { padding: 34px 26px; }
    .auth-content { padding: 34px 28px; }
}

@media (max-width: 767.98px) {
    .login-wrapper { align-items: flex-start; padding: 16px 10px 34px; min-height: calc(100vh - 64px); overflow: visible; }
    .bg-shapes { display: none; }
    .auth-wrapper, .auth-wrapper.is-register { width: 100%; }
    .auth-card { display: block; border-radius: 22px; box-shadow: 0 12px 40px rgba(77,50,120,.10); }
    .auth-aside {
        min-height: 0; padding: 20px 20px 18px;
        border-right: 0; border-bottom: 1px solid rgba(118,81,181,.10);
    }
    .auth-brand { display: grid; grid-template-columns: 54px 1fr; column-gap: 13px; align-items: center; }
    .auth-brand-logo { width: 54px; height: 54px; border-radius: 16px; margin: 0; grid-row: 1 / span 3; }
    .auth-brand-badge { display: none; }
    .auth-brand h2 { font-size: 1.08rem; margin: 0 0 2px; }
    .auth-brand p { font-size: .78rem; line-height: 1.45; }
    .auth-benefits, .auth-aside-foot { display: none; }
    .auth-content { padding: 24px 18px 26px; }
    .auth-login-inner { padding-top: 0; }
    .auth-heading { margin-bottom: 22px; }
    .auth-heading h1, .auth-heading h3 { font-size: 1.45rem; }
    .form-control { min-height: 50px; font-size: 16px; } /* กัน iOS zoom */
    .register-topbar { margin-bottom: 18px; }
    .profile-row { padding: 14px; gap: 13px; }
    .profile-upload-box { width: 72px; height: 72px; border-radius: 20px; }
    .otp-group { flex-direction: column; }
    .btn-outline-custom { width: 100%; }
    .otp-panel { padding: 14px 10px; }
    .otp-box-container { gap: 5px; }
    .otp-input { width: clamp(38px, 12.5vw, 46px); height: 50px; font-size: 1.12rem; }
    .otp-actions { flex-direction: column; gap: 12px; align-items: stretch !important; }
    .btn-verify-otp { width: 100%; }
}

@media (max-width: 370px) {
    .auth-content { padding-inline: 14px; }
    .profile-row { align-items: flex-start; }
    .otp-input { width: 37px; }
}
