:root {
  --bg: #f4f1ec;
  --ink: #1c1917;
  --muted: #78716c;
  --card: #fffdf9;
  --line: #e7e0d5;
  --accent: #0f766e;
  --err: #b91c1c;
  --term-bg: #0c0a09;
  --term-fg: #d6d3d1;
  --term-ok: #6ee7b7;
  --term-err: #fca5a5;
  --term-warn: #fcd34d;
  --term-info: #93c5fd;
  --brand-logo-font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --brand-product-font: Georgia, "Palatino Linotype", "Times New Roman", serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  /* room for sticky terminal */
  padding-bottom: 0;
}
body.has-term {
  padding-bottom: min(22vh, 160px);
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.top-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
}
.lang-switch select {
  display: inline-block !important;
  width: auto !important;
  min-width: 7rem;
  margin: 0 !important;
  margin-top: 0 !important;
  padding: 8px 12px !important;
  font-size: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.quota-bar {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}
.quota-chip {
  font-size: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 4px 8px;
  color: var(--ink);
}
.offboard-banner {
  flex-basis: 100%;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid #d9a84b;
  background: #fff6e5;
  color: #5c3d00;
}
.quota-chip.is-low {
  border-color: #f59e0b;
  background: #fffbeb;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.asset-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
}
.asset-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  word-break: break-all;
}
.asset-card .story { margin-top: 0; font-size: 13px; }
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.2;
  min-width: 0;
}
.brand-logo {
  font-family: var(--brand-logo-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.brand-logo:hover {
  color: var(--accent);
  text-decoration: none;
}
.brand-logo:empty {
  display: none;
}
.brand-product {
  font-family: var(--brand-product-font);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
  margin-top: 0;
}
body.mode-auth .brand-product {
  font-size: clamp(22px, 3.2vw, 30px);
}
.brand-tagline {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.site-footer {
  max-width: 1100px;
  margin: 8px auto 0;
  padding: 18px 16px 28px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.site-footer-line { margin: 0; }
.site-footer-name {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.site-footer-sep { margin: 0 6px; opacity: 0.55; }
.site-footer-ver {
  margin-left: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0.75;
  font-weight: 600;
}
.home-view { margin: 0; }
.home-hero-banner {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: #0b1220;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: min(52vh, 520px);
}
.home-hero-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.home-hero-copy {
  margin: 0 0 18px;
  padding: 2px 2px 4px;
}
.home-hero-copy h1 {
  margin: 4px 0 10px;
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.home-hero-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.home-hero-lead {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 42rem;
}
.home-hero-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.home-hero-caps li {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid #99d6cb;
  background: #f0faf8;
  color: var(--ink);
}
.auth-shell {
  display: grid;
  /* 与 Quote / CRM 登录页同构：左图右表单 */
  grid-template-columns: minmax(0, 1fr) clamp(460px, 42vw, 580px);
  height: 100%;
  min-height: 0;
  gap: 0;
  align-items: stretch;
}
.auth-visual {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  min-height: 0;
  height: 100%;
  padding: 12px 10px 12px 16px;
}
.auth-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center center;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 40px;
  background: var(--card);
  border-left: 1px solid var(--line);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.auth-card {
  margin: 0;
  width: 100%;
  max-width: 440px;
  padding: 36px 36px 30px;
  box-shadow: 0 10px 32px rgba(28, 25, 23, 0.07);
}
.auth-card h1 {
  margin: 0 0 14px;
  font-size: 2rem;
  line-height: 1.15;
}
.auth-card label {
  margin: 14px 0;
  font-size: 17px;
}
.auth-card input {
  padding: 12px 14px;
  font-size: 17px;
}
.auth-card button.primary {
  margin-top: 20px;
  padding: 13px 18px;
  font-size: 17px;
  width: 100%;
}
body.mode-auth {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.mode-auth .top {
  flex-shrink: 0;
  position: relative;
  justify-content: center;
  padding: 12px 24px;
  min-height: 72px;
}
body.mode-auth .brand {
  align-items: center;
  text-align: center;
  max-width: min(92vw, 560px);
}
body.mode-auth .top-right {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0;
}
body.mode-auth .brand-logo {
  font-size: 11px;
}
body.mode-auth .brand-tagline {
  font-size: 13px;
}
body.mode-auth .wrap,
body.mode-auth main.wrap.mode-auth {
  flex: 1;
  min-height: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.mode-auth .auth-shell:not(.hidden) {
  flex: 1;
  min-height: 0;
}
body.mode-auth .site-footer {
  display: none;
}
body.mode-auth .auth-mini-footer {
  display: block;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.auth-mini-footer {
  display: none;
}
.home-hero-eyebrow { display: none; }
.home-console-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.home-console-head h2 { margin: 0; }
@media (max-width: 640px) {
  body.mode-auth {
    height: auto;
    overflow: auto;
  }
  body.mode-auth .wrap {
    overflow: visible;
  }
  .auth-shell {
    grid-template-columns: 1fr;
    height: auto;
  }
  .auth-visual {
    order: 1;
    height: 32vh;
    min-height: 180px;
    max-height: 240px;
    padding: 10px 16px;
  }
  .auth-panel {
    order: 2;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 20px 16px 28px;
    overflow: visible;
  }
  .home-hero-banner { max-height: 280px; }
}
.nav button {
  margin-left: 6px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 6px 10px;
  cursor: pointer;
}
.nav button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.account-menu {
  position: relative;
  display: inline-block;
  margin-left: 6px;
}
.account-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 16rem;
  margin-left: 0 !important;
  border: 1px solid var(--line);
  background: #fff;
  padding: 4px 10px !important;
  cursor: pointer;
  text-align: right;
}
.account-org {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 15rem;
}
.account-email {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 15rem;
}
.account-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 12rem;
  max-width: min(18rem, calc(100vw - 1rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.12);
  padding: 6px;
  z-index: 40;
  display: flex;
  flex-direction: column;
}
.account-menu-panel.hidden { display: none !important; }
.account-menu-meta {
  padding: 6px 8px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.account-menu-meta strong { display: block; font-size: 13px; }
.account-menu-meta span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}
.account-menu-panel a,
.account-menu-panel button {
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ink) !important;
  text-align: left;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
}
.account-menu-panel a:hover,
.account-menu-panel button:hover {
  background: #f5f1ea !important;
}
.wrap { max-width: 1100px; margin: 28px auto; padding: 0 16px 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 22px;
}
.hidden { display: none !important; }
label { display: block; margin: 10px 0; font-size: 14px; }
input, select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #fff;
}
input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--accent);
}
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
button {
  margin-top: 10px;
  margin-right: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
button.btn-danger {
  background: #fff5f5;
  color: #b91c1c;
  border-color: #fca5a5;
}
button.btn-danger:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #f87171;
}
button.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.muted { color: var(--muted); font-size: 13px; }

/* current-config strip — visual block, not mixed with help text */
.now-box {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid #99d6cb;
  border-left: 4px solid var(--accent);
  background: #f0faf8;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.now-box .now-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.now-box.now-warn {
  border-color: #f59e0b;
  border-left-color: #d97706;
  background: #fffbeb;
}
.home-ws-go {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.home-ws-go button {
  margin-top: 0;
}
.now-box .now-value {
  font-weight: 600;
  word-break: break-word;
}
.now-box .now-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
.now-box.is-empty {
  border-color: #e7d5a8;
  border-left-color: #d97706;
  background: #fffbeb;
}
.now-box.is-error {
  border-color: #f5c2c2;
  border-left-color: var(--err);
  background: #fef2f2;
  color: var(--err);
}

.check { display: flex; align-items: flex-start; gap: 8px; }
.check input { width: auto; margin-top: 3px; }

.dow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 12px;
}
.dow-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.dow-row label:has(input:checked) {
  border-color: var(--accent);
  background: #f0faf8;
  color: var(--accent);
}
.dow-row input {
  width: auto;
  margin: 0;
  padding: 0;
}

/* password show/hide */
.pw-wrap {
  position: relative;
  display: block;
  margin-top: 4px;
}
.pw-wrap > input {
  display: block;
  width: 100%;
  margin-top: 0;
  padding-right: 40px;
}
.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 4px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.pw-toggle:hover,
.pw-toggle[aria-pressed="true"] {
  color: var(--ink);
}
.pw-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

.err { color: var(--err); min-height: 1.2em; }
.setup-steps {
  margin: 12px 0 18px;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.setup-steps b { color: var(--ink); }
.code {
  background: #1c1917;
  color: #f5f5f4;
  padding: 12px;
  overflow: auto;
  font-size: 12px;
  margin-top: 10px;
  max-height: 220px;
}
h1 { font-size: 22px; margin-top: 0; margin-bottom: 6px; }
h2 { font-size: 16px; margin-top: 26px; border-top: 1px solid var(--line); padding-top: 16px; }
h3 { font-size: 14px; margin-top: 18px; }
.ws-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.ws-bar-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.ws-bar-actions button { margin-top: 0; }
.story {
  margin: 12px 0 8px;
  padding: 10px 12px;
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  color: #115e59;
  font-size: 14px;
  line-height: 1.45;
}
.funnel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.funnel .step {
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px 10px;
  text-align: center;
}
.funnel .step .n {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.funnel .step .l {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.home-explain p { margin: 0; font-size: 14px; line-height: 1.55; }
.home-step-h {
  margin-top: 22px;
}
.home-create-ws {
  margin-top: 14px;
  padding-top: 4px;
}
.admin-create-org {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  background: #fafaf9;
}
.admin-create-org h3 {
  margin-top: 0;
}
.org-item, .admin-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.org-item.is-selected {
  background: #f0faf8;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 6px;
  border-bottom-color: transparent;
}
.org-item.is-selected .org-pick-btn {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.sender-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.sender-enable-check {
  flex-shrink: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
}
.sender-enable-check input {
  width: auto;
  margin: 0 4px 0 0;
  vertical-align: middle;
}
.sender-row-meta {
  min-width: 0;
  word-break: break-all;
}
.sender-row.is-disabled .sender-row-meta {
  opacity: 0.55;
}
.sender-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.sender-row-actions button {
  margin-top: 0;
}
.warmup-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}
.warmup-badge.is-ready { background: #dcfce7; color: #166534; }
.warmup-badge.is-warming { background: #fef3c7; color: #92400e; }
.warmup-badge.is-recovery { background: #fee2e2; color: #991b1b; }
.warmup-badge.is-paused { background: #e5e7eb; color: #374151; }
.warmup-badge.is-unlinked { background: #f4f4f5; color: #71717a; }
.warmup-table-wrap { overflow: auto; margin-top: 10px; }
.warmup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.warmup-table th,
.warmup-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 8px;
  text-align: left;
  white-space: nowrap;
}
.warmup-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.warmup-table td.num { font-variant-numeric: tabular-nums; }
.warmup-score {
  font-weight: 700;
  font-size: 16px;
}
.warmup-score.is-low { color: #b91c1c; }
.warmup-score.is-mid { color: #b45309; }
.warmup-score.is-high { color: #15803d; }
.catalog-list {
  margin: 8px 0 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fafaf9;
  min-height: 48px;
}
.catalog-list:empty::before {
  content: "加载中…";
  display: block;
  padding: 12px 0;
  color: var(--muted);
  font-size: 13px;
}
.catalog-list .catalog-empty {
  padding: 14px 0;
  color: var(--muted);
  font-size: 13px;
}
.catalog-row-meta {
  min-width: 0;
  word-break: break-word;
  font-size: 14px;
}
.catalog-row-meta .cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.catalog-row-meta .cat-badge.ws {
  background: #ccfbf1;
  color: #0f766e;
}
.catalog-row-meta .cat-badge.pl {
  background: #e7e5e4;
  color: #57534e;
}
.catalog-row-meta .cat-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.geo-wizard {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #99d6cb;
  border-left: 4px solid var(--accent);
  background: #f0faf8;
}
.geo-wizard .now-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.geo-wizard label { margin-bottom: 0; }
.geo-wizard button { margin-top: 18px; }
.sender-limit-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
}
.sender-limit-inline input {
  width: 72px;
  margin-top: 0;
  display: inline-block;
  padding: 6px 8px;
}

/* ---- probe modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(28, 25, 23, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card {
  background: var(--card);
  border: 1px solid var(--line);
  max-width: 520px;
  width: 100%;
  max-height: min(84vh, 640px);
  overflow: auto;
  padding: 18px 20px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.modal-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.modal-actions button {
  margin-top: 0;
}
.modal-card.modal-wide {
  max-width: min(960px, 96vw);
  max-height: min(88vh, 820px);
}
.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  margin: 6px 0 4px;
  color: var(--ink);
}
.preview-meta span {
  background: #f5f0e8;
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 4px;
}
.preview-table-wrap {
  overflow: auto;
  max-height: min(48vh, 420px);
  border: 1px solid var(--line);
  margin-top: 8px;
}
.preview-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.preview-table th,
.preview-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-table th {
  position: sticky;
  top: 0;
  background: var(--card);
  color: var(--muted);
  font-weight: 600;
  z-index: 1;
}
.preview-table tr:hover td {
  background: #faf7f2;
}
.preview-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 2px;
}
.preview-filters button {
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
}
.preview-filters button.is-on {
  background: #1c1917;
  color: #faf7f2;
  border-color: #1c1917;
}
.preview-table tr.is-sent td {
  background: #eef6ee;
}
.preview-table tr.is-failed td {
  background: #f8ecec;
}
.probe-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 12px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.probe-row .probe-from {
  font-size: 13px;
  font-weight: 600;
}
.probe-row input[type="email"] {
  margin-top: 2px;
}

/* ---- sticky terminal ---- */
.term-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  border-top: 2px solid var(--accent);
  background: var(--term-bg);
  box-shadow: 0 -4px 16px rgba(0,0,0,.18);
  max-height: min(22vh, 160px);
  display: flex;
  flex-direction: column;
}
.term-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px;
  border-bottom: 1px solid #292524;
  color: var(--term-fg);
  font-size: 12px;
  flex-shrink: 0;
}
.term-title { font-weight: 700; color: #fff; }
.term-sub { color: #a8a29e; flex: 1; }
.term-clear,
.term-stop {
  margin: 0;
  padding: 2px 8px;
  font-size: 11px;
  background: #292524;
  color: #e7e5e4;
  border-color: #44403c;
}
.term-stop {
  background: #7f1d1d;
  border-color: #991b1b;
  color: #fecaca;
}
.term-stop:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.terminal {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px 12px 10px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--term-fg);
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal .line { margin: 0 0 4px; }
.terminal .line.ok { color: var(--term-ok); }
.terminal .line.err { color: var(--term-err); }
.terminal .line.warn { color: var(--term-warn); }
.terminal .line.info { color: var(--term-info); }
.terminal .line.muted { color: #a8a29e; }
.terminal .ts { color: #78716c; margin-right: 8px; }

/* Email product: same MachinaMatrix tokens, task-first information architecture. */
.email-wrap { max-width: 1240px; }
body.email-app .email-top {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.10) 0%, rgba(15, 118, 110, 0.04) 100%),
    #e7f2ef;
  border-bottom: 1px solid #b7d4ce;
  box-shadow: 0 1px 0 rgba(15, 118, 110, 0.06);
}
body.email-app .email-top .brand-product {
  font-size: 1.12rem;
}
body.email-app .email-top {
  gap: 12px 18px;
}
.app-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.app-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}
.app-nav a:hover { background: rgba(15, 118, 110, 0.10); }
.app-nav a.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 0 0 1px #b7d4ce;
}
.help-article {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 22px 24px 28px;
  max-width: 720px;
}
.help-article h2 { margin: 22px 0 8px; font-size: 18px; }
.help-article h2:first-child { margin-top: 0; }
.help-article p { margin: 0; color: #44403c; line-height: 1.6; }
.file-button.is-disabled { opacity: .45; pointer-events: none; }
body.email-app .site-footer {
  max-width: 1240px;
}
.env-chip {
  border: 1px solid #e7d5a8;
  background: #fffbeb;
  color: #7c4a03;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
}
.page-head,
.detail-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.page-head { margin-bottom: 12px; }
.page-head h1,
.detail-head h1 { margin: 0; font-size: 27px; }
.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.task-name-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.task-name-link .dot {
  flex: 0 0 auto;
}
.table-shell {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
}
.task-table,
.history-table,
.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.task-table th,
.task-table td,
.history-table th,
.history-table td,
.preview-table th,
.preview-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.task-table th,
.history-table th,
.preview-table th {
  background: #f8f5f0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}
.task-table tbody tr:hover,
.history-table tbody tr:hover,
.preview-table tbody tr:hover { background: #faf8f4; }
.task-table tbody tr:last-child td,
.history-table tbody tr:last-child td,
.preview-table tbody tr:last-child td { border-bottom: 0; }
.task-name-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.task-name-link strong,
.file-name { display: block; font-size: 14px; }
.task-name-row strong { display: inline; }
.task-name-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.list-cell small,
.next-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.task-channel {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.list-cell { min-width: 200px; }
.next-cell { min-width: 215px; font-variant-numeric: tabular-nums; }
.action-cell { width: 48px; white-space: nowrap; text-align: right; }
.action-cell .text-button + .text-button { margin-left: 12px; }
.missing-file { color: #a16207; }
.text-button,
.back-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  margin: 0;
  font-weight: 600;
}
.back-link { margin-bottom: 14px; }
.detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.active-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.active-cluster.compact {
  align-items: flex-start;
  gap: 6px;
}
.active-cell { min-width: 72px; max-width: 88px; vertical-align: top; }
.active-local-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: right;
}
.active-local-time.compact {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.active-local-time.compact small,
.active-local-time small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.ghost-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.ghost-button:hover { border-color: var(--accent); color: var(--accent); }
.status-badge {
  display: inline-flex;
  align-items: center;
  min-width: 58px;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: #f5f5f4;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.status-needs_setup { color: #92400e; border-color: #e7d5a8; background: #fffbeb; }
.status-needs_test { color: #92400e; border-color: #e7d5a8; background: #fffbeb; }
.status-ready { color: #1d4ed8; border-color: #93c5fd; background: #eff6ff; }
.status-active { color: #166534; border-color: #86efac; background: #f0fdf4; }
.status-completed { color: #57534e; background: #f5f5f4; }
.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch-track {
  position: relative;
  width: 38px;
  height: 21px;
  border-radius: 999px;
  background: #d6d3d1;
  transition: background .15s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
  transition: transform .15s ease;
}
.switch-control input:checked + .switch-track { background: var(--accent); }
.switch-control input:checked + .switch-track::after { transform: translateX(17px); }
.switch-control input:disabled + .switch-track { opacity: .45; cursor: not-allowed; }
.switch-control.compact { min-width: 38px; }
.empty-row { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.message { min-height: 20px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.message.error { color: var(--err); }
.message.success { color: var(--accent); }
.legend-line {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}
.legend-line.legend-top {
  margin: 0 0 10px;
  padding: 0 2px;
}
.legend-line span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #a8a29e; display: inline-block; }
.dot-draft { background: #d97706; }
.dot-ready { background: #2563eb; }
.dot-active { background: #16a34a; }
.dot-completed { background: #78716c; }
.detail-title-line { display: flex; align-items: center; gap: 10px; }
.detail-status-dot { width: 9px; height: 9px; padding: 0; min-width: 0; border: 0; }
.detail-tabs {
  display: flex;
  gap: 22px;
  margin: 22px 0 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.detail-tabs button {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 -1px;
  padding: 10px 1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}
.detail-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}
.tab-count {
  min-width: 1.15em;
  padding: 0 6px;
  border-radius: 999px;
  background: #efe8dc;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}
.detail-tabs button.active .tab-count {
  background: #d1fae5;
  color: var(--accent);
}
.tab-panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 20px;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
.summary-strip > div { padding: 13px 15px; border-right: 1px solid var(--line); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip span { display: block; color: var(--muted); font-size: 11px; }
.summary-strip strong { display: block; margin-top: 5px; font-size: 15px; overflow-wrap: anywhere; }
.section-block { margin-top: 22px; }
.section-block h2,
.section-head h2,
.tab-panel > h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 15px;
}
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  color: #92400e;
  border-bottom: 1px solid #f0ebe3;
}
.check-list li:last-child { border-bottom: 0; }
.check-list li.done { color: #166534; }
.check-list li.todo .check-text { flex: 1; }
.check-list .check-mark { width: 16px; font-weight: 700; flex: 0 0 auto; }
.check-list .check-text { flex: 1; line-height: 1.4; }
.check-action {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid #e7d5a8;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.check-action:hover { border-color: #d97706; background: #fff7ed; }
.plain-copy { margin: 0 0 10px; line-height: 1.55; }
.next-step-block .primary { margin-top: 4px; }
.gate-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #e7d5a8;
  background: #fffbeb;
}
.gate-banner[data-kind="test"] {
  border-color: #fcd34d;
  background: #fffbeb;
}
.gate-banner[data-kind="ready"] {
  border-color: #99d6cb;
  background: #f0faf8;
}
.gate-banner-copy { min-width: 0; }
.gate-banner-copy strong { display: block; font-size: 14px; }
.gate-banner-copy p { margin: 4px 0 0; color: #78716c; font-size: 13px; line-height: 1.45; }
.gate-banner .primary { margin: 0; flex: 0 0 auto; }
.test-gate-card {
  margin: 22px 0 0;
  padding: 16px 16px 14px;
  border: 1px solid #e7d5a8;
  background: #fffdf7;
}
.test-gate-card.is-passed {
  border-color: #bbd6c2;
  background: #f0fdf4;
}
.test-gate-kicker {
  margin: 0 0 4px;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}
.test-gate-card.is-passed .test-gate-kicker { color: #166534; }
.today-send-card {
  margin: 0;
  padding: 18px 18px 16px;
  border: 1px solid #c7d2fe;
  background: #f8faff;
}
.today-send-card.is-ready {
  border-color: #86efac;
  background: #f0fdf4;
}
.today-send-card .test-gate-kicker { color: #3730a3; }
.today-send-card.is-ready .test-gate-kicker { color: #166534; }
.today-send-card .muted { margin: 8px 0 0; }
.stat-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 2px 0 0;
  line-height: 1;
}
.stat-title .stat-number {
  display: inline-block;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-title .stat-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.seed-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: 100%;
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}
.seed-check input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
}
.seed-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  margin: 12px 0 0;
}
.seed-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.seed-fields input {
  padding: 7px 9px;
  border: 1px solid #d6d3d1;
  background: #fff;
  font-size: 13px;
  color: var(--ink);
}
.today-send-actions { margin-top: 16px; }
#run-today {
  min-width: 14rem;
}
#run-today.is-stop {
  background: #b91c1c;
  border-color: #991b1b;
  color: #fff;
}
.send-run-panel {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #292524;
  background: var(--term-bg);
  color: var(--term-fg);
}
.send-run-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.send-run-head strong {
  color: #fff;
  font-size: 13px;
}
#send-run-frac {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #fde68a;
}
.send-run-bar-track {
  height: 6px;
  background: #1c1917;
  border: 1px solid #44403c;
  overflow: hidden;
}
#send-run-bar {
  display: block;
  height: 100%;
  width: 0;
  background: #34d399;
  transition: width .2s ease;
}
.send-run-panel.is-running #send-run-bar { background: #fbbf24; }
.send-run-current {
  min-height: 1.3em;
  margin: 8px 0 0;
  font-size: 12px;
  color: #e7e5e4;
}
.send-run-log {
  margin-top: 10px;
  height: min(36vh, 280px);
  border: 1px solid #292524;
  background: #0c0a09;
}
.send-run-summary {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #6ee7b7;
  line-height: 1.45;
}
.send-run-summary.hidden { display: none; }
.terminal .line.summary { font-weight: 700; color: #fff; }
.test-action-lead {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}
.test-sender-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #f0d9a8;
  background: #fff;
  font-size: 12px;
  line-height: 1.45;
  max-height: 160px;
  overflow: auto;
}
.test-sender-list li { padding: 2px 0; color: var(--ink); }
.test-plan-shell {
  margin-top: 10px;
  max-height: min(42vh, 360px);
  border: 1px solid #f0d9a8;
  background: #fff;
}
.test-plan-shell .preview-table th:first-child,
.test-plan-shell .preview-table td.test-sender-cell {
  position: sticky;
  left: 0;
  background: #fffdf7;
  z-index: 1;
  min-width: 180px;
}
.test-company {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.test-sender-heading {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px !important;
}
.schedule-conflict {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
}
.schedule-conflict.ok { color: #166534; }
.schedule-conflict.bad { color: #b91c1c; font-weight: 600; }
.test-gate-steps {
  margin: 10px 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}
.test-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f0d9a8;
  background: #fff;
}
.test-action-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.test-action-row .primary {
  margin: 0;
  flex: 0 0 auto;
  min-width: 11rem;
}
.schedule-block .ghost-button { margin-top: 4px; }
.step-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}
.schedule-block h2 { margin: 0; font-size: 18px; }
.file-button {
  display: inline-block;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.file-button input { display: none; }
.preview-shell { margin-top: 14px; max-height: 420px; }
.preview-table td { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
}
.schedule-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 14px;
  margin-top: 8px;
}
.schedule-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.schedule-field input,
.schedule-field select {
  display: block;
  width: auto;
  min-width: 7.5rem;
  margin: 0;
  padding: 6px 8px;
  font-size: 13px;
}
.schedule-field:first-child select { min-width: 11.5rem; }
.schedule-window {
  display: flex;
  align-items: center;
  gap: 6px;
}
.schedule-window input {
  width: 3.6rem;
  min-width: 0;
  text-align: center;
}
.schedule-window-sep {
  color: var(--muted);
  font-weight: 600;
}
.schedule-field-probe {
  flex: 1 1 220px;
}
.schedule-field-probe input {
  width: 100%;
  min-width: 16rem;
}
.editor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.editor-actions button { margin: 0; }
.saved-state {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: #f5f5f4;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.saved-state.dirty {
  border-color: #e7d5a8;
  background: #fffbeb;
  color: #92400e;
}
.template-version-row {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  align-items: end;
  gap: 12px;
  margin: 16px 0 4px;
}
.template-editor-label { margin-top: 12px; color: var(--ink); font-size: 13px; font-weight: 600; }
.editor-toolbar {
  display: flex;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #f8f5f0;
}
.editor-toolbar button {
  margin: 0;
  padding: 4px 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.editor-toolbar button:hover { border-color: var(--line); background: #fff; }
.template-editor {
  min-height: 330px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
  line-height: 1.55;
  overflow: auto;
}
.template-editor:focus { outline: 2px solid rgba(15, 118, 110, .18); border-color: var(--accent); }
.template-preview-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: #fff;
}
.preview-subject {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.preview-subject span { color: var(--muted); }
.template-preview-wrap iframe {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
  background: #fff;
}
.template-preview-wrap .message { padding: 0 12px 10px; }
.variable-hint { margin-top: 6px; font-size: 12px; }
.task-meta {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.task-meta summary { color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600; }
.secondary-file {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}
.sender-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sender-table th,
.sender-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.sender-table th { color: var(--muted); background: #f8f5f0; font-size: 11px; }
.sender-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.sender-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.sender-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d97706; }
.sender-status.ok::before { background: #16a34a; }
.sender-status.paused::before { background: #78716c; }
.sender-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #faf8f4;
}
.sender-actions { display: flex; gap: 8px; }
.sender-actions button { margin: 0; padding: 4px 7px; font-size: 11px; }
.probe-results { margin-top: 12px; }
.probe-result {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 90px minmax(120px, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.probe-result.success { color: #166534; }
.probe-result.failed { color: #b91c1c; }
.auth-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 60px rgba(28, 25, 23, .22);
}
.auth-dialog::backdrop { background: rgba(28, 25, 23, .38); }
.auth-dialog h2 { margin: 0 0 6px; font-size: 19px; }
.auth-dialog form > label { display: block; margin-top: 16px; }
textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}
.time-callout {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border-left: 4px solid var(--accent);
  background: #f0faf8;
  font-size: 13px;
}
.time-callout span { color: var(--muted); }
.safety-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #faf8f4;
}
.safety-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.safety-row button { margin: 0; }

@media (max-width: 820px) {
  .task-table th:nth-child(3),
  .task-table td:nth-child(3),
  .task-table th:nth-child(4),
  .task-table td:nth-child(4) { display: none; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .summary-strip > div:nth-child(2) { border-right: 0; }
  .summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
  .schedule-field,
  .schedule-field-probe { flex: 1 1 calc(50% - 14px); }
  .schedule-field input,
  .schedule-field select,
  .schedule-field-probe input { width: 100%; min-width: 0; }
}

.task-menu { position: relative; display: inline-block; }
.tasks-table-shell { overflow: visible; }
.menu-trigger {
  width: 34px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 700;
  letter-spacing: 1px;
}
.menu-trigger:hover,
.menu-trigger[aria-expanded="true"] {
  border-color: var(--line);
  background: #f5f1ea;
}
.menu-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  padding: 5px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 26px rgba(28, 25, 23, .14);
}
.menu-panel button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  text-align: left;
  white-space: nowrap;
}
.menu-panel button:hover { background: #f5f1ea; }
.menu-panel .menu-danger,
.danger-text { color: var(--err); }

@media (max-width: 820px) {
  .tasks-table-shell { overflow-x: auto; }
}
