/* ═══════════════════════════════════════════════
   Campaign Wizard Styles
   Extends the core AdPlatform design system
   ═══════════════════════════════════════════════ */

/* ── Wrapper ── */
.wizard-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;          /* allow flex shrink */
  overflow: hidden;        /* children scroll, not us */
  background: var(--color-bg);
  margin: -32px;           /* cancel content-area padding to fill full space */
}
.wizard-loading,
.wizard-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 24px;
  color: var(--color-text-muted);
}

/* ── Header ── */
.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
}
.wizard-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.wizard-back-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.wizard-back-btn:hover {
  background: var(--color-bg-subtle);
  color: var(--color-text);
  border-color: var(--color-text-muted);
}
.wizard-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.2px;
}
.wizard-subtitle {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.wizard-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.save-indicator {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.save-indicator.saved {
  color: var(--color-success);
}

/* ── Step Rail ── */
.wizard-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 32px;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.wizard-rail::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-border-light);
}
.wizard-rail-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 2px 2px 0;
}
.wizard-rail-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  z-index: 1;
}
.wizard-rail-step:hover .rail-step-label {
  color: var(--color-text);
}
.rail-step-indicator {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
  border: 2px solid var(--color-border);
  transition: all var(--transition-fast);
}
.wizard-rail-step.active .rail-step-indicator {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.wizard-rail-step.complete .rail-step-indicator {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.wizard-rail-step.past .rail-step-indicator {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.rail-step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.wizard-rail-step.active .rail-step-label {
  color: var(--color-primary);
  font-weight: 600;
}
.wizard-rail-step.complete .rail-step-label,
.wizard-rail-step.past .rail-step-label {
  color: var(--color-text-secondary);
}

/* Connectors between steps */
.wizard-rail-step:not(:last-child)::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--color-border);
  margin-left: 12px;
}
.wizard-rail-step.complete:not(:last-child)::after,
.wizard-rail-step.past:not(:last-child)::after {
  background: var(--color-primary);
}

/* ── Body ── */
.wizard-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 32px 32px;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

/* ── Footer ── */
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
}
.wizard-footer-center {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Step Content (shared) ── */
.wizard-step-content {
  animation: stepFadeIn 0.3s ease;
}
.wizard-step-content .form-group {
  margin-bottom: 16px;
}
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.step-intro {
  margin-bottom: 20px;
}
.step-intro h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.step-intro p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.field-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 6px;
}
.field-sub-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  display: block;
}
.field-error {
  font-size: 13px;
  color: var(--color-danger);
  margin-top: 6px;
}
.text-muted {
  color: var(--color-text-muted);
}

/* ── Step 1: Business ── */
.url-input-row {
  display: flex;
  gap: 12px;
}
.url-input-row .form-input {
  flex: 1;
}
.analysis-card {
  background: var(--color-success-light);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
}
.analysis-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-success);
}
.analysis-card-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.analysis-detail {
  display: flex;
  gap: 12px;
  font-size: 13px;
}
.analysis-label {
  min-width: 90px;
  font-weight: 600;
  color: #065f46;
  flex-shrink: 0;
}
.analysis-value {
  color: #064e3b;
  line-height: 1.5;
}
.category-tag {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(5, 150, 105, 0.15);
  color: var(--color-success);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.objective-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.objective-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  background: var(--color-bg-elevated);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}
.objective-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.objective-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.objective-icon {
  font-size: 18px;
  margin-bottom: 2px;
}
.objective-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.objective-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.3;
}

/* ── Step 2: Budget ── */

/* Category select enhanced */
.form-select-lg {
  padding: 12px 14px;
  font-size: 15px;
  min-height: 48px;
}

/* ── Channel Recommendation Badge ── */
.channel-rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 10px;
  background: var(--color-success-light, #ecfdf5);
  color: var(--color-success, #059669);
}
.channel-rec-badge svg {
  width: 10px;
  height: 10px;
}

/* Channel strength hint */
.channel-strength {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Channel context bar */
.channel-context-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-primary-bg, #EEF2FF);
  border: 1px solid color-mix(in srgb, var(--color-primary) 15%, transparent);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--color-primary);
}
.channel-context-bar svg {
  flex-shrink: 0;
}

.budget-input-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 280px;
}
.budget-prefix,
.budget-suffix {
  padding: 10px 12px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.budget-prefix {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
}
.budget-suffix {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: none;
  white-space: nowrap;
}
.budget-input {
  border-radius: 0 !important;
  text-align: center;
  font-weight: 600;
  font-size: 18px;
}
.budget-presets {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.preset-chip {
  padding: 6px 16px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-bg-elevated);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.preset-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.preset-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.estimate-banner {
  padding: 16px 20px;
  background: var(--color-primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.estimate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--color-primary-dark);
}
.estimate-row strong {
  font-size: 18px;
}
.estimate-note {
  font-size: 12px;
  color: #3b82f6;
  margin-top: 8px;
  line-height: 1.5;
}
.bidding-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bidding-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--color-bg-elevated);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}
.bidding-card:hover {
  border-color: var(--color-primary);
}
.bidding-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.bidding-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bidding-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.recommended-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  background: var(--color-success-light);
  color: var(--color-success);
  border-radius: 10px;
}
.bidding-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
}
.toggle-text {
  color: var(--color-text-muted);
}

/* ── Step 3: Creative ── */
.generate-bar {
  margin-bottom: 28px;
  padding: 20px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}
.generate-bar.empty {
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
  border-color: #c7d2fe;
}
.generate-bar-content {
  display: flex;
  align-items: center;
  gap: 16px;
}
.generate-bar-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light, #eef2ff);
  border-radius: 10px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.generate-bar.empty .generate-bar-icon {
  background: white;
}
.generate-bar-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.generate-bar-text strong {
  font-size: 14px;
  color: var(--color-text);
}
.generate-bar-text span {
  font-size: 12px;
  color: var(--color-text-muted);
}
.creative-section {
  margin-bottom: 28px;
}
.creative-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.creative-section-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}
.creative-section-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.asset-count {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Asset Editor */
.asset-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.asset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}
.asset-row:hover {
  border-color: var(--color-text-muted);
}
.asset-row.editing {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.asset-text {
  flex: 1;
  font-size: 14px;
  color: var(--color-text);
}
.char-counter {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.char-counter.over {
  color: var(--color-danger);
  font-weight: 600;
}
.asset-action {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.asset-action:hover {
  background: var(--color-bg-subtle);
  color: var(--color-text);
}
.asset-action.danger:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
}
.asset-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.asset-edit-row .form-input {
  flex: 1;
  margin: 0;
}
.add-asset-btn {
  align-self: flex-start;
  margin-top: 4px;
}

/* Images */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.image-thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 4/3;
  background: var(--color-bg-subtle);
}
.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-thumb-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  display: flex;
  gap: 6px;
}
.orientation-tag,
.dim-tag {
  font-size: 10px;
  font-weight: 600;
  color: white;
  background: rgba(0,0,0,0.4);
  padding: 1px 6px;
  border-radius: 4px;
}
.image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.image-thumb:hover .image-remove {
  opacity: 1;
}
.empty-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px;
  background: var(--color-bg-subtle);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  font-size: 13px;
}

/* Ad Preview */
.ad-preview-card {
  max-width: 400px;
  padding: 16px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.ad-preview-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.ad-preview-headline {
  font-size: 18px;
  font-weight: 600;
  color: #1a0dab;
  margin-bottom: 4px;
  cursor: pointer;
}
.ad-preview-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ── Step 4: Audience ── */
.audience-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border-light);
}
.audience-section:last-child {
  border-bottom: none;
}
.audience-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.optional-tag {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Geo Search */
.geo-search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.geo-search-spinner {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}
.geo-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
}
.geo-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}
.geo-result:hover {
  background: var(--color-bg-subtle);
}
.geo-result:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.geo-result-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}
.geo-result-type {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 10px;
}
.geo-result-canonical {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-left: auto;
}
.location-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.chip-remove {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 2px;
  opacity: 0.6;
}
.chip-remove:hover {
  opacity: 1;
}

/* Demo Chips */
.demo-group {
  margin-bottom: 16px;
}
.demo-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 16px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-bg-elevated);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* Segment Blocks */
.segment-block {
  margin-top: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.segment-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: var(--color-bg-subtle);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.segment-block-header:hover {
  background: var(--color-bg-muted);
}
.expand-icon {
  font-size: 12px;
  color: var(--color-text-muted);
}
.segment-block-desc {
  padding: 0 16px 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.segment-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0 16px 12px;
}
.segment-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.segment-item-row:hover {
  color: var(--color-text);
}
.segment-item-row input[type="checkbox"] {
  accent-color: var(--color-primary);
}
.selected-count {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-top: 1px solid var(--color-border-light);
}

/* ── Step 5: Review ── */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.review-grid-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (max-width: 768px) {
  .review-grid {
    grid-template-columns: 1fr;
  }
}
.review-section {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.review-section.has-issues {
  border-color: var(--color-border);
  border-width: 1px;
}
.review-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border-light);
}
.review-section.has-issues .review-section-header {
  background: var(--color-bg-subtle);
  border-bottom-color: var(--color-border-light);
}
.review-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.review-section-title h3 {
  font-size: 13px;
  font-weight: 600;
}
.review-icon {
  font-size: 15px;
}
.review-section-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-fix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: var(--color-danger, #DC2626);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-fix:hover {
  background: #b91c1c;
}
.btn-fix svg {
  stroke: white;
}
.review-section-issues {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 16px 0;
}
.review-issue-tag {
  font-size: 11px;
  color: var(--color-danger, #DC2626);
  font-weight: 500;
}
.review-section-body {
  padding: 12px 16px;
}
.review-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.review-row:last-child {
  border-bottom: none;
}
.review-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
  min-width: 60px;
  flex-shrink: 0;
}
.review-value {
  font-size: 13px;
  color: var(--color-text);
  text-align: right;
}

/* Compact creative summary on review */
.review-creative-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}
.review-dot-sep {
  color: var(--color-text-muted);
}
.review-sub-section {
  margin-bottom: 16px;
}
.review-sub-section:last-child {
  margin-bottom: 0;
}
.review-sub-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 8px;
}
.review-asset-item {
  font-size: 13px;
  color: var(--color-text);
  padding: 6px 12px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.review-more {
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 4px 0;
}
.review-image-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.review-thumb {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.review-more-images {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Validation */
.issues-box {
  background: var(--color-warning-bg, #FEF3C7);
  border: 1px solid var(--color-warning-border, #FCD34D);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}
.issue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--color-warning-text, #92400E);
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(252, 211, 77, 0.3);
}
.issue-row:last-child {
  border-bottom: none;
}
.issue-row:hover {
  background: rgba(252, 211, 77, 0.15);
}
.issue-fix {
  margin-left: auto;
  font-weight: 600;
  font-size: 12px;
  color: var(--color-primary);
}

/* Phase loading spinner */
.phase-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

/* Error box */
.error-box {
  padding: 12px 16px;
  background: var(--color-danger-light, #FEF2F2);
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-danger, #DC2626);
  margin-bottom: 16px;
}

.validation-box {
  padding: 16px 20px;
  background: var(--color-warning-light);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  font-size: 14px;
}
.validation-box strong {
  display: block;
  color: var(--color-warning);
  margin-bottom: 8px;
}
.validation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: #92400e;
}

/* Submit */
.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-top: 24px;
}
.submit-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.submit-bar-info strong {
  font-size: 15px;
  color: var(--color-text);
}
.submit-bar-info span {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Success State */
.submit-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
}
.success-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-success-light);
  color: var(--color-success);
  border-radius: 50%;
  margin-bottom: 20px;
}
.submit-success h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}
.submit-success p {
  font-size: 15px;
  color: var(--color-text-secondary);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.submit-details {
  width: 100%;
  max-width: 400px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

/* ── Draft Campaigns List (in Campaigns view) ── */
.drafts-section {
  margin-bottom: 28px;
}
.drafts-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}
.draft-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.draft-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.draft-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.draft-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-warning-light);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.draft-info {
  flex: 1;
  min-width: 0;
}
.draft-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.draft-meta {
  font-size: 12px;
  color: var(--color-text-muted);
}
.draft-actions {
  display: flex;
  gap: 4px;
}
.draft-actions button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.draft-actions button:hover {
  background: var(--color-bg-subtle);
  color: var(--color-text);
}
.draft-actions button.danger:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .wizard-rail {
    padding: 16px;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .rail-step-label {
    display: none;
  }
  .wizard-rail-step:not(:last-child)::after {
    width: 20px;
  }
  .wizard-body {
    padding: 20px;
  }
  .objective-grid,
  .bidding-grid {
    grid-template-columns: 1fr 1fr;
  }
  .wizard-footer {
    padding: 12px 20px;
  }
  .url-input-row {
    flex-direction: column;
  }
  .submit-bar {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════
   Phase 2 – Channel, Allocation & Objective Styles
   ═══════════════════════════════════════════════ */

/* ── Category Grid (ObjectiveStep) ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.category-card:hover { border-color: var(--color-text-tertiary); }
.category-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  color: var(--color-primary);
}
.category-icon { font-size: 22px; }
.category-label { font-weight: 500; text-align: center; }

/* ── Channel Grid (ChannelStep) ── */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.channel-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
}
.channel-card:hover:not(:disabled) {
  border-color: var(--channel-color, var(--color-primary));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.channel-card.selected {
  border-color: var(--channel-color, var(--color-primary));
  background: var(--color-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--channel-color, var(--color-primary)) 15%, transparent);
}
.channel-card.unsupported {
  opacity: 0.45;
  cursor: not-allowed;
}
.channel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.channel-icon svg { display: block; }
.channel-icon-fallback {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.channel-card-check svg {
  color: var(--channel-color, var(--color-primary));
}
.check-empty {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 6px;
}
.channel-card.selected .check-empty { display: none; }
.channel-card-body { flex: 1; margin-bottom: 12px; }
.channel-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.stub-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-warning-bg, #FEF3C7);
  color: var(--color-warning-text, #92400E);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.channel-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.channel-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}
.channel-min-budget {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
}
.channel-unsupported-label {
  font-size: 11px;
  color: var(--color-danger, #DC2626);
}

/* ── Channel Summary ── */
.channel-summary {
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  margin-bottom: 16px;
}
.channel-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 2px solid;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--color-surface);
}
.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  color: var(--color-text-tertiary);
}
.chip-remove:hover { color: var(--color-danger, #DC2626); }
.channel-summary-info {
  font-size: 13px;
  color: var(--color-text-secondary);
}
.channel-summary-note {
  color: var(--color-text-tertiary);
}
.channel-empty-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  color: var(--color-text-tertiary);
  font-size: 14px;
}

/* ── Budget Channel Requirements Bar ── */
.budget-channels-bar {
  padding: 14px 18px;
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  margin-bottom: 24px;
}
.budget-channels-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.budget-channels-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.budget-channel-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1.5px solid;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: white;
  color: var(--color-text);
}
.budget-ch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.budget-ch-min {
  font-size: 11px;
  color: var(--color-text-muted);
  padding-left: 4px;
  border-left: 1px solid var(--color-border);
  margin-left: 4px;
}
.budget-channels-note {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-light, #e2e8f0);
}

/* ── Budget Period Toggle ── */
.period-toggle {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}
.toggle-btn {
  padding: 8px 20px;
  border: none;
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.toggle-btn:not(:last-child) {
  border-right: 1px solid var(--color-border);
}
.toggle-btn.active {
  background: var(--color-primary);
  color: #fff;
}
.toggle-btn:hover:not(.active) {
  background: var(--color-bg);
}

/* ── Allocation Sliders ── */
.allocation-sliders {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
}
.allocation-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.allocation-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.alloc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.alloc-name { color: var(--color-text); }
.allocation-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.alloc-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 3px;
  background: var(--color-border);
  outline: none;
}
.alloc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--slider-color, var(--color-primary));
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.alloc-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--slider-color, var(--color-primary));
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.alloc-values {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 160px;
}
.alloc-pct-input {
  width: 48px;
  padding: 4px 6px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  background: var(--color-surface);
  color: var(--color-text);
}
.alloc-pct-sign {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-right: 8px;
}
.alloc-amount {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

/* ── Allocation Balance Indicator ── */
.allocation-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.allocation-balance.balanced {
  background: var(--color-success-bg, #F0FDF4);
  color: var(--color-success-text, #166534);
}
.allocation-balance.unbalanced {
  background: var(--color-warning-bg, #FEF3C7);
  color: var(--color-warning-text, #92400E);
}

/* ── Allocation Bar (visual) ── */
.allocation-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-border);
}
.alloc-bar-segment {
  transition: width 0.3s ease;
  min-width: 2px;
}
.alloc-bar-segment:first-child { border-radius: 4px 0 0 4px; }
.alloc-bar-segment:last-child { border-radius: 0 4px 4px 0; }

/* ── Recommendation Box ── */
.recommendation-box {
  padding: 16px;
  background: var(--color-primary-bg, #EEF2FF);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-radius: 10px;
  margin-bottom: 16px;
}
.recommendation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.recommendation-channels {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.rec-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.rec-channel strong { margin-left: auto; }

/* ── Warning Box ── */
.warning-box {
  padding: 12px 16px;
  background: var(--color-warning-bg, #FEF3C7);
  border: 1px solid var(--color-warning-border, #FCD34D);
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-warning-text, #92400E);
}

/* ── Review: Channel rows ── */
.review-channels-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.review-channel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.review-channel-name {
  font-weight: 500;
  flex: 1;
}
.review-channel-pct {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}
.review-channel-amt {
  font-size: 13px;
  color: var(--color-text-tertiary);
  min-width: 80px;
  text-align: right;
}
.review-empty-note {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-style: italic;
  padding: 4px 0;
}

/* Review channel chips */
.review-channels {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.review-channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1.5px solid;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--color-surface, #f8fafc);
}
.review-ch-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .channel-grid {
    grid-template-columns: 1fr;
  }
  .objective-grid {
    grid-template-columns: 1fr 1fr;
  }
  .alloc-values {
    min-width: auto;
    flex-wrap: wrap;
  }
  .allocation-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Audience Profile Summary ── */
.audience-profile-summary {
  background: var(--color-surface, #f8fafc);
  border: 1px dashed var(--color-border, #e2e8f0);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 20px;
}
.audience-profile-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  color: var(--color-text-muted);
}
.audience-profile-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
}
.audience-profile-hint {
  font-size: 11px;
  color: var(--color-text-tertiary, #94a3b8);
  margin-left: 4px;
}
.audience-profile-summary h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
}
.audience-profile-summary .field-hint {
  margin-bottom: 12px;
}
.profile-factors {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-factor {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  min-width: 120px;
}
.factor-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary, #64748b);
  font-weight: 600;
}
.factor-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary, #1e293b);
}
.factor-value.neutral {
  color: var(--color-text-secondary, #64748b);
}
.factor-value.has-value {
  color: var(--color-accent, #4F46E5);
}

/* ── Review: Audience Factors ── */
.review-factors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.review-factor-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-surface, #f1f5f9);
  color: var(--color-accent, #4F46E5);
  border: 1px solid var(--color-border, #e2e8f0);
}

/* ── Market Insight Bar (Census) ── */
.geo-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.geo-input-row .form-input {
  flex: 1;
}
.zip-lookup-btn {
  white-space: nowrap;
  padding: 8px 16px;
  font-size: 13px;
  height: 38px;
}
.market-insight-bar {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 16px;
  margin: 8px 0 16px;
}
.market-insight-bar.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
  padding: 14px 16px;
}
.insight-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #0369a1;
}
.insight-title {
  font-weight: 600;
  font-size: 13px;
}
.insight-source {
  font-size: 11px;
  color: #7dd3fc;
  margin-left: auto;
  font-weight: 500;
}
.insight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.insight-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,0.7);
  color: #0c4a6e;
  border: 1px solid #bae6fd;
}
.insight-details {
  border-top: 1px solid #bae6fd;
  padding-top: 12px;
}
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}
.insight-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.metric-value {
  font-size: 18px;
  font-weight: 700;
  color: #0369a1;
  line-height: 1.2;
}
.metric-label {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* ── Census Badge ── */
.census-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.census-badge.small {
  font-size: 10px;
  padding: 1px 6px;
}

/* ── Census-Suggested Chip (not selected, but recommended) ── */
.chip.census-suggested {
  border-color: #7dd3fc;
  background: rgba(224, 242, 254, 0.4);
  box-shadow: 0 0 0 1px #bae6fd inset;
}
