/* Import wizard ------------------------------------------------------------ */

.import-stepper {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0 0 18px;
}
.import-stepper li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}
.import-stepper li .dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e7ece9;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.import-stepper li.active {
    color: var(--text);
    border-color: var(--primary);
    background: var(--primary-soft);
}
.import-stepper li.active .dot { background: var(--primary-2); color: #fff; }
.import-stepper li.done .dot { background: var(--primary); color: #fff; }

.step-heading { margin: 4px 0 12px; font-size: 15px; }
.step-sub { color: var(--muted); font-size: 14px; margin: -4px 0 16px; }

/* Target selection */
.target-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.target-option input { position: absolute; opacity: 0; pointer-events: none; }
.target-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.target-card i { width: 22px; height: 22px; color: var(--primary); }
.target-card strong { font-size: 14px; }
.target-card small { color: var(--muted); font-size: 12px; }
.target-option input:checked + .target-card {
    border-color: var(--primary);
    background: var(--primary-soft);
}

/* Drop zone */
.drop-zone {
    border: 2px dashed #c2cdc9;
    border-radius: 14px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.drop-zone > i { width: 32px; height: 32px; color: var(--primary); }
.dz-primary { font-size: 14px; margin: 10px 0 2px; }
.dz-hint { color: var(--muted); font-size: 12px; margin: 0; }
.dz-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
}
.dz-file i { width: 16px; height: 16px; color: var(--primary); }

.link-btn {
    background: none;
    border: none;
    color: var(--primary-2);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Wizard actions */
.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.primary-btn.is-loading { opacity: .65; pointer-events: none; }

/* Mapping table */
.mapping-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.mapping-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mapping-table thead th {
    text-align: left;
    padding: 10px 14px;
    background: #f3f5f4;
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.mapping-table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.mapping-table .col-name { font-weight: 600; }
.mapping-table .col-sample { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    min-height: 38px;
}
.map-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }

.map-warn {
    margin: 14px 0 0;
    padding: 10px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    color: #9a3412;
    font-size: 13px;
}
.req { color: var(--danger); font-weight: 700; }

/* Progress */
.progress-track {
    height: 10px;
    border-radius: 999px;
    background: #e7ece9;
    overflow: hidden;
    margin: 18px 0 10px;
}
.progress-fill {
    height: 100%;
    width: 5%;
    background: var(--primary);
    border-radius: 999px;
    transition: width .4s ease;
}
.progress-label { color: var(--muted); font-size: 13px; margin: 0; }

/* Result */
.result-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.result-head i { width: 28px; height: 28px; flex-shrink: 0; }
.result-head h3 { margin: 0 0 2px; }
.result-head p { margin: 0; color: var(--muted); font-size: 14px; }
.result-head.is-success i { color: var(--primary); }
.result-head.is-error i { color: var(--danger); }

.result-stats { display: flex; gap: 12px; margin-bottom: 20px; }
.result-stats .stat {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.result-stats .stat-num { font-size: 22px; font-weight: 700; }
.result-stats .stat-lbl { font-size: 12px; color: var(--muted); }
.result-stats .stat.ok .stat-num { color: var(--primary); }
.result-stats .stat.warn .stat-num { color: #b45309; }

.result-errors { border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 8px; }
.result-errors-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.result-errors-head h4 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.result-errors-head i { width: 16px; height: 16px; color: #b45309; }
.errors-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.errors-table thead th { text-align: left; padding: 8px 12px; color: var(--muted); font-weight: 600; font-size: 12px; }
.errors-table td { padding: 8px 12px; border-top: 1px solid var(--line); }
.errors-table .err-row { width: 64px; font-weight: 600; color: var(--muted); }

@media (max-width: 640px) {
    .target-toggle { grid-template-columns: 1fr; }
    .result-stats { flex-direction: column; }
}
