/* ══════════════════════════════════════════════════════════════
   REGISTER DRIVER — Custom Styles
   ══════════════════════════════════════════════════════════════ */

/* ── BASE ──────────────────────────────────────────────────── */
body {
    font-family: 'Outfit', sans-serif !important;
    background: radial-gradient(circle at top right, #fff5f5, #ffffff) !important;
    color: #334155 !important;
}

/* ── PARTICLES ─────────────────────────────────────────────── */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

#particles-js canvas {
    pointer-events: none !important;
}

/* ── LAYOUT ────────────────────────────────────────────────── */
.wizard-main {
    background: transparent !important;
    padding: 60px 0;
    position: relative;
    z-index: 2;
}

.login-sec {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.login-sec-bg {
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(254, 0, 0, 0.08) !important;
    padding: 40px !important;
}

/* ── WIZARD STEPS ──────────────────────────────────────────── */
.wizard>.steps {
    margin-bottom: 30px;
}

.wizard>.steps ul {
    display: flex;
    justify-content: space-between;
    padding: 0;
    list-style: none;
    position: relative;
    margin-bottom: 0;
}

.wizard>.steps ul::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 16.66%;
    right: 16.66%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.wizard>.steps li {
    width: 33.33%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.wizard>.steps li a,
.wizard>.steps li a:hover,
.wizard>.steps li a:active {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    background: transparent !important;
    color: #64748b !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
}

.wizard>.steps .number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
    border: 2px solid #ffffff;
}

.wizard>.steps li.current .number {
    background: #fe0000 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(254, 0, 0, 0.15);
}

.wizard>.steps li.current a {
    color: #fe0000 !important;
    font-weight: 700 !important;
}

.wizard>.steps li.done .number {
    background: #28a745 !important;
    color: #ffffff !important;
}

.wizard>.steps li.done a {
    color: #28a745 !important;
}

/* ── CRITICAL: override overflow:hidden dari style.css bawaan ─ */
.wizard,
.wizard>.content,
.wizard>.content>.body {
    overflow: visible !important;
}

.wizard>.content {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    min-height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
    height: auto !important;
}

.wizard>.content>.body {
    min-height: auto !important;
    height: auto !important;
    position: static !important;
    width: 100% !important;
    padding: 0 !important;
    float: none !important;
}

.wizard>.content>.body input {
    display: block;
}

.wizard>.content>.body input[type="checkbox"] {
    display: inline-block;
}

.wizard>.content fieldset {
    padding: 0 !important;
}

/* ── FORM CONTROLS ─────────────────────────────────────────── */
.form-control {
    font-family: 'Outfit', sans-serif !important;
    height: 48px !important;
    border-radius: 8px !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 10px 16px !important;
    font-size: 0.95rem !important;
    transition: all 0.25s ease !important;
    background-color: #f8fafc !important;
    margin-bottom: 4px !important;
    color: #334155 !important;
}

textarea.form-control {
    height: auto !important;
}

.form-control:focus {
    border-color: #94a3b8 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15) !important;
    outline: none !important;
}

.form-control.is-valid-field {
    border-color: #22c55e !important;
    background-color: #f0fdf4 !important;
}

.form-control.is-warning-field {
    border-color: #f59e0b !important;
    background-color: #fffbeb !important;
}

.form-control.is-invalid-field {
    border-color: #fe0000 !important;
    background-color: #fff5f5 !important;
}

/* ── SELECT2 ───────────────────────────────────────────────── */
.select2-container--bootstrap4 .select2-selection {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    height: 48px !important;
    background-color: #f8fafc !important;
    transition: all 0.25s ease !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: 46px !important;
    padding-left: 16px !important;
    font-size: 0.95rem !important;
    color: #334155 !important;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--bootstrap4.select2-container--open .select2-selection {
    border-color: #94a3b8 !important;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15) !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
    border-color: #94a3b8 transparent transparent transparent !important;
}

.select2-dropdown {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1) !important;
    font-family: 'Outfit', sans-serif !important;
}

/* Dropdown ke body — harus paling atas */
body>.select2-container {
    z-index: 999999 !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #fe0000 !important;
    color: #ffffff !important;
}

.select2-search--dropdown .select2-search__field {
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 6px 12px !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #94a3b8 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15) !important;
}

/* Select2 error state */
.select2-is-invalid .select2-container--bootstrap4 .select2-selection {
    border-color: #fe0000 !important;
    background-color: #fff5f5 !important;
}

/* ── INLINE ALERT FEEDBACK ─────────────────────────────────── */
.field-alert {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
    margin-bottom: 12px;
    font-family: 'Outfit', sans-serif;
    animation: fadeInAlert 0.2s ease;
}

.field-alert.show {
    display: flex;
}

.field-alert.alert-success-inline {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

.field-alert.alert-warning-inline {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.field-alert.alert-danger-inline {
    background: #fff5f5;
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.field-alert .alert-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ── NIK PROGRESS BAR ──────────────────────────────────────── */
.nik-progress-wrap {
    margin-top: 4px;
    margin-bottom: 12px;
    display: none;
}

.nik-progress-wrap.show {
    display: block;
}

.nik-progress-bar-bg {
    height: 4px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.nik-progress-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.25s ease, background 0.25s ease;
}

.nik-progress-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 3px;
    color: #64748b;
}

/* ── LABELS ────────────────────────────────────────────────── */
label {
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    color: #475569 !important;
    margin-bottom: 5px !important;
    display: inline-block !important;
    letter-spacing: 0.01em !important;
}

label.error {
    display: none !important;
}

/* ── FILE UPLOAD ───────────────────────────────────────────── */
.custom-file-upload {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 18px;
}

.file-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-dropzone:hover {
    border-color: #fe0000;
    background: #fff5f5;
}

.file-dropzone.has-file {
    border-color: #22c55e;
    background: #f0fdf4;
    border-style: solid;
}

.file-dropzone i {
    font-size: 1.6rem;
    color: #fe0000;
    margin-bottom: 8px;
    transition: color 0.25s;
}

.file-dropzone.has-file i {
    color: #22c55e;
}

.file-dropzone p {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

.file-dropzone .file-size-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 4px;
}

.file-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* ── ACTION BUTTONS ────────────────────────────────────────── */
.wizard>.actions {
    margin-top: 28px;
}

.wizard>.actions ul {
    display: flex;
    justify-content: space-between;
    padding: 0;
    list-style: none;
    align-items: center;
}

.wizard>.actions li {
    margin-left: 0;
}

.wizard>.actions a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border: none;
    transition: none;
}

.wizard>.actions a[href="#next"],
.wizard>.actions a[href="#finish"] {
    background: #fe0000 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(254, 0, 0, 0.2) !important;
}

.wizard>.actions a[href="#next"]:hover,
.wizard>.actions a[href="#finish"]:hover {
    background: #d40000 !important;
    box-shadow: 0 4px 12px rgba(254, 0, 0, 0.3) !important;
}

.wizard>.actions a[href="#next"]:active,
.wizard>.actions a[href="#finish"]:active {
    background: #b00000 !important;
    box-shadow: 0 1px 4px rgba(254, 0, 0, 0.2) !important;
}

.wizard>.actions a[href="#previous"] {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: none !important;
}

.wizard>.actions a[href="#previous"]:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.wizard>.actions a[href="#previous"]:active {
    background: #f1f5f9 !important;
}

.wizard>.actions li.disabled {
    display: none !important;
}

/* ── TERMS CARD ────────────────────────────────────────────── */
.terms-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    transition: border-color 0.2s ease;
}

.terms-card:has(input:checked) {
    border-color: #22c55e;
    background: #f0fdf4;
}

.terms-card input[type="checkbox"] {
    margin-top: 3px;
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #fe0000;
    cursor: pointer;
    flex-shrink: 0;
}

.terms-card label {
    margin: 0 !important;
    font-weight: 500 !important;
    font-size: 0.88rem !important;
    color: #475569 !important;
    cursor: pointer;
    line-height: 1.5;
}

/* ── LOADING OVERLAY ───────────────────────────────────────── */
#loadingDivAjax {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    display: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.loader-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.loaderAjax {
    border: 4px solid #f1f5f9;
    border-top: 4px solid #fe0000;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px auto;
    box-shadow: 0 4px 12px rgba(254, 0, 0, 0.15);
}

.loader-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
    margin: 0;
}

.loader-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 4px;
}

/* ── SECTION DIVIDER ───────────────────────────────────────── */
.form-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin: 20px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

/* ── ANIMATIONS ────────────────────────────────────────────── */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInAlert {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .wizard-main {
        padding: 20px 0;
    }

    .login-sec-bg {
        padding: 24px 16px !important;
        border-radius: 14px !important;
    }

    .wizard>.steps li a {
        font-size: 0.7rem !important;
    }

    .wizard>.steps .number {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }

    .wizard>.steps ul::before {
        top: 14px !important;
        left: 14%;
        right: 14%;
    }

    .form-control {
        height: 44px !important;
        font-size: 0.88rem !important;
        padding: 8px 12px !important;
    }

    .row>[class*="col-md-6"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .wizard>.actions a {
        padding: 11px 18px !important;
        font-size: 0.85rem !important;
    }

    .select2-container--bootstrap4 .select2-selection {
        height: 44px !important;
    }

    .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
        line-height: 42px !important;
    }
}

@media (max-width: 480px) {
    .wizard-main {
        padding: 12px 0;
    }

    .login-sec-bg {
        padding: 18px 14px !important;
    }

    .wizard>.steps .number {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.65rem !important;
    }

    .wizard>.steps li a {
        font-size: 0.6rem !important;
    }
}