:root {
    --primary:      #2196b6;
    --primary-dark: #1a7a96;
    --primary-light:#e8f5fa;
    --text-dark:    #2d3748;
    --text-muted:   #718096;
    --border:       #d1e8f0;
    --bg-page:      #f0f6f9;
    --white:        #ffffff;
    --red:          #e53e3e;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'Open Sans', sans-serif;
    background: url('../images/bg-register.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-color: var(--bg-page);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── CONTAINER & CARD ── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem 3rem 1rem;
}

.register-wrapper {
    width: 100%;
    max-width: 700px; /* Menyesuaikan lebar maksimal register-card Anda */
    display: block;
    margin: 0 auto;
}

.register-header-outside {
    text-align: center;
    margin-bottom: 2rem; /* Jarak antara title luar dengan card register */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.register-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(33,150,182,.12);
    padding: 2.5rem;
    width: 100%;
    max-width: 850px;
    animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── WIZARD PROGRESS BAR ── */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 3rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}
.wizard-progress::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}
.wizard-progress-bar {
    position: absolute;
    top: 18px;
    left: 0;
    width: 0%; /* Berubah sesuai step, step 1 = 0% */
    height: 3px;
    background: var(--primary);
    z-index: 2;
    transition: width 0.4s ease;
}
.wizard-step {
    position: relative;
    z-index: 3;
    text-align: center;
    flex: 1;
}
.wizard-step-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid #e2e8f0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem auto;
    transition: all 0.3s ease;
}
.wizard-step.active .wizard-step-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(33, 150, 182, 0.15);
}
.wizard-step.completed .wizard-step-icon {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
}
.wizard-step-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
}
.wizard-step.active .wizard-step-label {
    color: var(--text-dark);
    font-weight: 600;
}

/* ── SECTIONS ── */
.card-heading {
    font-family: 'Raleway', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 2rem;
}

/* Avatar Container */
.avatar-upload-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
.avatar-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
}
.avatar-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fafcfd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--primary);
    font-size: 2rem;
    transition: all 0.2s ease;
}
.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.avatar-trigger {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background 0.2s;
}
.avatar-trigger:hover {
    background: var(--primary-dark);
}

/* ── FORM ELEMENTS ── */
.form-label-custom {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    display: block;
}
.required-star { 
    color: var(--red); 
    font-size: 0.85rem; 
}

.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.88rem;
    color: var(--text-dark);
    background: #fafcfd;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(33,150,182,.12);
    background: var(--white);
    outline: none;
}

/* ── CUSTOM REUSABLE FILE UPLOAD COMPONENT ── */
.upload-group-wrapper {
    margin-bottom: 1.2rem;
}
.upload-row {
    flex-wrap: wrap; /* SANGAT PENTING: Agar error ditarik ke baris baru secara otomatis */
}
.dropzone-area {
    flex: 1;
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    background: #fafcfd;
    font-size: 0.88rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}
.dropzone-area.has-file {
    border-style: solid;
    background: var(--white);
    color: var(--text-dark);
}
.btn-action-upload {
    height: 41px;
    width: 41px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-initial-upload {
    background: var(--primary);
    color: var(--white);
}
.btn-initial-upload:hover { background: var(--primary-dark); }

.btn-delete-file {
    background: #ffebeb;
    color: var(--red);
    display: none;
}
.btn-delete-file:hover { background: #fdd6d6; }

.btn-replace-file {
    background: #e8f5fa;
    color: var(--primary);
    display: none;
}
.btn-replace-file:hover { background: #d1ecf6; }

/* Penempatan Error Khusus di Atas Info Size */
.upload-row .invalid-feedback {
    flex: 0 0 100%;
    width: 100%;
    margin-top: 0.4rem;
    margin-bottom: 0.1rem;
    display: none;
}

.info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    padding: 0 0.1rem;
}
.upload-size-text {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 500;
}
.upload-size-text.text-danger {
    color: var(--red) !important;
}
.upload-limit-text {
    font-size: 0.76rem;
    color: #3182ce;
}

/* JQuery Validation Error Rules */
.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--red) !important;
}
.invalid-feedback {
    font-size: 0.75rem;
    color: var(--red);
    margin-top: 0.3rem;
}

/* Radio inline customized layout */
.radio-container {
    display: flex;
    gap: 1.5rem;
    padding-top: 0.6rem;
}
.form-check-input {
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}
.form-check-label {
    font-size: 0.88rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* ── BUTTON FOOTER ROW ── */
.btn-row {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    border-top: 1.5px solid #edf2f7;
    padding-top: 1.5rem;
}
.btn-back {
    flex: 1;
    background: #edf2f7;
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-back:hover { background: #e2e8f0; }

.btn-next {
    flex: 1;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-next:hover { background: var(--primary-dark); }
.btn-next:active, .btn-back:active { transform: scale(0.99); }

@media (max-width: 768px) {
    .register-card { padding: 1.5rem; }
    .wizard-progress { margin-bottom: 2rem; }
    .wizard-step-label { display: none; }
}

.is-invalid-select2 {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12) !important;
    background-color: #fffbfa !important;
}

.select2-container--bootstrap-5 .select2-selection {
    border: 1.5px solid var(--border, #d1e8f0);
    border-radius: 8px !important;
    min-height: 41px !important; /* Menyesuaikan dengan tinggi input teks kustom Anda */
    background-color: #fafcfd !important; /* Menyamakan warna background input */
    display: flex !important;
    align-items: center !important;
    transition: border-color .2s, box-shadow .2s;
}

/* ── 2. MENYESUAIKAN TEKS DI DALAM SELECT2 ── */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.88rem !important;
    color: var(--text-dark, #2d3748) !important;
    padding-left: 0.9rem !important; /* Menyamakan padding dalam input */
}

/* Menyesuaikan warna teks placeholder (Cara yang Benar) */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder {
    color: var(--text-muted, #718096) !important;
}

/* ── 3. MENYESUAIKAN IKON PANAH (ARROW) DROPDOWN ── */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    right: 0.6rem !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

/* ── 4. EFEK STATE FOCUS (SAAT DIKLIK) ── */
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: var(--primary, #2196b6) !important;
    box-shadow: 0 0 0 3px rgba(33, 150, 182, 0.12) !important;
    background-color: #ffffff !important; /* Berubah putih saat fokus seperti input lain */
}

.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--primary, #2196b6) !important;
    background-color: #ffffff !important;
}

/* ── 5. PENYELARASAN DROPDOWN LIST DAN SEARCH BOX ── */
.select2-container--bootstrap-5 .select2-dropdown {
    border: 1.5px solid var(--primary, #2196b6) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    border: 1.5px solid var(--border, #d1e8f0) !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus {
    border-color: var(--primary, #2196b6) !important;
    box-shadow: none !important;
}

/* Menyesuaikan list item di dalam dropdown */
.select2-container--bootstrap-5 .select2-results__option {
    font-size: 0.88rem !important;
    padding: 0.6rem 0.9rem !important;
}

/* Warna saat item dropdown disorot (hover) */
.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary, #2196b6) !important;
    color: #ffffff !important;
}