/* ═══════════════════════════════════════════════════════════
   PitStop — CSS Register Halaman Split-Screen
   ═══════════════════════════════════════════════════════════ */

/* ── Layout Split Screen Halaman Register ── */
.auth-page {
    background-color: var(--bg);
    min-height: 100vh;
}

@media (min-width: 769px) {
    .auth-page {
        height: 100vh;
        overflow: hidden;
    }
}

.auth-split {
    display: grid;
    grid-template-columns: 40% 1fr;
    /* Membagi layar: kiri 40%, kanan 60% */
    height: 100vh;
}

/* ── Panel Kiri (Gambar) ── */
.auth-left {
    position: relative;
    overflow: hidden;
    animation: registerFadeInLeft 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.login-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Panel Kanan (Formulir Pendaftaran) ── */
.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background-color: #EBF1FF;
}

/* Khusus Pendaftaran: Tambahan Scroll jika layar pendek */
.auth-right-scroll {
    align-items: flex-start;
    overflow-y: auto;
    padding-top: 3.5rem;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
    animation: registerFadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* ── Progress Stepper ── */
.stepper {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 2rem;
    position: relative;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 0.4rem;
    width: 120px;
}

.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #E2E8F0;
    color: #64748B;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stepper-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748B;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.stepper-line {
    position: absolute;
    top: 16px;
    left: 86px;
    right: 86px;
    height: 2px;
    background-color: #E2E8F0;
    z-index: 1;
    transition: all 0.3s ease;
    transform: translateY(-50%);
}

/* Active State */
.stepper-step.active .stepper-circle {
    background-color: #C3D5F1;
    color: #1F2937;
}

.stepper-step.active .stepper-label {
    color: #1F2937;
    font-weight: 700;
}

/* Completed State */
.stepper-step.completed .stepper-circle {
    background-color: #C3D5F1;
    color: #1F2937;
}

.stepper-step.completed .stepper-label {
    color: #1F2937;
}

.stepper-line.active {
    background-color: #CADDFA;
}

/* Header Form */
.auth-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.auth-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Elemen Formulir */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: var(--white);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-dark);
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

/* Input Password dengan Tombol Eye */
.input-password {
    position: relative;
}

.input-password input {
    padding-right: 3rem;
}

.btn-toggle-pass {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    display: flex;
    align-items: center;
    transition: color var(--transition);
}

.btn-toggle-pass:hover {
    color: var(--primary);
}

/* Dua Kolom Berdampingan (Password & Konfirmasi) */
.form-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Checkbox */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-body);
    user-select: none;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    position: relative;
}

.checkbox-label input:checked+.checkbox-custom {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked+.checkbox-custom::after {
    content: '';
    width: 4px;
    height: 8px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

/* Link Biru */
.link-blue {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color var(--transition);
}

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

/* Pesan Error Kolom */
.input-error {
    font-size: 0.78rem;
    color: #ef4444;
    min-height: 1rem;
}

/* Tombol Submit */
.btn-submit {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.9rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
    box-shadow: 0 4px 14px rgba(67, 97, 238, 0.35);
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

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

/* Footer / Switch Halaman & Tombol Kembali */
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
}

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

.btn-back-home {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color var(--transition);
    text-decoration: none;
}

.btn-back-home:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

/* ── Responsif Layar Kecil (Mobile) ── */
@media (max-width: 768px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 2.5rem 1.5rem;
    }

    .form-row-two {
        grid-template-columns: 1fr;
        /* Kolom password bertumpuk secara vertikal di mobile */
        gap: 1.1rem;
    }
}

/* ── Efek Animasi Masuk Halaman Register ── */
@keyframes registerFadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes registerFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enable scrolling when viewport height is too small to fit the form (e.g. on zoom, small screens, or landscape mode) */
@media (max-height: 780px) {
    .auth-page {
        height: auto !important;
        overflow: auto !important;
    }
    .auth-split {
        height: auto !important;
        min-height: 100vh;
    }
    .auth-right {
        height: auto !important;
        min-height: 100vh;
        padding: 2.5rem 1.5rem !important;
    }
    .auth-left {
        height: auto !important;
        min-height: 100vh;
    }
}

/* Error & Success Input Outline Styles */
.form-group input.error {
    border-color: #EF4444 !important;
    background-color: #ffffff !important;
}
.form-group input.success {
    border-color: #10B981 !important;
    background-color: #ffffff !important;
}
.form-group input.error:focus {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
.form-group input.success:focus {
    border-color: #10B981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.input-helper-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.3rem;
    font-weight: 500;
    line-height: 1.35;
}