:root {
    --primary: #1a4f8a;
    --primary-dark: #153f6e;
    --primary-rgb: 26, 79, 138;
    --accent: #0d7c5b;
    --accent-rgb: 13, 124, 91;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --muted: #64748b;
    --danger: #dc2626;
    --warning: #d97706;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;
    --info-text: #1e40af;
    --warn-bg: #fffbeb;
    --warn-border: #fbbf24;
    --warn-text: #92400e;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--surface);
    min-height: 100vh;
    /* padding: 2rem 0 3rem; */
    overflow-x: hidden;
}

/* ─── Layout ─── */
.signup-wrapper {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow-x: hidden;
}

/* ─── Header Card ─── */
.signup-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 8px;
    padding: 1.75rem 2rem 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.signup-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    pointer-events: none;
}

.signup-header::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 35%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    pointer-events: none;
}

.header-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: .85rem;
}

.header-badge {
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 8px;
    padding: 3px 12px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: .6rem;
}

.header-logo img {
    height: 38px;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
}

.signup-header h2 {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.signup-header p {
    text-align: center;
    font-size: 12.5px;
    opacity: .85;
    margin: 0;
}

/* ─── Alert ─── */
.alert-custom {
    border-radius: 8px;
    padding: .9rem 1.1rem;
    font-size: 13px;
    margin-bottom: 1.4rem;
    line-height: 1.65;
}

.alert-warn-custom {
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    border-left: 4px solid #f59e0b;
    color: var(--warn-text);
}

.alert-info-custom {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    border-left: 4px solid #3b82f6;
    color: var(--info-text);
}

.alert-danger-custom {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--danger);
    color: #991b1b;
}

.alert-custom strong {
    display: block;
    margin-bottom: 5px;
    font-size: 13.5px;
}

.alert-custom ul {
    padding-left: 18px;
    margin: 0;
}

.alert-custom li {
    margin-top: 3px;
}

/* ─── Step Indicator ─── */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.step-indicator .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 150px;
    position: relative;
}

.step-indicator .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: var(--border);
    transition: background .4s;
}

.step-indicator .step-item.completed:not(:last-child)::after {
    background: var(--accent);
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--muted);
    transition: all .3s;
    position: relative;
    z-index: 1;
}

.step-item.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(var(--primary-rgb), .15);
}

.step-item.completed .step-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    white-space: nowrap;
}

.step-item.active .step-label {
    color: var(--primary);
}

.step-item.completed .step-label {
    color: var(--accent);
}

/* ─── Form Card ─── */
.form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem;
    margin-bottom: 1.1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.section-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.icon-blue {
    background: #dbeafe;
}

.icon-green {
    background: #d1fae5;
}

.icon-amber {
    background: #fef3c7;
}

.icon-purple {
    background: #ede9fe;
}

/* ─── Fields ─── */
.field-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
    display: block;
}

.field-label .req {
    color: var(--danger);
    margin-left: 2px;
}

.form-control-custom,
.form-select-custom {
    width: 100%;
    padding: .55rem .85rem;
    font-size: 13.5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: #1e293b;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-control-custom:focus,
.form-select-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.form-control-custom::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.form-control-custom[readonly] {
    background: var(--surface);
    color: var(--muted);
    cursor: not-allowed;
}

.form-select-custom {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

textarea.form-control-custom {
    resize: vertical;
    min-height: 85px;
}

.field-hint {
    font-size: 11.5px;
    margin-top: 4px;
    display: block;
}

.hint-muted {
    color: #94a3b8;
}

.hint-warn {
    color: var(--warning);
}

.hint-danger {
    color: var(--danger);
}

/* ─── Upload Area ─── */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), .025);
}

.upload-area input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-icon {
    font-size: 30px;
    margin-bottom: 6px;
}

.upload-area p {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 3px;
}

.upload-area small {
    font-size: 11.5px;
    color: #94a3b8;
}

#preview_foto {
    display: none;
    max-height: 140px;
    border-radius: 10px;
    margin-top: 10px;
    border: 1px solid var(--border);
}

/* ─── Buttons ─── */
.btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    text-decoration: none;
}

.btn-wa:hover {
    background: #16a34a;
    color: #fff;
}

.wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .25rem 0 .5rem;
}

.step-counter {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.btn-prev-wiz {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .6rem 1.25rem;
    font-size: 13.5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all .2s;
}

.btn-prev-wiz:hover:not(:disabled) {
    border-color: #94a3b8;
}

.btn-prev-wiz:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.btn-next-wiz {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    padding: .6rem 1.5rem;
    font-size: 13.5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all .2s;
}

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

.btn-submit-wiz {
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 10px;
    padding: .65rem 1.75rem;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all .2s;
}

.btn-submit-wiz:hover {
    opacity: .9;
    transform: translateY(-1px);
}

/* ─── Sections ─── */
.wizard-section {
    display: none;
}

.wizard-section.active {
    display: block;
    animation: fadeUp .3s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

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

/* ─── Login link ─── */
.login-link {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 1rem;
}

.login-link a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* ─── Responsive ─── */
@media (max-width: 576px) {
    .signup-header {
        padding: 1.25rem 1.25rem 1rem;
    }

    .form-card {
        padding: 1.25rem 1rem;
    }

    .step-label {
        display: none;
    }
}

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: auto;
    padding: .2rem 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b;
    padding: 0 .8rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;

}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 10px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent;
    border-width: 5px 4px 0 4px;
    margin-top: -2px;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #64748b transparent;
    border-width: 0 4px 5px 4px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary, #1a4f8a) !important;
    box-shadow: 0 0 0 3px rgba(26, 79, 138, .12) !important;
    outline: none;
}

.select2-dropdown {
    border: 1px solid var(--primary, #1a4f8a);
    border-radius: 9px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
    font-size: 13.5px;
    overflow: hidden;
    z-index: 9999;
}

.select2-container--default .select2-search--dropdown {
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    outline: none;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary, #1a4f8a);
    box-shadow: 0 0 0 3px rgba(26, 79, 138, .10);
}

.select2-container--default .select2-results__option {
    padding: 8px 14px;
    color: #1e293b;
    transition: background .15s;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--primary, #1a4f8a);
    color: #fff;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: #dbeafe;
    color: var(--primary, #1a4f8a);
    font-weight: 600;
}

.select2-results__option--load-more,
.select2-results__message {
    text-align: center;
    font-size: 12.5px;
    color: #64748b;
    padding: 10px;
}

/* Loading spinner di dalam select2 */
.select2-container--default .select2-results__option.loading-results {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.select2-selection__clear {
    padding-left: 15px;
    padding-right: 0px;
    margin-right: 0 !important;
}

/* Spinner kecil untuk state loading serverside */
.s2-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e2e8f0;
    border-top-color: var(--primary, #1a4f8a);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ══ Spinner ══ */
.s2-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid #e2e8f0;
    border-top-color: #1a4f8a;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ══ Upload Area ══ */
.upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: #fafbfc;
}

.upload-area:hover {
    border-color: #1a4f8a;
    background: rgba(26, 79, 138, .03);
}

.upload-icon {
    font-size: 2.25rem;
    color: #94a3b8;
    margin-bottom: 8px;
    display: block;
}

.upload-area p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 4px;
}

.upload-area small {
    font-size: 11.5px;
    color: #94a3b8;
}

/* ══ Crop Preview ══ */
.crop-preview-wrap {
    display: none;
    margin-top: 1rem;
}

.crop-ratio-box {
    width: 150px;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    background: #f1f5f9;
}

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

.crop-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-crop-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .45rem 1rem;
    font-size: 12.5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all .2s;
}

.btn-crop-open {
    background: #1a4f8a;
    color: #fff;
}

.btn-crop-open:hover {
    background: #153f6e;
}

.btn-crop-reset {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-crop-reset:hover {
    background: #e2e8f0;
}

/* ══ Modal Crop ══ */
.crop-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, .78);
    align-items: center;
    justify-content: center;
}

.crop-modal-overlay.open {
    display: flex;
}

.crop-modal {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    width: 96%;
    max-width: 520px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

.crop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.crop-modal-header h6 {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.btn-crop-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    padding: 5px 7px;
    border-radius: 6px;
    transition: background .15s;
    line-height: 1;
}

.btn-crop-close:hover {
    background: #f1f5f9;
    color: #dc2626;
}

.crop-container {
    width: 100%;
    max-height: 420px;
    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;
}

.crop-container img {
    display: block;
    max-width: 100%;
}

.crop-ratio-hint {
    text-align: center;
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 6px;
}

.crop-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-crop-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
}

.btn-crop-tool:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-crop-confirm {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: .55rem 1.5rem;
    background: linear-gradient(135deg, #1a4f8a, #0d7c5b);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 13.5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
    margin-left: 8px;
}

.btn-crop-confirm:hover {
    opacity: .9;
}

.form-control-lg {
    font-size: .9rem;
}
