/* ===== 设计变量 ===== */
:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #e8ecf4;
  --line-strong: #d7deea;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #7b8798;
  --brand: #2b5cff;
  --brand-dark: #1f47cc;
  --brand-soft: #eef3ff;
  --ok: #0d9f6e;
  --ok-soft: #e8f7f1;
  --warn: #b45309;
  --warn-soft: #fdf3e4;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 2px 4px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.07);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3dae6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #bcc6d6; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 通用 ===== */
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, #2b5cff, #6d8dff);
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(43, 92, 255, 0.28);
  flex: 0 0 auto;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.5;
  background: var(--panel-soft); color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(13, 159, 110, 0.18); }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(180, 83, 9, 0.18); }
.pill.brand { background: var(--brand-soft); color: var(--brand); border-color: rgba(43, 92, 255, 0.18); }
.pill.muted { color: var(--muted); }
.pill.danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(220, 38, 38, 0.16); }

/* ===== 聊天页布局 ===== */
.chat-page { height: 100vh; overflow: hidden; }

.app {
  display: grid;
  grid-template-columns: 268px 1fr;
  height: 100vh;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  min-height: 0;
}

.sidebar-head {
  padding: 18px 16px 14px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-head .name { font-weight: 650; font-size: 15px; letter-spacing: 0.2px; }
.sidebar-head .sub { font-size: 11.5px; color: var(--muted); }

.new-chat {
  margin: 0 14px 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; border-radius: var(--radius-sm);
  border: 1px solid rgba(43, 92, 255, 0.22);
  background: var(--brand-soft); color: var(--brand);
  font-size: 13.5px; font-weight: 600;
  transition: background 0.16s ease, transform 0.16s ease;
}
.new-chat:hover { background: #e3ebff; }
.new-chat:active { transform: scale(0.99); }

.sidebar-label {
  padding: 4px 18px 8px;
  font-size: 11.5px; color: var(--muted); letter-spacing: 0.4px;
  text-transform: uppercase;
}

.conv-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; min-height: 0; }

.conv-item {
  width: 100%; text-align: left;
  border: 1px solid transparent; background: transparent;
  border-radius: var(--radius-sm);
  padding: 9px 10px; margin-bottom: 2px;
  display: flex; flex-direction: column; gap: 3px;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.conv-item:hover { background: var(--panel-soft); }
.conv-item.active { background: var(--brand-soft); border-color: rgba(43, 92, 255, 0.2); }
.conv-item .row { display: flex; align-items: center; gap: 6px; }
.conv-item .title { font-size: 13px; font-weight: 550; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .preview { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .time { font-size: 11px; color: var(--muted); }

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted);
}
.sidebar-foot a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.sidebar-foot a:hover { color: var(--brand); }

/* ===== 聊天主区 ===== */
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }

.chat-head {
  height: 64px; flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
}
.chat-head .avatar {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(135deg, #2b5cff, #7aa0ff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.chat-head .meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chat-head .title { font-weight: 650; font-size: 14.5px; }
.chat-head .status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.chat-head .spacer { flex: 1; }

.ghost-btn {
  height: 32px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--panel);
  color: var(--text-2); font-size: 12.5px; font-weight: 500;
  transition: all 0.15s ease;
}
.ghost-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.ghost-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ghost-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ghost-btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.ghost-btn.danger { color: var(--danger); border-color: rgba(220, 38, 38, 0.3); }
.ghost-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

.messages {
  flex: 1; overflow-y: auto;
  padding: 22px 20px 8px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 0;
}
.messages-inner { width: 100%; max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.msg { display: flex; gap: 10px; max-width: 100%; }
.msg .bubble {
  padding: 10px 13px; border-radius: 4px 14px 14px 14px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13.8px; color: var(--text);
  max-width: min(620px, 82%);
  white-space: pre-wrap; word-break: break-word;
}
.msg .bubble b { font-weight: 650; }
.msg .bubble .ln { display: block; }

.msg-avatar {
  width: 30px; height: 30px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #2b5cff, #7aa0ff);
  margin-top: 2px;
}
.msg-avatar.agent { background: linear-gradient(135deg, #0d9f6e, #48c99a); }

.msg.user { justify-content: flex-end; }
.msg.user .bubble {
  background: var(--brand); border-color: var(--brand); color: #fff;
  border-radius: 14px 4px 14px 14px;
  box-shadow: 0 4px 12px rgba(43, 92, 255, 0.2);
}

.msg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.msg-tag {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--panel-soft); color: var(--muted); border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 4px;
}
.msg-tag.brand { background: var(--brand-soft); color: var(--brand); border-color: rgba(43, 92, 255, 0.18); }
.msg-tag.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(13, 159, 110, 0.18); }

.msg.system { justify-content: center; }
.msg.system .note {
  font-size: 12px; color: var(--muted);
  background: #eef1f7; border-radius: 999px; padding: 4px 12px;
  text-align: center;
}

.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%; background: #b8c2d4;
  animation: blink 1.1s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.empty-state {
  margin: auto; text-align: center; padding: 40px 20px; max-width: 520px;
}
.empty-state .big-avatar {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #2b5cff, #7aa0ff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 700;
  box-shadow: 0 10px 24px rgba(43, 92, 255, 0.26);
}
.empty-state h2 { margin: 0 0 6px; font-size: 18px; font-weight: 650; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }

.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.suggest button {
  border: 1px solid var(--line-strong); background: var(--panel);
  border-radius: 999px; padding: 7px 14px; font-size: 12.8px; color: var(--text-2);
  transition: all 0.15s ease;
}
.suggest button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* 转人工横幅 */
.handoff-banner {
  max-width: 780px; margin: 0 auto 8px; width: 100%;
  display: none;
  align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--warn-soft); border: 1px solid rgba(180, 83, 9, 0.2);
  color: #92400e; font-size: 12.8px;
}
.handoff-banner.show { display: flex; }
.handoff-banner b { font-weight: 650; }
.handoff-banner .spacer { flex: 1; }

/* 评分卡 */
.rating-card {
  max-width: 780px; margin: 0 auto 10px; width: 100%;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: none;
}
.rating-card.show { display: block; }
.rating-card h4 { margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.rating-card p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.stars { display: flex; gap: 6px; margin-bottom: 10px; }
.stars button {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--panel);
  font-size: 16px; color: #cbd5e1; line-height: 1;
  transition: all 0.13s ease;
}
.stars button.on { color: #f59e0b; border-color: #fbbf24; background: #fffbeb; }
.stars button:hover { transform: translateY(-1px); }
.rating-card textarea {
  width: 100%; min-height: 56px; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 13px; color: var(--text); outline: none;
  margin-bottom: 10px;
}
.rating-card textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 92, 255, 0.1); }
.rating-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* 输入区 */
.composer-wrap { flex: 0 0 auto; padding: 12px 20px 18px; }
.composer {
  max-width: 780px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 10px 10px 10px 14px;
  display: flex; align-items: flex-end; gap: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 92, 255, 0.1); }
.composer textarea {
  flex: 1; border: none; outline: none; resize: none;
  font-size: 13.8px; line-height: 1.6; color: var(--text);
  max-height: 132px; min-height: 24px; padding: 4px 0;
  background: transparent;
}
.composer textarea::placeholder { color: #9aa6b8; }
.send-btn {
  width: 34px; height: 34px; border-radius: 10px; border: none;
  background: var(--brand); color: #fff; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.send-btn:hover { background: var(--brand-dark); }
.send-btn:active { transform: scale(0.96); }
.send-btn:disabled { background: #c7d2e8; cursor: not-allowed; }
.composer-hint {
  max-width: 780px; margin: 6px auto 0; font-size: 11.5px; color: var(--muted);
  display: flex; justify-content: space-between; gap: 10px;
}

/* 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(8px);
  background: rgba(15, 23, 42, 0.92); color: #fff;
  padding: 9px 16px; border-radius: 10px; font-size: 12.5px;
  opacity: 0; pointer-events: none; transition: all 0.22s ease; z-index: 60;
  max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 管理后台 ===== */
.admin-body { background: var(--bg); min-height: 100vh; }

.admin-top {
  height: 62px; background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.admin-top .name { font-weight: 650; font-size: 15px; }
.admin-top .sub { font-size: 12px; color: var(--muted); }
.admin-top .spacer { flex: 1; }

.admin-main { max-width: 1240px; margin: 0 auto; padding: 22px 24px 60px; }

.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tab {
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px solid transparent; background: transparent;
  font-size: 13.5px; color: var(--text-2); font-weight: 500;
}
.tab.active { background: var(--panel); border-color: var(--line); color: var(--brand); box-shadow: var(--shadow-sm); }
.tab:hover:not(.active) { background: #eef1f7; }

.kpi-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px;
}
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow-sm);
}
.kpi .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 25px; font-weight: 680; letter-spacing: -0.4px; margin-top: 4px; line-height: 1.25; }
.kpi .value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.kpi .foot { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.kpi.accent { background: linear-gradient(150deg, #2b5cff, #5a80ff); border-color: transparent; color: #fff; }
.kpi.accent .label, .kpi.accent .foot, .kpi.accent .value small { color: rgba(255, 255, 255, 0.82); }

.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 16px; margin-bottom: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 2px; font-size: 13.8px; font-weight: 650; }
.card .hint { margin: 0 0 14px; font-size: 12px; color: var(--muted); }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
.bar-row .k { width: 62px; color: var(--text-2); flex: 0 0 auto; }
.bar-track { flex: 1; height: 8px; background: #eef1f7; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--brand); transition: width 0.5s ease; }
.bar-fill.ok { background: var(--ok); }
.bar-fill.warn { background: #f59e0b; }
.bar-fill.muted { background: #94a3b8; }
.bar-row .v { width: 42px; text-align: right; color: var(--muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; }

.trend { width: 100%; height: 132px; display: block; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--panel);
  font-size: 12.5px; color: var(--text-2);
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
table.conv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.conv-table th {
  text-align: left; font-weight: 550; font-size: 12px; color: var(--muted);
  padding: 10px 14px; background: var(--panel-soft); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.conv-table td { padding: 11px 14px; border-bottom: 1px solid #f1f4f9; vertical-align: top; }
table.conv-table tr:last-child td { border-bottom: none; }
table.conv-table tbody tr { cursor: pointer; transition: background 0.13s ease; }
table.conv-table tbody tr:hover { background: #f9fbff; }
table.conv-table tbody tr.selected { background: var(--brand-soft); }
.cell-preview { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.cell-id { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }

.empty-row { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

/* 详情抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.28);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 40;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 94vw);
  background: var(--panel); box-shadow: -12px 0 32px rgba(15, 23, 42, 0.14);
  transform: translateX(100%); transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 41; display: flex; flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head {
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 10px;
}
.drawer-head .title { font-weight: 650; font-size: 14.5px; }
.drawer-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.drawer-head .spacer { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 12px 16px; }
.drawer-foot textarea {
  width: 100%; min-height: 64px; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 13px; outline: none;
}
.drawer-foot textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 92, 255, 0.1); }
.drawer-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 9px; }

.dmsg { margin-bottom: 12px; }
.dmsg .who { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 6px; align-items: center; }
.dmsg .text {
  background: var(--panel-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 13px; white-space: pre-wrap; word-break: break-word; color: var(--text);
}
.dmsg.user .text { background: var(--brand-soft); border-color: rgba(43, 92, 255, 0.16); }
.dmsg.agent .text { background: var(--ok-soft); border-color: rgba(13, 159, 110, 0.18); }
.dmsg.system .text { background: transparent; border-style: dashed; color: var(--muted); font-size: 12px; }

/* 登录门 */
.gate {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.gate-card {
  width: 100%; max-width: 380px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 28px 26px;
}
.gate-card .brand-mark { margin-bottom: 16px; width: 42px; height: 42px; border-radius: 13px; font-size: 18px; }
.gate-card h1 { margin: 0 0 6px; font-size: 18px; font-weight: 680; }
.gate-card p { margin: 0 0 20px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.gate-card label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.gate-card input {
  width: 100%; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0 12px; font-size: 14px; outline: none; margin-bottom: 8px;
  letter-spacing: 0.4px;
}
.gate-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 92, 255, 0.1); }
.gate-card .err { color: var(--danger); font-size: 12.5px; min-height: 18px; margin-bottom: 10px; }
.gate-card button { width: 100%; height: 40px; border-radius: var(--radius-sm); border: none; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; }
.gate-card button:hover { background: var(--brand-dark); }
.gate-card button:disabled { background: #c7d2e8; }

.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }

/* 响应式 */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .messages { padding: 16px 12px 6px; }
  .composer-wrap { padding: 10px 12px 14px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-main { padding: 16px 12px 40px; }
  .chat-head { padding: 0 12px; }
}

/* 停止生成 */
#stopWrap { max-width: 780px; margin: 0 auto 6px; display: flex; justify-content: center; }
#stopWrap:empty { display: none; }
.stop-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--panel);
  color: var(--text-2); font-size: 12.5px; font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.stop-btn:hover { color: var(--danger); border-color: rgba(220, 38, 38, 0.35); background: var(--danger-soft); }
.stop-icon { width: 8px; height: 8px; border-radius: 2px; background: currentColor; display: inline-block; }

/* 非工作时间留言 */
.handoff-banner.offline { flex-direction: column; align-items: stretch; gap: 9px; }
.contact-row { display: flex; gap: 8px; }
.contact-row input {
  flex: 1; height: 32px; border-radius: 8px;
  border: 1px solid rgba(180, 83, 9, 0.28); background: #fff;
  padding: 0 10px; font-size: 12.5px; color: var(--text); outline: none;
}
.contact-row input:focus { border-color: #b45309; box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1); }
.contact-row .ghost-btn { height: 32px; flex: 0 0 auto; }
