/* IBM i Source Import Styles */

.ibmi-import-container {
  padding: 0;
}

/* =============================================================================
   Step Indicator
   ============================================================================= */

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
  padding: 20px 32px;
  background: var(--color-surface, #fff);
  border-radius: var(--radius-large, 20px);
  box-shadow: var(--shadow-soft, 0 12px 32px rgba(15, 23, 42, 0.08));
}

.step-indicator .step {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.4;
  transition: opacity 0.25s ease;
}

.step-indicator .step.active,
.step-indicator .step.completed {
  opacity: 1;
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-surface-muted, #eef1f6);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  border: 2px solid var(--color-border);
}

.step.active .step-number {
  background: var(--color-accent, var(--color-primary));
  color: #fff;
  border-color: var(--color-accent, var(--color-primary));
  box-shadow: 0 4px 12px rgba(63, 114, 255, 0.3);
}

.step.completed .step-number {
  background: var(--color-success, #22c55e);
  color: #fff;
  border-color: var(--color-success, #22c55e);
  box-shadow: 0 4px 12px rgba(46, 182, 125, 0.3);
}

.step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.step.active .step-label {
  color: var(--color-text);
}

.step.completed .step-label {
  color: var(--color-text);
}

.step-connector {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 16px;
  min-width: 32px;
  max-width: 80px;
  border-radius: 1px;
  transition: background 0.25s ease;
}

.step.completed + .step-connector {
  background: var(--color-success, #22c55e);
}

/* =============================================================================
   Content Cards (white elevated panels)
   ============================================================================= */

.step-content {
  animation: fadeIn 0.3s ease;
}

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

.content-card {
  background: var(--color-surface, #fff);
  border-radius: var(--radius-large, 20px);
  box-shadow: var(--shadow-soft, 0 12px 32px rgba(15, 23, 42, 0.08));
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.card-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted, #eef1f6);
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-icon-download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface, #fff);
  color: var(--color-text-secondary, #64748b);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-icon-download:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.card-body {
  padding: 28px;
}

.card-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--color-surface-muted, #eef1f6);
}

/* =============================================================================
   Step 1: Connect Form
   ============================================================================= */

/* Center and constrain Step 1 card like the login panel */
#step-1-content .content-card {
  max-width: 480px;
  margin: 0 auto;
}

/* Form field layout matching login panel */
.form-single-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-single-column .form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-single-column .form-row label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}

.form-single-column .form-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.form-single-column .form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(63, 114, 255, 0.12);
}

.form-actions {
  margin-top: 8px;
}

.form-actions .btn-primary {
  padding: 0.75rem 2rem;
  font-size: 0.9375rem;
  border-radius: 12px;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

.loading-indicator .btn-spinner {
  border-color: var(--color-border);
  border-top-color: var(--color-accent, var(--color-primary));
  margin-left: 0;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Advanced Options */
.advanced-options {
  margin-top: 4px;
}

.advanced-options summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--color-accent, var(--color-primary));
  font-weight: 500;
  user-select: none;
  transition: color 0.15s;
}

.advanced-options summary:hover {
  color: var(--color-accent-dark, var(--color-text));
}

.advanced-options .form-row {
  margin-top: 16px;
}

.form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Error Message */
.error-message {
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  background: var(--color-danger-bg, rgba(239, 68, 68, 0.08));
  color: var(--color-danger, #ef4444);
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px solid var(--color-danger, #ef4444);
}

/* Loading Indicator */
.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* =============================================================================
   Step 2: Object Selection
   ============================================================================= */

/* Selection Toolbar */
.selection-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.selection-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent, var(--color-primary));
}

.selection-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.options-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary, #64748b);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  cursor: pointer;
}

.option-with-help {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.option-with-help > .option-help {
  font-size: 12px;
  color: var(--color-text-muted, #94a3b8);
  line-height: 1.4;
  padding-left: 22px;
}

/* Library Tree */
.library-tree {
  border-radius: var(--radius-medium, 12px);
  overflow: hidden;
}

.library-row {
  margin-bottom: 4px;
}

.library-row:last-child {
  margin-bottom: 0;
}

.library-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: default;
  user-select: none;
  background: var(--color-surface-muted, #eef1f6);
  border-radius: var(--radius-small, 8px);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.library-header:hover {
  background: var(--color-background, #e8ecf3);
  border-color: var(--color-border);
}

.expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 11px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.expand-btn:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.library-checkbox {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.library-checkbox input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.library-name {
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font-mono, monospace);
  color: var(--color-text);
}

.library-type {
  font-size: 12px;
  color: var(--color-text-muted);
}

.library-counting {
  font-size: 12px;
  color: var(--color-text-muted);
  font-style: italic;
  margin-left: 8px;
}

/* Library Body (objects area) */
.library-body {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-small, 8px) var(--radius-small, 8px);
  margin-top: -4px;
  margin-bottom: 4px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 52px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  background: var(--color-surface-muted, #eef1f6);
}

.filter-field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-field label {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.form-input-sm {
  padding: 4px 8px;
  font-size: 12px;
  height: 28px;
  border-radius: var(--radius-small, 8px);
}

.filter-name {
  width: 120px;
}

.filter-type {
  width: 100px;
}

/* Object List */
.object-list {
  max-height: 400px;
  overflow-y: auto;
}

.object-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 52px;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s;
  cursor: pointer;
  user-select: none;
}

.object-row.object-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface-muted, #eef1f6);
  cursor: default;
  user-select: none;
  padding-top: 8px;
  padding-bottom: 8px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.object-row.object-header .object-name,
.object-row.object-header .object-type {
  font-family: inherit;
}

.object-row.object-header:hover {
  background: var(--color-surface-muted, #eef1f6);
}

.object-row:last-child {
  border-bottom: none;
}

.object-row:hover {
  background: rgba(63, 114, 255, 0.06);
}

.object-row.selected {
  background: rgba(63, 114, 255, 0.08);
}

.object-checkbox {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.object-checkbox input[type="checkbox"] {
  margin: 0;
  pointer-events: none;
  width: 15px;
  height: 15px;
}

.object-name {
  font-family: var(--font-mono, monospace);
  font-weight: 500;
  min-width: 100px;
}

.object-type {
  font-family: var(--font-mono, monospace);
  color: var(--color-text-muted);
  min-width: 80px;
  font-size: 12px;
}

.object-attribute {
  font-family: var(--font-mono, monospace);
  color: var(--color-text-muted);
  min-width: 60px;
  font-size: 12px;
}

.object-row.object-header .object-attribute {
  font-family: inherit;
}

.object-text {
  color: var(--color-text-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-objects {
  padding: 32px;
  color: var(--color-text-muted);
  font-size: 13px;
  text-align: center;
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 10px 52px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-surface-muted, #eef1f6);
  border-radius: 0 0 var(--radius-small, 8px) var(--radius-small, 8px);
}

.pagination-bar .btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  min-width: 28px;
}

.pagination-bar .btn-small svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.page-info {
  white-space: nowrap;
}

.page-number-input {
  width: 3em;
  text-align: center;
  padding: 2px 4px;
  font-size: 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface, #fff);
  color: var(--color-text);
}

.page-total {
  margin-left: auto;
}

.page-size-select {
  width: 70px;
}

/* =============================================================================
   Modal Dialogs
   ============================================================================= */

#save-selection-dialog,
#load-selection-dialog,
#liblist-dialog,
#options-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-dialog {
  background: var(--color-surface, #fff);
  border-radius: var(--radius-large, 20px);
  box-shadow: var(--shadow-card, 0 20px 60px rgba(15, 23, 42, 0.12));
  min-width: 400px;
  max-width: 500px;
  width: 100%;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
}

/* Selection List (in load dialog) */
.selection-list {
  max-height: 300px;
  overflow-y: auto;
}

.selection-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-small, 8px);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.selection-item:hover {
  background: var(--color-surface-muted, #eef1f6);
  border-color: var(--color-border);
}

.selection-item-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  min-width: 0;
}

.selection-item-name {
  font-weight: 500;
  font-size: 14px;
}

.selection-item-meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

.selection-delete-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.selection-delete-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.selection-delete-btn:hover {
  color: var(--color-danger, #ef4444);
  border-color: var(--color-danger, #ef4444);
  background: rgba(239, 68, 68, 0.08);
}

/* =============================================================================
   Library List Dialog
   ============================================================================= */

.liblist-modal-dialog {
  min-width: 400px;
  max-width: 480px;
}

.liblist-jobd-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 8px;
}

.liblist-jobd-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.liblist-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.liblist-add-row .form-input {
  flex: 1;
  text-transform: uppercase;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.02em;
}

.liblist-items {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small, 8px);
}

.liblist-items:empty {
  border: 1px dashed var(--color-border);
  padding: 24px;
}

.liblist-items:empty::after {
  content: 'No libraries added yet';
  display: block;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}

.liblist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s;
}

.liblist-item:last-child {
  border-bottom: none;
}

.liblist-item:hover {
  background: var(--color-surface-muted, #eef1f6);
}

.liblist-item-name {
  flex: 1;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.liblist-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.liblist-item-actions button {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.liblist-item-actions button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.liblist-item-actions button:hover:not(:disabled) {
  background: var(--color-surface-muted, #eef1f6);
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.liblist-item-actions button.liblist-remove:hover:not(:disabled) {
  color: var(--color-danger, #ef4444);
  border-color: var(--color-danger, #ef4444);
  background: rgba(239, 68, 68, 0.08);
}

.liblist-item-actions button:disabled {
  opacity: 0.25;
  cursor: default;
}

/* =============================================================================
   Step 3: Analysis Progress
   ============================================================================= */

.analysis-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--color-surface-muted, #eef1f6);
  border-radius: var(--radius-medium, 12px);
  border: 1px solid var(--color-border);
}

.progress-bar-container {
  flex: 1;
  height: 10px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 5px;
  overflow: hidden;
}

:root[data-theme="dark"] .progress-bar-container {
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
  border-radius: 5px;
  transition: width 0.4s ease-out;
}

.progress-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

/* Analysis / Import Log */
.analysis-log {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium, 12px);
  max-height: 400px;
  overflow-y: auto;
  background: #1e293b;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #e2e8f0;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
}

:root[data-theme="dark"] .analysis-log {
  background: #0c1222;
  border-color: #1e293b;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.log-entry {
  padding: 6px 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.1s;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.04);
}

.log-badge {
  font-weight: 700;
  flex-shrink: 0;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
  min-width: 42px;
  display: inline-block;
}

.log-ok .log-badge {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

.log-warn .log-badge {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
}

.log-error .log-badge {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

.log-info .log-badge {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
}

.log-analyzing .log-badge {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
}

.log-message {
  word-break: break-word;
  color: #cbd5e1;
  line-height: 1.5;
}

.log-ok .log-message { color: #d1fae5; }
.log-warn .log-message { color: #fef3c7; }
.log-error .log-message { color: #fecaca; }
.log-analyzing .log-message { color: #93c5fd; }

/* =============================================================================
   Step 4: Review & Import
   ============================================================================= */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--color-surface-muted, #eef1f6);
  border-radius: var(--radius-small, 8px);
  text-align: center;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.summary-label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.review-section {
  margin-bottom: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small, 8px);
  overflow: hidden;
}

.review-section-title {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: var(--color-surface-muted, #eef1f6);
  user-select: none;
}

.review-section-title:hover {
  background: var(--color-background, #e8ecf3);
}

.review-section-body {
  padding: 8px 16px;
}

.review-item {
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
}

.review-item:last-child {
  border-bottom: none;
}

.review-item-error {
  color: var(--color-danger, #ef4444);
}

.review-item-warn {
  color: var(--color-warning, #f59e0b);
}

.review-item-skip {
  color: var(--color-text-muted);
}

.review-target {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
  padding: 16px;
  background: var(--color-surface-muted, #eef1f6);
  border-radius: var(--radius-small, 8px);
}

.review-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-field label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.review-field span {
  font-size: 14px;
  font-weight: 500;
}

.review-field select {
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small, 8px);
  background: var(--color-surface, #fff);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s;
}

.review-field select:focus {
  outline: none;
  border-color: var(--color-accent, var(--color-primary));
  box-shadow: 0 0 0 3px rgba(63, 114, 255, 0.12);
}

#import-progress {
  margin-top: 24px;
}

/* Branch Selector (in card header, right-aligned) */

.branch-selector-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 13px;
  margin-top: 8px;
}

.branch-selector-header label {
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.branch-selector-header span {
  font-size: 13px;
  font-weight: 500;
}

.branch-selector-header select {
  width: auto;
}

.form-input-sm {
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 6px;
}

/* =============================================================================
   Dark Mode Adjustments
   ============================================================================= */

:root[data-theme="dark"] .step-indicator {
  border: 1px solid var(--color-border);
}

:root[data-theme="dark"] .content-card {
  border-color: var(--color-border);
}

:root[data-theme="dark"] .step-number {
  border-color: var(--color-border);
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 600px) {
  .step-indicator {
    padding: 14px 16px;
    margin-bottom: 24px;
  }

  .step-label {
    display: none;
  }

  .step-connector {
    min-width: 16px;
    margin: 0 6px;
  }

  .filter-bar {
    padding-left: 16px;
  }

  .object-row {
    padding-left: 16px;
  }

  .pagination-bar {
    padding-left: 16px;
    flex-wrap: wrap;
  }

  .object-text {
    display: none;
  }

  .modal-dialog {
    min-width: unset;
    margin: 16px;
    border-radius: var(--radius-medium, 12px);
  }

  .card-header {
    padding: 16px 20px;
  }

  .card-body {
    padding: 20px;
  }

  .card-footer {
    padding: 12px 20px;
  }

  #step-1-content .content-card {
    max-width: none;
  }
}

/* =============================================================================
   Type Mappings (Options Dialog)
   ============================================================================= */

.modal-dialog-wide {
  max-width: 540px;
}

.modal-dialog-wide .modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

.options-section-title {
  margin: 20px 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text, #1e293b);
}

.checkbox-label + .options-section-title {
  padding-top: 16px;
  border-top: 1px solid var(--color-border, #e2e8f0);
}

.options-section-title:first-child {
  margin-top: 0;
}

.type-mappings-details {
  margin-bottom: 16px;
}

.type-mappings-details summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary, #64748b);
  margin-bottom: 6px;
  user-select: none;
}

.type-mappings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.type-mappings-table th {
  text-align: left;
  padding: 4px 8px;
  font-weight: 500;
  color: var(--color-text-secondary, #64748b);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  font-size: 0.75rem;
}

.type-mappings-table td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--color-border);
}

.type-mappings-table td code {
  font-family: var(--font-mono, 'SFMono-Regular', Consolas, monospace);
  font-size: 0.8125rem;
}

.type-mappings-table .col-action {
  width: 70px;
  text-align: center;
}

.type-mappings-table .builtin-row td {
  color: var(--color-text-secondary, #64748b);
}

.badge-builtin {
  display: inline-block;
  font-size: 0.6875rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.type-mappings-custom h6 {
  font-size: 0.8125rem;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--color-text, #1e293b);
}

.type-mappings-empty {
  font-size: 0.8125rem;
  color: var(--color-text-secondary, #64748b);
  padding: 8px 0;
}

.type-mapping-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.type-mapping-add-row .form-input-sm {
  height: 30px;
  font-size: 0.8125rem;
}
