/* ==========================================================================
   1. GLOBAL RESET & DESIGN TOKENS
   ========================================================================== */
* {
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary: #0878f9;
    --primary-dark: #0563d2;
    --navy: #071d35;
    --text: #172033;
    --muted: #718096;
    --border: #e5eaf1;
    --soft: #f5f8fc;
    --success: #22a06b;
    --danger: #dc3545;
    --danger-dark : #dc3043;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: #f4f8fc;
}

/* Inherit Font untuk Elemen Form */
button,
input {
    font-family: inherit;
}


/* ==========================================================================
   2. MOBILE-FIRST SHELL & LAYOUT CONTAINER
   ========================================================================== */
/* Pembungkus utama seluruh halaman auth */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
}

/* Kartu putih pembungkus form (mengunci lebar maksimal ala tampilan mobile) */
.auth-panel {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(7, 29, 53, 0.06);
    padding: 32px 24px;
    margin: 0 auto;
}

/* Tab/View form yang dapat berganti */
.auth-view {
    width: 100%;
    display: none;
    animation: fadeUp 0.28s ease;
}

.auth-view.active {
    display: block;
}

/* Animasi transisi antar view */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}


/* ==========================================================================
   3. BRANDING & HEADER SECTION
   ========================================================================== */
/* Logo Brand Mobile (Center) */
.mobile-brand {
    margin-bottom: 24px;
    text-align: left;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--navy);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.brand > span:last-child > span {
    color: var(--primary);
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 8px 22px rgba(8, 120, 249, 0.2);
}

/* Header Teks & Badge */
.auth-header {
    position: relative;
    margin-bottom: 22px;
}

.auth-header h2 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.7px;
    margin: 12px 0 6px;
}

.auth-header p {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

/* Tombol Kembali */
.back-button {
    border: 0;
    background: #f4f7fb;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: var(--navy);
    margin-bottom: 14px;
    cursor: pointer;
}

/* Badge Identifikasi Step/Halaman */
.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--primary);
    background: #eaf4ff;
    border-radius: 100px;
    padding: 6px 12px;
}


/* ==========================================================================
   4. PROGRESS STEPS (REGISTRASI MULTI-STEP)
   ========================================================================== */
.progress-steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 22px 0 26px;
}

.progress-line {
    position: absolute;
    height: 2px;
    background: #edf1f5;
    left: 15%;
    right: 15%;
    top: 13px;
    z-index: 0;
}

.progress-line span {
    display: block;
    height: 100%;
    background: var(--primary);
    transition: 0.3s;
}

.progress-step {
    position: relative;
    z-index: 1;
    text-align: center;
    background: #fff;
    padding: 0 4px;
}

.progress-step b {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f3f7;
    color: #8b96a6;
    display: grid;
    place-items: center;
    margin: auto;
    font-size: 10px;
}

.progress-step small {
    display: block;
    color: #9aa4b1;
    font-size: 8px;
    margin-top: 6px;
}

/* Status Step Aktif / Selesai */
.progress-step.active b,
.progress-step.done b {
    background: var(--primary);
    color: #fff;
}

.progress-step.active small,
.progress-step.done small {
    color: var(--text);
    font-weight: 600;
}


/* ==========================================================================
   5. FORM ELEMENTS & INPUT STYLING
   ========================================================================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.input-wrap {
    position: relative;
}

/* Ikon Sisi Kiri Input */
.input-wrap > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    color: #9aa7b7;
    font-size: 17px;
}

/* Form Control Field */
.input-wrap .form-control {
    height: 48px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 0 43px 0 42px;
    font-size: 12px;
    color: var(--text);
    box-shadow: none;
}

.input-wrap .form-control:focus {
    border-color: #74b5ff;
    box-shadow: 0 0 0 3px rgba(8, 120, 249, 0.08);
    outline: none;
}

.input-wrap .form-control::placeholder {
    color: #aab4c1;
}

/* Tombol Toggle Password (Mata) */
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a0af;
    padding: 8px;
    cursor: pointer;
}

/* Penanganan Status Error Validation */
.field-error {
    color: var(--danger);
    font-size: 10px;
    display: block;
    margin-top: 5px;
    min-height: 0;
}

.form-group.invalid .form-control {
    border-color: var(--danger);
}

/* Petunjuk Ketentuan Password */
.password-rules {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.password-rules span {
    font-size: 10px;
    color: #98a3b2;
}

.password-rules i {
    font-size: 9px;
    margin-right: 3px;
}


/* ==========================================================================
   6. CHECKBOX & OPTION CONTROLS (Ingat Saya & Lupa Password)
   ========================================================================== */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Memisah checkbox ke kiri & link ke kanan */
    margin: 12px 0 20px;
    font-size: 11px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #637083;
    cursor: pointer;
    user-select: none;
}

.check-label input {
    margin: 0;
    accent-color: var(--primary);
}

.terms-label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 10px;
    color: #7b8796;
    line-height: 1.7;
    margin: 5px 0 18px;
}

.terms-label input {
    accent-color: var(--primary);
}


/* ==========================================================================
   7. BUTTONS & SWITCH LINKS
   ========================================================================== */
.btn-primary-custom {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(8, 120, 249, 0.16);
    transition: 0.2s;
    cursor: pointer;
    padding: 0 20px;
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
}


.btn-danger-custom {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 11px;
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(8, 120, 249, 0.16);
    transition: 0.2s;
    cursor: pointer;
    padding: 0 20px;
}

.btn-danger-custom:hover {
    background: var(--danger-dark );
}

.btn-secondary-custom {
    width: 100%;
    border: 0;
    background: #f1f5f9;
    color: var(--text);
    border-radius: 11px;
    min-height: 48px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.switch-text {
    text-align: center;
    font-size: 11px;
    color: #7d8998;
    margin: 20px 0 0;
}

.link-button {
    border: 0;
    background: none;
    padding: 0;
    font-size: inherit;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}


/* ==========================================================================
   8. CAMERA & VERIFICATION OVERLAYS (KTP & Wajah)
   ========================================================================== */
.camera-box {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--navy);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.camera-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay Bingkai KTP */
.ktp-overlay-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    aspect-ratio: 85.6 / 53.98;
    border: 2px dashed rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ktp-hint-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Sudut Siku Bingkai KTP */
.ktp-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--primary);
    border-style: solid;
}

.ktp-corner.top-left {
    top: -2px;
    left: -2px;
    border-width: 3px 0 0 3px;
    border-top-left-radius: 8px;
}

.ktp-corner.top-right {
    top: -2px;
    right: -2px;
    border-width: 3px 3px 0 0;
    border-top-right-radius: 8px;
}

.ktp-corner.bottom-left {
    bottom: -2px;
    left: -2px;
    border-width: 0 0 3px 3px;
    border-bottom-left-radius: 8px;
}

.ktp-corner.bottom-right {
    bottom: -2px;
    right: -2px;
    border-width: 0 3px 3px 0;
    border-bottom-right-radius: 8px;
}

/* Overlay Bingkai Oval Wajah */
.camera-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -52%);
    width: 170px;
    height: 200px;
    border: 2px solid #fff;
    border-radius: 48% 48% 43% 43%;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.3);
}


/* ==========================================================================
   9. TOAST NOTIFICATIONS
   ========================================================================== */
#toast-container {
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-toast {
    max-width: 340px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 12px 35px rgba(12, 33, 55, 0.12);
    font-size: 11px;
    color: #536174;
    animation: toastIn 0.25s ease;
}

.custom-toast i {
    font-size: 16px;
    color: var(--success);
}

.custom-toast.error i {
    color: var(--danger);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}


/* ==========================================================================
   10. MOBILE RESPONSIVE ADAPTATION (Layar Mobile Asli)
   ========================================================================== */
@media (max-width: 575.98px) {
    body {
        background: #fff; /* Mengubah background body menjadi putih di layar HP */
    }

    .auth-shell {
        padding: 0;
    }

    .auth-panel {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        padding: 24px 20px;
        min-height: 100vh;
    }
}


/* Wrapper Utama Container */
#successRegisterView {
    padding: 10px 0;
}

/* Icon Hourglass/Jam Pasir Modern */
.success-icon-wrapper {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto 20px auto;
}

.success-icon-bg {
    width: 100%;
    height: 100%;
    background: #fff8e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 32px;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.18);
    border: 1px solid #fde68a;
}

/* Efek Lingkaran Memancar (Pulse) */
.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.25);
    z-index: 1;
    animation: pulseRing 2s infinite ease-in-out;
}

@keyframes pulseRing {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.28); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

/* Badge Status Pending */
.badge-status-pending {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff8e6;
    color: #d97706;
    border: 1px solid #fde68a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Card Info Warning Box */
.status-info-card {
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 16px;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.status-info-card .info-icon {
    font-size: 20px;
    line-height: 1;
}

/* Tombol Secondary (Keluar / Switch Akun) */
.btn-secondary-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-secondary-custom:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Styling Ilustrasi Success Register */
.illustration-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.illustration-img {
    max-width: 100px; /* Atur batas lebar gambar */
    height: auto;
    object-fit: contain;
    /* Memberikan sedikit efek floating/mengapung halus */
    animation: floatIllustration 3s ease-in-out infinite;
}

/* Card Container */
.verification-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    text-align: left;
}

/* Header Card */
.verification-card-header {
    background: #f8fafc;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.verification-card-header i {
    color: #0878f9;
}

/* List Item Styling */
.verification-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.verification-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.verification-list li:last-child {
    border-bottom: none;
}

.verification-list .list-icon {
    width: 32px;
    height: 32px;
    background: rgba(8, 120, 249, 0.08);
    color: #0878f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.verification-list .list-content h6 {
    margin: 0 0 2px 0;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}

.verification-list .list-content p {
    margin: 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}
