/* ═══════════════════════════════════════════════
   XEROX MULTI-STEP WIZARD — JASA USER
   ═══════════════════════════════════════════════ */

.x-wizard-page {
    background: #f8fafc;
    min-height: 100vh;
}
.x-wrap {
    padding: 16px 16px calc(var(--bnh) + 30px);
    max-width: 600px;
    margin: 0 auto;
}

/* ── PROGRESS BAR ── */
.x-progress-container {
    margin-bottom: 24px;
    position: relative;
    padding: 0 10px;
}
.x-progress-bar {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #e2e8f0;
    transform: translateY(-50%);
    z-index: 0;
    border-radius: 4px;
}
.x-progress-bar::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: var(--prog, 0%);
    background: var(--primary);
    transition: width 0.4s cubic-bezier(0.2,0.8,0.2,1);
    border-radius: 4px;
}
.x-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
.x-step {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}
.x-step.active {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-faint);
}
.x-step.completed {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ── PANELS ── */
.x-wizard-container {
    position: relative;
    min-height: 400px;
}
.x-step-panel {
    display: none;
    animation: fadeSlideUp 0.4s cubic-bezier(0.2,0.8,0.2,1);
}
.x-step-panel.active {
    display: block;
}

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

.x-panel-header {
    margin-bottom: 20px;
    text-align: center;
}
.x-panel-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--txt1);
}
.x-panel-header p {
    font-size: 0.85rem;
    color: var(--txt3);
    margin-top: 4px;
}
.x-sub-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--txt1);
    margin-bottom: 12px;
}

/* ── STEP 1: SHOPS ── */
.x-shops-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.x-shop-card {
    background: #fff;
    border: 1.5px solid var(--border2);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.x-shop-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--sh-sm);
}
.x-shop-card.selected {
    border-color: var(--primary);
    background: var(--primary-faint);
    box-shadow: 0 4px 12px rgba(45,140,240,0.15);
}
.x-shop-img {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.x-shop-info { flex: 1; min-width: 0; }
.x-shop-name {
    font-size: 1rem; font-weight: 800; color: var(--txt1);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.x-shop-addr {
    font-size: 0.75rem; color: var(--txt3); font-weight: 500;
    margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.x-shop-check {
    color: var(--primary);
    font-size: 1.2rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}
.x-shop-card.selected .x-shop-check {
    opacity: 1; transform: scale(1);
}

/* ── STEP 2: FULFILLMENT ── */
.x-fulfillment-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.x-radio-card {
    cursor: pointer;
}
.x-radio-card input { display: none; }
.x-rc-content {
    background: #fff;
    border: 1.5px solid var(--border2);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
}
.x-radio-card input:checked + .x-rc-content {
    border-color: var(--primary);
    background: var(--primary-faint);
    box-shadow: 0 4px 12px rgba(45,140,240,0.12);
}
.x-rc-icon {
    font-size: 1.6rem;
    color: #94a3b8;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.x-radio-card input:checked + .x-rc-content .x-rc-icon { color: var(--primary); }
.x-rc-text h4 { font-size: 0.9rem; font-weight: 800; color: var(--txt1); }
.x-rc-text p { font-size: 0.7rem; color: var(--txt3); margin-top: 4px; }

.x-address-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.x-addr-card {
    background: #fff;
    border: 1.5px solid var(--border2);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.x-addr-card.selected { border-color: var(--primary); background: var(--primary-faint); }
.x-addr-card i { color: var(--txt3); font-size: 1.1rem; }
.x-addr-card.selected i { color: var(--primary); }
.x-addr-info { flex:1; }
.x-addr-label { font-size: 0.75rem; font-weight: 800; color: var(--primary); text-transform: uppercase; }
.x-addr-street { font-size: 0.9rem; font-weight: 700; color: var(--txt1); margin-top: 2px; }
.x-addr-meta { font-size: 0.75rem; color: var(--txt3); margin-top: 2px; }

.x-new-addr-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--sh-sm);
}
.x-input {
    width: 100%;
    height: 42px;
    border: 1.5px solid var(--border2);
    border-radius: 8px;
    padding: 0 14px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    background: #f8fafc;
    color: var(--txt1);
    outline: none;
    transition: border-color 0.2s;
}
.x-input:focus { border-color: var(--primary); background: #fff; }
.x-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.x-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }


/* ── BUTTONS ── */
.x-wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    gap: 12px;
}
.x-btn-primary, .x-btn-secondary, .x-btn-success {
    height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    transition: all 0.2s;
    flex: 1;
}
.x-btn-primary { background: var(--primary); color: #fff; }
.x-btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.x-btn-secondary { background: #e2e8f0; color: #475569; }
.x-btn-secondary:hover { background: #cbd5e1; }
.x-btn-success { background: #16a34a; color: #fff; }
.x-btn-success:hover { background: #15803d; transform: translateY(-1px); }
.x-btn-primary:disabled { opacity: 0.6; pointer-events: none; }


/* ── STEP 3: UPLOAD ── */
.x-upload-box {
    border: 2px dashed #94a3b8;
    background: #f1f5f9;
    border-radius: 16px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}
.x-upload-box:hover {
    border-color: var(--primary);
    background: var(--primary-faint);
}
.x-upload-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 12px;
}
.x-upload-box h3 { font-size: 1rem; font-weight: 800; color: var(--txt1); }
.x-upload-box p { font-size: 0.8rem; color: var(--txt3); margin-top: 4px; }

.x-processing {
    text-align: center;
    padding: 20px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.x-file-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.x-file-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--sh-sm);
    overflow: hidden;
}
.x-fc-head {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    gap: 12px;
}
.x-fc-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: #fee2e2; color: #dc2626;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.x-fc-icon.img { background: #dcfce7; color: #16a34a; }
.x-fc-info { flex: 1; min-width: 0; }
.x-fc-name { font-size: 0.85rem; font-weight: 800; color: var(--txt1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-fc-meta { font-size: 0.7rem; color: var(--txt3); margin-top: 2px; }
.x-fc-del {
    background: none; border: none; color: #94a3b8; font-size: 1.1rem; cursor: pointer; padding: 4px;
}
.x-fc-del:hover { color: #dc2626; }

.x-fc-body { padding: 14px; }
.x-config-row {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.x-config-row:last-child { margin-bottom: 0; }
.x-config-label { font-size: 0.8rem; font-weight: 700; color: var(--txt2); }

.x-select {
    height: 32px;
    border: 1.5px solid var(--border2);
    border-radius: 6px;
    padding: 0 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--txt1);
    background: #fff;
    outline: none;
    cursor: pointer;
}
.x-select:focus { border-color: var(--primary); }

.x-qty-ctrl {
    display: flex; align-items: center; gap: 8px;
}
.x-qty-btn {
    width: 28px; height: 28px;
    border-radius: 6px;
    border: none; background: #e2e8f0; color: #475569;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.8rem;
}
.x-qty-btn:hover { background: #cbd5e1; }
.x-qty-val { font-size: 0.9rem; font-weight: 800; width: 24px; text-align: center; }

.x-file-price {
    text-align: right;
    font-size: 1rem; font-weight: 800; color: var(--primary);
    padding: 10px 14px;
    background: var(--primary-faint);
    border-top: 1px solid var(--primary-light);
}
.x-price-note {
    font-size: 0.75rem; color: #64748b; margin-top: 10px; text-align: center;
}

/* ── STEP 4: SUMMARY ── */
.x-summary-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--sh-sm);
}
.x-sum-row {
    display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.9rem;
}
.x-sum-label { color: var(--txt3); font-weight: 600; }
.x-sum-val { color: var(--txt1); font-weight: 800; text-align: right; }
.x-sum-divider {
    height: 1px; background: var(--border2); margin: 16px 0;
}
.x-sum-total {
    font-size: 1.2rem;
}
.x-sum-total .x-sum-val { color: var(--primary); font-size: 1.4rem; }


/* ═══════════════════════════════════════════════════════════════════
   VALIDATION ERROR POPUP
   ═══════════════════════════════════════════════════════════════════ */
.validation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.validation-dialog {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px 28px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.validation-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.validation-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--txt1);
    margin-bottom: 12px;
}

.validation-msg {
    font-size: 0.95rem;
    color: var(--txt2);
    line-height: 1.6;
    margin-bottom: 24px;
}

.validation-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.validation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@media (max-width: 480px) {
    .validation-dialog {
        padding: 28px 24px;
    }
    
    .validation-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .validation-title {
        font-size: 1.2rem;
    }
    
    .validation-msg {
        font-size: 0.9rem;
    }
}
