:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --border: #dce2df;
  --border-strong: #c2cdc8;
  --ink: #162420;
  --ink-muted: #5a6b65;
  --accent: #0f5c52;
  --accent-hover: #0a443c;
  --accent-light: #e6f3f0;
  --accent-border: #b5dbd4;
  --amber: #9a5b13;
  --amber-bg: #fef6ea;
  --red: #b42318;
  --red-bg: #fef3f2;
  --green: #15603a;
  --green-bg: #e8f6ee;
  --blue: #1d4ed8;
  --blue-bg: #eff6ff;
  --radius-lg: 14px;
  --radius-md: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* 顶部极简导航 */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}

.topbar-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.brand h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 600;
}

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 22px 20px 60px;
}

/* 顶部小白一句话说明卡 */
.intro-banner {
  background: linear-gradient(180deg, #eaf5f2 0%, #f3f8f6 100%);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.intro-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 3px;
}

.intro-desc {
  font-size: 13.5px;
  color: #2b453f;
}

/* 核心三步流向卡片与无缝衔接导流桥 */
.step-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  position: relative;
  box-shadow: 0 2px 8px rgba(18, 36, 31, 0.03);
}

.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.step-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
}

.step-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 1px;
}

/* 板块之间的实体衔接桥（让上下卡片视觉连成一体） */
.flow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.flow-line {
  width: 2px;
  height: 14px;
  background: var(--accent-border);
}

.flow-pill {
  background: #ffffff;
  border: 1.5px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(15, 92, 82, 0.06);
}

/* 第 1 步内部左右两个选择框 */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 820px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }
}

.choice-box {
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s, background 0.15s;
}

.choice-box.recommended {
  background: #f4faf8;
  border-color: var(--accent-border);
}

.choice-tag-top {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.choice-box h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 12px;
}

.model-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--ink);
}

.choice-hint {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

/* 按钮与表单 */
.btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.14s;
}

.btn:hover {
  background: var(--surface-soft);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline-accent {
  background: #fff;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-outline-accent:hover {
  background: var(--accent-light);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
}

.btn-danger {
  color: var(--red);
  border-color: #f3c1bd;
  background: #fff;
}

.btn-danger:hover {
  background: var(--red-bg);
}

select,
input[type="text"],
input[type="password"],
textarea {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 92, 82, 0.12);
}

/* 第 3 步顶部统计小胶囊 */
.mini-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-chip {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.stat-chip strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-soft);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #fafcfb;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.muted {
  color: var(--ink-muted);
  font-size: 12.5px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-approved {
  background: var(--green-bg);
  color: var(--green);
}

.badge-skipped {
  background: #f1f3f2;
  color: #63706b;
}

.badge-sent {
  background: var(--blue-bg);
  color: var(--blue);
}

.badge-hot {
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #86efac;
}

.badge-bounced {
  background: var(--red-bg);
  color: var(--red);
}

.alert {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
}

.alert-ok {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #bbf7d0;
}

.alert-err {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #fecaca;
}

.alert-info {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

/* 底部站长高级折叠区 */
.admin-drawer {
  margin-top: 28px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
}

.admin-drawer summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 13.5px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

@media (max-width: 820px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.admin-subcard {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

/* 弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 24, 22, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

.form-field {
  margin-bottom: 12px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.form-field input {
  width: 100%;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
  display: none;
  z-index: 200;
}
