/* ============================================
   ChipGetter Onboarding Wizard — Heritage Editorial
   Serif headers + clean sans-serif body
   Accent: Muted Slate Blue — solid, no gradients
   ============================================ */

:root {
  --bg: #f1f0f2;
  --bg-subtle: #e9e8eb;
  --bg-muted: #dedde0;
  --bg-dark: #1a1a1f;
  --surface: #ffffff;
  --surface-raised: #ffffff;

  --accent: #5e3c6d;
  --accent-hover: #4d2f5b;
  --accent-light: #f0e8f3;
  --accent-subtle: #f5f0f7;
  --accent-glow: rgba(94, 60, 109, 0.15);

  --text-primary: #1a1a1f;
  --text-secondary: #4a4a52;
  --text-muted: #8e8e96;
  --text-inverse: #ffffff;

  --border: #d8d6db;
  --border-light: #e8e6eb;
  --border-focus: var(--accent);

  --error: #c0392b;
  --error-bg: #fdf0ee;
  --success: #2d8a5e;
  --success-bg: #edf7f1;
  --warning: #c68a1d;
  --warning-bg: #fdf6e8;

  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-accent: 0 0 0 3px var(--accent-glow);

  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(94, 60, 109, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 60, 109, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* Soft accent glow top */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 50%, rgba(94, 60, 109, 0.06) 0%, rgba(94, 60, 109, 0.02) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(241, 240, 242, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
}

.top-bar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.top-bar-help {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.top-bar-help a {
  color: var(--accent);
  font-weight: 500;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-wrapper {
  position: sticky;
  top: 49px;
  z-index: 99;
  background: rgba(241, 240, 242, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 24px;
}

.progress-inner {
  max-width: 720px;
  margin: 0 auto;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 2px solid var(--border);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-dot span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.progress-step.active .step-dot {
  background: var(--accent);
  border: 2px solid var(--accent);
  transform: scale(1.1);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.progress-step.active .step-dot span {
  color: var(--text-inverse);
}

.progress-step.completed .step-dot {
  background: var(--accent);
  border: 2px solid var(--accent);
}

.progress-step.completed .step-dot span {
  color: var(--text-inverse);
  font-size: 0;
}

.progress-step.completed .step-dot::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--text-inverse);
  border-bottom: 2px solid var(--text-inverse);
  transform: rotate(-45deg);
  margin-top: -2px;
}

.step-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
  color: var(--accent);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 24px;
  max-width: 56px;
  position: relative;
  margin: 0 4px;
  margin-bottom: 22px;
  border-radius: 1px;
}

.progress-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1px;
}

.progress-line-fill.filled {
  width: 100%;
}

/* ============================================
   Wizard Main & Container
   ============================================ */
.wizard-main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding-bottom: 100px;
}

.wizard-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

/* ============================================
   Wizard Steps
   ============================================ */
.wizard-step {
  display: none;
  animation: stepIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-step.active {
  display: block;
}

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

/* Step Headers */
.step-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.step-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.5;
}

.step-header {
  margin-bottom: 32px;
}

.step-header-centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================================
   Form Elements
   ============================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="time"],
input[type="tel"],
input[type="date"] {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  width: 100%;
  height: 42px;
}

input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

input::placeholder {
  color: var(--text-muted);
}

.field-error {
  font-size: 0.75rem;
  color: var(--error);
  min-height: 1em;
  font-weight: 500;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Password toggle */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 44px;
}

.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}

.toggle-pw:hover {
  color: var(--text-secondary);
}

/* ============================================
   Stripe Placeholder
   ============================================ */
.stripe-placeholder {
  margin-top: 24px;
  padding: 18px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.stripe-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stripe-card-element {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  min-height: 42px;
}

.stripe-mock {
  display: flex;
  align-items: center;
}

.stripe-mock-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stripe-note {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  height: 42px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(94, 60, 109, 0.25);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  height: 42px;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  height: 42px;
}

.btn-back:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 12px;
  transition: color var(--transition-fast);
}

.btn-text:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--accent-hover);
}

/* ============================================
   Upload / Dropzone
   ============================================ */
.upload-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dropzone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  background: var(--bg);
  overflow: hidden;
}

.dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: scale(1.005);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.dropzone-content {
  position: relative;
  z-index: 2;
}

.dropzone-icon {
  margin-bottom: 14px;
}

.dropzone-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dropzone-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dropzone-browse {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.dropzone-browse:hover {
  text-decoration: underline;
}

.dropzone-active-overlay {
  position: absolute;
  inset: 0;
  background: rgba(94, 60, 109, 0.05);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.dropzone.drag-over .dropzone-active-overlay {
  display: flex;
}

.dropzone-active-overlay p {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

/* File Status */
.file-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
}

.file-status-icon {
  color: var(--success);
  flex-shrink: 0;
}

.file-status-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.file-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-remove {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}

.file-remove:hover {
  color: var(--error);
}

/* Validation Results */
.validation-results {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.validation-summary {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.validation-summary.success {
  background: var(--success-bg);
  color: var(--success);
}

.validation-summary.has-errors {
  background: var(--warning-bg);
  color: var(--warning);
}

.validation-errors {
  max-height: 180px;
  overflow-y: auto;
  background: var(--bg);
}

.validation-error-row {
  padding: 8px 16px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

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

.error-row-num {
  font-weight: 700;
  color: var(--error);
  white-space: nowrap;
  min-width: 48px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.error-message {
  color: var(--text-secondary);
}

/* ============================================
   Preview Table
   ============================================ */
.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.preview-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.preview-table th {
  background: var(--bg-subtle);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.preview-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-table tr:last-child td {
  border-bottom: none;
}

.preview-table tr:hover td {
  background: var(--bg-subtle);
}

.row-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.row-status.valid {
  background: var(--success-bg);
  color: var(--success);
}

.row-status.error {
  background: var(--error-bg);
  color: var(--error);
}

.preview-empty {
  text-align: center;
  padding: 44px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   Customize Section
   ============================================ */
.customize-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.customize-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Email Preview Card */
.email-preview-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.email-preview-header {
  padding: 10px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-preview-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--text-inverse);
  padding: 2px 7px;
  border-radius: 3px;
}

.email-preview-title {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.email-preview-body {
  padding: 18px;
}

.email-mock {
  font-size: 0.8rem;
  line-height: 1.6;
}

.email-mock-from,
.email-mock-subject {
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.email-mock-subject {
  font-weight: 600;
  color: var(--text-primary);
}

.email-mock-divider {
  height: 1px;
  background: var(--border-light);
  margin: 10px 0;
}

.email-mock-body p {
  margin-bottom: 10px;
}

.email-mock-quote {
  font-style: italic;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 14px 0;
}

/* ============================================
   QR Code Section
   ============================================ */
.qr-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.qr-url-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qr-url-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.qr-url-copy {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.qr-url-input {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  background: var(--bg) !important;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
}

.qr-url-input:focus {
  box-shadow: none !important;
}

.qr-display {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.qr-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.qr-code-container {
  width: 200px;
  height: 200px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
}

.qr-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   Done / Completion
   ============================================ */
.done-checkmark {
  margin-bottom: 20px;
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.check-path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.5s ease 0.25s forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.done-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}

.done-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
}

.done-card-icon {
  margin-bottom: 12px;
}

.done-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.done-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.done-summary {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.done-summary h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.summary-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.summary-url {
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
  font-family: var(--font-mono);
}

/* ============================================
   Navigation
   ============================================ */
.wizard-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(241, 240, 242, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--border-light);
  padding: 14px 24px;
}

.wizard-nav-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-spacer {
  flex: 1;
}

/* ============================================
   Footer
   ============================================ */
.wizard-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.wizard-footer a {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .customize-grid {
    grid-template-columns: 1fr;
  }

  .done-cards {
    grid-template-columns: 1fr;
  }

  .qr-display {
    flex-direction: column;
    align-items: center;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .step-title {
    font-size: 1.5rem;
  }

  .progress-line {
    min-width: 12px;
    max-width: 28px;
  }

  .step-label {
    font-size: 0.55rem;
  }

  .step-dot {
    width: 26px;
    height: 26px;
  }

  .wizard-container {
    padding: 28px 18px 24px;
  }

  .step-header {
    margin-bottom: 24px;
  }

  .step-subtitle {
    font-size: 0.88rem;
  }

  /* Larger touch targets on mobile */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="time"],
  input[type="tel"],
  input[type="date"] {
    font-size: 16px; /* prevents iOS zoom on focus */
    height: 44px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-back {
    height: 44px;
  }

  .btn-primary {
    font-size: 0.9rem;
  }

  /* Dropzone tighter on mobile */
  .dropzone {
    padding: 32px 18px;
  }

  .dropzone-icon svg {
    width: 40px;
    height: 40px;
  }

  /* Stat cards */
  .preview-stats {
    gap: 8px;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  /* Email preview */
  .email-preview-body {
    padding: 14px;
  }

  /* QR section */
  .qr-card {
    padding: 18px;
  }

  .qr-code-container {
    width: 180px;
    height: 180px;
  }

  .qr-url-input {
    font-size: 0.75rem !important;
  }

  /* Done section */
  .done-card {
    padding: 18px;
  }

  .done-summary {
    padding: 18px;
  }

  /* Stripe placeholder */
  .stripe-placeholder {
    padding: 14px;
  }

  .stripe-mock-label {
    font-size: 0.78rem;
  }

  /* Nav */
  .wizard-nav {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .step-label {
    display: none;
  }

  .progress-line {
    min-width: 14px;
    max-width: 36px;
  }

  .top-bar-help {
    display: none;
  }

  .top-bar-inner {
    padding: 10px 16px;
  }

  .progress-wrapper {
    padding: 12px 16px;
  }

  .step-title {
    font-size: 1.3rem;
  }

  .wizard-container {
    padding: 22px 16px 20px;
  }

  /* Preview table scroll hint */
  .preview-table-wrapper {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .btn-copy span {
    display: none;
  }

  .btn-copy {
    padding: 10px 12px;
  }
}

@media (max-width: 380px) {
  .wizard-container {
    padding: 18px 12px 16px;
  }

  .step-dot {
    width: 24px;
    height: 24px;
  }

  .step-dot span {
    font-size: 0.6rem;
  }
}

/* ============================================
   Spinner (for submit loading state)
   ============================================ */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.55s linear infinite;
  vertical-align: middle;
}

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