/* ═════════════════════════════════════════════════════════════════════
   SPECTRA /// SENDER — Test mode
   ═════════════════════════════════════════════════════════════════════ */

.test-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .test-layout { grid-template-columns: 1fr; } }

.test-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.test-channel-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  gap: 2px;
  align-self: flex-start;
}
.test-channel-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.15s;
}
.test-channel-btn svg { width: 12px; height: 12px; stroke-width: 2; }
.test-channel-btn.active {
  background: var(--card-bg-solid);
  color: var(--product);
  box-shadow: inset 0 0 0 1px var(--product-line);
}

.test-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.test-actions .spacer { flex: 1; }

/* Preview */
.test-preview {
  padding: 6px 0;
}
.test-preview-empty {
  padding: 40px 20px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-mute);
}

.test-email-preview {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.tep-headers {
  padding: 12px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tep-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  font-size: 12.5px;
  align-items: baseline;
}
.tep-row .k {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 600;
}
.tep-row .v { color: var(--fg-bright); }
.tep-body {
  padding: 20px 22px;
  background: #fff;
  color: #1a1a1a;
  font-size: 13px;
  line-height: 1.6;
  min-height: 120px;
}
.tep-body a { color: #0a84ff; text-decoration: underline; }
.tep-body code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 3px;
}
.merge-preview {
  font-style: normal;
  color: var(--product);
  background: var(--product-soft);
  padding: 0 4px;
  border-radius: 3px;
}

/* History */
.test-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-2);
  font-size: 12px;
}
.test-history-row:last-child { border-bottom: none; }
.test-history-row .th-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.test-history-row .th-dot.ok  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.test-history-row .th-dot.err { background: var(--red);   box-shadow: 0 0 6px var(--red); }
.test-history-row .th-dot.dry { background: var(--fg-mute); }
.test-history-row .th-body { flex: 1; min-width: 0; }
.test-history-row .th-t {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.test-history-row .th-d {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-mute);
  margin-top: 2px;
}
.test-history-row .th-status {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.test-history-row .th-status.ok  { background: var(--green-soft); color: var(--green); }
.test-history-row .th-status.err { background: var(--red-soft); color: var(--red); }
.test-history-row .th-status.dry { background: var(--card-bg); color: var(--fg-mute); }

.test-history-empty {
  padding: 24px 8px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
}