:root {
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --primary-light: #fb923c;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px -12px rgba(234, 88, 12, 0.18);
  --gradient: linear-gradient(135deg, #ea580c 0%, #f59e0b 60%, #fbbf24 100%);
  --pix-green: #00bdae;
  --pix-dark: #065f46;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(234, 88, 12, 0.11), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(245, 158, 11, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(251, 146, 60, 0.06), transparent);
  pointer-events: none;
  z-index: -1;
}

.hidden { display: none !important; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--footer { padding-bottom: 3rem; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px -4px rgba(234, 88, 12, 0.42);
}

.logo-icon svg { width: 22px; height: 22px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav button {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.site-nav a:hover,
.site-nav button:hover {
  color: var(--primary-dark);
  background: #f1f5f9;
}

.site-nav .nav-cta {
  background: var(--gradient);
  color: #fff !important;
}

/* Hero */
.hero {
  text-align: center;
  padding: 1.25rem 1rem 1rem;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.14;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 680px;
  margin: 0.65rem auto 0;
  font-weight: 500;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}

.badge svg { width: 14px; height: 14px; color: var(--primary); }

/* Stats Counter */
.stats-counter-card {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.1rem auto 0;
  padding: 0.7rem 1.2rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(234, 88, 12, 0.25);
  border-radius: 14px;
  box-shadow: 0 8px 24px -6px rgba(234, 88, 12, 0.14);
  backdrop-filter: blur(10px);
  text-align: left;
  max-width: 100%;
}

.stats-counter-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.14) 0%, rgba(245, 158, 11, 0.18) 100%);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.stats-counter-icon svg { width: 22px; height: 22px; }

.stats-live-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  animation: statsPulseDot 2s infinite;
}

@keyframes statsPulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.stats-counter-body { display: flex; flex-direction: column; line-height: 1.3; }
.stats-counter-main { font-size: 0.94rem; font-weight: 700; color: var(--text); }
.stats-counter-number {
  display: inline-block;
  font-weight: 800;
  font-size: 1.05rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
}
.stats-counter-sub { font-size: 0.76rem; font-weight: 500; color: var(--text-muted); margin-top: 0.1rem; }

/* Rails & Ad Slots */
.page-rails {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1140px) 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 0 1.25rem;
}

.page-main { grid-column: 2; min-width: 0; }

.page-aside {
  position: sticky;
  top: 1rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page-aside-left { grid-column: 1; justify-self: end; }
.page-aside-right { grid-column: 3; justify-self: start; }

@media (max-width: 1280px) {
  .page-rails { grid-template-columns: minmax(0, 1fr); padding: 0 1rem; }
  .page-main { grid-column: 1; }
  .page-aside { display: none !important; }
}

.ad-slot {
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  margin: 1.25rem 0;
  text-align: center;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-slot--top {
  min-height: 90px;
  max-width: 970px;
  margin: 0.5rem auto 1.25rem;
}

.ad-slot--sidebar {
  width: 300px;
  min-height: 250px;
}

.ad-slot--post {
  min-height: 250px;
  max-width: 728px;
  margin: 1.5rem auto;
}

.ad-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

/* Step progress */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 1rem 0 1.5rem;
  padding: 0 1rem;
}

.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.step-dot span:first-child {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: #fff;
  border: 2px solid var(--border);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.step-dot label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step-dot.active span:first-child {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
}

.step-dot.active label { color: var(--primary-dark); }
.step-dot.done span:first-child { background: #ecfdf5; border-color: #6ee7b7; color: #059669; }

.step-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  background: var(--border);
  margin: 0 0.3rem;
  margin-bottom: 1.35rem;
  transition: background 0.3s;
}

.step-line.done { background: linear-gradient(90deg, #6ee7b7, var(--primary-light)); }

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.25s;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title-icon {
  width: 32px;
  height: 32px;
  background: rgba(234, 88, 12, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Upload Step 1 */
#step1.card {
  padding: 0;
  border: none;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 20;
}

.upload-area {
  border: 2px dashed rgba(234, 88, 12, 0.35);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  transition: all 0.25s ease;
  background: linear-gradient(160deg, #fff7ed 0%, #f8fafc 50%, #fef3c7 100%);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  border-style: solid;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.upload-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.1rem;
  background: rgba(234, 88, 12, 0.12);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s, background 0.25s;
}

.upload-area:hover .upload-icon,
.upload-area.dragover .upload-icon {
  background: rgba(234, 88, 12, 0.2);
  transform: scale(1.05);
}

.upload-icon svg { width: 36px; height: 36px; color: var(--primary); }

.upload-area h3 {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.upload-sub { font-size: 1rem; color: var(--text-muted); margin-bottom: 0.45rem; }
.upload-hint { color: var(--text-muted); font-size: 0.88rem; }

.upload-formats { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 0.9rem; }
.format-tag {
  padding: 0.2rem 0.65rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.upload-native-btn {
  display: inline-block;
  width: min(100%, 340px);
  margin: 1.2rem auto 0;
  padding: 0.95rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

#fileInput,
#multiFileInput,
#cellFileInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

.file-info {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  text-align: left;
  color: #9a3412;
  display: inline-block;
  max-width: 100%;
}

/* Preset Quick Cards (Step 1 & Step 2) */
.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 0.5rem;
}

.use-case-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1.05rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.use-case-card:hover {
  border-color: rgba(234, 88, 12, 0.45);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.use-case-card .uc-icon { font-size: 1.4rem; }
.use-case-card strong { font-size: 0.9rem; }
.use-case-card span { font-size: 0.78rem; color: var(--text-muted); }

/* Step 2 Workspace Grid */
.workspace-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }
}

.config-panel {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.config-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 1.1rem;
}

.config-block-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.preset-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.55rem;
}

.preset-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.18s ease;
}

.preset-pill:hover {
  border-color: var(--primary-light);
  background: #fff7ed;
}

.preset-pill.active {
  border-color: var(--primary);
  background: #fff7ed;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

.preset-pill strong {
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--text);
}

.preset-pill span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.preset-pill .pill-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.45rem;
  background: rgba(234, 88, 12, 0.12);
  color: var(--primary-dark);
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 800;
}

/* Form fields */
.fields-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.fields-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

@media (max-width: 560px) {
  .fields-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field-item label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.field-item input[type="number"],
.field-item select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-item input[type="number"]:focus,
.field-item select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.btn-auto-margin {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: var(--primary-dark);
  cursor: pointer;
  font-family: inherit;
}

.btn-auto-margin:hover {
  background: #ffedd5;
}

.warning-banner {
  margin-top: 0.65rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Fill Mode Toggle (Repetir 1 imagem vs Imagens por Posição) */
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: #e2e8f0;
  padding: 0.3rem;
  border-radius: 10px;
}

.mode-btn {
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.multi-image-manager {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}

.multi-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.btn-xs {
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-xs:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-xs--primary {
  background: #fff7ed;
  border-color: #fdba74;
  color: var(--primary-dark);
}

.slots-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.4rem;
  max-height: 210px;
  overflow-y: auto;
  padding: 0.4rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.slot-thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, transform 0.15s;
}

.slot-thumb:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.slot-thumb.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.25);
}

.slot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.slot-thumb .slot-num {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1.3;
}

.slot-thumb .slot-empty {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
}

/* Preview Column (Step 2) */
.preview-panel {
  position: sticky;
  top: 1rem;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.metric-chip {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  text-align: center;
}

.metric-chip span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.metric-chip strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 0.1rem;
}

.a4-canvas-stage {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
}

.a4-canvas-wrapper {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 210 / 297;
  background: #ffffff;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

#a4PreviewCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
}

#a4PreviewCanvas.interactive-cells {
  cursor: pointer;
}

.preview-legend {
  margin-top: 0.75rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

/* Buttons & Actions Bar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
}

.actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* =========================================================
   MÓDULO DE APOIO VIA PIX ("PAGUE UM CAFÉ") — ETAPA 3
   Estilos principais unificados em /affiliates.css
   ========================================================= */
#pixQrCanvas {
  width: 156px;
  height: 156px;
  display: block;
  image-rendering: pixelated;
}

/* Content & FAQ */
.content-section h2 { font-size: 1.3rem; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.content-section p { color: var(--text); margin-bottom: 0.75rem; }

.steps-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  padding: 0;
}

.steps-list li {
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-sm);
  display: grid;
  gap: 0.35rem;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
  background: rgba(255, 255, 255, 0.85);
}

.faq summary { cursor: pointer; font-weight: 800; }
.faq p { color: var(--text-muted); margin-top: 0.5rem; margin-bottom: 0; }

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer .footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: left;
  margin: 1.5rem 0;
}
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
  font-weight: 600;
}
.footer-col a:hover { color: var(--primary-dark); }
.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Loader */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loader-box {
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: var(--text-muted); font-weight: 700; }

/* Small screens */
@media (max-width: 640px) {
  .card { padding: 1.2rem; }
  .upload-area { padding: 2rem 1.15rem; }
  .step-dot label { display: none; }
  .step-line { max-width: 40px; }
  .btn { padding: 0.75rem 1.1rem; font-size: 0.9rem; }
  .preview-metrics { grid-template-columns: 1fr; }
}
