:root {
  --bg: #12161c;
  --bg2: #1a222c;
  --panel: rgba(26, 34, 44, 0.88);
  --ink: #eef3f7;
  --muted: #8b9aab;
  --line: rgba(238, 243, 247, 0.1);
  --teal: #2fd4a3;
  --teal-dim: rgba(47, 212, 163, 0.16);
  --amber: #f0b429;
  --rose: #ff6b6b;
  --sky: #5bb8ff;
  --font-ui: "Noto Sans SC", "PingFang SC", sans-serif;
  --font-brand: "Outfit", "Noto Sans SC", sans-serif;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  --page-max: 1480px;
  --page-pad: 28px;
  --zone-gap: 28px;
  --card-pad: 16px 18px;
  --fs-zone: 0.72rem;
  --fs-h2: 1.02rem;
  --fs-body: 0.9rem;
  --fs-aux: 0.8rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(47, 212, 163, 0.18), transparent 55%),
    radial-gradient(700px 420px at 92% 0%, rgba(240, 180, 41, 0.12), transparent 50%),
    radial-gradient(600px 400px at 70% 100%, rgba(91, 184, 255, 0.08), transparent 45%),
    linear-gradient(165deg, #0e1218 0%, #161d27 45%, #12161c 100%);
  animation: ambience 14s ease-in-out infinite alternate;
}
@keyframes ambience {
  from { filter: saturate(1); }
  to { filter: saturate(1.15) brightness(1.04); }
}

.topbar {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 22px var(--page-pad) 14px;
  display: grid;
  gap: 12px;
}
.topbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 24px;
}
.brand-block { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 18px; }
.brand-mark {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  letter-spacing: 0.02em;
  line-height: 1;
  background: linear-gradient(120deg, #fff 20%, var(--teal) 70%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brandPulse 4s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 12px rgba(47, 212, 163, 0.35)); }
}
.brand-sub { color: var(--muted); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 0 rgba(47, 212, 163, 0.5);
}
.live-dot.on {
  background: var(--teal);
  animation: ping 1.6s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(47, 212, 163, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(47, 212, 163, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 212, 163, 0); }
}
.badge {
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}
.badge.demo { color: var(--amber); border-color: rgba(240, 180, 41, 0.4); }
.badge.prod { color: var(--teal); border-color: rgba(47, 212, 163, 0.4); }
.badge.api-on { color: var(--teal); border-color: rgba(47, 212, 163, 0.4); }
.badge.api-off {
  color: #c45c26;
  border-color: rgba(196, 92, 38, 0.55);
  background: rgba(196, 92, 38, 0.12);
  font-weight: 700;
}

/* API 总开关状态条 */
.api-banner {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(196, 92, 38, 0.55);
  background: linear-gradient(135deg, rgba(180, 90, 30, 0.92), rgba(120, 50, 20, 0.88));
  color: #fff;
  box-shadow: var(--shadow);
}
.api-banner.on {
  border-color: rgba(20, 160, 120, 0.45);
  background: linear-gradient(135deg, rgba(16, 120, 90, 0.35), rgba(12, 80, 70, 0.25));
  color: var(--text);
}
.api-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 18px;
}
.api-banner-inner strong { font-size: 1.05rem; }
.api-banner-inner span { flex: 1; min-width: 200px; font-size: 0.92rem; opacity: 0.95; }
.api-conn-line { margin: 6px 0 0; font-size: 0.9rem; font-weight: 600; }
.api-conn-line.on { color: var(--teal); }
.api-conn-line.off { color: #c45c26; }
.tagline { margin: 0; color: var(--muted); max-width: 52ch; font-size: var(--fs-body); line-height: 1.45; }
.top-actions {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.top-actions-primary,
.top-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.top-actions-secondary .btn { opacity: 0.92; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 10px;
  font: 600 0.92rem var(--font-ui);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(47, 212, 163, 0.45); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(135deg, var(--teal), #1fad86);
  color: #06241c;
  border-color: transparent;
}
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: wait; }

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
}
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.metric::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.55;
}
.m-label { display: block; color: var(--muted); font-size: 0.75rem; margin-bottom: 6px; }
.m-val {
  font-family: var(--font-brand);
  font-size: 1.55rem;
  font-weight: 700;
}
.m-val.good { color: var(--teal); }
.m-val.warn { color: var(--amber); }
.m-val.flash { animation: flashNum 0.55s ease; }
@keyframes flashNum {
  from { color: #fff; transform: scale(1.06); }
  to { transform: scale(1); }
}

.gates {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(240, 180, 41, 0.35);
  background: rgba(240, 180, 41, 0.08);
}
.gates h2 { margin: 0 0 10px; font-size: 1rem; }
.gates-list { display: grid; gap: 8px; }
.gate-card {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}
.gate-card .meta { color: var(--muted); font-size: 0.85rem; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.cockpit {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 16px;
  padding: 0;
  margin: 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head h2 { margin: 0; font-size: var(--fs-h2); font-weight: 700; letter-spacing: 0.01em; }
.hint { color: var(--muted); font-size: var(--fs-aux); }

.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.dept-counts {
  font-size: 0.85rem;
}
.floor-wall-stats {
  margin: 10px 0 12px;
}
.dept-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 0;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.dept-card.working {
  border-color: rgba(47, 212, 163, 0.55);
  box-shadow: 0 0 0 1px rgba(47, 212, 163, 0.15), var(--shadow);
  animation: cardGlow 1.8s ease-in-out infinite;
}
.dept-card.waiting { border-color: rgba(240, 180, 41, 0.5); }
.dept-card.escalate { border-color: rgba(255, 107, 107, 0.55); }
@keyframes cardGlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.dept-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 700;
}
.dept-status {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.dept-status.working { color: var(--teal); background: var(--teal-dim); }
.dept-status.waiting { color: var(--amber); background: rgba(240, 180, 41, 0.12); }
.dept-status.escalate { color: var(--rose); background: rgba(255, 107, 107, 0.12); }

.agent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.agent-row:first-of-type { border-top: 0; }
.agent-row.no-thought {
  background: rgba(255, 70, 70, 0.08);
  margin: 0 -6px;
  padding: 8px 6px;
  border-radius: 8px;
  border-top-color: transparent;
}
.agent-llm-badge {
  font-size: 0.68rem;
  line-height: 1.3;
  margin: 2px 0 4px;
  color: var(--muted);
}
.agent-llm-badge.ok { color: var(--teal); }
.agent-llm-badge.mech { color: var(--muted); opacity: 0.85; }
.agent-llm-badge.bad,
.agent-llm-badge.no-thought {
  color: #ff6b6b;
  font-weight: 700;
}
.avatar.no-thought {
  border-color: rgba(255, 107, 107, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.35);
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800;
  font-family: var(--font-brand);
  background: linear-gradient(145deg, #2a3544, #1c2530);
  border: 1px solid var(--line);
  flex-shrink: 0;
  position: relative;
}
.avatar.working::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 2px solid rgba(47, 212, 163, 0.55);
  animation: spinRing 1.2s linear infinite;
}
@keyframes spinRing {
  to { transform: rotate(360deg); }
}
.agent-meta { min-width: 0; flex: 1; }
.agent-name { font-size: 0.88rem; font-weight: 600; }
.agent-task {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-task.working { color: #c9f5e4; }

.side-rail { min-height: 320px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.activity-stream {
  overflow: auto;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.act {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  animation: slideIn 0.35s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}
.act .who { font-size: 0.78rem; font-weight: 700; color: var(--teal); }
.act .msg { font-size: 0.82rem; margin-top: 2px; }
.act .when { color: var(--muted); font-size: 0.7rem; margin-top: 4px; }

.board-wrap, .timeline-wrap { padding: 0; margin: 0; }
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.col {
  background: rgba(26, 34, 44, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 180px;
}
.col-title {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.order-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.order-card:hover {
  border-color: rgba(91, 184, 255, 0.45);
  transform: translateY(-1px);
}
.order-card .oid { font-size: 0.72rem; color: var(--sky); }
.order-card .name { font-weight: 700; margin: 4px 0; font-size: 0.9rem; }
.order-card .sub { color: var(--muted); font-size: 0.75rem; }

.order-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
  margin-left: 8px;
}
.order-timeline li {
  position: relative;
  padding: 0 0 14px 18px;
}
.order-timeline li::before {
  content: "";
  position: absolute;
  left: -6px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}
.order-timeline .t-event { font-weight: 600; }
.order-timeline .t-detail { color: var(--muted); font-size: 0.85rem; }
.order-timeline .t-at { color: var(--muted); font-size: 0.72rem; }

.channels-dialog {
  width: min(720px, 94vw);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #171e28;
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow);
}
.channels-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.dialog-head, .channels-dialog > .dialog-tip,
.channels-list, .pay-edit, .inbound-box {
  padding: 14px 18px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 { margin: 0; }
.dialog-tip { margin: 0; color: var(--muted); font-size: 0.88rem; }
.channels-list { display: grid; gap: 10px; }
.ch-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
}
.ch-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ch-name { font-weight: 700; }
.pill {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
}
.pill.ok { background: var(--teal-dim); color: var(--teal); }
.pill.wait { background: rgba(240, 180, 41, 0.12); color: var(--amber); }
.pill.bad { background: rgba(255, 107, 107, 0.14); color: var(--rose); }
.ch-desc { color: var(--muted); font-size: 0.82rem; margin: 6px 0; }
.ch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.pay-fields label {
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.pay-fields input, .lead-form input, .lead-form select, .lead-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0f141b;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
#inbound-log {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  max-height: 160px;
  overflow: auto;
}

.foot {
  padding: 16px 28px 32px;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  border-top: 1px solid var(--line);
}

/* 公开询盘页 */
.form-page .form-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}
.form-hero .brand-mark {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.form-hero h1 {
  font-family: var(--font-brand);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 8px;
}
.form-hero p { color: var(--muted); margin: 0 0 24px; }
.lead-form {
  display: grid;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.lead-form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}
.form-msg { min-height: 1.2em; color: var(--amber); margin: 0; }

/* AI 引擎状态条 */
.ai-banner {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(220, 60, 60, 0.55);
  background: linear-gradient(135deg, rgba(180, 30, 40, 0.92), rgba(120, 20, 30, 0.88));
  color: #fff;
  box-shadow: var(--shadow);
}
.ai-banner.ok {
  border-color: rgba(20, 160, 120, 0.45);
  background: linear-gradient(135deg, rgba(16, 120, 90, 0.35), rgba(12, 80, 70, 0.25));
  color: var(--text);
}
.ai-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 18px;
}
.ai-banner-inner strong { font-size: 1.05rem; }
.ai-banner-inner span { flex: 1; min-width: 200px; font-size: 0.92rem; opacity: 0.95; }
.ai-conn-line { margin: 10px 0 0; font-size: 0.9rem; font-weight: 600; }
.ai-conn-line.on { color: var(--teal); }
.ai-conn-line.off { color: #e85d5d; }

/* 营业心跳 / 全流程健康度 */
.heartbeat-panel {
  margin: 0;
  padding: var(--card-pad);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hb-overall {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}
.hb-light {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  background: #9aa;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}
.hb-light.green { background: #2ecc71; }
.hb-light.yellow { background: #f1c40f; }
.hb-light.red { background: #e74c3c; }
.hb-light.gray { background: #95a5a6; }
.hb-rings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.hb-ring {
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,0.02);
}
.hb-ring.red { border-color: rgba(231, 76, 60, 0.55); background: rgba(231, 76, 60, 0.08); }
.hb-ring.yellow { border-color: rgba(241, 196, 15, 0.45); }
.hb-ring.green { border-color: rgba(46, 204, 113, 0.4); }
.hb-quota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}
.hb-quota-title, .hb-exc-title { font-weight: 700; margin: 8px 0 6px; }
.hb-exc-list { margin: 0; padding-left: 18px; }
.hb-exc { color: #c0392b; margin: 4px 0; font-size: 0.88rem; }
.hb-actions { margin-top: 8px; }

/* 真实营业首屏 */
.biz-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.biz-status-card, .biz-todo {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.biz-status-label { color: var(--muted); font-size: 0.8rem; margin-bottom: 6px; }
.biz-status-value {
  font-family: var(--font-brand);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
}
.biz-status-value.on { color: var(--teal); }
.biz-status-value.demo { color: var(--amber); }
.biz-status-value.off { color: var(--muted); }
.biz-status-tip { color: var(--muted); margin: 10px 0 0; font-size: 0.9rem; }
.biz-todo-title { font-weight: 700; margin-bottom: 8px; }
#biz-checklist { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
#biz-checklist li { font-size: 0.88rem; color: var(--muted); }
#biz-checklist li.ok { color: var(--teal); }
#biz-checklist li.todo { color: var(--amber); }

.pay-auto-banner, .pay-manual-warn {
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  line-height: 1.45;
}
.pay-auto-banner {
  background: linear-gradient(135deg, rgba(16, 120, 100, 0.12), rgba(30, 90, 140, 0.1));
  border: 1px solid rgba(16, 120, 100, 0.28);
}
.pay-manual-warn {
  background: linear-gradient(135deg, rgba(180, 110, 20, 0.12), rgba(160, 70, 40, 0.08));
  border: 1px solid rgba(180, 110, 20, 0.35);
}
.pay-auto-banner strong, .pay-manual-warn strong { display: block; margin-bottom: 0.35rem; }
.pay-auto-banner p, .pay-manual-warn p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.pay-declare-box { margin: 1rem 0 0.5rem; display: grid; gap: 0.5rem; }
.auto-pay-box {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.auto-pay-box h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.auto-pay-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.8rem;
  margin: 0.75rem 0;
}
.auto-pay-fields label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.auto-pay-fields label.span-2 { grid-column: 1 / -1; }
.auto-pay-fields input, .auto-pay-fields select {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.12);
  font: inherit;
}
.auto-pay-urls { font-size: 0.8rem; color: var(--muted); word-break: break-all; margin: 0.5rem 0; }
.auto-pay-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
@media (max-width: 640px) {
  .auto-pay-fields { grid-template-columns: 1fr; }
}

.inbox-item.cs .inbox-num { color: #fbbf24; }
.inbox-item.cs.overdue .inbox-num { color: var(--rose, #f43f5e); }
.cs-alert-banner {
  margin: 8px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(127,29,29,.45), rgba(30,58,95,.35));
  border: 1px solid rgba(248,113,113,.4);
}
.cs-alert-inner {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.cs-alert-inner strong { color: #fecaca; }
.cs-alert-inner span { color: #e2e8f0; font-size: .9rem; flex: 1; }
.tab-badge {
  display: inline-block; min-width: 1.2em; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: #e11d48; color: #fff; font-size: .7rem; font-weight: 700;
}
.cs-assist-cols {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px;
}
@media (max-width: 960px) {
  .cs-assist-cols { grid-template-columns: 1fr; }
}
.cs-col h3 {
  margin: 0 0 8px; font-size: .92rem; display: flex; justify-content: space-between;
}
.cs-case-list { display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.cs-case-card {
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
}
.cs-case-card.overdue { border-color: rgba(244,63,94,.55); background: rgba(127,29,29,.25); }
.cs-case-card .cs-title { font-weight: 700; margin-bottom: 4px; }
.cs-case-card .cs-meta { color: var(--muted); font-size: .78rem; margin-bottom: 6px; }
.cs-case-card .cs-body { color: #cbd5e1; line-height: 1.4; margin-bottom: 8px; white-space: pre-wrap; }
.cs-case-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-case-actions .btn { font-size: .75rem; padding: 4px 8px; }
.cs-empty { color: var(--muted); font-size: .85rem; padding: 8px 0; }

.inbox-item.cs .inbox-num { color: #fbbf24; }
.inbox-item.cs.overdue .inbox-num { color: var(--rose, #f43f5e); }
.cs-alert-banner {
  margin: 8px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(127,29,29,.45), rgba(30,58,95,.35));
  border: 1px solid rgba(248,113,113,.4);
}
.cs-alert-inner {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.cs-alert-inner strong { color: #fecaca; }
.cs-alert-inner span { color: #e2e8f0; font-size: .9rem; flex: 1; }
.tab-badge {
  display: inline-block; min-width: 1.2em; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: #e11d48; color: #fff; font-size: .7rem; font-weight: 700;
}
.cs-assist-cols {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px;
}
@media (max-width: 960px) {
  .cs-assist-cols { grid-template-columns: 1fr; }
}
.cs-col h3 {
  margin: 0 0 8px; font-size: .92rem; display: flex; justify-content: space-between;
}
.cs-case-list { display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.cs-case-card {
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
}
.cs-case-card.overdue { border-color: rgba(244,63,94,.55); background: rgba(127,29,29,.25); }
.cs-case-card .cs-title { font-weight: 700; margin-bottom: 4px; }
.cs-case-card .cs-meta { color: var(--muted); font-size: .78rem; margin-bottom: 6px; }
.cs-case-card .cs-body { color: #cbd5e1; line-height: 1.4; margin-bottom: 8px; white-space: pre-wrap; }
.cs-case-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-case-actions .btn { font-size: .75rem; padding: 4px 8px; }
.cs-empty { color: var(--muted); font-size: .85rem; padding: 8px 0; }

.inbox-bar {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(26, 34, 44, 0.75);
  border: 1px solid var(--line);
}
.inbox-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}
.inbox-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  position: relative;
}
.inbox-item.pay .inbox-num { color: var(--rose); }
.inbox-item.muted .inbox-num { color: var(--muted); }
.inbox-label { color: var(--muted); font-size: 0.85rem; }
.inbox-num { font-family: var(--font-brand); font-size: 1.35rem; }
.inbox-hint { margin: 0; color: var(--muted); font-size: 0.8rem; flex: 1; min-width: 160px; }
.pay-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.55);
  animation: payPing 1.4s ease-out infinite;
}
.pay-dot.inline {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}
@keyframes payPing {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}
.btn.danger { color: #ffb4b4; border-color: rgba(255, 107, 107, 0.45); }

.pay-banner {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(240, 180, 41, 0.55);
  background: linear-gradient(120deg, rgba(240, 180, 41, 0.18), rgba(255, 107, 107, 0.08));
  box-shadow: var(--shadow);
  animation: payPulse 2.4s ease-in-out infinite;
}
@keyframes payPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06); }
}
.pay-banner-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
}
.pay-banner-label { color: var(--amber); font-weight: 700; font-size: 0.9rem; }
.pay-banner-amount {
  font-family: var(--font-brand);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #ffe08a;
  line-height: 1;
  margin: 4px 0;
}
.pay-banner-meta { color: var(--muted); font-size: 0.85rem; }
.pay-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.demo-fold { position: relative; }
.demo-fold summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.demo-fold summary::-webkit-details-marker { display: none; }
.demo-fold-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.golive-dialog { width: min(780px, 96vw); max-height: 90vh; overflow: auto; }
.biz-import-hint {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.biz-import-hint code { font-size: 0.78rem; }
.biz-import-hint .btn { margin-left: 4px; vertical-align: middle; }
.import-profile-dialog { width: min(720px, 96vw); max-height: 92vh; overflow: auto; }
.import-profile-dialog .dialog-tip { padding: 0 18px; }
.import-fill-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 18px 0;
}
.import-fill-status .pill {
  font: 600 0.75rem var(--font-ui);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.import-fill-status .pill.ok {
  color: #06241c;
  background: var(--teal);
  border-color: transparent;
}
.import-paste-label {
  display: grid;
  gap: 6px;
  padding: 12px 18px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.import-paste-label textarea {
  width: 100%;
  min-height: 180px;
  font: 0.8rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
  color: var(--text);
  resize: vertical;
}
.import-file-row { padding: 10px 18px 0; align-items: end; }
.import-activate-chk { color: var(--muted); font-size: 0.85rem; display: flex; gap: 8px; align-items: center; }
.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px 4px;
}
.import-profile-dialog .form-msg { padding: 0 18px; }
.import-result {
  margin: 8px 18px 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--line);
  font: 0.78rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
  color: var(--muted);
}
@media (max-width: 640px) {
  .import-actions { flex-direction: column; }
  .import-actions .btn { width: 100%; }
}
.wizard-steps {
  display: flex;
  gap: 6px;
  padding: 12px 18px 0;
  flex-wrap: wrap;
}
.wiz-step {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font: 600 0.8rem var(--font-ui);
  cursor: pointer;
}
.wiz-step.active {
  color: #06241c;
  background: var(--teal);
  border-color: transparent;
}
.wiz-pane { padding: 14px 18px; }
.wiz-nav {
  display: flex;
  justify-content: space-between;
  padding: 8px 18px 16px;
  border-top: 1px solid var(--line);
}
.svc-edit { display: grid; gap: 10px; margin-bottom: 10px; }
.svc-row {
  display: grid;
  grid-template-columns: auto 1fr 140px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,0.18);
}
.svc-row .chk { color: var(--muted); font-size: 0.8rem; }
.share-box { display: grid; gap: 12px; margin-bottom: 14px; }
.share-box label { display: grid; gap: 6px; color: var(--muted); font-size: 0.85rem; }
.copy-row { display: flex; gap: 8px; }
.copy-row input, .share-box textarea, .channel-mini input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0f141b;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.qr-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.85rem;
}
.qr-wrap img {
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.channel-mini h3 { margin: 0 0 8px; font-size: 1rem; }
.tunnel-box {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.tunnel-box code {
  display: block;
  font-size: 0.78rem;
  color: var(--sky);
  word-break: break-all;
}
.activate-list { color: var(--muted); font-size: 0.9rem; }

/* 店铺式下单页 */
.form-shell.shop { max-width: 640px; }
.svc-catalog h2 { margin: 0 0 10px; font-size: 1rem; }
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.svc-pick {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}
.svc-pick.on, .svc-pick:hover {
  border-color: rgba(47, 212, 163, 0.55);
  background: rgba(47, 212, 163, 0.08);
}
.svc-pick .price { color: var(--amber); font-family: var(--font-brand); font-weight: 700; }
.svc-pick .price small { color: var(--muted); font-weight: 500; }
.svc-pick .desc { color: var(--muted); font-size: 0.75rem; }
.pay-hint-card {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
  color: var(--muted);
  font-size: 0.88rem;
}
.pay-hint-card h3 { margin: 0 0 8px; color: var(--ink); font-size: 0.95rem; }
.pay-hint-card ul { margin: 0; padding-left: 18px; }

.receipt-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.receipt-row strong { color: var(--ink); }
.receipt-row.big { border-bottom: 0; padding-top: 14px; }
.receipt-row .money { color: var(--amber); font-size: 1.6rem; font-family: var(--font-brand); }
.receipt-save-card {
  border: 1px solid rgba(196, 163, 90, 0.45);
  background: linear-gradient(160deg, rgba(196, 163, 90, 0.12), rgba(0,0,0,0.18));
}
.receipt-save-title { margin: 0 0 12px; font-size: 1.05rem; color: var(--amber); }
.receipt-save-tip { margin: 10px 0 0; font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.receipt-save-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.receipt-link-wrap { font-size: 0.82rem; word-break: break-all; font-weight: 500; }
.lookup-label { display: block; margin: 12px 0 6px; font-size: 0.88rem; color: var(--muted); }
.lookup-page input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
  color: var(--ink);
  font: inherit;
}
.lookup-actions { margin: 12px 0; }
.lookup-block { margin-top: 8px; }
.lookup-triple,
.lookup-recover { margin-top: 16px; color: var(--muted); }
.lookup-triple summary,
.lookup-recover summary { cursor: pointer; margin-bottom: 8px; font-weight: 600; color: var(--ink); }
.lookup-secure-note { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.lookup-order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lookup-order-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
}
.lookup-order-item div { display: grid; gap: 4px; }
.lookup-order-item .meta { font-size: 0.78rem; color: var(--muted); }
.lookup-open-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}
@media (max-width: 640px) {
  .lookup-open-row { grid-template-columns: 1fr; }
}
.order-phone-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 16px 12px;
}
.order-phone-search input {
  min-width: 220px;
  flex: 1;
  max-width: 360px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
  color: var(--ink);
  font: inherit;
}
.order-contact-search-result {
  margin: 0 16px 14px;
  display: grid;
  gap: 10px;
}
.order-search-card {
  padding: 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
  display: grid;
  gap: 8px;
}
.order-search-card .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.order-contact-hit {
  padding: 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
  display: grid;
  gap: 8px;
}
.order-contact-hit .hit-meta { font-size: 0.84rem; color: var(--muted); }
.order-contact-hit .hit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.receipt-due { margin-top: 12px; }
.receipt-due h3, .pay-card h2 { margin: 0 0 8px; font-size: 1rem; }
.due-line { color: var(--amber); margin: 4px 0; }
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pay-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  color: var(--muted);
  font-size: 0.88rem;
}
.pay-list strong { color: var(--ink); word-break: break-all; text-align: right; }
.pay-tip, .next-step { color: var(--muted); font-size: 0.88rem; }
.receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.order-detail-grid .od-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 14px;
}
.order-detail-grid .od-card .k { color: var(--muted); font-size: 0.78rem; margin-bottom: 4px; }
.order-detail-grid .od-card .v { font-weight: 600; word-break: break-all; }
.order-detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.order-detail-split h3 { margin: 0 0 10px; font-size: 0.95rem; }
.cockpit-chat {
  background: rgba(0,0,0,0.25);
  border-radius: 12px;
  padding: 12px;
  min-height: 220px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cockpit-chat .bubble {
  max-width: 92%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
}
.cockpit-chat .bubble.agent { align-self: flex-start; background: #1e3a5f; }
.cockpit-chat .bubble.customer { align-self: flex-end; background: #0f766e; }
.cockpit-chat .bubble.boss { align-self: flex-end; background: #5b21b6; }
.cockpit-chat .who { font-size: 0.72rem; opacity: 0.7; margin-bottom: 2px; }
.cockpit-compose { display: flex; gap: 8px; margin-top: 10px; }
.cockpit-compose input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.3);
  color: inherit;
}
.file-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 0.85rem; }
.file-list li { margin: 4px 0; }
.file-list a { color: var(--sky, #7dd3fc); }
.gate-links { margin-top: 6px; font-size: 0.8rem; color: var(--muted); }
.gate-links code { font-size: 0.75rem; word-break: break-all; }

.warn-banner {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 93, 93, 0.55);
  background: linear-gradient(120deg, rgba(180, 30, 40, 0.4), rgba(120, 20, 30, 0.28));
}
.warn-banner-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
}
.warn-banner-inner strong { color: #ffb4b4; font-size: 1.05rem; }
.warn-banner-inner span { flex: 1; min-width: 180px; font-size: 0.9rem; }

.access-banner {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: linear-gradient(120deg, rgba(14, 80, 120, 0.45), rgba(15, 40, 70, 0.5));
  box-shadow: var(--shadow);
  min-width: 0;
  height: 100%;
}
.access-banner-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px;
}
.access-label { color: var(--sky, #7dd3fc); font-weight: 700; font-size: 0.85rem; }
.access-url {
  font-family: var(--font-brand);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  word-break: break-all;
  margin: 4px 0;
}
.access-meta { color: var(--muted); font-size: 0.85rem; }
.access-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lan-row { padding: 0 18px 14px; display: flex; flex-wrap: wrap; gap: 8px; }

.critical-banner {
  margin: 0;
  border-radius: var(--radius);
  padding: 12px 16px;
  border: 1px solid rgba(220, 60, 60, 0.65) !important;
  background: rgba(180, 30, 30, 0.22) !important;
}
.critical-banner strong { color: #ff8a8a !important; font-size: 1.08rem; }
.social-login-bar {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(220, 50, 50, 0.45);
  background: rgba(80, 18, 18, 0.28);
}
.social-login-title {
  font-weight: 700;
  font-size: var(--fs-h2);
  color: #ffc9c9;
  margin-bottom: 10px;
}
.social-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.social-login-btn {
  background: #9e2a2a !important;
  border-color: rgba(255, 120, 120, 0.55) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  padding: 8px 14px !important;
  min-height: 40px;
  box-shadow: none;
}
.social-login-btn.is-logged {
  background: #1b5e20 !important;
  border-color: #66bb6a !important;
  box-shadow: 0 0 0 1px rgba(102, 187, 106, 0.35);
}
.login-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}
.login-dot.red { background: #ff5252; box-shadow: 0 0 6px #ff5252; }
.login-dot.green { background: #69f0ae; box-shadow: 0 0 6px #69f0ae; }
.login-dot.amber { background: var(--amber); box-shadow: 0 0 6px rgba(240, 180, 41, 0.8); }
#social-login-hint { margin: 8px 0 0; font-size: 0.85rem; }
.acq-day-board { margin: 10px 0 14px; }
.acq-truth {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(0,0,0,0.2);
}
.acq-truth.tone-bad { border-color: rgba(231, 76, 60, 0.55); }
.acq-truth.tone-wait { border-color: rgba(241, 196, 15, 0.45); }
.acq-truth.tone-ok { border-color: rgba(46, 204, 153, 0.45); }
.acq-truth-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.acq-truth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.acq-truth-grid em { display: block; font-style: normal; color: var(--muted); font-size: 0.78rem; }
.acq-truth-grid strong { display: block; font-size: 1.35rem; margin: 2px 0 4px; }
.acq-truth-grid .muted { font-size: 0.75rem; }
.acq-truth-verdict { margin: 10px 0 4px; font-weight: 600; }
.acq-truth-how { margin: 0; font-size: 0.8rem; }
.social-safety-board { margin: 10px 0 12px; }
.safety-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.safety-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.16);
  font-size: 0.84rem;
  color: var(--muted);
}
.safety-card.ok { border-color: rgba(46, 204, 153, 0.4); }
.safety-card.wait { border-color: rgba(241, 196, 15, 0.4); }
.safety-card strong { color: var(--text); display: block; margin-bottom: 4px; }
.safety-msg { margin-top: 6px; color: var(--amber); font-size: 0.8rem; }
.acq-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.acq-bucket {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.16);
}
.acq-bucket.tone-green { border-color: rgba(46, 204, 153, 0.45); }
.acq-bucket.tone-yellow { border-color: rgba(241, 196, 15, 0.45); }
.acq-bucket.tone-red { border-color: rgba(231, 76, 60, 0.55); background: rgba(231, 76, 60, 0.08); }
.acq-bucket-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.acq-bucket-list { margin: 0; padding-left: 16px; font-size: 0.84rem; color: var(--muted); }
.wall-card.internal { border-color: rgba(241, 196, 15, 0.35); background: rgba(241, 196, 15, 0.06); }
.relay-note { flex: 1 1 100%; font-size: 0.82rem; color: var(--amber); }
.ext-url-label { flex: 1 1 100%; font-size: 0.82rem; color: var(--muted); display: grid; gap: 4px; }
.ext-url-label input { width: 100%; }
.wizard-items { display: grid; gap: 12px; max-height: min(55vh, 640px); overflow: auto; }
.wiz-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(0,0,0,0.18);
}
.wiz-card.is-green { border-color: rgba(46, 204, 153, 0.5); }
.honest-line { color: var(--amber); font-size: 0.9rem; }
.wiz-recommend { margin: 8px 0 14px; padding-left: 20px; color: var(--muted); font-size: 0.9rem; }
.wiz-script {
  white-space: pre-wrap;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.82rem;
}
.wecom-quick { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.inline-note { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.wizard-wide { width: min(980px, 96vw); }
.outreach-panel, .radar-panel, .content-pipeline-panel, .sales-panel {
  margin: 0;
  padding: var(--card-pad);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  min-width: 0;
}
.sales-funnel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
}
.sales-funnel .funnel-cell {
  min-width: 88px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.14);
}
.sales-funnel .funnel-cell em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
}
.sales-funnel .funnel-cell strong {
  font-size: 1.25rem;
}
.sales-board {
  display: grid;
  gap: 12px;
}
.sales-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,0.16);
}
.sales-card .sales-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.sales-quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.sales-quote-grid div {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.sales-quote-grid em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
}
.sales-cuts {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}
.sales-login-needed {
  margin: 6px 0 10px;
  font-size: 0.85rem;
}
.content-pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
@media (max-width: 1100px) {
  .content-pipeline-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.content-col {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.14);
  min-height: 120px;
}
.content-col h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.content-col .cnt { color: var(--muted); font-weight: 500; }
.content-card {
  border-top: 1px solid var(--line);
  padding: 8px 0;
  font-size: 0.82rem;
}
.content-card .ct-title { font-weight: 600; margin-bottom: 2px; }
.content-card .ct-meta { color: var(--muted); font-size: 0.78rem; }
.content-card.awaiting_login .ct-title { color: var(--amber); }
.content-card.published .ct-title { color: var(--teal); }
.content-card .ct-packs { margin-top: 6px; font-size: 0.78rem; }
.content-card .ct-result-strip {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.content-card .ct-result {
  font-size: 0.78rem;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
  border-left: 3px solid var(--muted);
}
.content-card .ct-result.ok { border-left-color: var(--teal); color: var(--teal); }
.content-card .ct-result.wait { border-left-color: var(--amber); color: var(--amber); }
.content-card .ct-result.fail { border-left-color: var(--rose); color: var(--rose); }
.content-card .ct-pack {
  margin: 6px 0;
  padding: 6px 8px;
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
}
.content-card .ct-full {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 4px 0 0;
  max-height: 220px;
  overflow: auto;
  font-family: inherit;
  font-size: 0.76rem;
  line-height: 1.45;
}
.content-card .ct-note { color: var(--amber); margin-top: 4px; }
.content-card .ct-link { margin-top: 4px; word-break: break-all; }
.content-card .ct-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.content-news-log {
  margin-top: 10px;
  font-size: 0.8rem;
  max-height: 90px;
  overflow: auto;
}
.agent-output {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}
.outreach-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; align-items: center; }
.outreach-ready { font-size: 0.85rem; margin-bottom: 8px; }
.outreach-board .out-card, .radar-card {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.outreach-board .out-card.need-config { border-left: 3px solid var(--rose); padding-left: 10px; }
.outreach-board .out-title { flex: 1 1 100%; color: var(--muted); font-size: 0.88rem; }
.out-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.88rem; }
.pub-attempt { flex: 1 1 100%; font-size: 0.8rem; color: var(--muted); }
.pub-attempt.ok { color: var(--teal); }
.pub-attempt.fail { color: var(--rose); }
.publish-log { margin-top: 12px; }
.muted { color: var(--muted); }
.radar-stats { color: var(--muted); font-size: 0.85rem; }
.bid-draft {
  flex: 1 1 100%;
  white-space: pre-wrap;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--ink);
  margin: 4px 0;
  max-height: 140px;
  overflow: auto;
}
.radar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.platforms-list, .platforms-groups {
  display: grid;
  gap: 14px;
  max-height: min(70vh, 720px);
  overflow: auto;
  padding-right: 4px;
}
.plat-group {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
}
.plat-group h3 { margin: 0 0 10px; font-size: 0.98rem; }
.plat-group.tone-green { border-color: rgba(46, 204, 153, 0.45); background: rgba(46, 204, 153, 0.08); }
.plat-group.tone-yellow { border-color: rgba(241, 196, 15, 0.45); background: rgba(241, 196, 15, 0.07); }
.plat-group.tone-blue { border-color: rgba(82, 158, 255, 0.45); background: rgba(82, 158, 255, 0.08); }
.plat-group.tone-muted { opacity: 0.92; }
.plat-fold summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }
.plat-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.18);
  margin-bottom: 10px;
}
.plat-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.plat-name { font-weight: 700; font-size: 1.05rem; }
.plat-missing { color: var(--amber); font-size: 0.82rem; margin: 6px 0; }
.plat-switches { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; font-size: 0.88rem; }
.switch-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.trade-note { color: var(--amber); }
.platforms-dialog { width: min(960px, 96vw); }
.wall-feed { margin: 8px 0 14px; }
.wall-list { display: grid; gap: 8px; }
.wall-card {
  border: 1px solid rgba(46, 204, 153, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(46, 204, 153, 0.06);
}
.wall-card p { margin: 6px 0 0; color: var(--muted); font-size: 0.88rem; }
.wall-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.wall-empty { padding: 8px 0; }
.enable-channel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.pub-link { color: var(--teal); word-break: break-all; }
.ext-deal-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ext-deal-row input, .ext-deal-row select {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 8px;
  min-width: 120px;
}
.od-wide { grid-column: 1 / -1; }
.btn.warn, .btn.sm.warn { background: rgba(255,107,107,0.2); color: var(--rose); border-color: rgba(255,107,107,0.35); }

.svc-fields {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  display: grid;
  gap: 10px;
}
/* display:grid 会覆盖 UA 的 [hidden]，必须显式隐藏，否则服务字段串台 */
.svc-fields[hidden] {
  display: none !important;
}
.svc-fields legend { padding: 0 6px; font-weight: 700; }
.req { color: #f0b429; font-size: 0.8rem; margin-left: 4px; }
.opt { color: var(--muted, #8a93a6); font-size: 0.8rem; margin-left: 4px; font-weight: 400; }
.form-soft-tip {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(10, 132, 255, 0.08);
  border: 1px solid rgba(10, 132, 255, 0.22);
  color: var(--muted, #8a93a6);
  font-size: 0.9rem;
  line-height: 1.45;
}
.pay-hint-card.warn { border-color: rgba(232, 93, 93, 0.5); }
.pay-not-ready {
  padding: 14px;
  border-radius: 10px;
  background: rgba(180, 30, 40, 0.25);
  border: 1px solid rgba(232, 93, 93, 0.5);
  margin-bottom: 12px;
}
.qr-pay-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 12px 0;
}
.qr-block { margin: 0; text-align: center; }
.qr-block img {
  width: min(260px, 70vw);
  height: auto;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.qr-block figcaption { margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.qr-upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.ocr-bank-box {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
  background: rgba(255, 255, 255, 0.02);
}
.ocr-bank-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.ocr-bank-head strong { color: var(--ink); font-size: 0.9rem; }
.ocr-file-label {
  display: inline-grid;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: 10px;
}
.ocr-raw {
  margin: 8px 0 0;
  padding: 8px 10px;
  max-height: 110px;
  overflow: auto;
  font-size: 0.75rem;
  color: var(--muted);
  background: #0f141b;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-all;
}
.field-tip {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}
.field-with-help {
  position: relative;
}
.help-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 0.7rem;
  color: var(--muted);
  cursor: help;
  vertical-align: middle;
}
.help-bubble:hover + .help-pop,
.help-bubble:focus + .help-pop { display: block; }
.help-pop {
  display: none;
  position: absolute;
  z-index: 5;
  left: 0;
  top: 1.6em;
  width: min(280px, 70vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #1a222d;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.alipay-guide { margin: 4px 0 8px; }
.alipay-inline-tip { margin: 8px 0 10px; }
.pay-fields label.span-2 { grid-column: 1 / -1; }
.tunnel-live { margin: 10px 0; }
.lan-list { margin-top: 8px; font-size: 0.85rem; color: var(--muted); }
.lan-list code { display: inline-block; margin: 4px 6px 0 0; word-break: break-all; }
.warn-tip { color: #f0b429; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .cockpit { grid-template-columns: 1fr; }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .board { grid-template-columns: repeat(2, 1fr); }
  .biz-hero { grid-template-columns: 1fr; }
  .order-detail-split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --page-pad: 14px; --zone-gap: 20px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dept-grid, .board, .pay-fields, .svc-grid { grid-template-columns: 1fr; }
  .svc-row { grid-template-columns: 1fr; }
}

/* ========== 驾驶舱层叠排版（首屏短 + Tab 主区） ========== */
.page-shell {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 4px var(--page-pad) 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cockpit-first {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.first-status-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: stretch;
}
.biz-hero-compact {
  margin: 0;
  gap: 10px;
}
.biz-hero-compact .biz-status-card,
.biz-hero-compact .biz-todo {
  padding: 12px 14px;
}
.biz-hero-compact .biz-status-value {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
}
.biz-hero-compact .biz-status-tip,
.biz-hero-compact .ai-conn-line,
.biz-hero-compact .biz-import-hint {
  font-size: 0.78rem;
  margin-top: 6px;
}
.biz-hero-compact #biz-checklist {
  max-height: 88px;
  overflow: auto;
  gap: 4px;
}
.biz-hero-compact #biz-checklist li { font-size: 0.8rem; }
.metrics-first {
  margin: 0;
  align-content: stretch;
}
.metrics-first .metric {
  min-height: 64px;
  padding: 10px 12px;
}
.metrics-first .m-val { font-size: 1.25rem; }
.zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.zone-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.zone-title {
  margin: 0;
  font-size: var(--fs-zone);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.zone-sub {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-aux);
  line-height: 1.4;
}
.attention-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(28vh, 260px);
  overflow: auto;
  padding-right: 2px;
}
.attention-compact .gates {
  margin: 0;
  padding: 10px 12px;
}
.attention-compact .gates h2 { font-size: 0.92rem; }
.panel-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--card-pad);
  box-shadow: var(--shadow);
  min-width: 0;
}
.stack-workspace {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.stack-howto {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(47, 212, 163, 0.28);
  background: rgba(47, 212, 163, 0.08);
  color: var(--ink);
  font-size: var(--fs-aux);
  line-height: 1.5;
}
.stack-howto strong { color: var(--teal); }
.stack-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(15, 20, 27, 0.72);
  border: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}
.stack-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 9px;
  font: 600 0.88rem var(--font-ui);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.stack-tab:hover {
  color: var(--ink);
  background: rgba(238, 243, 247, 0.06);
}
.stack-tab[aria-selected="true"] {
  color: #06241c;
  background: linear-gradient(135deg, var(--teal), #1fad86);
  border-color: transparent;
}
.stack-panes {
  min-width: 0;
}
.stack-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  animation: stackIn 0.18s ease;
}
.stack-pane.is-active {
  display: flex;
}
@keyframes stackIn {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.pane-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  align-items: start;
}
.stack-pane .dialog-tip {
  font-size: var(--fs-aux);
  line-height: 1.5;
  margin: 0 0 10px;
}
.stack-pane .outreach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.stack-pane .radar-board,
.stack-pane .sales-board,
.stack-pane .outreach-board,
.stack-pane .wall-feed,
.stack-pane .publish-log,
.stack-pane .content-pipeline-board,
.stack-pane .content-news-log,
.stack-pane .acq-day-board {
  max-height: min(52vh, 520px);
  overflow: auto;
}
.stack-pane .board {
  max-height: min(58vh, 580px);
  overflow: auto;
}
.stack-pane .activity-stream {
  max-height: min(42vh, 420px);
}
.stack-pane .access-banner,
.stack-pane .heartbeat-panel {
  margin: 0;
}
.foot {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 16px var(--page-pad) 32px;
}
.ai-banner { margin: 0; }

@media (max-width: 1100px) {
  .first-status-row { grid-template-columns: 1fr; }
  .pane-split { grid-template-columns: 1fr; }
  .attention-compact { max-height: min(36vh, 300px); }
}
@media (max-width: 720px) {
  .stack-tabs { gap: 4px; }
  .stack-tab { padding: 8px 10px; font-size: 0.8rem; }
}
