/* ==========================================================
   客户跟踪复盘系统 · 样式
   浅色金融科技风格
   ========================================================== */

:root {
  --bg:          #F4F6FA;
  --surface:     #FFFFFF;
  --surface-2:   #F8FAFC;
  --border:      #E3E8EF;
  --border-2:    #D3DAE6;

  --brand:       #2563EB;
  --brand-dark:  #1D4ED8;
  --brand-light: #EFF6FF;
  --brand-mid:   #DBEAFE;

  --text:        #16202F;
  --text-2:      #52627A;
  --text-3:      #8896AB;

  --danger:      #DC2626;
  --danger-bg:   #FEF2F2;
  --warn:        #D97706;
  --warn-bg:     #FFFBEB;
  --ok:          #059669;
  --ok-bg:       #ECFDF5;
  --purple:      #7C3AED;
  --purple-bg:   #F5F3FF;

  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 2px rgba(16,32,63,.04), 0 4px 12px rgba(16,32,63,.05);
  --shadow-lg:   0 8px 32px rgba(16,32,63,.14);
  --sidebar-w:   208px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--brand); text-decoration: none; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-spacer { flex: 1; min-height: 20px; }
.sidebar-foot { padding-top: 8px; }
.sidebar-foot .btn { width: 100%; justify-content: center; }

.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 20px; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; letter-spacing: .5px;
}
.brand-name { font-weight: 650; font-size: 14.5px; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: var(--text-3); margin-top: -3px; }

.nav-group-title {
  font-size: 11px; color: var(--text-3); font-weight: 600;
  padding: 14px 10px 6px; letter-spacing: .6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: .13s; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.nav-item .ico { width: 17px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 1px 6px;
  border-radius: 9px; min-width: 18px; text-align: center;
}
.nav-badge.muted { background: var(--border-2); color: var(--text-2); }

.main {
  flex: 1; margin-left: var(--sidebar-w);
  padding: 22px 26px 60px; max-width: 1500px;
}

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-title { font-size: 21px; font-weight: 680; letter-spacing: -.2px; }
.page-desc { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; }

/* ---------- 按钮 ---------- */
.btn {
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 550; transition: .13s;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { border-color: var(--text-3); color: var(--text); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-danger { color: var(--danger); border-color: #F5C6C6; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-size: 14.5px; font-weight: 620; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand);
}
.stat.danger::before { background: var(--danger); }
.stat.warn::before   { background: var(--warn); }
.stat.ok::before     { background: var(--ok); }
.stat.purple::before { background: var(--purple); }
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.stat-value { font-size: 27px; font-weight: 700; letter-spacing: -.6px; line-height: 1.25; }
.stat.danger .stat-value { color: var(--danger); }
.stat.warn .stat-value   { color: var(--warn); }
.stat.ok .stat-value     { color: var(--ok); }
.stat-hint { font-size: 11.5px; color: var(--text-3); }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3);
  padding: 9px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13.2px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; transition: .1s; }
tbody tr.clickable:hover { background: var(--brand-light); }
tr.row-overdue { background: var(--danger-bg); }
tr.row-overdue:hover { background: #FDE8E8; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px; font-size: 11.5px;
  font-weight: 600; white-space: nowrap; line-height: 1.7;
}
.tag-blue   { background: var(--brand-light); color: var(--brand-dark); }
.tag-green  { background: var(--ok-bg);      color: var(--ok); }
.tag-red    { background: var(--danger-bg);  color: var(--danger); }
.tag-amber  { background: var(--warn-bg);    color: var(--warn); }
.tag-purple { background: var(--purple-bg);  color: var(--purple); }
.tag-gray   { background: #F1F5F9;           color: var(--text-2); }

.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-hot    { background: #EF4444; }
.dot-normal { background: #3B82F6; }
.dot-cold   { background: #94A3B8; }
.dot-risk   { background: #D97706; }

.prio { font-weight: 750; font-size: 11.5px; padding: 2px 7px; border-radius: 4px; }
.prio-P0 { background: var(--danger); color: #fff; }
.prio-P1 { background: var(--warn-bg); color: var(--warn); border: 1px solid #FCD9A4; }
.prio-P2 { background: #F1F5F9; color: var(--text-2); }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--text-3); font-weight: 400; }
input[type=text], input[type=date], input[type=datetime-local], input[type=number],
input[type=time], input[type=password], select, textarea {
  padding: 8px 11px; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface); outline: none; transition: .13s; width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
textarea { resize: vertical; min-height: 68px; line-height: 1.6; }
select { cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 11px; border: 1px solid var(--border-2); border-radius: 20px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; transition: .12s;
  user-select: none; background: var(--surface);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 550; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16,32,63,.4);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column;
}
.modal.wide { max-width: 900px; }
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 650; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 13px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 9px; background: var(--surface-2);
  border-radius: 0 0 14px 14px;
}
.close-x {
  width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center;
  color: var(--text-3); font-size: 19px; line-height: 1;
}
.close-x:hover { background: var(--surface-2); color: var(--text); }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -21px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--brand);
}
.tl-item.key::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-mid); }
.tl-date { font-size: 12px; color: var(--text-3); font-weight: 600; margin-bottom: 3px; }
.tl-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px; }
.tl-row { display: flex; gap: 7px; font-size: 13px; margin-top: 5px; }
.tl-row:first-child { margin-top: 0; }
.tl-key { color: var(--text-3); flex-shrink: 0; font-size: 12.5px; min-width: 62px; }
.tl-val { color: var(--text); flex: 1; }

/* ---------- 杂项 ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--text-3); }
.empty-ico { font-size: 34px; opacity: .35; margin-bottom: 8px; }
.empty-text { font-size: 13.5px; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 13px; }
.toolbar input[type=text] { max-width: 210px; }
.toolbar select { width: auto; min-width: 108px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1080px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

.muted { color: var(--text-3); }
.small { font-size: 12px; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb12 { margin-bottom: 12px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.right { text-align: right; }

.bar-wrap { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar { height: 100%; background: var(--brand); border-radius: 4px; transition: width .3s; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #16202F; color: #fff; padding: 10px 20px; border-radius: 8px;
  font-size: 13.5px; z-index: 300; box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

.rule-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 15px; background: var(--surface); transition: .13s;
}
.rule-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.rule-card.off { opacity: .5; }
.rule-name { font-weight: 620; font-size: 13.8px; }
.rule-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.7; }
.rule-list { display: grid; gap: 10px; }

.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; background: var(--border-2);
  border-radius: 20px; transition: .2s; cursor: pointer;
}
.slider::before {
  content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(16px); }

.kv { display: grid; grid-template-columns: 84px 1fr; gap: 7px 12px; font-size: 13.2px; }
.kv dt { color: var(--text-3); font-size: 12.5px; }
.kv dd { color: var(--text); }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab {
  padding: 8px 15px; font-size: 13.5px; font-weight: 550; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .13s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 620; }

.funnel-row { display: flex; align-items: center; gap: 11px; padding: 7px 0; }
.funnel-name { width: 118px; font-size: 12.8px; flex-shrink: 0; }
.funnel-bar { flex: 1; height: 22px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.funnel-fill {
  height: 100%; background: linear-gradient(90deg, #60A5FA, #2563EB);
  border-radius: 5px; display: flex; align-items: center; padding-left: 8px;
  color: #fff; font-size: 11.5px; font-weight: 650; min-width: 26px;
}
.funnel-val { width: 72px; text-align: right; font-size: 12.5px; color: var(--text-2); flex-shrink: 0; }

/* ==========================================================
   照片墙 / 灯箱（客户情况照片）
   ========================================================== */
.photo-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}
.photo-grid.small-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }

.photo-cell {
  position: relative; margin: 0; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2);
  cursor: pointer; transition: .14s;
}
.photo-cell:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.photo-cell img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-cell figcaption {
  padding: 4px 6px; font-size: 11px; color: var(--text-2);
  background: var(--surface); display: flex; justify-content: space-between; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.photo-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border: none; border-radius: 50%; cursor: pointer; line-height: 1;
  background: rgba(16, 32, 63, .62); color: #fff; font-size: 14px;
}
.photo-del:hover { background: var(--danger); }
.photo-empty {
  padding: 18px; text-align: center; font-size: 12.5px; color: var(--text-3);
  border: 1px dashed var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.lightbox {
  position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column;
  background: rgba(10, 18, 32, .88);
}
.lb-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 18px; color: #fff; background: rgba(0, 0, 0, .3);
}
.lb-title { font-size: 14px; font-weight: 600; }
.lb-sub { display: block; font-size: 11.5px; font-weight: 400; opacity: .72; margin-top: 2px; }
.lb-acts { display: flex; gap: 8px; flex-shrink: 0; }
.lb-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow: auto;
}
.lb-body img { max-width: 100%; max-height: 100%; border-radius: var(--radius-sm); }
.lb-cap { padding: 10px 18px 18px; color: #E5EAF2; font-size: 13px; text-align: center; }

/* ==========================================================
   移动端入口二维码
   ========================================================== */
.qr-entry { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.qr-box {
  flex-shrink: 0; padding: 10px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.qr-box svg { display: block; }
.qr-side { flex: 1; min-width: 280px; }
.qr-err {
  width: 168px; height: 168px; display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: var(--danger);
  text-align: center; padding: 12px;
}
.qr-steps {
  margin: 0; padding-left: 18px; font-size: 12.6px;
  color: var(--text-2); line-height: 1.85;
}
.qr-steps b { color: var(--text); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }

/* ==========================================================
   可扩展下拉：自定义标签的删除按钮
   ========================================================== */
.tag-x { margin-left: 4px; cursor: pointer; font-weight: 700; opacity: .55; }
.tag-x:hover { opacity: 1; color: var(--danger); }

/* ---------- 渠道管理页 ---------- */
.btn-danger-ghost {
  padding: 6px 11px; border: 1px solid var(--danger-bg); background: transparent;
  color: var(--danger); border-radius: var(--radius-sm); font-size: 13px; cursor: pointer;
  transition: .12s;
}
.btn-danger-ghost:hover { background: var(--danger-bg); }
.alert-list { display: flex; flex-direction: column; gap: 9px; }
.alert-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2);
}
.alert-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); }
.alert-item.alert-danger { border-color: #FCA5A5; background: var(--danger-bg); }
.alert-item.alert-danger .alert-dot { background: var(--danger); }
.alert-item.alert-warn { border-color: #FCD9A4; background: var(--warn-bg); }
.alert-item.alert-warn .alert-dot { background: var(--warn); }
.alert-item > div:nth-child(2) { flex: 1; }
.ok-line { padding: 12px 14px; border-radius: 9px; background: var(--ok-bg); color: var(--ok); font-size: 13.5px; font-weight: 550; }

/* 渠道来源类型图例 */
.type-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.type-legend .tl-item { display: flex; align-items: center; gap: 8px; }
.type-legend .tl-item .small { max-width: 260px; }

/* 渠道列表类型筛选 */
.ch-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ch-chip { padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; font-size: 13px; cursor: pointer; color: var(--text-2); transition: all .12s; }
.ch-chip:hover { border-color: var(--brand); color: var(--brand); }
.ch-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.mt12 { margin-top: 12px; }
.mb8  { margin-bottom: 8px; }

/* ==========================================================
   编辑退出守卫：未保存徽标（配合 Modal._guard）
   ========================================================== */
.dirty-flag {
  display: none; font-size: 11px; font-weight: 600;
  color: var(--warn); background: var(--warn-bg);
  border: 1px solid #FDE68A; padding: 1px 8px; border-radius: 8px;
  margin-right: auto; margin-left: 10px;
}
.dirty-flag.on { display: inline-block; }

/* ---------- 确认 / 输入弹层（z-index 必须高于 .modal-mask 的 100，否则在弹窗内会被遮住） ---------- */
.confirm-mask {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .45); padding: 20px;
}
.confirm-box {
  width: min(420px, 92vw); background: #fff;
  border-radius: 12px; padding: 22px;
  box-shadow: 0 12px 40px rgba(16, 32, 63, .22);
}
.confirm-ico {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #FEF3C7; color: #B45309; font-weight: 800;
  margin-bottom: 10px; font-size: 18px;
}
.confirm-title { font-size: 15px; font-weight: 650; color: #16202F; }
.confirm-msg { margin-top: 8px; font-size: 13.5px; line-height: 1.7; color: #52627A; }
.confirm-foot { margin-top: 18px; display: flex; gap: 10px; justify-content: flex-end; }

/* 可点击的统计卡（今日复盘台：点开看客户清单） */
.stat.clickable { cursor: pointer; transition: transform .08s; }
.stat.clickable:hover { box-shadow: 0 4px 14px rgba(16, 32, 63, .14); transform: translateY(-1px); }

/* ==========================================================
   手机端页面（mobile.html，作用域隔离，不污染桌面端）
   ========================================================== */
body.mobile { background: var(--surface-2); }
.m-app { display: flex; flex-direction: column; min-height: 100vh; }
.m-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  background: var(--brand); color: #fff;
  box-shadow: 0 1px 6px rgba(16,32,63,.12);
}
.m-head-title { font-size: 16px; font-weight: 650; letter-spacing: .3px; }
.m-head-btns { display: flex; align-items: center; gap: 6px; }
.m-head-btn, .m-head-add {
  background: rgba(255,255,255,.18); color: #fff;
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
}
.m-head-btn:active, .m-head-add:active { background: rgba(255,255,255,.30); }
.m-main {
  flex: 1; padding: 14px 12px calc(env(safe-area-inset-bottom) + 74px);
  max-width: 720px; width: 100%; margin: 0 auto;
}
.m-tab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(16,32,63,.06);
}
.m-tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 7px; color: var(--text-3); font-size: 11px; font-weight: 500;
  min-width: 0; overflow: hidden;
}
.m-tab-btn span:not(.m-ico) {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.m-tab-btn .m-ico { font-size: 18px; line-height: 1; }
.m-tab-btn.active { color: var(--brand); }
.m-tab-btn.active .m-ico { transform: translateY(-1px); }

/* 7 个 tab 及以上时收紧字号，避免窄屏换行/挤压 */
@media (max-width: 420px) {
  .m-tab-btn { font-size: 10px; padding: 7px 0 6px; }
  .m-tab-btn .m-ico { font-size: 16px; }
}

/* 手机端表格横向滚动，避免列被压变形 */
.mobile .card-body.tight { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mobile table { min-width: 560px; }
.mobile .comm-mini { max-width: 220px; }

/* 移动端布局收拢：单列、收敛内距、表格横滑 */
.mobile .page-head { margin-bottom: 14px; }
.mobile .page-title { font-size: 18px; }
.mobile .grid-2 { grid-template-columns: 1fr !important; gap: 12px; }
.mobile .card { border-radius: var(--radius); }
.mobile .card-body { padding: 14px; }
.mobile .form-grid { grid-template-columns: 1fr !important; gap: 12px 0; }
.mobile .field input,
.mobile .field select,
.mobile .field textarea { font-size: 16px; }
.mobile table { display: block; overflow-x: auto; white-space: nowrap; }
.mobile .toolbar { flex-wrap: wrap; }
.mobile .toolbar input[type=text] { max-width: none; flex: 1; }
.mobile .modal-mask { align-items: flex-end; padding: 0; }
.mobile .modal {
  max-width: 100%; width: 100%; height: auto; max-height: 92vh;
  border-radius: 16px 16px 0 0; margin-top: auto;
}
.mobile .photo-grid { grid-template-columns: repeat(3, 1fr); }
.mobile .qr-entry { flex-direction: column; }
.mobile .qr-side { min-width: 0; width: 100%; }

/* 选项 / 负责人 删除管理列表 */
.dict-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.dict-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--card2); }
.dict-name { flex: 1; font-weight: 600; color: var(--text); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dict-meta { flex: 0 0 auto; margin-right: 4px; }

/* 数据模式角标已移除：现在默认走共享库，无需在角落提示；连接异常走 Toast 提示 */

/* ==========================================================
   渠道看板（可截图发给渠道方）
   ========================================================== */
.board-wrap { max-width: 1100px; margin: 0 auto; }
.board-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.board-head-card { background: linear-gradient(135deg, #f7faff 0%, #eef4ff 100%); }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 14px; }
.board-head .bh-title { font-size: 18px; }
.board-head .bh-attr { flex: 1; min-width: 180px; }
.board-head .bh-cost { white-space: nowrap; }

.board-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.board-stat {
  background: #fff; border: 1px solid var(--line, #EDF1F7); border-radius: var(--radius, 12px);
  padding: 12px 10px; text-align: center;
}
.board-stat .bs-n { font-size: 22px; font-weight: 700; color: var(--text-1, #16202F); line-height: 1.1; }
.board-stat .bs-l { font-size: 12px; color: var(--text-3, #52627A); margin-top: 4px; }
.board-stat.bs-alert { background: #fff4f3; border-color: #ffd5cf; }
.board-stat.bs-alert .bs-n { color: var(--danger, #e5484d); }
.tag-green-t { color: #1a9d5a !important; }
.tag-red-t { color: #e5484d !important; }

.board-table { width: 100%; border-collapse: collapse; }
.board-table th, .board-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--line, #EDF1F7);
  text-align: left; font-size: 14px; vertical-align: middle;
}
.board-table thead th { background: #f4f6fa; color: var(--text-3); font-weight: 600; font-size: 13px; }
.board-table tbody tr { cursor: default; }
.board-table tbody tr:not(.row-alert) { cursor: pointer; }
.board-table tbody tr.row-alert { background: #fff8f7; }
.board-table tbody tr.row-alert td:first-child { box-shadow: inset 3px 0 0 var(--danger, #e5484d); }
.board-table .small { font-size: 12.5px; line-height: 1.5; }

.flag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.flag-red { background: #ffe9e6; color: #d6443b; }
.flag-amber { background: #fff3df; color: #c47f12; }

.board-foot {
  margin-top: 18px; padding: 14px 16px; background: #16202F; color: #fff; border-radius: var(--radius, 12px);
}
.board-foot .bf-line { font-size: 15px; font-weight: 600; }
.board-foot .bf-sub { font-size: 12.5px; opacity: .8; margin-top: 6px; }

/* 截图模式：隐藏一切非看板元素，仅留干净看板 + 脚注 */
.board-shot-on .no-shot { display: none !important; }
.board-shot-on .layout .sidebar,
.board-shot-on .m-head,
.board-shot-on .m-tab { display: none !important; }
.board-shot-on .board-wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }

/* 手机端：看板明细由表格转为卡片 */
@media (max-width: 720px) {
  .board-stats { grid-template-columns: repeat(3, 1fr); }
  .board-table thead { display: none; }
  .board-table, .board-table tbody, .board-table tr, .board-table td { display: block; width: 100%; }
  .board-table tbody tr {
    border: 1px solid var(--line, #EDF1F7); border-radius: 12px;
    margin-bottom: 10px; padding: 4px 0; background: #fff;
  }
  .board-table tbody tr.row-alert td:first-child { box-shadow: none; border-left: 3px solid var(--danger, #e5484d); border-radius: 12px 0 0 12px; }
  .board-table td { border: none; display: flex; justify-content: space-between; gap: 12px; padding: 6px 14px; }
  .board-table td::before { content: attr(data-label); color: var(--text-3); font-weight: 600; flex: 0 0 auto; }
  .board-table td > * { text-align: right; }
  .board-head .bh-attr { min-width: 0; }
}

/* 打印 / 另存为 PDF：纯净看板 */
@media print {
  .layout .sidebar, .m-head, .m-tab, .no-shot, .board-tools { display: none !important; }
  .board-wrap { max-width: 100%; }
  .card { box-shadow: none; border: 1px solid #ddd; }

/* ==========================================================
   每日运营看板（三支柱 + 腾讯会议 + 重要事项）
   ========================================================== */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 12px; }
.pillar { margin: 0; }
.pillar-sum { margin-left: auto; background: var(--brand, #2f6bff); color: #fff;
  border-radius: 999px; min-width: 26px; height: 22px; padding: 0 8px; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.step-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 2px; border-bottom: 1px dashed var(--line, #EDF1F7); }
.step-row:last-child { border-bottom: none; }
.step-label { font-weight: 600; color: var(--text-1, #16202F); }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.step-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line, #EDF1F7);
  background: #fff; color: var(--brand, #2f6bff); font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1; }
.step-btn:hover { background: #f0f5ff; }
.step-val { min-width: 26px; text-align: center; font-weight: 700; font-size: 16px; color: var(--text-1, #16202F); }

.meeting-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px;
  background: #fff7f3; border: 1px solid #ffd9c8; cursor: pointer; margin-bottom: 12px; transition: .15s; }
.meeting-banner:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.meeting-banner.on { background: #eafaf0; border-color: #a9e3c1; }
.mb-ico { font-size: 24px; }
.mb-text { flex: 1; min-width: 0; }
.mb-title { font-weight: 700; color: var(--text-1, #16202F); }
.mb-sub { font-size: 12.5px; color: var(--text-3, #52627A); margin-top: 2px; }
.mb-flag { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  background: #ffe2d6; color: #d6602f; }
.meeting-banner.on .mb-flag { background: #cdeed8; color: #1a9d5a; }

.imp-box { width: 100%; min-height: 96px; border: 1px solid var(--line, #EDF1F7); border-radius: 10px;
  padding: 10px 12px; font: inherit; color: var(--text-1, #16202F); resize: vertical; }
.imp-box:focus { outline: none; border-color: var(--brand, #2f6bff); }

.yest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 10px; }
.yest { background: #f6f8fc; border: 1px solid var(--line, #EDF1F7); border-radius: 10px; padding: 10px 6px; text-align: center; }
.yest b { display: block; font-size: 20px; color: var(--brand, #2f6bff); line-height: 1.1; }
.yest span { font-size: 11.5px; color: var(--text-3, #52627A); }
.yest.ok b { color: #1a9d5a; } .yest.no b { color: var(--danger, #e5484d); }
.yest-note { margin-top: 12px; padding: 10px 12px; background: #f6f8fc; border-radius: 10px; font-size: 13px; color: var(--text-2); }
.yest-total { margin-top: 10px; font-size: 13px; color: var(--text-3, #52627A); }
.yest-total b { color: var(--brand, #2f6bff); }

.scroll-x { overflow-x: auto; }
.th-sub { font-size: 11px; font-weight: 400; color: var(--text-3, #52627A); }

/* 渠道详情：沟通记录 / 复盘条目 */
.log-item { border: 1px solid var(--line, #EDF1F7); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.log-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.log-head .btn { margin-left: auto; }
.log-body { font-size: 14px; color: var(--text-1, #16202F); line-height: 1.6; white-space: pre-wrap; }

/* 渠道详情：概况要点 */
.kv-block { padding: 10px 0; border-bottom: 1px dashed var(--line, #EDF1F7); }
.kv-block:last-child { border-bottom: none; }
.kv-label { font-size: 12px; color: var(--text-3, #52627A); font-weight: 600; margin-bottom: 6px; }
.kv-text { font-size: 14px; color: var(--text-1, #16202F); line-height: 1.65; white-space: pre-wrap; }
.kv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.kv-block.overdue, .kv-block.warn-block { background: #fff8f0; border-radius: 8px; padding: 10px; margin: 0 -10px; }
.kv-text.overdue, dd.overdue, .ch-next-action.overdue { color: #c0392b; }

/* 渠道列表：下一步动作 */
.ch-next-action { font-size: 13px; color: var(--text-1, #16202F); line-height: 1.5; }
.ch-next-action .tag { margin-left: 4px; }

/* 沟通记录里的下一步动作 */
.log-next-action { margin-top: 8px; padding: 8px 10px; background: #f4f8ff; border-radius: 6px; font-size: 13px; }
.log-next-action.overdue { background: #fff2f0; }
.log-next-action .kv-label { display: block; margin-bottom: 4px; }
.log-next-action .tag { margin-left: 6px; }

/* ---------- 登录与权限 ---------- */
/* 登录遮罩：必须覆盖包括侧栏底部按钮在内的所有元素 */
/* 登录页：作为主内容区路由渲染，不再用 fixed 遮罩 */
.login-page {
  min-height: calc(100vh - 82px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
}

.login-card {
  width: 480px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 34px 28px 24px;
  box-shadow: 0 18px 52px rgba(15,23,42,.18);
  position: relative;
  box-sizing: border-box;
}
.login-logo { width: 54px; height: 54px; border-radius: 16px; background: var(--brand, #2f6bff);
  color: #fff; font-weight: 700; font-size: 22px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; box-shadow: 0 6px 18px rgba(47,107,255,.32); }
.login-title { text-align: center; font-size: 22px; font-weight: 800; color: var(--text-1, #16202F); letter-spacing: .3px; }
.login-sub { text-align: center; color: var(--text-3, #52627A); font-size: 13px; margin: 6px 0 22px; }

/* ---------- 身份卡片网格 ---------- */
.id-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 12px;
}
.id-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px 12px;
  border: 1px solid var(--line, #EDF1F7); border-radius: 14px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .08s;
}
.id-card:hover { border-color: var(--brand, #2f6bff); box-shadow: 0 6px 18px rgba(47,107,255,.14); }
.id-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: #f0f3f9; color: var(--text-2, #3a4a63);
  font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  transition: transform .1s, box-shadow .15s;
}
.id-avatar:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(15,23,42,.16); }
.id-avatar.av-owner {
  background: linear-gradient(135deg, #2f6bff 0%, #1d5df2 100%);
  color: #fff; font-size: 20px;
  box-shadow: 0 4px 12px rgba(47,107,255,.34);
}
.id-name { font-size: 14px; font-weight: 600; color: var(--text-1, #16202F);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.id-role { font-size: 11px; color: var(--text-3, #52627A); }
.id-card.is-owner {
  border-color: var(--brand, #2f6bff);
  background: linear-gradient(180deg, #f6f9ff 0%, #fff 100%);
}
.id-card.is-owner .id-name { color: var(--brand, #2f6bff); }

/* 卡片右上删除、底部设密码 */
.id-del, .id-set {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-3, #52627A); font-size: 11px; padding: 2px 6px; border-radius: 6px;
  transition: .12s;
}
.id-del { position: absolute; top: 4px; right: 4px; font-size: 15px; line-height: 1;
  opacity: 0; transition: opacity .15s; }
.id-card:hover .id-del { opacity: .55; }
.id-card:hover .id-del:hover { opacity: 1; color: #e5484d; background: #fdecec; }
.id-set { margin-top: 2px; }
.id-set:hover { color: var(--brand, #2f6bff); background: #f0f5ff; }

/* 新增身份卡片 */
.id-card.id-add {
  border-style: dashed; border-width: 2px; border-color: #cfd8e8;
  background: #fbfcfe; cursor: pointer; justify-content: center;
  min-height: 128px; gap: 4px;
}
.id-card.id-add:hover { border-color: var(--brand, #2f6bff); background: #f4f8ff; }
.id-plus { font-size: 26px; color: var(--brand, #2f6bff); line-height: 1; font-weight: 300; }
.id-add-label { font-size: 13px; color: var(--text-2, #3a4a63); font-weight: 600; }

.login-foot { margin-top: 16px; text-align: center; font-size: 11px; color: var(--text-3, #52627A); }
/* 普通设备：名称+密码表单用的窄卡片 */
.login-card.login-card-sm { width: 380px; }
/* 登录页底部小字链接（主控管理 / 切回账号登录） */
.login-link { display: block; margin: 14px auto 0; padding: 4px 8px;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-3, #52627A); font-size: 12px; border-radius: 6px; transition: .12s; }
.login-link:hover { color: var(--brand, #2f6bff); background: #f0f5ff; }

.login-pwd { width: 100%; margin-top: 14px; padding: 11px 12px; border: 1px solid var(--line, #EDF1F7);
  border-radius: 10px; font-size: 15px; box-sizing: border-box; }
.login-pwd:focus { outline: none; border-color: var(--brand, #2f6bff); }
.login-err { min-height: 18px; margin-top: 8px; font-size: 12px; color: #e5484d; text-align: center; }
.login-submit { width: 100%; margin-top: 8px; justify-content: center; }
.login-back { margin: 12px auto 0; display: block; border: none; background: transparent;
  color: var(--text-3, #52627A); font-size: 13px; cursor: pointer; }
.login-back:hover { color: var(--brand, #2f6bff); }

/* 侧栏底部给绝对定位的「写跟踪记录」按钮留出空间，避免 userBar 被覆盖 */
.user-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 8px 12px 12px;
  background: #fff; border: 1px solid var(--line, #EDF1F7); border-radius: 10px; font-size: 13px;
  cursor: pointer; transition: .12s; }
.user-bar:hover { border-color: var(--brand, #2f6bff); background: #f4f8ff; }
.ub-name { font-weight: 600; color: var(--text-1, #16202F); }
.ub-switch { margin-left: auto; border: none; background: #f0f3f9; color: var(--text-2, #3a4a63);
  border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.ub-switch:hover { background: #e4e9f3; }

.tag-owner { background: #eaf6ee; color: #1f8a4c; }
.tag-member { background: #eef3ff; color: #2f6bff; }

.perm-member { padding: 12px 0; border-bottom: 1px dashed var(--line, #EDF1F7); }
.perm-member:last-child { border-bottom: none; }
.perm-mname { font-weight: 600; font-size: 14px; color: var(--text-1, #16202F); margin-bottom: 8px; }
.perm-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.perm-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2, #3a4a63); cursor: pointer; }
.perm-all { font-weight: 600; color: var(--brand, #2f6bff); }
.card-foot { padding: 10px 14px; border-top: 1px solid var(--line, #EDF1F7); background: #fafbfe;
  font-size: 12px; color: var(--text-3, #52627A); border-radius: 0 0 12px 12px; }

/* 手机端适配 */
.mobile .pillar-grid { grid-template-columns: 1fr; }
.mobile .yest-grid { grid-template-columns: repeat(3, 1fr); }
.mobile .meeting-banner { padding: 10px 12px; }
.mobile .mb-ico { font-size: 20px; }
}

/* 语音输入按钮（Web Speech API） */
.voice-btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 6px; padding: 5px 13px; font-size: 14px; line-height: 1;
  border: 1px solid var(--border-2, #d9e0ea); border-radius: 20px;
  background: var(--surface, #fff); color: var(--text-2, #3a4a63);
  cursor: pointer; transition: .13s; user-select: none;
}
.voice-btn:hover { border-color: var(--brand, #2f6bff); color: var(--brand, #2f6bff); }
.voice-btn.voice-on {
  background: #e11d48; border-color: #e11d48; color: #fff;
  animation: voicePulse 1.2s ease-in-out infinite;
}
.voice-btn.voice-disabled { opacity: .4; cursor: not-allowed; }

/* ==========================================================
   智能语音录入（SmartVoice）+ PWA 安装引导
   ========================================================== */
.sv-mask, .pwa-mask {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(16, 32, 63, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 18px; backdrop-filter: blur(2px);
}
/* 聆听层 */
.sv-listen {
  width: 100%; max-width: 440px; background: var(--surface);
  border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 26px 22px 20px; text-align: center;
}
.sv-listen-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.sv-mic {
  width: 92px; height: 92px; margin: 12px auto 8px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  border: 2px solid var(--brand-mid);
}
.sv-mic.on { animation: svPulse 1.2s ease-in-out infinite; background: var(--brand); color: #fff; border-color: var(--brand); }
@keyframes svPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .35); }
  50%      { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); }
}
.sv-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.7; margin-bottom: 12px; }
.sv-transcript {
  min-height: 72px; max-height: 160px; overflow: auto; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13.5px; color: var(--text); white-space: pre-wrap; margin-bottom: 16px;
}
.sv-listen-foot { display: flex; gap: 10px; }
.sv-listen-foot .btn { flex: 1; justify-content: center; }
/* 结果面板 */
.sv-result {
  width: 100%; max-width: 560px; max-height: 90vh; overflow: auto;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 20px;
}
.sv-result-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.sv-result-title { font-size: 17px; font-weight: 700; color: var(--text); }
.sv-switch { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sv-switch select { padding: 5px 8px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: var(--surface); }
.sv-why { color: var(--text-3); font-size: 12px; }
.sv-raw { font-size: 12px; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 14px; }
.sv-raw span { color: var(--text-2); }
.sv-fields .sv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.sv-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.sv-field.full { grid-column: 1 / -1; }
.sv-field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.sv-field input, .sv-field select, .sv-field textarea {
  border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 8px 10px;
  background: var(--surface); color: var(--text); width: 100%;
}
.sv-field textarea { resize: vertical; }
.sv-result-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
/* PWA 安装引导 */
.pwa-box { width: 100%; max-width: 460px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 22px; }
.pwa-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.pwa-steps { margin: 0 0 12px 18px; display: flex; flex-direction: column; gap: 8px; }
.pwa-steps li { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.pwa-guide-note { font-size: 12px; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.pwa-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
/* 手机头部按钮区允许换行，避免加图标后拥挤 */
.m-head-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 窄屏：结果面板字段单列、贴边 */
@media (max-width: 640px) {
  .sv-fields .sv-grid { grid-template-columns: 1fr; }
  .sv-result, .sv-listen, .pwa-box { max-width: 100%; }
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .45); }
  50% { box-shadow: 0 0 0 7px rgba(225, 29, 72, 0); }
}
