/* ===========================================================================
   import-wizard.css — Phase 1D
   ===========================================================================
   Plan: IMPORT-V2-PHASE-1-PLAN-2026-05-13.md §6.1D step 3
   Design: CLAUDE.md Wireline + Light Sidebar Chrome
     • teal #298084 CTA
     • Geist Sans body, JetBrains Mono for grid + metrics, Newsreader 24px hero
     • no border-left stripes
     • drawer vs modal vs full-page (this is full-page per R6.13)
   =========================================================================== */

#view-import {
  padding: 28px 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.iw-hero {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
  color: #1A1F26;
  margin: 4px 0 4px;
}
.iw-sub {
  font-size: 13px;
  color: #6B7480;
  margin: 0 0 24px;
}

/* Stage breadcrumb */
.iw-steps {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6B7480;
}
.iw-step {
  padding: 6px 10px;
  border-radius: 4px;
  background: #F0F4F8;
  border: 1px solid #E2E5EA;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.iw-step.done {
  background: oklch(0.93 0.04 200);
  color: #1A1F26;
  border-color: oklch(0.78 0.06 200);
}
.iw-step.current {
  background: #FFFFFF;
  color: #298084;
  border-color: #298084;
  font-weight: 600;
}
.iw-step .iw-step-num {
  background: rgba(255,255,255,.65);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 10px;
  color: #6B7480;
}
.iw-step.current .iw-step-num {
  background: #298084;
  color: #fff;
}

/* Card surface (no nested cards — single flat surface per stage) */
.iw-card {
  background: #FFFFFF;
  border: 1px solid #E2E5EA;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Drop zone */
.iw-drop {
  border: 1px dashed #B7BFC9;
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
  background: oklch(0.98 0.005 200);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.iw-drop:hover, .iw-drop.is-dragover {
  background: oklch(0.96 0.01 200);
  border-color: #298084;
}
.iw-drop input[type="file"] { display: none; }
.iw-drop-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6B7480;
  margin-bottom: 8px;
}
.iw-drop-title {
  font-size: 14px;
  color: #1A1F26;
  margin: 0 0 4px;
}
.iw-drop-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #298084;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  margin-top: 8px;
  cursor: pointer;
  border: none;
}
.iw-drop-btn:hover { filter: brightness(1.08); }

/* Parse progress */
.iw-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  gap: 12px;
}
.iw-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #E2E5EA;
  border-top-color: #298084;
  border-radius: 50%;
  animation: iw-spin 800ms linear infinite;
}
@keyframes iw-spin { to { transform: rotate(360deg); } }
.iw-progress-msg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #6B7480;
}

/* Buttons */
.iw-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}
.iw-btn {
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.iw-btn-primary {
  background: #298084;
  color: #fff;
}
.iw-btn-primary:hover { filter: brightness(1.08); }
.iw-btn-primary:disabled {
  background: #B7BFC9;
  cursor: not-allowed;
}
.iw-btn-secondary {
  background: #FFFFFF;
  border-color: #E2E5EA;
  color: #1A1F26;
}
.iw-btn-secondary:hover { border-color: #B7BFC9; }

/* Review grid */
.iw-grid {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.iw-grid thead th {
  text-align: left;
  background: #F0F4F8;
  border-bottom: 1px solid #E2E5EA;
  padding: 8px 10px;
  font-weight: 500;
  font-size: 11px;
  color: #6B7480;
  font-family: 'Geist Sans', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iw-grid tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #F0F4F8;
  vertical-align: top;
}
.iw-grid tbody tr.flagged { background: oklch(0.985 0.025 80 / 0.45); }
.iw-grid tbody tr.error { background: oklch(0.98 0.04 25 / 0.45); }
.iw-flag-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  font-family: 'Geist Sans', system-ui, sans-serif;
}
.iw-flag-pill.pro    { background: oklch(0.93 0.05 200); color: #1A4448; }
.iw-flag-pill.target { background: #F0F4F8; color: #6B7480; }
.iw-flag-pill.govt   { background: oklch(0.93 0.04 280); color: #1F1A48; }
.iw-flag-pill.flag   { background: oklch(0.93 0.05 80); color: #4A3614; }

/* Stage summary panel */
.iw-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.iw-summary-tile {
  background: #F8F9FB;
  border: 1px solid #E2E5EA;
  border-radius: 6px;
  padding: 12px 14px;
}
.iw-summary-tile .iw-tile-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B7480;
  font-family: 'Geist Sans', system-ui, sans-serif;
}
.iw-summary-tile .iw-tile-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  color: #1A1F26;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

/* Form fields (assign stage) */
.iw-field {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}
.iw-field label {
  font-size: 12px;
  color: #6B7480;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iw-field select,
.iw-field input {
  padding: 8px 10px;
  border: 1px solid #E2E5EA;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  background: #FFFFFF;
}
.iw-field select:focus,
.iw-field input:focus {
  outline: 2px solid #298084;
  outline-offset: -1px;
  border-color: #298084;
}

/* Banner messages */
.iw-banner {
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}
.iw-banner-info  { background: oklch(0.96 0.02 200); color: #1A4448; }
.iw-banner-warn  { background: oklch(0.96 0.05 80);  color: #4A3614; }
.iw-banner-error { background: oklch(0.96 0.04 25);  color: #5C1A1A; }
.iw-banner-ok    { background: oklch(0.96 0.04 145); color: #1A4424; }

/* Permission-denied state */
.iw-deny {
  text-align: center;
  padding: 64px 24px;
  color: #6B7480;
}
.iw-deny-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  font-style: italic;
  color: #1A1F26;
  margin: 0 0 8px;
}

/* ===========================================================================
   Stage 3 — Map (Phase 2D)
   =========================================================================== */

.iw-map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.iw-map-counts {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-family: 'Geist Sans', system-ui, sans-serif;
  font-size: 12px;
  color: #6B7480;
}
.iw-map-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.iw-map-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.iw-map-cost {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6B7480;
  font-variant-numeric: tabular-nums;
}

.iw-map-grid-wrap {
  border: 1px solid #E2E5EA;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}
.iw-map-grid {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Geist Sans', system-ui, sans-serif;
  font-size: 13px;
}
.iw-map-grid thead th {
  text-align: left;
  background: #F0F4F8;
  border-bottom: 1px solid #E2E5EA;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 11px;
  color: #6B7480;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iw-map-grid tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #F0F4F8;
  vertical-align: middle;
}
.iw-map-grid tbody tr:last-child td { border-bottom: 0; }

.iw-map-src-name {
  font-weight: 500;
  color: #1A1F26;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.iw-map-src-sample {
  font-size: 11px;
  color: #6B7480;
  margin-top: 2px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iw-map-arrow {
  color: #B7BFC9;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  width: 22px;
}
.iw-map-dst { width: 36%; }
.iw-map-select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #E2E5EA;
  border-radius: 4px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  color: #1A1F26;
}
.iw-map-select:focus {
  outline: 2px solid #298084;
  outline-offset: -1px;
  border-color: #298084;
}
.iw-map-reason {
  font-size: 11px;
  color: #6B7480;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iw-map-conf { width: 60px; text-align: center; }

/* Confidence pills */
.iw-conf-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.iw-conf-high          { background: oklch(0.93 0.05 145); color: #1A4424; }
.iw-conf-medium        { background: oklch(0.95 0.06 80);  color: #4A3614; }
.iw-conf-low           { background: oklch(0.95 0.05 25);  color: #5C1A1A; }
.iw-conf-user_override { background: oklch(0.93 0.05 200); color: #1A4448; }
.iw-conf-none          { background: #F0F4F8;              color: #6B7480; }

/* Row tint by confidence — subtle left-edge background, no border-stripe (BAN 1) */
.iw-map-cell-high   td { background: oklch(0.99 0.01 145 / 0.55); }
.iw-map-cell-medium td { background: oklch(0.995 0.015 80 / 0.65); }
.iw-map-cell-low    td { background: oklch(0.99 0.015 25 / 0.55); }
.iw-map-cell-user   td { background: oklch(0.99 0.012 200 / 0.55); }
.iw-map-cell-none   td { background: transparent; }

/* Spinner used by parse + map stages */
.iw-progress {
  text-align: center;
  padding: 48px 24px;
}
.iw-progress-msg {
  font-size: 14px;
  color: #1A1F26;
  margin: 16px 0 6px;
}
.iw-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #E2E5EA;
  border-top-color: #298084;
  border-radius: 50%;
  margin: 0 auto;
  animation: iw-spin 0.9s linear infinite;
}
@keyframes iw-spin { to { transform: rotate(360deg); } }
