/* ☰ → Manual testing (testing.js): a progress bar, then each section of server/manual-testing.md as a
   fold-out card; every step has a To do / Passed / Bug / Skipped switch and a comment. Same tokens as
   the new design (agent-home.css), repeated here so the page looks the same in Classic view. */

.mt{
  --mt-ink: #0f1b2d;
  --mt-ink-2: #3d4a5c;
  --mt-mute: #646f7f;
  --mt-line: #ebe7df;
  --mt-paper: #ffffff;
  --mt-canvas: #faf8f4;
  --mt-navy: #102d4e;
  --mt-green: #15803d;
  --mt-green-bg: #e7f7ec;
  --mt-rose: #be123c;
  --mt-rose-bg: #fdecef;
  --mt-slate: #475569;
  --mt-slate-bg: #eef1f5;
  --mt-sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--mt-ink);
  font-family: var(--mt-sans);
}

.mt .ra-invoice-head__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mt .mt-search{
  width: 240px;
  max-width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--mt-line);
  border-radius: 10px;
  background: var(--mt-paper);
  font: 400 0.875rem/1 var(--mt-sans);
  color: var(--mt-ink);
}

.mt-filter{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--mt-line);
  border-radius: 999px;
  background: var(--mt-paper);
}

.mt-filter button{
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--mt-ink-2);
  font: 500 0.8125rem/1 var(--mt-sans);
  cursor: pointer;
}

.mt-filter button[aria-pressed="true"]{
  background: var(--mt-navy);
  color: #fff;
}

#rwTesting{
  display: grid;
  gap: 12px;
  max-width: 1080px;
  padding-bottom: 64px;
}

.mt-empty{
  margin: 0;
  padding: 32px 16px;
  color: var(--mt-mute);
  text-align: center;
}

.mt-empty.is-error,
.mt-error{
  color: var(--mt-rose);
}

/* ---------- Summary ---------- */

.mt-summary{
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--mt-line);
  border-radius: 14px;
  background: var(--mt-paper);
}

.mt-summary__bar{
  height: 8px;
  border-radius: 999px;
  background: var(--mt-slate-bg);
  overflow: hidden;
}

.mt-summary__bar span{
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mt-green);
}

.mt-summary__text{
  margin: 0;
  color: var(--mt-ink-2);
  font-size: 0.875rem;
}

.mt-dot{
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: 1px;
}

.mt-dot--pass{ background: var(--mt-green); }
.mt-dot--bug{ background: var(--mt-rose); }
.mt-dot--skip{ background: var(--mt-slate); }

/* ---------- Sections ---------- */

.mt-section{
  border: 1px solid var(--mt-line);
  border-radius: 14px;
  background: var(--mt-paper);
}

.mt-section__head{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.mt-section__head::-webkit-details-marker{ display: none; }

.mt-section__head::before{
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--mt-mute);
  border-bottom: 2px solid var(--mt-mute);
  transform: rotate(-45deg);
  flex: none;
}

.mt-section[open] > .mt-section__head::before{ transform: rotate(45deg); }

.mt-section__title{
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
}

.mt-section__counts{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
}

.mt-count{
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  text-align: center;
  font-weight: 600;
}

.mt-count--pass{ background: var(--mt-green-bg); color: var(--mt-green); }
.mt-count--bug{ background: var(--mt-rose-bg); color: var(--mt-rose); }
.mt-count--skip{ background: var(--mt-slate-bg); color: var(--mt-slate); }
.mt-count__of{ color: var(--mt-mute); }

.mt-section__body{
  display: grid;
  gap: 18px;
  padding: 0 18px 18px;
}

.mt-part__title{
  margin: 0 0 8px;
  color: var(--mt-ink-2);
  font-size: 0.875rem;
  font-weight: 600;
}

.mt-notes{
  margin: 0;
  padding-left: 18px;
  color: var(--mt-ink-2);
  font-size: 0.875rem;
  line-height: 1.55;
}

.mt code{
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--mt-slate-bg);
  font-size: 0.85em;
}

/* ---------- Steps ---------- */

.mt-steps{
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--mt-line);
}

.mt-step{
  display: grid;
  gap: 8px;
  padding: 10px 0 10px 12px;
  border-bottom: 1px solid var(--mt-line);
  border-left: 3px solid transparent;
}

.mt-step.is-pass{ border-left-color: var(--mt-green); }
.mt-step.is-bug{ border-left-color: var(--mt-rose); background: #fffafb; }
.mt-step.is-skip{ border-left-color: var(--mt-slate); }
.mt-step.is-skip .mt-step__text{ color: var(--mt-mute); }

.mt-step__main{
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.mt-step__text{
  margin: 4px 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.mt-step__tools{
  display: flex;
  flex: none;
  gap: 8px;
  align-items: center;
}

.mt-states{
  display: inline-flex;
  border: 1px solid var(--mt-line);
  border-radius: 999px;
  overflow: hidden;
}

.mt-state{
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-left: 1px solid var(--mt-line);
  background: var(--mt-paper);
  color: var(--mt-ink-2);
  font: 500 0.8125rem/1 var(--mt-sans);
  cursor: pointer;
}

.mt-state:first-child{ border-left: 0; }
.mt-state:disabled{ cursor: progress; opacity: 0.6; }
.mt-state--todo[aria-pressed="true"]{ background: var(--mt-navy); color: #fff; }
.mt-state--pass[aria-pressed="true"]{ background: var(--mt-green); color: #fff; }
.mt-state--bug[aria-pressed="true"]{ background: var(--mt-rose); color: #fff; }
.mt-state--skip[aria-pressed="true"]{ background: var(--mt-slate); color: #fff; }

.mt-btn{
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--mt-line);
  border-radius: 999px;
  background: var(--mt-paper);
  color: var(--mt-ink-2);
  font: 500 0.8125rem/1 var(--mt-sans);
  cursor: pointer;
}

.mt-btn--primary{
  border-color: var(--mt-navy);
  background: var(--mt-navy);
  color: #fff;
}

.mt-btn--quiet{
  border-color: transparent;
  color: var(--mt-mute);
}

.mt-btn--quiet:hover{ color: var(--mt-navy); }

.mt-note{
  justify-self: start;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--mt-line);
  border-radius: 10px;
  background: var(--mt-canvas);
  color: var(--mt-ink-2);
  font: 400 0.875rem/1.5 var(--mt-sans);
  text-align: left;
  white-space: pre-wrap;
  cursor: text;
}

.mt-step.is-bug .mt-note{
  border-color: #f6c9d3;
  background: var(--mt-rose-bg);
}

.mt-note-edit{
  display: grid;
  gap: 8px;
}

.mt-note-input{
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--mt-line);
  border-radius: 10px;
  font: 400 0.875rem/1.5 var(--mt-sans);
  color: var(--mt-ink);
  resize: vertical;
}

.mt-note-actions{
  display: flex;
  gap: 8px;
  align-items: center;
}

.mt-hint,
.mt-step__meta{
  color: var(--mt-mute);
  font-size: 0.75rem;
}

.mt-error{
  margin: 0;
  font-size: 0.8125rem;
}

/* ---------- Phone ---------- */

@media (max-width: 720px){
  .mt .mt-search{ width: 100%; font-size: 16px; }
  .mt-step__main{ flex-direction: column; gap: 8px; }
  .mt-step__tools{ flex-wrap: wrap; }
  .mt-note-input{ font-size: 16px; }
  .mt-section__head{ padding: 12px 14px; }
  .mt-section__body{ padding: 0 14px 14px; }
}
