/* ── Wizard layout ────────────────────────────────────────────────────────── */

.onboard-page {
  max-width: 680px;
  margin: 16px auto 48px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Progress bar ─────────────────────────────────────────────────────────── */

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.wizard-progress::-webkit-scrollbar { display: none; }

.prog-step {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}

.prog-step.active  { color: #fff; font-weight: 700; }
.prog-step.done    { color: rgba(255,255,255,0.75); }

.prog-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.prog-step.active .prog-dot { background: #fff; color: #667eea; }
.prog-step.done   .prog-dot { background: rgba(255,255,255,0.5); color: #fff; }

.prog-sep {
  width: 20px;
  height: 1px;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
  margin: 0 2px;
}

/* ── Wizard card ──────────────────────────────────────────────────────────── */

.wizard-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.wizard-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.wizard-card .step-hint {
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 16px;
}

/* ── Card list (step 1) ───────────────────────────────────────────────────── */

.card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.trello-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid #f3f4f6;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s;
  -webkit-tap-highlight-color: transparent;
}

.trello-card-row:hover         { border-color: #667eea; background: #f5f3ff; }
.trello-card-row.selected      { border-color: #667eea; background: #eef2ff; }
.trello-card-row.already-onboarded { opacity: 0.6; cursor: default; }
.trello-card-row.already-onboarded:hover { border-color: #f3f4f6; background: #fff; }

.trello-card-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  min-width: 0;
}

.trello-card-due {
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
}

.already-badge {
  font-size: 0.68rem;
  background: #d1fae5;
  color: #065f46;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.manual-url-toggle {
  font-size: 0.82rem;
  color: #667eea;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 4px;
  display: block;
}

.manual-url-area {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.manual-url-area input {
  flex: 1;
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 8px 10px;
  color: #1f2937;
}
.manual-url-area input:focus { outline: none; border-color: #667eea; }

/* ── Order lookup (step 2) ────────────────────────────────────────────────── */

.parsed-info {
  background: #f9fafb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: #374151;
}

.parsed-info strong { color: #111827; }

.order-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.order-chip {
  background: #eef2ff;
  color: #4338ca;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.lookup-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.lookup-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  font-size: 0.85rem;
}

.lookup-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lookup-due-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

.lookup-row.found    { border-color: #a7f3d0; background: #f0fdf4; }
.lookup-row.not-found { border-color: #fca5a5; background: #fff5f5; }
.lookup-row.added    { border-color: #bfdbfe; background: #eff6ff; }

.lookup-icon { font-size: 1rem; flex-shrink: 0; }
.lookup-order-id { font-weight: 700; color: #1f2937; }
.lookup-customer { color: #6b7280; flex: 1; }
.lookup-remove {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.lookup-remove:hover { color: #ef4444; }

.add-order-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.add-order-row input {
  flex: 1;
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 8px 10px;
}
.add-order-row input:focus { outline: none; border-color: #667eea; }

/* ── Step configurator (step 3) ──────────────────────────────────────────── */

.order-config {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.order-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f9fafb;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.order-config-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
}

.order-config-customer {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 1px;
}

.order-config-body {
  padding: 14px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-due-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #374151;
}

.order-due-row label { font-weight: 500; white-space: nowrap; }
.order-due-row input[type="date"] {
  font-family: inherit;
  font-size: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 5px 8px;
}

.steps-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-check-row {
  border: 1px solid #f3f4f6;
  border-radius: 7px;
  overflow: hidden;
}

.step-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.step-check-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: #667eea;
}

.step-check-label.checked { background: #f5f3ff; }

.step-date-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 8px 38px;
  font-size: 0.78rem;
  color: #6b7280;
  background: #fafafa;
  border-top: 1px solid #f3f4f6;
}
.step-date-panel label { font-weight: 500; white-space: nowrap; }
.step-date-panel input[type="date"] {
  font-family: inherit;
  font-size: 0.78rem;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 3px 6px;
  color: #1f2937;
  background: #fff;
}

.sub-task-checks {
  padding: 6px 12px 10px 38px;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sub-task-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.sub-task-check-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #667eea;
}

.sub-task-check-label.locked {
  color: #9ca3af;
  cursor: default;
}

.sub-task-check-label.locked input { accent-color: #9ca3af; }

/* ── Job settings (step 4) ────────────────────────────────────────────────── */

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
}

.field-group input[type="date"],
.field-group input[type="url"],
.field-group input[type="text"] {
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 8px 10px;
  color: #1f2937;
}
.field-group input:focus { outline: none; border-color: #667eea; }

.field-group-inline {
  flex-direction: row;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.priority-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.priority-btn {
  flex: 1;
  min-width: 90px;
  padding: 8px 12px;
  border-radius: 7px;
  border: 2px solid #e5e7eb;
  background: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.13s;
}

.priority-btn:hover          { border-color: #667eea; color: #667eea; }
.priority-btn.active-normal  { border-color: #667eea; background: #eef2ff; color: #4338ca; }
.priority-btn.active-rush    { border-color: #dc2626; background: #fee2e2; color: #b91c1c; }
.priority-btn.active-firm    { border-color: #7c3aed; background: #ede9fe; color: #6d28d9; }

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tag-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.8rem;
  color: #374151;
}

.tag-remove {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.tag-remove:hover { color: #ef4444; }

/* ── Review (step 5) ──────────────────────────────────────────────────────── */

.review-section {
  margin-bottom: 14px;
}

.review-section h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 8px;
}

.review-row {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 5px;
  align-items: baseline;
}

.review-label { color: #9ca3af; font-size: 0.78rem; min-width: 80px; }

.review-order {
  border: 1px solid #f3f4f6;
  border-radius: 7px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.review-order-id { font-weight: 700; color: #111827; }
.review-steps { color: #6b7280; margin-top: 4px; font-size: 0.8rem; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.wizard-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}

.btn-back {
  background: #f3f4f6;
  color: #6b7280;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.13s;
}
.btn-back:hover { background: #e5e7eb; }

.btn-next {
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.13s;
}
.btn-next:hover    { background: #5a6fd8; }
.btn-next:disabled { background: #c4c9f0; cursor: not-allowed; }

.btn-create {
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.13s;
}
.btn-create:hover    { background: #047857; }
.btn-create:disabled { background: #a7f3d0; cursor: not-allowed; }

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

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

.error-msg {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-top: 10px;
}
