/* =========================================================
   Supplier Registration Wizard
   ========================================================= */

.wizard-wrap { max-width: 960px; margin: 0 auto; padding: var(--sp-6) var(--sp-5) var(--sp-8); }

/* ---------- Progress indicator ---------- */
.progress-steps { display: flex; margin: 0 0 var(--sp-6); padding: 0; list-style: none; position: relative; }
.progress-steps::before {
    content: ''; position: absolute; top: 22px; left: 8%; right: 8%; height: 3px;
    background: linear-gradient(to right, var(--gray-200) 0%, var(--gray-200) 100%);
    border-radius: 3px; z-index: 0;
}
.progress-steps li { flex: 1; position: relative; z-index: 1; text-align: center; }
.step-dot {
    width: 44px; height: 44px; margin: 0 auto 0.5rem; border-radius: 50%;
    background: #fff; border: 3px solid var(--gray-300); color: var(--gray-400);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; transition: all var(--t-base);
}
.step-dot svg { width: 18px; height: 18px; display: none; }
.step-label { font-size: var(--fs-xs); font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.6px; transition: color var(--t-base); }
.progress-steps li.active .step-dot { background: var(--ramco-navy); border-color: var(--ramco-navy); color: #fff; box-shadow: 0 0 0 6px rgba(18,35,61,0.12); }
.progress-steps li.active .step-label { color: var(--ramco-navy); }
.progress-steps li.done .step-dot { background: var(--ramco-red); border-color: var(--ramco-red); color: #fff; }
.progress-steps li.done .step-dot svg { display: block; }
.progress-steps li.done .step-label { color: var(--ramco-red); }

/* ---------- Panels ---------- */
.wizard-panel { display: none; animation: panel-in 0.35s ease; }
.wizard-panel.active { display: block; }
.wizard-panel[hidden] { display: none !important; }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.form-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--r-xl); box-shadow: var(--sh-md); padding: var(--sp-6); margin-bottom: var(--sp-5); }
.form-card .card-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: var(--sp-5); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--gray-100); }

/* Wizard footer nav */
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); }
.wizard-nav .nav-right { display: flex; gap: var(--sp-3); }

/* Items/Contacts tables */
.list-shell { margin-top: var(--sp-4); }
.list-shell .data-table-wrap { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: var(--r-lg); }

/* Family multi-select */
.fam-select { border: 1px solid var(--gray-200); border-radius: var(--r-lg); padding: var(--sp-3); background: var(--gray-50); max-height: 220px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-2); }
.fam-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.65rem; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--r-md); font-size: var(--fs-sm); cursor: pointer; transition: border-color var(--t-base), background var(--t-base); }
.fam-item:hover { border-color: var(--ramco-navy); }
.fam-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ramco-red); flex-shrink: 0; }
.fam-item:has(input:checked) { border-color: var(--ramco-red); background: #ffeef0; color: var(--ramco-navy); }
.fam-empty { grid-column: 1 / -1; text-align: center; color: var(--gray-400); font-size: var(--fs-sm); padding: var(--sp-3); }
.fam-actions { display: flex; justify-content: flex-end; margin-top: var(--sp-3); }
.fam-actions .btn { min-width: 220px; }

/* Summary strip after success */
.summary-ok { text-align: center; padding: var(--sp-6); }
.summary-ok .big-check { width: 72px; height: 72px; margin: 0 auto var(--sp-4); border-radius: 50%; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; }
.summary-ok .big-check svg { width: 36px; height: 36px; }

/* Loading overlay for AJAX adds */
.adding::before { content: ''; display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; vertical-align: -2px; margin-right: 6px; animation: rot 0.7s linear infinite; }

@media (max-width: 640px) {
    .progress-steps li { display: flex; flex-direction: column; align-items: center; }
    .step-label { display: none; }
    .wizard-nav { flex-direction: column-reverse; }
    .wizard-nav .nav-right, .wizard-nav .btn { width: 100%; }
    .form-card { padding: var(--sp-5) var(--sp-4); }
}