/* #Bagian Auth CSS# */
/* #Komponen Token Warna# */
:root {
    --primary-purple: #7C3AED;
    --primary-purple-hover: #6D28D9;
    --light-purple: #EDE9FE;
    --text-dark: #111827;
    --text-muted: #4B5563;
    --text-subtle: #6B7280;
    --border-color: #E5E7EB;
    --border-focus: #A78BFA;
    --input-bg: #F9FAFB;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 20px 50px -12px rgba(124, 58, 237, 0.18);
    --radius-card: 20px;
    --radius-input: 12px;
    --radius-pill: 999px;
}

.text-center {
    text-align: center;
}

/* #Bagian Auth Layout Body# */
body.auth-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, #A8E8FF 0%, #C4B5FD 42%, #E9D5FF 100%);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

body.auth-page::before,
body.auth-page::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

body.auth-page::before {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 0%, transparent 70%);
}

body.auth-page::after {
    width: 360px;
    height: 360px;
    bottom: -100px;
    left: -60px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
}

/* #Bagian Auth Wrapper Kartu# */
.auth-wrapper {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    padding: 24px 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.auth-container {
    background-color: #ffffff;
    width: 100%;
    padding: 36px 32px 32px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* #Bagian Auth Responsif Mobile# */
@media (max-width: 575.98px) {
    body.auth-page {
        align-items: center;
        padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
    }

    .auth-wrapper {
        min-height: auto;
        flex: none;
        width: 100%;
        max-width: 440px;
        justify-content: center;
        padding: 0;
    }

    .auth-container.login-card,
    .auth-container.register-card {
        border-radius: var(--radius-card);
        box-shadow: var(--card-shadow);
        max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .auth-container.login-card {
        padding: 28px 22px 26px;
    }

    .auth-container.register-card {
        padding: 24px 22px 28px;
        margin-top: 0;
    }
}

@media (min-width: 576px) {
    .auth-wrapper {
        padding: 48px 24px;
        justify-content: center;
    }

    .auth-container {
        border-radius: var(--radius-card);
        box-shadow: var(--card-shadow);
    }
}

/* #Bagian Auth Logo Brand# */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
    width: 100%;
}

.app-name {
    font-weight: 700;
    font-size: clamp(28px, 6vw, 36px);
    color: var(--primary-purple);
    letter-spacing: -0.03em;
}

/* #Komponen Logo Dalam Kartu# */
.logo-container--in-card {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #F3F4F6;
}

.logo-container--in-card svg {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 4px 14px rgba(124, 58, 237, 0.22));
}

.app-name--in-card {
    font-size: 1.625rem;
    letter-spacing: -0.03em;
    line-height: 1;
}

@media (max-width: 575.98px) {
    .logo-container--in-card svg {
        width: 56px;
        height: 56px;
    }

    .app-name--in-card {
        font-size: 1.5rem;
    }
}

@media (min-width: 576px) {
    .logo-container--in-card {
        margin-bottom: 24px;
        padding-bottom: 24px;
    }

    .logo-container--in-card svg {
        width: 72px;
        height: 72px;
    }

    .app-name--in-card {
        font-size: 1.75rem;
    }
}

.back-button {
    position: absolute;
    top: 24px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F3F4F6;
    color: var(--text-dark);
    transition: background 0.2s;
    text-decoration: none;
    margin-bottom: 0;
}
.back-button:hover {
    background: #E5E7EB;
}

/* #Bagian Auth Form Input# */
.auth-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 28px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-subtle);
    margin: 0 0 28px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-control-custom {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-input);
    padding: 12px 14px;
    font-size: 0.9375rem;
    color: var(--text-dark);
    outline: none;
    background-color: var(--input-bg);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-control-custom::placeholder {
    color: #9CA3AF;
}

.form-control-custom:hover {
    border-color: #D1D5DB;
    background-color: #fff;
}

.form-control-custom:focus {
    border-color: var(--border-focus);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field .form-control-custom {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    color: #9CA3AF;
    transition: color 0.2s, background-color 0.2s;
}

.password-toggle:hover {
    color: var(--text-muted);
    background-color: #F3F4F6;
}

.password-toggle-icon--show {
    display: none;
}

.password-visible .password-toggle-icon--hide {
    display: none;
}

.password-visible .password-toggle-icon--show {
    display: block;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 0.8125rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary-purple);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--primary-purple-hover);
    text-decoration: underline;
}

.role-selection-group {
    margin-top: 35px;
    margin-bottom: 35px;
}

.role-selection-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.role-cards {
    display: flex;
    gap: 15px;
}

.role-card-wrapper {
    flex: 1;
}

.role-card-input {
    display: none;
}

.role-card-label {
    display: block;
    text-align: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.role-card-input:checked + .role-card-label {
    border-color: var(--primary-purple);
    background-color: var(--light-purple);
    color: var(--primary-purple);
    font-weight: 600;
}

/* #Komponen Tombol Submit Sosial# */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 14px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    margin-top: 4px;
    min-height: 48px;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

a.btn-submit,
a.btn-submit:hover,
a.btn-submit:focus-visible {
    color: #ffffff;
    text-decoration: none;
    display: block;
    text-align: center;
    box-sizing: border-box;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 28px 0 22px;
    color: var(--text-subtle);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 14px;
    white-space: nowrap;
}

.social-login-group {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.social-login-form {
    flex: 1;
    margin: 0;
}

.btn-social {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    min-height: 48px;
    box-sizing: border-box;
}

.btn-social:hover {
    border-color: #D1D5DB;
    background-color: #F9FAFB;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 4px;
    font-size: 0.875rem;
    color: var(--text-subtle);
    line-height: 1.5;
}

.auth-footer a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--primary-purple-hover);
    text-decoration: underline;
}

.auth-alert {
    margin-top: 16px;
    margin-bottom: 0;
    padding: 12px 14px;
    border-radius: var(--radius-input);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.45;
    text-align: center;
}

.auth-alert--success {
    color: #047857;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
}

.auth-alert--error {
    color: #B91C1C;
    background: #FEF2F2;
    border: 1px solid #FECACA;
}

.text-danger {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* #Bagian Auth OTP Verifikasi Email# */
.otp-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.otp-input {
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 65px;
    min-height: 2.75rem;
    height: 65px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s ease;
}

    .otp-input:focus {
        border-color: var(--primary-purple);
        box-shadow: 0 0 0 3px var(--light-purple);
    }

.otp-text-info {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

    .otp-text-info span {
        color: var(--primary-purple);
        font-weight: 600;
    }

/* #Bagian Auth Onboarding Upload# */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    padding: 40px 20px;
    background-color: #F9FAFB;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    min-height: 180px;
}

    .upload-area:hover, .upload-area.dragover {
        border-color: var(--primary-purple);
        background-color: #F5F3FF;
    }

    .upload-area svg.upload-icon {
        color: #9CA3AF;
        margin-bottom: 12px;
        width: 40px;
        height: 40px;
        transition: color 0.2s ease-in-out;
    }

    .upload-area:hover svg.upload-icon, .upload-area.dragover svg.upload-icon {
        color: var(--primary-purple);
    }

    .upload-area.has-file {
        border-color: #10B981;
        background-color: #ECFDF5;
    }

        .upload-area.has-file svg.upload-icon {
            color: #10B981;
        }

.upload-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    text-align: center;
}

.upload-subtext {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 8px;
    background-color: #E5E7EB;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-purple);
    border-radius: 10px;
}

.progress-step-1 {
    width: 33.33%;
}

.progress-step-2 {
    width: 66.66%;
}

.progress-step-3 {
    width: 100%;
}

/* Custom Select Dropdown */
select.form-control-custom {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9L12 15L18 9" stroke="%236B7280" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}
/* #Bagian Auth Onboarding Step# */
.onb-psy-progress-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.onb-step-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    gap: 12px;
}
.onb-step-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.onb-step-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-purple);
}
.auth-title--step1 {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 16px;
    text-align: center;
}
.onb-step-note {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    background: #F3F4F6;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: left;
}
.file-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    z-index: -1;
    overflow: hidden;
}
