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

:root {
  /* ---------- 背景与表面（浅蓝渐变 iOS 风） ---------- */
  --bg-grad:     linear-gradient(165deg, #E9F1FE 0%, #F3F8FF 42%, #FBFDFF 100%);
  --bg:          var(--bg-grad);
  --surface:     rgba(255,255,255,.88);
  --surface-solid: #FFFFFF;
  --surface-2:   #F4F8FE;
  --surface-3:   #EEF4FE;

  --border:      #E6EEFA;
  --border-2:    #D6E2F4;
  --line:        #E6EEFA;

  /* ---------- 品牌色（柔和科技蓝渐变） ---------- */
  --brand:       #2F6BFF;
  --brand-dark:  #1E54E8;
  --brand-light: #EEF4FF;
  --brand-mid:   #D9E7FF;
  --brand-grad:  linear-gradient(135deg, #5BA7FF 0%, #2F6BFF 58%, #1E54E8 100%);
  --brand-grad-soft: linear-gradient(135deg, #8FC2FF 0%, #4D86FF 100%);

  /* ---------- 文字 ---------- */
  --text:        #16223D;
  --text-1:      #16223D;
  --text-2:      #50607A;
  --text-3:      #8595AC;

  /* ---------- 状态色 ---------- */
  --danger:      #F04438;
  --danger-bg:   #FEF2F1;
  --warn:        #E8860B;
  --warn-bg:     #FEF6EC;
  --ok:          #12B76A;
  --ok-bg:       #ECFDF3;
  --purple:      #7A5AF8;
  --purple-bg:   #F4F1FE;

  /* ---------- 圆角（更圆润） ---------- */
  --radius:      16px;
  --radius-sm:   10px;
  --radius-lg:   22px;

  /* ---------- 阴影（柔和分层） ---------- */
  --shadow:      0 1px 2px rgba(20,48,100,.04), 0 6px 20px rgba(20,60,140,.07);
  --shadow-md:   0 8px 28px rgba(20,60,140,.10);
  --shadow-lg:   0 22px 56px rgba(18,48,110,.18);
  --shadow-brand: 0 10px 28px rgba(47,107,255,.32);

  /* ---------- 动效 ---------- */
  --ease:        cubic-bezier(.22,.61,.36,1);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
  --t-fast:      .15s;
  --t:           .24s;

  --sidebar-w:   216px;
}

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

body {
  font-family: "Plus Jakarta Sans", -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;
  text-rendering: optimizeLegibility;
}

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: rgba(255,255,255,.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-right: 1px solid var(--border);
  box-shadow: 12px 0 36px rgba(20,60,140,.05);
  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; display: flex; flex-direction: column; gap: 8px; }
.sidebar-foot .btn { width: 100%; justify-content: center; }

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--brand-grad);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; letter-spacing: .5px;
  box-shadow: 0 6px 16px rgba(47,107,255,.34);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.brand-sub { font-size: 10.5px; color: var(--text-3); margin-top: 1px; letter-spacing: .3px; }

.nav-group-title {
  font-size: 10.5px; color: var(--text-3); font-weight: 700;
  padding: 16px 12px 7px; letter-spacing: .8px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: background var(--t) var(--ease), color var(--t) var(--ease), transform .12s var(--ease);
  width: 100%; text-align: left; position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: var(--brand-light); color: var(--brand-dark); font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(47,107,255,.12);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--brand-grad);
}
.nav-item .ico { width: 18px; text-align: center; flex-shrink: 0; font-size: 15px; }
.nav-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 1px 7px;
  border-radius: 10px; min-width: 18px; text-align: center;
  box-shadow: 0 2px 6px rgba(240,68,56,.3);
}
.nav-badge.muted { background: var(--border-2); color: var(--text-2); box-shadow: none; }

.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: 9px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 600; transition: all var(--t) var(--ease);
  border: 1px solid var(--border-2); background: var(--surface-solid); color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(20,48,100,.04);
}
.btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(47,107,255,.12); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(47,107,255,.30);
}
.btn-primary:hover { color: #fff; filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(47,107,255,.38); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-danger { color: var(--danger); border-color: #F7CDCD; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--brand); box-shadow: none; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card-head {
  padding: 15px 18px; 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: 650; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }
.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: 16px 18px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--brand-grad);
}
.stat::after {
  content: ''; position: absolute; right: -24px; top: -24px; width: 84px; height: 84px;
  border-radius: 50%; background: radial-gradient(circle, var(--brand-mid) 0%, transparent 70%);
  opacity: .5; pointer-events: none;
}
.stat.danger::before { background: linear-gradient(180deg, #F04438, #D92D20); }
.stat.warn::before   { background: linear-gradient(180deg, #F5A623, #E8860B); }
.stat.ok::before     { background: linear-gradient(180deg, #2BD07E, #12B76A); }
.stat.purple::before { background: linear-gradient(180deg, #9A7BFF, #7A5AF8); }
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 600; }
.stat-value { font-size: 28px; font-weight: 750; letter-spacing: -.6px; line-height: 1.25; position: relative; }
.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); position: relative; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--text-3);
  padding: 13px 16px; background: var(--surface-3);
  border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
  letter-spacing: .3px;
}
th.sortable { cursor: pointer; user-select: none; transition: color var(--t-fast) var(--ease); }
th.sortable:hover { color: var(--brand); }
th .sort-ind { color: var(--brand); margin-left: 3px; font-size: 10px; }
td { padding: 13px 16px; 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: background var(--t-fast) var(--ease); }
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: 9px 12px; border: 1px solid var(--border-2); border-radius: 12px;
  background: var(--surface-solid); outline: none; transition: all var(--t-fast) var(--ease); width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 4px rgba(47,107,255,.14);
}
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,.42);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: maskIn .2s var(--ease);
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface-solid); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column;
  border: 1px solid var(--border);
  animation: modalIn .26s var(--ease-bounce);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal.wide { max-width: 900px; }
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16.5px; font-weight: 680; }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 9px; background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.close-x {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  color: var(--text-3); font-size: 19px; line-height: 1; transition: all var(--t-fast) var(--ease);
}
.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: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 14px;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.toolbar input[type=text] { max-width: 220px; }
.toolbar select { width: auto; min-width: 110px; }
.toolbar-sep { width: 1px; height: 22px; background: var(--border-2); margin: 0 2px; }
.toolbar-label { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
#custSortKey { min-width: 116px; border-color: var(--brand-mid); background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }

.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: 7px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.bar { height: 100%; background: var(--brand-grad); border-radius: 6px; transition: width .3s var(--ease); }

.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(--bg-grad); }
.m-app { display: flex; flex-direction: column; min-height: 100vh; }

/* 顶部毛玻璃导航条（浅蓝 iOS 风） */
.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: rgba(255,255,255,.82);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.6), 0 4px 16px rgba(20,60,140,.06);
}
.m-head-title {
  font-size: 16.5px; font-weight: 750; letter-spacing: .3px;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.m-head-btns { display: flex; align-items: center; gap: 6px; }
.m-head-btn, .m-head-add {
  background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 11px; font-size: 13px; font-weight: 600;
  transition: all var(--t-fast) var(--ease);
}
.m-head-btn:active, .m-head-add:active { transform: scale(.96); }
.m-head-add {
  background: var(--brand-grad); color: #fff; border: none;
  box-shadow: 0 4px 12px rgba(47,107,255,.30);
}
.m-main {
  flex: 1; padding: 14px 12px calc(env(safe-area-inset-bottom) + 78px);
  max-width: 720px; width: 100%; margin: 0 auto;
}

/* 底部毛玻璃 tab 栏，激活项品牌色 + 图标圆底 */
.m-tab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 16px rgba(20,60,140,.07);
}
.m-tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 7px; color: var(--text-3); font-size: 11px; font-weight: 500;
  min-width: 0; overflow: hidden; transition: color var(--t-fast) var(--ease);
}
.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: 17px; line-height: 1; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 10px; transition: all var(--t-fast) var(--ease);
}
.m-tab-btn.active { color: var(--brand); }
.m-tab-btn.active .m-ico {
  background: var(--brand-light); color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(47,107,255,.16);
}

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

/* 手机端表格横向滚动，避免列被压变形 */
.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 遮罩 */
/* 渐变背景 + 柔光装饰球，营造浅蓝 iOS 金融科技氛围 */
.login-page {
  position: relative;
  min-height: calc(100vh - 82px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
  overflow: hidden;
}
.login-page::before,
.login-page::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(8px);
}
.login-page::before {
  width: 420px; height: 420px; top: -120px; right: -120px;
  background: radial-gradient(circle at 35% 35%, #BBD6FF 0%, rgba(187,214,255,0) 68%);
  opacity: .8;
}
.login-page::after {
  width: 360px; height: 360px; bottom: -140px; left: -100px;
  background: radial-gradient(circle at 60% 40%, #CDE7FF 0%, rgba(205,231,255,0) 70%);
  opacity: .7;
}
.login-page > .login-card { position: relative; z-index: 1; }

.login-card {
  width: 480px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius-lg);
  padding: 40px 32px 26px;
  box-shadow: 0 24px 60px rgba(18,48,110,.20), 0 4px 12px rgba(18,48,110,.06);
  position: relative;
  box-sizing: border-box;
  animation: loginIn .5s var(--ease-bounce);
}
@keyframes loginIn {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.login-logo {
  width: 60px; height: 60px; border-radius: 18px;
  background: var(--brand-grad);
  color: #fff; font-weight: 800; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 10px 24px rgba(47,107,255,.40);
  animation: logoPop .55s var(--ease-bounce) .05s both;
}
@keyframes logoPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.login-title { text-align: center; font-size: 23px; font-weight: 800; color: var(--text-1, #16223D); letter-spacing: .3px; }
.login-sub { text-align: center; color: var(--text-3, #52627A); font-size: 13px; margin: 7px 0 22px; }
.login-slogan {
  position: relative; text-align: center; margin: 0 0 24px;
  padding-top: 16px; font-size: 13.5px; font-weight: 600; letter-spacing: .6px; line-height: 1.7;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-slogan::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 34px; height: 3px; border-radius: 3px; background: var(--brand-grad); opacity: .8;
}

/* ---------- 身份卡片网格 ---------- */
.id-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 13px;
}
.id-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 18px 8px 13px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform .12s var(--ease-bounce);
}
.id-card:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(47,107,255,.16); transform: translateY(-3px); }
.id-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, #EEF4FF, #DCE8FF); color: var(--brand-dark, #1E54E8);
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  transition: transform .12s var(--ease-bounce), box-shadow var(--t) var(--ease);
}
.id-avatar:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(15,23,42,.16); }
.id-avatar.av-owner {
  background: var(--brand-grad);
  color: #fff; font-size: 21px;
  box-shadow: 0 6px 16px rgba(47,107,255,.38);
}
.id-name { font-size: 14px; font-weight: 650; color: var(--text-1, #16223D);
  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);
  background: linear-gradient(180deg, #F3F8FF 0%, #FFFFFF 100%);
  box-shadow: 0 8px 22px rgba(47,107,255,.14);
}
.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-status { font-size: 13px; color: var(--brand); font-weight: 600; min-height: 18px; margin-bottom: 8px; }
.sv-meter { width: 100%; height: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin: 0 auto 6px; }
.sv-meter-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #34d399, #2563eb); border-radius: 999px; transition: width .06s linear; }
.sv-timer { font-size: 12px; color: var(--text-3); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.sv-mic.loud { background: #ef4444; color: #fff; border-color: #ef4444; }
.sv-livehint { font-size: 12px; color: #f59e0b; margin-bottom: 10px; display: none; }
.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); }
}
