/* ============================================================
   Impostazioni → Manutenzione → "Pulizia guidata"
   Percorso verticale a passi (stesso linguaggio di .dh-steps in DropHub):
   grigio = in attesa, ember = passo corrente, verde = fatto, tratteggio = saltato.
   Solo token del design system (app.css + zp-tokens.css).
   ============================================================ */

.mt-hero {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  flex-wrap: wrap;
}
.mt-hero-main { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.mt-hero-icon {
  width: 52px; height: 52px; border-radius: var(--r-xl); flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.5rem; color: #fff;
  background: linear-gradient(135deg, var(--ember-400), var(--ember-600));
  box-shadow: var(--shadow-ember);
}
.mt-hero-title { font-size: var(--text-h3); font-weight: var(--weight-bold); color: var(--text-main); line-height: var(--leading-tight); }
.mt-hero-sub { color: var(--text-soft); font-size: var(--text-sm); margin-top: 2px; max-width: 640px; }
.mt-hero-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

.mt-progress { margin-top: var(--space-5); }
.mt-progress-row { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-xs); color: var(--text-faint); font-weight: var(--weight-semibold); margin-bottom: 6px; }
.mt-progress-track { height: 8px; border-radius: var(--r-full); background: var(--bg-900); overflow: hidden; }
.mt-progress-fill { height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--ember-400), var(--ember-600)); transition: width var(--dur) var(--ease); }
.mt-progress-fill--done { background: var(--success); }
.mt-progress-track--thin { height: 5px; margin-top: var(--space-2); }

/* ── Passi ─────────────────────────────────────────────────── */
.mt-steps { list-style: none; margin: var(--space-5) 0 0; padding: 0; position: relative; }
.mt-step { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: var(--space-3); padding-bottom: var(--space-3); }
.mt-step:not(:last-child)::before {
  content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--stroke);
}
.mt-step--done:not(:last-child)::before,
.mt-step--empty:not(:last-child)::before { background: var(--success-line); }

.mt-dot {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem;
  background: var(--bg-900); color: var(--text-faint); border: 2px solid transparent; position: relative; z-index: 1;
}
.mt-step--current .mt-dot, .mt-step--running .mt-dot {
  background: var(--ember-500); color: #fff; box-shadow: 0 0 0 5px var(--ember-100);
}
.mt-step--done .mt-dot { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.mt-step--empty .mt-dot { background: var(--panel); color: var(--success); border-color: var(--success-line); }
.mt-step--skipped .mt-dot { background: var(--panel); color: var(--text-faint); border: 2px dashed var(--stroke-strong); }

.mt-step-card {
  border: 1px solid var(--stroke); border-radius: var(--r-lg); background: var(--panel);
  padding: 10px 14px; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.mt-step--current .mt-step-card, .mt-step--running .mt-step-card {
  border-color: var(--line-ember); box-shadow: var(--shadow-sm); padding: 14px 16px;
}
.mt-step--waiting .mt-step-card { background: var(--panel-soft); }

.mt-step-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; min-height: 20px; }
.mt-step-title { font-weight: var(--weight-bold); color: var(--text-main); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.mt-step--waiting .mt-step-title, .mt-step--skipped .mt-step-title { color: var(--text-soft); font-weight: var(--weight-semibold); }
.mt-step-num { font-size: var(--text-xs); color: var(--text-faint); font-weight: var(--weight-semibold); }
.mt-step-note { font-size: var(--text-xs); color: var(--text-faint); margin-top: 2px; }

.mt-count { font-size: var(--text-xs); font-weight: var(--weight-bold); padding: 3px 10px; border-radius: var(--r-full); white-space: nowrap; }
.mt-count--todo { background: var(--ember-50); color: var(--ember-700); border: 1px solid var(--ember-200); }
.mt-count--done { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-line); }
.mt-count--muted { background: var(--bg-900); color: var(--text-faint); }

.mt-target { font-size: .68rem; font-weight: var(--weight-bold); letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: var(--r-full); }
.mt-target--read { background: var(--bg-900); color: var(--text-soft); }
.mt-target--db { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-line); }
.mt-target--shopify { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-line); }

.mt-step-body { margin-top: var(--space-3); }
.mt-what { color: var(--text-soft); font-size: var(--text-sm); line-height: var(--leading-snug); margin-bottom: var(--space-3); }
.mt-filters { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: flex-end; margin-bottom: var(--space-3); }
.mt-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; margin-top: var(--space-3); }
.mt-big-number { font-size: var(--text-h2); font-weight: var(--weight-black); color: var(--ember-700); line-height: 1; }
.mt-big-label { font-size: var(--text-xs); color: var(--text-faint); font-weight: var(--weight-semibold); }
.mt-summary { display: flex; gap: var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-3); }

.mt-preview { margin-top: var(--space-3); border: 1px solid var(--stroke); border-radius: var(--r-md); overflow: hidden; }
.mt-preview table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.mt-preview th { text-align: left; background: var(--bg-800); color: var(--text-faint); font-weight: var(--weight-semibold); padding: 6px 10px; }
.mt-preview td { padding: 6px 10px; border-top: 1px solid var(--stroke); color: var(--text-main); vertical-align: top; }
.mt-preview-more { padding: 6px 10px; font-size: var(--text-xs); color: var(--text-faint); border-top: 1px solid var(--stroke); background: var(--bg-800); }
.mt-arrow { color: var(--text-faint); margin: 0 4px; }

.mt-done-banner {
  display: flex; align-items: center; gap: var(--space-3); padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--success-bg); border: 1px solid var(--success-line); color: var(--success); font-weight: var(--weight-semibold);
}
.mt-done-banner i { font-size: 1.4rem; }

.mt-advanced-head { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.mt-advanced-head:hover .zp-title { color: var(--ember-700); }

@media (max-width: 640px) {
  .mt-step { grid-template-columns: 32px 1fr; gap: var(--space-2); }
  .mt-dot { width: 32px; height: 32px; font-size: .9rem; }
  .mt-step:not(:last-child)::before { left: 15px; top: 32px; }
}
