/* ============================================================
   IMPORT  —  Import wizard (step 1 of 5)
   ============================================================ */
.imp-page{display:flex;flex-direction:column}
.imp-header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-4);margin-bottom:var(--space-5)}
.imp-header__left{display:flex;flex-direction:column;gap:4px;min-width:0}
.imp-title{font-size:var(--text-3xl);font-weight:var(--weight-bold);color:var(--text-primary);letter-spacing:-.02em;line-height:1.2}
.imp-subtitle{font-size:var(--text-base);font-weight:var(--weight-regular);color:var(--text-secondary);line-height:1.4}
.imp-help{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 var(--space-4);background:var(--surface);border:1px solid var(--border);border-radius:8px;
  font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--text-secondary);cursor:pointer;white-space:nowrap;flex-shrink:0;
  transition:background var(--duration-fast) var(--ease),border-color var(--duration-fast) var(--ease)}
.imp-help:hover{background:var(--surface-2);border-color:var(--border-hi)}
.imp-help svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Stepper */
.imp-stepper{display:flex;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-xl);box-shadow:var(--shadow-sm);padding:var(--space-4) var(--space-5);margin-bottom:var(--space-5);gap:0}
.imp-step{display:flex;align-items:center;gap:var(--space-2);flex-shrink:0}
.imp-step__num{width:28px;height:28px;min-width:28px;border-radius:var(--radius-full);display:flex;align-items:center;justify-content:center;
  font-size:var(--text-sm);font-weight:var(--weight-semibold);border:2px solid var(--border);color:var(--text-muted);background:var(--surface)}
.imp-step--active .imp-step__num{background:var(--brand);border-color:var(--brand);color:#fff}
.imp-step--done .imp-step__num{background:var(--brand);border-color:var(--brand);color:#fff}
.imp-step__label{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--text-muted);white-space:nowrap}
.imp-step--active .imp-step__label{color:var(--text-primary);font-weight:var(--weight-semibold)}
.imp-step__line{flex:1;height:2px;background:var(--border);margin:0 var(--space-3);min-width:24px}

/* Main 2-column layout */
.imp-main{display:grid;grid-template-columns:39fr 61fr;gap:var(--space-5);align-items:start}
.imp-left{display:flex;flex-direction:column;gap:var(--space-5);min-width:0}
.imp-right{min-width:0}
.imp-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-xl);box-shadow:var(--shadow-sm);padding:var(--space-5)}
.imp-card__title{font-size:var(--text-md);font-weight:var(--weight-semibold);color:var(--text-primary);line-height:1.3}
.imp-card__sub{font-size:var(--text-sm);color:var(--text-muted);line-height:1.4;margin-top:2px;margin-bottom:var(--space-4)}
.imp-empty-inline{font-size:var(--text-sm);color:var(--text-muted);padding:var(--space-4) 0;text-align:center}

/* Import type cards */
.imp-types{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-3)}
.imp-type{position:relative;display:flex;flex-direction:column;gap:var(--space-2);min-height:92px;padding:var(--space-3);border:1px solid var(--border);border-radius:var(--radius-lg);cursor:pointer;
  transition:border-color var(--duration-fast) var(--ease),background var(--duration-fast) var(--ease),box-shadow var(--duration-fast) var(--ease)}
.imp-type:hover{border-color:var(--border-hi);box-shadow:var(--shadow-xs)}
.imp-type--full{grid-column:1 / -1}
.imp-type--selected{border-color:var(--info);background:var(--info-bg)}
.imp-type__icon{width:36px;height:36px;min-width:36px;border-radius:var(--radius-md);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.imp-type__icon svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-type__icon--blue{background:var(--info-bg);color:var(--info)}
.imp-type__icon--green{background:var(--success-bg);color:var(--success)}
.imp-type__icon--purple{background:var(--purple-bg);color:var(--purple)}
.imp-type__icon--orange{background:var(--warning-bg);color:var(--warning)}
.imp-type__icon--cyan{background:var(--info-bg);color:var(--info)}
.imp-type__icon--teal{background:var(--teal-bg);color:var(--teal)}
.imp-type__name{font-size:var(--text-base);font-weight:var(--weight-semibold);color:var(--text-primary);line-height:1.2}
.imp-type__desc{font-size:var(--text-xs);color:var(--text-muted);line-height:1.4}
.imp-type__check{position:absolute;top:var(--space-3);right:var(--space-3);width:20px;height:20px;border-radius:var(--radius-full);background:var(--info);display:none;align-items:center;justify-content:center}
.imp-type__check svg{width:12px;height:12px;stroke:#fff;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.imp-type--selected .imp-type__check{display:flex}

/* Source selector */
.imp-source{display:flex;align-items:center;gap:var(--space-3);height:48px;padding:0 var(--space-3);border:1px solid var(--border);border-radius:8px;cursor:pointer;
  transition:border-color var(--duration-fast) var(--ease),background var(--duration-fast) var(--ease)}
.imp-source:hover{border-color:var(--border-hi);background:var(--surface-2)}
.imp-source__icon{width:28px;height:28px;border-radius:var(--radius-sm);background:var(--success-bg);color:var(--success);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.imp-source__icon svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-source__label{flex:1;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--text-primary)}
.imp-source__chev{width:16px;height:16px;color:var(--text-muted);flex-shrink:0;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Right card: upload + preview */
.imp-upload{display:flex;align-items:center;gap:var(--space-3);min-height:64px;padding:var(--space-4);border:1px solid var(--border);border-radius:10px;margin-bottom:var(--space-4)}
.imp-upload__icon{width:36px;height:36px;border-radius:var(--radius-md);background:var(--success-bg);color:var(--success);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.imp-upload__icon svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-upload__info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.imp-upload__name{font-size:var(--text-base);font-weight:var(--weight-semibold);color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.imp-upload__meta{font-size:var(--text-xs);color:var(--text-muted)}
.imp-upload__status{display:inline-flex;align-items:center;gap:5px;font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--success);white-space:nowrap}
.imp-upload__status svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.imp-upload__change{display:inline-flex;align-items:center;height:32px;padding:0 var(--space-3);border:1px solid var(--border);border-radius:8px;background:var(--surface);
  font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--text-secondary);cursor:pointer;white-space:nowrap;flex-shrink:0;transition:background var(--duration-fast) var(--ease),border-color var(--duration-fast) var(--ease)}
.imp-upload__change:hover{background:var(--surface-2);border-color:var(--border-hi)}

.imp-tabs{display:flex;align-items:center;gap:var(--space-5);border-bottom:1px solid var(--border);margin-bottom:var(--space-4)}
.imp-tab{padding:0 0 var(--space-3);font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--text-secondary);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color var(--duration-fast) var(--ease)}
.imp-tab:hover{color:var(--text-primary)}
.imp-tab--active{color:var(--info);border-bottom-color:var(--info);font-weight:var(--weight-semibold)}

.imp-summary{display:flex;align-items:center;gap:var(--space-6);padding:var(--space-3) var(--space-4);border:1px solid var(--border);border-radius:10px;margin-bottom:var(--space-4)}
.imp-summary__item{display:flex;align-items:center;gap:6px;font-size:var(--text-sm)}
.imp-summary__label{color:var(--text-muted)}
.imp-summary__value{font-weight:var(--weight-semibold);color:var(--text-primary)}

.imp-tablewrap{border:1px solid var(--border);border-radius:10px;overflow:hidden;overflow-x:auto}
.imp-table{width:100%;border-collapse:collapse;font-size:var(--text-xs)}
.imp-table th{background:var(--surface-2);text-align:left;font-size:var(--text-xs);font-weight:var(--weight-semibold);color:var(--text-muted);text-transform:uppercase;letter-spacing:.02em;
  padding:10px var(--space-3);white-space:nowrap;border-bottom:1px solid var(--border)}
.imp-table td{padding:0 var(--space-3);height:48px;font-size:var(--text-xs);color:var(--text-secondary);border-bottom:1px solid var(--border);white-space:nowrap;vertical-align:middle}
.imp-table tr:last-child td{border-bottom:none}
.imp-table tr:hover td{background:var(--surface-2)}
.imp-table__id{font-family:var(--font-mono);font-weight:var(--weight-semibold);color:var(--text-primary)}
.imp-table__title{color:var(--text-primary);font-weight:var(--weight-medium)}
.imp-pri{display:inline-flex;align-items:center;height:20px;padding:0 var(--space-2);border-radius:var(--radius-full);font-size:var(--text-xs);font-weight:var(--weight-semibold)}
.imp-pri--high{background:var(--error-bg);color:var(--error)}
.imp-pri--medium{background:var(--warning-bg);color:var(--warning)}
.imp-pri--low{background:var(--surface-2);color:var(--text-muted)}

/* Auto-mapping callout */
.imp-callout{display:flex;align-items:center;gap:var(--space-3);min-height:64px;padding:var(--space-3) var(--space-4);background:var(--success-bg);border:1px solid var(--success-border);border-radius:10px;margin-top:var(--space-4)}
.imp-callout__icon{width:32px;height:32px;border-radius:var(--radius-md);background:rgba(18,183,106,.18);color:var(--success);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.imp-callout__icon svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-callout__text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.imp-callout__title{font-size:var(--text-base);font-weight:var(--weight-semibold);color:var(--success)}
.imp-callout__sub{font-size:var(--text-xs);color:var(--text-secondary)}
.imp-callout__btn{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 var(--space-3);background:var(--surface);border:1px solid var(--success-border);border-radius:8px;
  font-size:var(--text-sm);font-weight:var(--weight-semibold);color:var(--success);cursor:pointer;white-space:nowrap;flex-shrink:0;transition:background var(--duration-fast) var(--ease)}
.imp-callout__btn:hover{background:rgba(18,183,106,.10)}
.imp-callout__btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Bottom action bar */
.imp-actions{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:var(--space-4) var(--space-5);margin-top:var(--space-4)}
.imp-actions__right{display:flex;align-items:center;gap:var(--space-2)}
.imp-btn{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 var(--space-4);border-radius:8px;font-size:var(--text-base);font-weight:var(--weight-semibold);cursor:pointer;border:1px solid transparent;white-space:nowrap;
  transition:background var(--duration-fast) var(--ease),border-color var(--duration-fast) var(--ease),color var(--duration-fast) var(--ease)}
.imp-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.imp-btn--ghost{background:var(--surface);border-color:var(--border);color:var(--text-secondary)}
.imp-btn--ghost:hover{background:var(--surface-2);border-color:var(--border-hi);color:var(--text-primary)}
.imp-btn--primary{background:var(--brand);border-color:var(--brand);color:#fff}
.imp-btn--primary:hover{filter:brightness(.95)}

@media(max-width:1200px){.imp-main{grid-template-columns:1fr}.imp-stepper{flex-wrap:wrap;gap:var(--space-2)}.imp-step__line{display:none}}

/* ---- Wizard additions ---- */
.imp-content{display:flex;flex-direction:column;gap:var(--space-5);margin-bottom:var(--space-4)}
.imp-card--wide{width:100%}
.imp-step__line--done{background:var(--brand)}
.imp-type__fmt{font-size:var(--text-xs);color:var(--text-muted);margin-top:2px}
.imp-btn--sm{height:32px;padding:0 var(--space-3);font-size:var(--text-sm)}
.imp-inline-err{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-3);padding:var(--space-2) var(--space-3);background:var(--error-bg);border:1px solid var(--error-border,var(--error));border-radius:var(--radius-sm);font-size:var(--text-sm);color:var(--error)}
.imp-inline-err svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}

/* Step 2 */
.imp-step2{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-5);align-items:start}
.imp-form-field{display:flex;flex-direction:column;gap:var(--space-1);margin-bottom:var(--space-4)}
.imp-label{font-size:var(--text-xs);font-weight:var(--weight-semibold);color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}
.imp-select{height:38px;padding:0 var(--space-3);background:var(--surface-0,var(--surface));border:1px solid var(--border);border-radius:var(--radius-sm);font-size:var(--text-sm);color:var(--text-primary);width:100%;cursor:pointer;transition:border-color var(--duration-fast) var(--ease)}
.imp-select:focus{outline:none;border-color:var(--info);box-shadow:0 0 0 3px rgba(41,121,255,.12)}
.imp-input{height:38px;padding:0 var(--space-3);background:var(--surface-0,var(--surface));border:1px solid var(--border);border-radius:var(--radius-sm);font-size:var(--text-sm);color:var(--text-primary);width:100%;transition:border-color var(--duration-fast) var(--ease)}
.imp-field-hint{font-size:var(--text-xs);color:var(--text-muted);margin-top:2px}
.imp-new-proj-row{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-2);flex-wrap:wrap}
.imp-new-proj-row .imp-input{flex:1;min-width:160px}
.imp-input:focus{outline:none;border-color:var(--info);box-shadow:0 0 0 3px rgba(41,121,255,.12)}
.imp-dropzone{border:2px dashed var(--border);border-radius:var(--radius-lg);padding:var(--space-8) var(--space-5);margin-top:var(--space-4);cursor:pointer;transition:border-color var(--duration-fast) var(--ease),background var(--duration-fast) var(--ease)}
.imp-dropzone:hover,.imp-dropzone--over{border-color:var(--info);background:var(--info-bg)}
.imp-dropzone__inner{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);text-align:center}
.imp-dropzone__icon{color:var(--text-muted)}
.imp-dropzone__icon svg{width:28px;height:28px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-dropzone__title{font-size:var(--text-sm);color:var(--text-secondary)}
.imp-dropzone__browse{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 var(--space-4);background:var(--info);color:#fff;border-radius:var(--radius-sm);font-size:var(--text-sm);font-weight:var(--weight-semibold);cursor:pointer;transition:filter var(--duration-fast) var(--ease)}
.imp-dropzone__browse:hover{filter:brightness(.92)}
.imp-dropzone__browse input{display:none}
.imp-dropzone__note{font-size:var(--text-xs);color:var(--text-muted)}
.imp-upload2{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);border:1px solid var(--border);border-radius:var(--radius-md);margin-bottom:var(--space-4)}
.imp-upload2__icon{width:36px;height:36px;border-radius:var(--radius-md);background:var(--success-bg);color:var(--success);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.imp-upload2__icon svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-upload2__info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.imp-upload2__name{font-size:var(--text-sm);font-weight:var(--weight-semibold);color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.imp-upload2__meta{font-size:var(--text-xs);color:var(--text-muted)}
.imp-upload2__ok{display:inline-flex;align-items:center;gap:4px;font-size:var(--text-xs);font-weight:var(--weight-semibold);color:var(--success);flex-shrink:0}
.imp-upload2__ok svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.imp-upload2__btns{display:flex;gap:var(--space-2);margin-top:var(--space-4)}
.imp-checklist{display:flex;flex-direction:column;gap:var(--space-2)}
.imp-checklist__item{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-sm);color:var(--text-secondary)}
.imp-checklist__dot{width:18px;height:18px;border-radius:var(--radius-full);background:var(--success-bg);color:var(--success);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.imp-checklist__dot svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

/* Step 3 mapping */
.imp-map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-3) 0;margin-bottom:var(--space-3)}
.imp-map-conf{font-size:var(--text-sm);color:var(--text-secondary)}
.imp-map-conf strong{color:var(--text-primary)}
.imp-map-rows{display:flex;flex-direction:column;gap:var(--space-2)}
.imp-map-row{display:grid;grid-template-columns:1fr 32px 1fr 28px;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface)}
.imp-map-row:hover{background:var(--surface-2)}
.imp-map-src{min-width:0}
.imp-map-select{width:100%}
.imp-map-arrow{display:flex;align-items:center;justify-content:center;color:var(--text-muted)}
.imp-map-arrow svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-map-dst{display:flex;align-items:center;gap:var(--space-2);min-width:0}
.imp-map-dst__name{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.imp-map-badge{display:inline-flex;align-items:center;height:18px;padding:0 var(--space-1);border-radius:var(--radius-sm);background:var(--error-bg);color:var(--error);font-size:10px;font-weight:var(--weight-bold);flex-shrink:0}
.imp-map-status{width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-full);flex-shrink:0}
.imp-map-status svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.imp-map-status--ok{background:var(--success-bg);color:var(--success)}
.imp-map-status--warn{background:var(--warning-bg);color:var(--warning)}
.imp-map-status--missing{background:var(--error-bg);color:var(--error)}

/* Step 4 */
.imp-step4{display:flex;flex-direction:column;gap:var(--space-5)}
.imp-step4__summary{margin-top:0}
.imp-valid-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:var(--space-3);margin-top:var(--space-3)}
.imp-valid-item{display:flex;flex-direction:column;align-items:center;gap:var(--space-1);padding:var(--space-3);border:1px solid var(--border);border-radius:var(--radius-md);text-align:center}
.imp-valid-num{font-size:var(--text-xl);font-weight:var(--weight-bold);color:var(--text-primary)}
.imp-valid-lbl{font-size:var(--text-xs);color:var(--text-muted)}
.imp-valid-item--ok .imp-valid-num{color:var(--success)}
.imp-valid-item--ok{background:var(--success-bg);border-color:var(--success-border,var(--success))}
.imp-valid-item--warn{background:var(--warning-bg);border-color:var(--warning-border,var(--warning))}
.imp-valid-item--warn .imp-valid-num{color:var(--warning)}
.imp-valid-item--ok2 .imp-valid-num{color:var(--success)}
.imp-valid-items{display:flex;flex-wrap:wrap;gap:var(--space-3)}
.imp-valid-items span{display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-sm);color:var(--success)}
.imp-valid-items span svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.imp-warn-list{display:flex;flex-direction:column;gap:var(--space-2)}
.imp-warn-item{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-sm);color:var(--warning)}
.imp-warn-item svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.imp-warn-item--none{color:var(--success)}
.imp-warn-item--err{color:var(--error)}

/* Import guide modal */
.imp-guide-overlay{position:fixed;inset:0;background:rgba(8,12,24,.5);display:flex;align-items:flex-start;justify-content:center;z-index:1300;padding:var(--space-8) var(--space-4);overflow-y:auto}
.imp-guide{width:100%;max-width:680px;background:var(--surface-0,#fff);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow-lg);padding:var(--space-6)}
.imp-guide__head{display:flex;align-items:center;justify-content:space-between}
.imp-guide__title{font-size:var(--text-xl);font-weight:var(--weight-bold);color:var(--text-primary);margin:0}
.imp-guide__close{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:8px;background:none;cursor:pointer;color:var(--text-secondary)}
.imp-guide__close:hover{background:var(--surface-2)}
.imp-guide__sub{font-size:var(--text-sm);color:var(--text-secondary);margin:var(--space-2) 0 var(--space-5)}
.imp-guide__steps{display:flex;flex-direction:column;gap:var(--space-4)}
.imp-guide-step{display:flex;gap:var(--space-3)}
.imp-guide-step__n{flex:none;width:26px;height:26px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-full);background:var(--brand,#2563eb);color:#fff;font-size:var(--text-xs);font-weight:var(--weight-bold)}
.imp-guide-step__title{font-size:var(--text-base);font-weight:var(--weight-semibold);color:var(--text-primary);margin-bottom:2px}
.imp-guide-step__text{font-size:var(--text-sm);color:var(--text-secondary);line-height:1.5}
.imp-guide__section{font-size:var(--text-sm);font-weight:var(--weight-bold);color:var(--text-primary);margin:var(--space-5) 0 var(--space-2)}
.imp-guide__table{width:100%;border-collapse:collapse;font-size:var(--text-sm)}
.imp-guide__table th,.imp-guide__table td{text-align:left;padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--border)}
.imp-guide__table th{color:var(--text-secondary);font-weight:var(--weight-semibold)}
.imp-guide__table td{color:var(--text-primary)}
.imp-guide__table td:last-child{font-family:var(--font-mono,monospace);color:var(--text-secondary)}
.imp-guide__tips{margin:0;padding-left:var(--space-5);display:flex;flex-direction:column;gap:var(--space-2)}
.imp-guide__tips li{font-size:var(--text-sm);color:var(--text-secondary);line-height:1.5}

/* Test Case import-conflict strategy modal (reuses .imp-guide/.imp-guide-overlay) */
.imp-strategy__options{display:flex;flex-direction:column;gap:var(--space-3);margin-top:var(--space-2)}
.imp-strategy__option{display:flex;align-items:flex-start;gap:var(--space-3);padding:var(--space-4);border:1px solid var(--border);border-radius:10px;cursor:pointer;transition:border-color .15s,background .15s}
.imp-strategy__option:hover{background:var(--surface-2)}
.imp-strategy__option:has(input:checked){border-color:var(--brand,#2563eb);background:var(--brand-muted,rgba(37,99,235,.06))}
.imp-strategy__option input[type="radio"]{margin-top:3px;flex:none}
.imp-strategy__text{display:flex;flex-direction:column;gap:2px}
.imp-strategy__text strong{font-size:var(--text-base);color:var(--text-primary)}
.imp-strategy__text span{font-size:var(--text-sm);color:var(--text-secondary);line-height:1.5}
.imp-strategy__foot{display:flex;justify-content:flex-end;gap:var(--space-2);margin-top:var(--space-6)}

/* Step 5 */
.imp-step5{display:flex;flex-direction:column;gap:var(--space-5)}
.imp-step5__hero{text-align:center;padding:var(--space-8) var(--space-5)}
.imp-hero-icon{display:flex;justify-content:center;margin-bottom:var(--space-4);color:var(--success)}
.imp-hero-icon svg{width:52px;height:52px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-hero-title{font-size:var(--text-xl);font-weight:var(--weight-bold);color:var(--text-primary);margin-bottom:var(--space-2)}
.imp-hero-sub{font-size:var(--text-base);color:var(--text-secondary)}
.imp-result-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:var(--space-4)}
.imp-result-card{display:flex;flex-direction:column;align-items:center;gap:var(--space-1);padding:var(--space-5) var(--space-4);border:1px solid var(--border);border-radius:var(--radius-lg);text-align:center;background:var(--surface)}
.imp-result-num{font-size:var(--text-2xl);font-weight:var(--weight-bold)}
.imp-result-lbl{font-size:var(--text-xs);color:var(--text-muted);font-weight:var(--weight-medium)}
.imp-result-card--ok{background:var(--success-bg);border-color:var(--success-border,var(--success))}.imp-result-card--ok .imp-result-num{color:var(--success)}
.imp-result-card--blue{background:var(--info-bg);border-color:var(--info-border,var(--info))}.imp-result-card--blue .imp-result-num{color:var(--info)}
.imp-result-card--purple{background:var(--purple-bg);border-color:var(--purple-border,var(--purple))}.imp-result-card--purple .imp-result-num{color:var(--purple)}
.imp-result-card--warn{background:var(--warning-bg);border-color:var(--warning-border,var(--warning))}.imp-result-card--warn .imp-result-num{color:var(--warning)}
.imp-step5__grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-5)}
.imp-details{display:flex;flex-direction:column;gap:var(--space-3)}
.imp-detail{display:flex;gap:var(--space-4)}
.imp-detail__k{font-size:var(--text-sm);color:var(--text-muted);width:140px;flex-shrink:0}
.imp-detail__v{font-size:var(--text-sm);color:var(--text-primary);font-weight:var(--weight-medium)}
.imp-created-list{display:flex;flex-direction:column;gap:var(--space-2)}
.imp-created-item{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-sm);color:var(--text-secondary)}
.imp-created-chk{width:18px;height:18px;border-radius:var(--radius-full);background:var(--success-bg);color:var(--success);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.imp-created-chk svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.imp-step5__links{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3)}
.imp-step5__links a,.imp-step5__links button{text-decoration:none}

/* History */
.imp-hist-list{display:flex;flex-direction:column;gap:var(--space-2);margin-top:var(--space-3)}
.imp-hist-item{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface)}
.imp-hist-icon{color:var(--text-muted);flex-shrink:0}
.imp-hist-icon svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-hist-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.imp-hist-name{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.imp-hist-meta{font-size:var(--text-xs);color:var(--text-muted)}
.imp-hist-ok{display:inline-flex;align-items:center;gap:4px;font-size:var(--text-xs);color:var(--success);white-space:nowrap;flex-shrink:0}
.imp-hist-ok svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.imp-hist-time{font-size:var(--text-xs);color:var(--text-muted);white-space:nowrap;flex-shrink:0}

/* Progress overlay */
.imp-prog-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:500;display:flex;align-items:center;justify-content:center}
.imp-prog-box{background:var(--surface-1,var(--surface));border:1px solid var(--border);border-radius:var(--radius-xl);box-shadow:var(--shadow-lg);padding:var(--space-8) var(--space-10);min-width:340px;display:flex;flex-direction:column;align-items:center;gap:var(--space-4)}
.imp-prog-spin{color:var(--info)}
.imp-spin-svg{animation:imp-spin 1s linear infinite}
@keyframes imp-spin{to{transform:rotate(360deg)}}
.imp-prog-title{font-size:var(--text-lg);font-weight:var(--weight-semibold);color:var(--text-primary)}
.imp-prog-bar-wrap{width:100%;height:8px;background:var(--surface-2,var(--border));border-radius:var(--radius-full);overflow:hidden}
.imp-prog-bar{height:100%;background:var(--info);border-radius:var(--radius-full);transition:width .3s ease}
.imp-prog-txt{font-size:var(--text-sm);color:var(--text-secondary)}
.imp-prog-pct{font-size:var(--text-sm);font-weight:var(--weight-semibold);color:var(--info)}

/* Toast */
.imp-toast{position:fixed;bottom:var(--space-6);left:50%;transform:translateX(-50%) translateY(12px);background:var(--surface-2,var(--surface));color:var(--text-primary);border:1px solid var(--border);border-radius:var(--radius-full);padding:var(--space-2) var(--space-5);font-size:var(--text-sm);font-weight:var(--weight-medium);white-space:nowrap;opacity:0;z-index:9999;pointer-events:none;transition:opacity var(--duration-base) var(--ease),transform var(--duration-base) var(--ease);box-shadow:var(--shadow-md)}
.imp-toast--show{opacity:1;transform:translateX(-50%) translateY(0)}
.imp-toast--success{background:var(--brand,var(--info));color:#fff;border-color:var(--brand,var(--info))}
.imp-toast--error{background:var(--error);color:#fff;border-color:var(--error)}

/* Top-level tab bar: "Import Data" (wizard) vs "Screenshot Folder" */
.imp-maintabs{display:flex;gap:var(--space-2);border-bottom:1px solid var(--border);margin-bottom:var(--space-5)}
.imp-maintab{display:inline-flex;align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-1);margin-bottom:-1px;background:none;border:none;border-bottom:2px solid transparent;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--text-secondary);cursor:pointer}
.imp-maintab svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.imp-maintab:hover{color:var(--text-primary)}
.imp-maintab--active{color:var(--brand);border-bottom-color:var(--brand);font-weight:var(--weight-semibold)}

/* Screenshot Folder -> Excel */
.ssx-card{margin-bottom:var(--space-5)}
.ssx-dropzone{border:1.5px dashed var(--border-hi);border-radius:var(--radius-lg);padding:var(--space-8) var(--space-5);text-align:center;background:var(--bg,var(--surface-2))}
.ssx-dropzone svg{color:var(--text-muted);margin-bottom:var(--space-3)}
.ssx-dropzone__title{font-size:var(--text-md);font-weight:var(--weight-semibold);color:var(--text-primary);margin-bottom:4px}
.ssx-dropzone__sub{font-size:var(--text-xs);color:var(--text-secondary);font-family:var(--font-mono,monospace)}
.ssx-dropzone .imp-btn{margin-top:var(--space-4)}
.ssx-repick{margin-top:var(--space-3)}

.ssx-scenario-tag{display:flex;align-items:center;gap:6px;font-size:var(--text-sm);color:var(--text-secondary);margin-bottom:var(--space-3)}
.ssx-scenario-tag svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8}
.ssx-scenario-tag b{color:var(--text-primary);font-family:var(--font-mono,monospace)}
.ssx-detected{background:var(--bg,var(--surface-2));border:1px solid var(--border);border-radius:var(--radius-md);padding:var(--space-2) var(--space-4)}
.ssx-detected-row{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) 0;border-bottom:1px solid var(--border)}
.ssx-detected-row:last-child{border-bottom:none}
.ssx-detected-icon{width:28px;height:28px;border-radius:var(--radius-sm);background:var(--brand-muted);color:var(--brand);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ssx-detected-name{font-weight:var(--weight-semibold);font-size:var(--text-sm);color:var(--text-primary)}
.ssx-detected-meta{font-size:var(--text-xs);color:var(--text-secondary)}
.ssx-detected-count{margin-left:auto;font-size:var(--text-xs);color:var(--text-secondary);background:var(--surface-2);padding:2px 8px;border-radius:var(--radius-full);font-family:var(--font-mono,monospace);flex-shrink:0}

.ssx-opt-row{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-4);padding:var(--space-4) 0;border-bottom:1px solid var(--border)}
.ssx-opt-row:last-child{border-bottom:none;padding-bottom:0}
.ssx-opt-row:first-child{padding-top:0}
.ssx-opt-label{font-size:var(--text-sm);font-weight:var(--weight-semibold);color:var(--text-primary);margin-bottom:2px}
.ssx-opt-desc{font-size:var(--text-xs);color:var(--text-secondary);max-width:460px;line-height:1.5}

.ssx-switch{position:relative;width:40px;height:22px;flex-shrink:0;display:inline-block}
.ssx-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;z-index:1}
.ssx-track{position:absolute;inset:0;background:var(--surface-3,var(--border-hi));border:1px solid var(--border-hi);border-radius:var(--radius-full);transition:background .15s ease,border-color .15s ease;pointer-events:none}
.ssx-thumb{position:absolute;width:16px;height:16px;left:2px;top:2px;background:#fff;border-radius:50%;transition:transform .15s ease;box-shadow:var(--shadow-xs)}
.ssx-switch input:checked + .ssx-track{background:var(--brand);border-color:var(--brand)}
.ssx-switch input:checked + .ssx-track .ssx-thumb{transform:translateX(18px)}

.ssx-segmented{display:inline-flex;background:var(--surface-2);border:1px solid var(--border-hi);border-radius:var(--radius-sm);padding:2px;flex-shrink:0}
.ssx-segmented button{border:none;background:transparent;color:var(--text-secondary);font-size:var(--text-xs);font-weight:var(--weight-semibold);padding:6px 12px;border-radius:4px;cursor:pointer}
.ssx-segmented .ssx-seg--active{background:var(--brand);color:#fff}

.ssx-error{display:flex;align-items:flex-start;gap:var(--space-2);font-size:var(--text-sm);color:var(--error);background:var(--error-bg);border:1px solid var(--error-border);border-radius:var(--radius-sm);padding:var(--space-3);margin-bottom:var(--space-5)}
.ssx-error svg{flex-shrink:0;margin-top:1px}

.ssx-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:var(--space-3)}
.ssx-footer-note{font-size:var(--text-sm);color:var(--text-secondary)}
.ssx-footer-note code{font-family:var(--font-mono,monospace);color:var(--text-primary);background:var(--surface-2);padding:2px 6px;border-radius:4px}

@media(max-width:1100px){
  .imp-step2{grid-template-columns:1fr}
  .imp-step5__grid{grid-template-columns:1fr}
  .imp-result-cards{grid-template-columns:1fr 1fr}
  .imp-valid-grid{grid-template-columns:1fr 1fr}
}
