/* ============================================================
   启盛数智运维台 · 设计系统
   墨蓝暖白 · 精致商务
   ============================================================ */
:root {
  /* 墨蓝 */
  --ink: #0b1a22;
  --ink-2: #102632;
  --ink-3: #173441;
  /* 暖白 */
  --paper: #f4f1ea;
  --paper-2: #ece7dc;
  --panel: #fffdf9;
  --panel-2: #faf6ee;
  --line: #e5ded2;
  --line-2: #efe9de;
  /* 文字 */
  --text: #13232b;
  --text-2: #46565e;
  --muted: #8a979c;
  /* 品牌 */
  --brand: #0e7c68;
  --brand-dark: #0a6252;
  --brand-50: #e9f4f0;
  --brand-100: #c8e6dc;
  /* 状态 */
  --green: #0f7a53;
  --green-bg: #e4f3eb;
  --blue: #1d4ed8;
  --blue-bg: #e8efff;
  --orange: #b45309;
  --orange-bg: #fbefdc;
  --red: #b42318;
  --red-bg: #fbe9e7;
  --gray: #5f6b71;
  --gray-bg: #f0ece3;
  --purple: #6d28d9;
  --purple-bg: #f1ecfd;
  /* 尺寸 */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(19, 35, 43, .05), 0 1px 1px rgba(19, 35, 43, .02);
  --shadow-md: 0 12px 32px rgba(19, 35, 43, .09), 0 2px 8px rgba(19, 35, 43, .04);
  --shadow-lg: 0 32px 80px rgba(11, 26, 34, .30);
  --sidebar-w: 244px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--brand-100); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfc7b9; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b7ae9f; background-clip: content-box; border: 2px solid transparent; }
svg { width: 16px; height: 16px; flex: 0 0 auto; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.boot { display: flex; align-items: center; justify-content: center; height: 100vh; color: var(--muted); letter-spacing: 2px; }

/* ---------------------------- 布局 ---------------------------- */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(175deg, var(--ink) 0%, var(--ink-2) 62%, #0c202b 100%);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 14px;
  position: relative;
  isolation: isolate;
}
.sidebar::before {
  content: '';
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
}
.sidebar::after {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02));
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(140deg, #19a98d 0%, #0e7c68 55%, #0a5c4d 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; letter-spacing: -.5px;
  box-shadow: 0 6px 18px rgba(14, 124, 104, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.brand-text b { display: block; font-size: 14px; font-weight: 700; letter-spacing: .4px; color: #f7f3ea; }
.brand-text span { display: block; font-size: 10px; color: rgba(247, 243, 234, .42); margin-top: 3px; letter-spacing: 1.8px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; padding-bottom: 8px; }
.nav-label {
  font-size: 10px; color: rgba(247, 243, 234, .34);
  padding: 18px 12px 7px; letter-spacing: 2px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px; color: rgba(247, 243, 234, .68);
  cursor: pointer; font-size: 13.5px; user-select: none;
  border: 0; background: none; width: 100%; text-align: left;
  position: relative; transition: background .16s ease, color .16s ease;
}
.nav-item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: 0 0 17px; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #fbf8f0; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(25, 169, 141, .26), rgba(25, 169, 141, .07));
  color: #eafff8; font-weight: 650;
  box-shadow: inset 3px 0 0 #27b397;
}
.nav-item.active svg { color: #4fd0b3; opacity: 1; }
.nav-item .badge-dot {
  margin-left: auto; background: #d94b3d; color: #fff; font-size: 10.5px; line-height: 1;
  padding: 3px 6px; border-radius: 20px; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(11, 26, 34, .6);
}

.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; margin-top: 8px; }
/* 侧边栏底部的版本号（2026-11-03）：点了进「发版公告」 */
.ver-line {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px; margin-bottom: 4px; border-radius: 9px;
  color: rgba(255, 255, 255, .62); font-size: 12px; text-decoration: none;
  transition: background .16s, color .16s;
}
.ver-line:hover { background: rgba(255, 255, 255, .06); color: #eafff8; }
.ver-line svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ver-num { font-family: var(--mono, monospace); letter-spacing: .2px; }
.ver-dot {
  margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
  color: #fff; background: var(--brand); border-radius: 5px; padding: 1px 5px;
}
.ver-line.is-new { color: #eafff8; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 10px; cursor: pointer; transition: background .16s; }
.user-card:hover { background: rgba(255, 255, 255, .06); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, .09); color: #eafff8;
  display: flex; align-items: center; justify-content: center;
  font-weight: 650; font-size: 13px; flex: 0 0 32px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
}
.user-meta { min-width: 0; }
.user-meta b { display: block; font-size: 13px; font-weight: 600; color: #f7f3ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { display: block; font-size: 11px; color: rgba(247, 243, 234, .42); margin-top: 2px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 64px; flex: 0 0 64px;
  background: rgba(244, 241, 234, .84); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px; padding: 0 28px;
  position: relative; z-index: 5;
}
.page-title {
  font-size: 17px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap;
  display: flex; align-items: center; gap: 9px;
}
.page-title::before {
  content: ''; width: 5px; height: 17px; border-radius: 3px;
  background: linear-gradient(to bottom, #19a98d, #0e7c68);
  flex: 0 0 5px;
}
.topbar-search { margin-left: auto; position: relative; width: min(400px, 42vw); }

/* 顶栏「返回上一级」 */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  height: 32px; padding: 0 12px; border-radius: 9px; white-space: nowrap;
  border: 1px solid var(--line); background: rgba(255, 253, 249, .72);
  color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .16s, color .16s, background .16s;
}
.back-btn:hover { color: var(--brand); border-color: var(--brand-100); background: var(--panel); }
.back-btn svg { width: 16px; height: 16px; flex: 0 0 16px; }
.back-btn[hidden] { display: none; }
.topbar-search input {
  width: 100%; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255, 253, 249, .72); padding: 0 52px 0 36px; outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.topbar-search input::placeholder { color: #9aa4a6; }
.topbar-search input:focus {
  background: var(--panel); border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 124, 104, .12);
}
.topbar-search svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 1.8; pointer-events: none; }
.topbar-search kbd {
  position: absolute; right: 8px; top: 8px; border: 1px solid var(--line); border-radius: 5px;
  font-size: 10px; color: var(--muted); padding: 2px 6px; background: rgba(255, 253, 249, .9);
  font-family: var(--font); letter-spacing: .4px;
}

/* 顶栏「功能导航搜索」的结果面板（2026-11-25）
   搜功能 / 页面名，列出来点一下就跳过去 */
.fs-panel {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  width: min(420px, 88vw); max-height: 62vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 34px rgba(11, 26, 34, .16); padding: 5px;
}
.fs-panel[hidden] { display: none; }
.fs-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--text);
}
.fs-item:hover, .fs-item.is-active { background: rgba(14, 124, 104, .09); color: var(--brand); }
/* ⚠️ 上面 .topbar-search svg 那条规则会把图标压成 absolute，这里要盖回来 */
.fs-panel svg { position: static; width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: 0 0 16px; }
.fs-ic { display: inline-flex; align-items: center; color: var(--muted); }
.fs-item.is-active .fs-ic, .fs-item:hover .fs-ic { color: var(--brand); }
.fs-label { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-item mark { background: rgba(180, 83, 9, .18); color: var(--brand); border-radius: 3px; padding: 0 1px; }
.fs-group { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 1px 7px; flex: 0 0 auto; }
.fs-empty { padding: 14px 12px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.content {
  flex: 1; overflow-y: auto; padding: 28px;
  background:
    radial-gradient(1100px 460px at 100% -8%, rgba(14, 124, 104, .070), transparent 62%),
    radial-gradient(760px 360px at 0% 0%, rgba(180, 83, 9, .035), transparent 60%),
    var(--paper);
}
.content-inner { max-width: 1480px; margin: 0 auto; }

/* ---------------------------- 通用组件 ---------------------------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
/* ⚠️ card-hd 里挤了多个控件时（到期客户提醒页有 2 个下拉 + 1 个搜索框），
   标题会被 flex 压扁 —— 中文可以逐字换行，于是「到期客户提醒」竖成一行。
   修法：标题不缩不换行（nowrap），控件不够放就整体换行。 */
.card-hd { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-hd h3 { margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -.1px; display: flex; align-items: center; gap: 9px; flex: 0 0 auto; white-space: nowrap; }
/* .input/.select 全局是 width:100%（.toolbar 里有覆盖，card-hd 里漏了）——
   不改的话 card-hd 里的下拉框会撑满整行、把标题挤到上一行去。 */
.card-hd .select { width: auto; min-width: 120px; flex: 0 0 auto; }
.card-hd h3::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--brand); flex: 0 0 3px;
}
.card-hd .spacer { flex: 1; }
.card-bd { padding: 20px; }
.card-bd.tight { padding: 10px 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  cursor: pointer; font-weight: 600; white-space: nowrap;
  transition: background .16s, border-color .16s, box-shadow .16s, transform .1s;
  font-size: 13.5px;
}
.btn:hover { background: var(--panel-2); border-color: #d8cfc0; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(14, 124, 104, .20); }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.btn-primary {
  background: linear-gradient(180deg, #128a73 0%, var(--brand) 100%);
  border-color: var(--brand-dark); color: #fff;
  box-shadow: 0 2px 6px rgba(14, 124, 104, .24), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-danger { color: var(--red); border-color: #efcbc6; background: var(--panel); }
.btn-danger:hover { background: var(--red-bg); border-color: #e6b3ac; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(19, 35, 43, .055); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 25px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 8px; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); padding: 8px 11px; outline: none;
  transition: border-color .16s, box-shadow .16s; min-height: 36px;
}
.input::placeholder, .textarea::placeholder { color: #a3abac; }
.input:hover, .select:hover, .textarea:hover { border-color: #d6ccbd; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 124, 104, .12);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.65; }
.select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a979c' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px;
}
label.field { display: block; }
label.field > .lbl { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; font-weight: 600; letter-spacing: .1px; }
label.field > .lbl .req { color: var(--red); margin-left: 2px; }
.field-help { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.55; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--text-2); }
.check input { width: 15px; height: 15px; accent-color: var(--brand); }

/* 多选（复选框组）字段：团购平台、会员卡类型、营销方案…… */
.check-field > .lbl { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; font-weight: 600; letter-spacing: .1px; }
.check-field > .lbl .req { color: var(--red); margin-left: 2px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.check-grid .check { min-height: 26px; }
.check-other { flex: 1 1 240px; min-width: 200px; gap: 8px; }
.check-other > span { color: var(--muted); font-size: 12.5px; flex: 0 0 auto; }
.check-other input.input { flex: 1 1 auto; height: 30px; }

/* 多选下拉（multiselect）：选项多的时候用（模块字典有二三十个）
   一个框 + 展开的复选框面板，就地展开不做浮层（弹窗正文会裁掉浮层）。 */
.ms-field > .lbl { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; font-weight: 600; letter-spacing: .1px; }
.ms-field > .lbl .req { color: var(--red); margin-left: 2px; }
.ms-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; height: 34px; padding: 0 11px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13.5px; color: var(--text); text-align: left;
}
.ms-btn:hover { border-color: var(--brand); }
.ms.open .ms-btn { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.ms-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-arrow { color: var(--muted); font-size: 11px; flex: 0 0 auto; }
.ms-pop {
  margin-top: 6px; padding: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.ms-top { display: flex; gap: 8px; }
.ms-top .ms-search { height: 30px; }
.ms-list { max-height: 260px; overflow-y: auto; margin: 6px 0; }
.ms-group + .ms-group { margin-top: 6px; border-top: 1px solid var(--line-2); padding-top: 6px; }
.ms-group-t { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .6px; padding: 4px 2px; }
.ms-item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 6px; cursor: pointer; }
.ms-item:hover { background: var(--gray-bg); }
.ms-item input { width: 15px; height: 15px; accent-color: var(--brand); flex: 0 0 auto; }
.ms-item span { font-size: 13.5px; color: var(--text-2); }
.ms-foot { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 8px; }
/* 「＋ 新增…」勾上以后就地出现的输入框（直接在这里打新模块名） */
.ms-group-new { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.ms-newrow { display: flex; gap: 8px; margin-top: 6px; padding-left: 23px; }
.ms-newrow[hidden] { display: none; }
.ms-newrow .ms-new { flex: 1 1 auto; height: 30px; }
.ms-newrow .ms-newopt { flex: 0 0 116px; height: 30px; padding-right: 26px; }

/* 活动方案明细：可增删的行（类型 / 方案名 / 具体内容 / 删除） */
.marketing-card { margin-bottom: 16px; }
/* 嵌在门店卡片里（拓扑图正上方）时不需要底部间距 */
.marketing-card-inner { margin: 15px 0 0; }
.plan-field > .lbl { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; font-weight: 600; letter-spacing: .1px; }
.plan-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 8px; }
.plan-list:empty { display: none; }
.plan-row { display: flex; gap: 7px; align-items: center; }
.plan-row .plan-type { flex: 0 0 104px; width: 104px; min-height: 34px; }
.plan-row .plan-name { flex: 1 1 0; min-width: 90px; }
.plan-row .plan-detail { flex: 1.6 1 0; min-width: 120px; }
.plan-row .btn { flex: 0 0 auto; }

/* 卡片里的方案明细：方案名 + 具体内容 */
.plan-lines { margin-top: 7px; display: flex; flex-direction: column; gap: 3px; }
.plan-line { font-size: 12.5px; line-height: 1.6; display: flex; gap: 6px; flex-wrap: wrap; }
.plan-line-name { color: var(--text); font-weight: 650; }
.plan-line-detail { color: var(--text-2); }
.plan-line-detail::before { content: '· '; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------- 标签 ---------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 650;
  line-height: 19px; white-space: nowrap; letter-spacing: .1px;
}
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-blue { background: var(--blue-bg); color: var(--blue); }
.tag-orange { background: var(--orange-bg); color: var(--orange); }
.tag-red { background: var(--red-bg); color: var(--red); }
.tag-gray { background: var(--gray-bg); color: var(--gray); }
.tag-purple { background: var(--purple-bg); color: var(--purple); }
.tag-outline { background: transparent; border: 1px solid var(--line); color: var(--text-2); }
.tag-soft { background: var(--brand-50); color: var(--brand); }
/* 「使用的软件」标签（2026-11-05）：可点 = 能筛
   点一下就只显示用这个软件的客户，所以要像按钮一样有 hover / 选中反馈，
   否则用户以为它只是个装饰标签。 */
.tag-filter { cursor: pointer; user-select: none; transition: filter .12s, box-shadow .12s; }
.tag-filter:hover { filter: brightness(.94); box-shadow: 0 0 0 2px var(--brand-100); }
.tag-filter.on { background: var(--brand); color: #fff; box-shadow: none; }
/* 客户状态标签（2026-11-19）：可点 = 能改
   客户状态（已上线 / 年费续费中 / 未续年费）点一下就弹选择器，
   所以要像按钮一样有 hover 反馈，否则用户以为它只是个装饰标签。 */
.tag-click { cursor: pointer; user-select: none; transition: filter .12s, box-shadow .12s; }
.tag-click:hover { filter: brightness(.94); box-shadow: 0 0 0 2px var(--brand-100); }
.ct-status-empty { cursor: pointer; user-select: none; }
.ct-status-empty:hover { color: var(--brand); text-decoration: underline; }
/* 状态选择器：按钮横排，窄屏自动换行 */
.status-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.status-picker .btn { min-width: 88px; justify-content: center; }
/* .tag 是 inline-flex，会盖掉浏览器 hidden 属性的 display:none —— 要用 hidden 隐藏标签就得写这条 */
.tag[hidden] { display: none; }

/* ---------------------------- 表格 ---------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.table th {
  text-align: left; font-weight: 650; color: #7d898d; font-size: 11.5px; letter-spacing: .7px;
  padding: 11px 14px; background: #f7f3eb; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
table.table td.wrap { white-space: normal; }
table.table tbody tr { transition: background .13s; }
@media (hover: hover) and (pointer: fine) {
  table.table tbody tr:hover td { background: #fbf7ef; }
}
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tr.clickable { cursor: pointer; }
.cell-main { font-weight: 650; color: var(--text); }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.actions { display: flex; gap: 4px; justify-content: flex-end; }
.actions .btn { color: var(--text-2); }
/* 库存总览：操作列有入库/出库/编辑/删除四个按钮。
   给这一列一个最小宽度，让四个按钮一行排开（别被压成竖排）。
   不用 sticky —— 吸在右侧会盖住左边一列的字（货架号被切一半），
   表宽不够时跟别的表格一样横向滚动就行。 */
.actions.stock-acts { flex-wrap: nowrap; }
table.table td.stock-acts-cell { min-width: 190px; }

/* ---------------------------- 统计卡 ---------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 18px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand); opacity: .85;
}
.stat .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; font-weight: 550; letter-spacing: .2px; }
.stat .v {
  font-size: 33px; font-weight: 750; letter-spacing: -1px; margin-top: 10px; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.stat .d { font-size: 11.5px; color: var(--muted); margin-top: 9px; line-height: 1.5; }
.stat .ico {
  position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand);
}
.stat .ico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.stat.accent::before { background: var(--orange); }
.stat.accent .ico { background: var(--orange-bg); color: var(--orange); }
.stat.green::before { background: var(--green); }
.stat.green .ico { background: var(--green-bg); color: var(--green); }
.stat.purple::before { background: var(--purple); }
.stat.purple .ico { background: var(--purple-bg); color: var(--purple); }
.stat.clickable { cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s; }
.stat.clickable:hover { border-color: #d3c9b9; box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---------------------------- 详情页 ---------------------------- */
.detail-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-title h1 { margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -.5px; color: var(--ink); }
.detail-sub { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 9px; color: var(--text-2); font-size: 12.5px; }
.detail-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: #bdb3a3; }
.crumb { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 22px 0 0; overflow-x: auto; }
.tab {
  padding: 11px 15px; border: 0; background: none; cursor: pointer; color: var(--text-2);
  font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color .16s, border-color .16s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; }
.tab .cnt { font-size: 11px; background: var(--gray-bg); color: var(--gray); border-radius: 10px; padding: 1px 6px; margin-left: 6px; }
.tab.active .cnt { background: var(--brand-50); color: var(--brand); }

.store-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.chip {
  padding: 7px 13px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; font-size: 12.5px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .16s, border-color .16s, color .16s;
}
.chip:hover { border-color: #cfc4b3; background: var(--panel-2); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 650; box-shadow: 0 2px 8px rgba(14, 124, 104, .24); }
.chip .n { opacity: .72; font-size: 11px; }

.kv { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 11px 16px; font-size: 13px; }
.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }
.kv dd.mono { font-family: var(--mono); font-size: 12.5px; }
.ip-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px;
  padding: 2px 8px; font-family: var(--mono); font-size: 12.5px; margin: 0 4px 4px 0;
}
.copy-btn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 2px; display: inline-flex; }
.copy-btn:hover { color: var(--brand); }
.copy-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.alert { display: flex; gap: 9px; padding: 11px 13px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.65; }
.alert svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.alert-warn { background: var(--orange-bg); color: #87410a; border: 1px solid #f0d5b0; }
.alert-info { background: var(--brand-50); color: #0a5c52; border: 1px solid var(--brand-100); }
.alert-danger { background: var(--red-bg); color: #971b13; border: 1px solid #f0c9c4; }

.store-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.store-card + .store-card { margin-top: 18px; }
.store-card-hd {
  padding: 14px 18px; display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border-bottom: 1px solid var(--line-2);
}
.store-card-hd h4 { margin: 0; font-size: 14px; font-weight: 700; }
.store-card-bd { padding: 18px; }
.store-card-bd > .kv { margin-bottom: 2px; }

.acct-box { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.acct-box .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 12.5px; color: var(--text-2); font-weight: 650; }
.pwd { font-family: var(--mono); font-size: 12.5px; letter-spacing: .5px; }
.pwd-wrap { position: relative; display: flex; align-items: center; }
.pwd-wrap .input { padding-right: 34px; }
.pwd-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; padding: 4px; cursor: pointer; color: var(--muted); line-height: 0; }
.pwd-eye svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.pwd-eye.on { color: var(--brand); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; stroke: #c9c0b1; fill: none; stroke-width: 1.3; margin-bottom: 10px; }
.empty p { margin: 0 0 12px; font-size: 13px; }
.empty.mini { padding: 24px; }
.empty.mini svg { width: 28px; height: 28px; margin-bottom: 6px; }

/* ---------------------------- 工具条 / 筛选 ---------------------------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
/* 搜索框 + 「查询」按钮永远挨在一起，不会被工具条挤到下一行 */
.search-group { display: flex; align-items: center; gap: 8px; }
.toolbar .search-group .search-box { flex: 0 1 300px; }
.card-hd .search-group .search-box { flex: 0 1 240px; }
/* 搜索框（工具条、卡片头、详情页都能用）：放大镜绝对定位在输入框里 */
.search-box { position: relative; flex: 0 1 300px; }
.search-box input { padding-left: 33px; }
.search-box svg { position: absolute; left: 10px; top: 10px; width: 15px; height: 15px; stroke: var(--muted); fill: none; stroke-width: 1.8; }
.toolbar select { width: auto; min-width: 124px; }
.toolbar select.pending { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 124, 104, .12); }
.toolbar #filter-hint { white-space: nowrap; }
.select-search { margin-bottom: 6px; height: 32px; font-size: 12.5px; }
/* 下拉搜索的匹配提示：告诉用户「搜到了几个 / 没搜到」 */
.select-search-tip { min-height: 15px; margin: -2px 0 6px; font-size: 12px; line-height: 1.3; }
.select-search-tip:empty { margin: 0; }
.toolbar .count { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* 客户档案顶部的三个总数：客户 / 品牌 / 门店（2026-11-01 用户要求）
   数字大一点、标签灰一点 —— 一眼能看清规模，不用去数表格 */
.toolbar .stat-bar { display: inline-flex; align-items: baseline; gap: 14px; white-space: nowrap; }
.toolbar .stat-bar .stat {
  display: inline-flex; align-items: baseline; gap: 4px;
  color: var(--muted); font-size: 12.5px;
}
.toolbar .stat-bar .stat b {
  color: var(--text); font-size: 15px; font-weight: 650;
  font-variant-numeric: tabular-nums; letter-spacing: .2px;
}

/* 表头第二行：三个总数落在对应列的正下方（客户列 / 品牌列 / 门店列）。
   列名已经在第一行写清楚了，这里只放数字，跟列严格对齐。 */
table.table thead tr.stat-row th {
  padding: 7px 14px 9px; font-size: 11.5px; color: var(--muted);
  background: #f7f3eb; border-bottom: 1px solid var(--line);
}
table.table thead tr.stat-row th b {
  font-size: 16px; font-weight: 680; color: var(--text); letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
/* 统计行里没数字的列别撑出多余空白 */
table.table thead tr.stat-row th:empty { padding-left: 0; padding-right: 0; }

/* ---------------------------- 模态框 ---------------------------- */
/* 对话框本身可聚焦（用于没有可操作元素的弹窗），不画描边 */
.modal:focus { outline: none; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(11, 26, 34, .52);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 24px; overflow-y: auto;
  animation: fadeIn .16s ease;
}
.modal {
  width: 100%; max-width: 640px; background: var(--panel); border-radius: 16px;
  box-shadow: var(--shadow-lg); animation: popIn .18s ease; margin-bottom: 24px;
  max-height: 88vh; display: flex; flex-direction: column;
  border: 1px solid rgba(255, 255, 255, .5);
}
.modal.wide { max-width: 880px; }
.modal.narrow { max-width: 470px; }
.modal-hd { padding: 18px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.modal-hd h3 { margin: 0; font-size: 15.5px; font-weight: 700; letter-spacing: -.1px; }
.modal-bd { padding: 20px 22px; overflow-y: auto; flex: 1 1 auto; }
.modal-ft {
  padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px;
  background: var(--panel-2); border-radius: 0 0 16px 16px;
}
.modal-close {
  margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--muted);
  width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--gray-bg); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section {
  grid-column: 1 / -1; font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: 1.2px; padding-top: 6px; border-top: 1px solid var(--line-2); margin-top: 6px;
}
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.992) } to { opacity: 1; transform: none } }

/* ---------------------------- Toast ---------------------------- */
#toast-root {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 300;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: var(--ink); color: #f7f3ea; padding: 10px 17px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow-md); animation: dropIn .2s ease; max-width: 80vw;
  border: 1px solid rgba(255, 255, 255, .08);
}
.toast.ok { background: #0d6b4d; }
.toast.err { background: #a4231a; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: none } }

/* ---------------------------- 搜索页 ---------------------------- */
.search-hero { text-align: center; padding: 34px 16px 22px; }
.search-hero h1 { margin: 0 0 7px; font-size: 25px; font-weight: 750; letter-spacing: -.6px; color: var(--ink); }
.search-hero p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.search-big { position: relative; max-width: 660px; margin: 0 auto; }
.search-big input {
  height: 50px; border-radius: 12px; padding: 0 118px 0 44px; font-size: 15px;
  box-shadow: var(--shadow-sm); background: var(--panel);
}
.search-big svg { position: absolute; left: 15px; top: 15px; width: 19px; height: 19px; stroke: var(--muted); fill: none; stroke-width: 1.8; }
.search-big .btn { position: absolute; right: 7px; top: 7px; height: 36px; }
.search-hints { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 13px; }
.search-hints .chip { font-size: 12px; }
.result-section { margin-top: 22px; }
.result-section h3 { margin: 0 0 9px; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; font-weight: 650; letter-spacing: .2px; }
.result-item { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .14s; }
.result-item:last-child { border-bottom: 0; }
.result-item:hover { background: #fbf7ef; }
.result-item .ico {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand-50); color: var(--brand);
  display: flex; align-items: center; justify-content: center; flex: 0 0 32px;
}
.result-item .ico svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.result-item .body { flex: 1; min-width: 0; }
.result-item .t { font-weight: 650; font-size: 13.5px; }
.result-item .s { color: var(--muted); font-size: 12px; margin-top: 3px; }
.hl { background: #fde9b8; color: #6b3d00; border-radius: 3px; padding: 0 2px; }

/* ---------------------------- 文件 ---------------------------- */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.file-card {
  border: 1px solid var(--line); border-radius: 11px; padding: 13px;
  display: flex; gap: 10px; align-items: flex-start; background: var(--panel);
  transition: border-color .16s, box-shadow .16s;
}
.file-card:hover { border-color: #d5cab9; box-shadow: var(--shadow-sm); }
.file-card .fico {
  width: 36px; height: 36px; border-radius: 9px; background: var(--brand-50); color: var(--brand);
  display: flex; align-items: center; justify-content: center; flex: 0 0 36px;
}
.file-card .fico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.file-card .fn { font-size: 12.5px; font-weight: 600; word-break: break-all; line-height: 1.45; }
.file-card .fm { font-size: 11px; color: var(--muted); margin-top: 4px; }
.file-card .fa { margin-left: auto; display: flex; flex-direction: column; gap: 2px; }
.uploader {
  border: 1.5px dashed #d3c9b9; border-radius: 12px; padding: 28px; text-align: center;
  color: var(--muted); cursor: pointer; transition: .16s; background: var(--panel-2);
}
.uploader:hover, .uploader.drag { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.uploader svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; margin-bottom: 6px; }

/* ---------------------------- 时间线 ---------------------------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 5px; bottom: 5px; width: 1.5px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 17px 4px; }
.tl-item::before {
  content: ''; position: absolute; left: -18px; top: 5px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--panel); border: 2px solid var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 124, 104, .10);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; }
.tl-text { font-size: 13px; line-height: 1.65; white-space: pre-wrap; }

/* ---------------------------- 登录页 ---------------------------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; }
.login-left {
  flex: 1;
  background:
    radial-gradient(900px 620px at 82% 18%, rgba(25, 169, 141, .30), transparent 62%),
    radial-gradient(620px 460px at 8% 92%, rgba(180, 83, 9, .18), transparent 60%),
    linear-gradient(155deg, #081521 0%, #0b1f2a 52%, #0e2b34 100%);
  color: #f7f3ea; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-left::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(760px 560px at 60% 42%, #000, transparent 80%);
  mask-image: radial-gradient(760px 560px at 60% 42%, #000, transparent 80%);
}
.login-left::after {
  content: ''; position: absolute; width: 640px; height: 640px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .10); right: -240px; bottom: -300px;
  box-shadow: 0 0 0 1px rgba(25, 169, 141, .12), inset 0 0 120px rgba(25, 169, 141, .10);
}
.login-brand { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.login-brand .mk {
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(140deg, #19a98d, #0e7c68);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px;
  box-shadow: 0 10px 28px rgba(14, 124, 104, .42), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.login-brand b { font-size: 17px; letter-spacing: .6px; }
.login-brand span { display: block; font-size: 10.5px; opacity: .58; margin-top: 3px; letter-spacing: 2.4px; }
.login-hero { position: relative; z-index: 1; }
.login-hero h1 {
  font-size: 40px; line-height: 1.24; margin: 0 0 16px; letter-spacing: -1.2px;
  font-weight: 750; color: #fbf8f0;
}
.login-hero h1 em { font-style: normal; color: #3fd0b2; }
.login-hero p { margin: 0; opacity: .68; font-size: 14px; line-height: 1.85; max-width: 440px; }
.login-feats { display: flex; gap: 24px; margin-top: 34px; position: relative; flex-wrap: wrap; }
.login-feat {
  font-size: 12.5px; opacity: .9; display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .10); border-radius: 20px;
  background: rgba(255, 255, 255, .04); backdrop-filter: blur(4px);
}
.login-feat svg { width: 14px; height: 14px; stroke: #3fd0b2; fill: none; stroke-width: 2.4; }
.login-foot { font-size: 11.5px; opacity: .42; position: relative; z-index: 1; letter-spacing: .4px; }
.login-right {
  width: 500px; flex: 0 0 500px;
  background:
    radial-gradient(620px 420px at 100% 0%, rgba(14, 124, 104, .07), transparent 62%),
    var(--paper);
  display: flex; align-items: center; justify-content: center; padding: 48px;
}
.login-form { width: 100%; max-width: 340px; }
.login-mobile-brand { display: none; }
.login-form h2 { margin: 0 0 7px; font-size: 26px; font-weight: 750; letter-spacing: -.7px; color: var(--ink); }
.login-form .sub { color: var(--muted); font-size: 13px; margin-bottom: 28px; }
.login-form .input { height: 44px; margin-bottom: 14px; }
.login-form .btn-primary { width: 100%; height: 44px; margin-top: 8px; font-size: 14px; letter-spacing: 2px; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.login-err { background: var(--red-bg); color: var(--red); font-size: 12.5px; padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; border: 1px solid #f0c9c4; }

/* ---------------------------- 设置 / 导入 ---------------------------- */
.setting-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.tile {
  border: 1px solid var(--line); border-radius: 12px; padding: 17px; background: var(--panel);
  transition: border-color .16s, box-shadow .16s;
}
.tile:hover { border-color: #d5cab9; box-shadow: var(--shadow-sm); }
.tile h4 { margin: 0 0 5px; font-size: 13.5px; font-weight: 700; }
.tile p { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.import-result { border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; background: var(--panel-2); }
.import-result .nums { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
.import-result .nums b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.import-result .nums span { font-size: 11.5px; color: var(--muted); }
.err-list { margin: 8px 0 0; padding-left: 18px; color: var(--red); font-size: 12px; line-height: 1.7; max-height: 180px; overflow: auto; }

/* ---------------------------- 条形图 ---------------------------- */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 108px minmax(0, 1fr) 46px; align-items: center; gap: 11px; font-size: 12.5px; }
.bar-track { height: 8px; background: #efeade; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 6px; transition: width .45s ease; }
.bar-val { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 600; }

/* 地址定位条 */
.geo-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: -6px; margin-bottom: 4px; }
.geo-bar .field-help { margin: 0; flex: 1 1 220px; }
.geo-bar .btn { flex: 0 0 auto; }

/* 建档时的设备编辑器 */
.dev-editor { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--panel-2); }
.dev-editor-tip { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 11px; line-height: 1.65; }
.dev-editor-tip svg { width: 14px; height: 14px; stroke: currentColor; flex: 0 0 auto; margin-top: 2px; }
.dev-sec { margin-bottom: 15px; }
.dev-sec:last-child { margin-bottom: 0; }
.dev-sec-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; font-size: 13px; }
.dev-rows { display: flex; flex-direction: column; gap: 7px; }
.dev-row { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr auto; gap: 6px; align-items: center; }
.dev-row-printer { grid-template-columns: 1fr 1.1fr auto .9fr 1fr auto; }
.dev-row .input, .dev-row .select { height: 33px; font-size: 13px; }
.dev-proxy-wrap { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.dev-cats { grid-column: 1 / -1; height: 31px; font-size: 12.5px; }
/* 建档时打印机的「纸宽」和「负责菜品」各占一行 */
.dev-row-printer .dev-paper { grid-column: 1 / 3; }
.dev-row-printer .dev-cats { grid-column: 3 / -1; }
.dev-item .dev-cats { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dev-item .dev-cats .tag { font-size: 11px; }

/* 门店设备清单 */
.dev-block { margin-top: 15px; border-top: 1px dashed var(--line); padding-top: 13px; }
.dev-block-hd { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; margin-bottom: 9px; flex-wrap: wrap; }
.dev-block-hd svg { width: 15px; height: 15px; stroke: currentColor; }
.dev-group { margin-bottom: 9px; }
.dev-kind { display: flex; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.dev-items { display: flex; flex-direction: column; gap: 5px; }
.dev-item {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 11px; background: var(--panel-2); border-radius: 8px; font-size: 13px;
  border: 1px solid var(--line-2);
}
.dev-item .dev-name { font-weight: 650; }
.dev-item .dev-ip { color: var(--text-2); font-size: 12.5px; }
.dev-item .dev-note { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 设备名称做成可点的：点开看这台设备的修改记录 */
.dev-item .dev-name-btn {
  border: 0; background: none; padding: 0; margin: 0;
  font-family: inherit; font-size: inherit; line-height: inherit;
  color: inherit; cursor: pointer; text-align: left;
}
.dev-item .dev-name-btn:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.dev-item .dev-name-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* 设备照片（2026-11-01）：同事到现场照着照片就能找到这台设备 */
.dev-photo {
  flex: 0 0 auto; width: 44px; height: 44px; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer;
}
.dev-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dev-photo:hover { border-color: var(--brand); }
/* 「拍照」是个 label，里面藏着 file input —— 手机上 capture 会直接调相机。
   input 用透明覆盖层铺在 label 上（不用 hidden）：hidden 的 input 点不到，
   覆盖层既能让 label 整个可点，也能被自动化测试直接命中。 */
.dev-photo-label { cursor: pointer; position: relative; }
.dev-photo-label svg { width: 13px; height: 13px; }
.dev-photo-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.02; cursor: pointer; border: 0; padding: 0;
}

/* 新增 / 编辑设备弹窗里的「设备照片」那一条 */
.dev-photo-field { display: flex; flex-direction: column; gap: 7px; }
.dev-photo-field .lbl { font-size: 12.5px; color: var(--muted); }
.dev-photo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dev-photo-prev {
  width: 84px; height: 84px; object-fit: cover;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.dev-photo-empty {
  width: 84px; height: 84px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12px;
}
.dev-photo-tip { flex: 1 1 200px; }

/* 设备弹窗里的「+ 补一条硬件」快捷入口（2026-11-02） */
.dev-hw-add { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dev-hw-add .small { flex: 1 1 220px; }

/* ---------------------------- 工单现场照片（2026-11-03） ----------------------------
   售后工单和巡检工单共用。file input 用透明覆盖层铺在 label 上（不能用 hidden：
   hidden 的 input 点不到，label 也不一定能触发它）。 */
.ph-block { margin-top: 14px; }
.ph-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.ph-title { font-weight: 650; font-size: 13.5px; display: inline-flex; align-items: center; gap: 5px; }
.ph-title svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ph-up-label { cursor: pointer; position: relative; overflow: hidden; }
.ph-up-label svg { width: 13px; height: 13px; }
.ph-file-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.02; cursor: pointer; border: 0; padding: 0;
}
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.ph-item { position: relative; }
.ph-thumb {
  display: block; width: 100%; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.ph-thumb img { display: block; width: 100%; height: 104px; object-fit: cover; }
.ph-thumb:hover { border-color: var(--brand); }
.ph-del {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 7px; background: rgba(0, 0, 0, .55); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.ph-del svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.ph-del:hover { background: rgba(190, 40, 40, .92); }
.ph-empty {
  border: 1px dashed var(--line); border-radius: 10px; padding: 13px 14px;
  color: var(--muted); font-size: 12.5px; line-height: 1.7;
}

/* 网络拓扑图 */
.topo-block { margin-top: 15px; border-top: 1px dashed var(--line); padding-top: 13px; }
.topo-hd { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; margin-bottom: 9px; flex-wrap: wrap; }
.topo-hd svg { width: 15px; height: 15px; stroke: currentColor; }
.topo-scroll { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); padding: 6px; }
.topo-scroll svg { max-width: 100%; }
.topo-files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.topo-file {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2);
  background: var(--gray-bg); border-radius: 6px; padding: 3px 7px;
}

/* 拓扑编辑器 */
.topo-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.topo-tools .btn.active { background: var(--brand-50); color: var(--brand-dark); border-color: var(--brand-100); }
.topo-editor svg { user-select: none; touch-action: none; }
.topo-editor .topo-node { cursor: grab; }
.topo-editor .topo-node:active { cursor: grabbing; }
.topo-node.pending .box { stroke: var(--brand); stroke-width: 2.4; }
.topo-node:hover .box { filter: drop-shadow(0 3px 8px rgba(19, 35, 43, .16)); }
.topo-link-hit { pointer-events: none; }
.topo-editor svg.del-mode .topo-link-hit { pointer-events: stroke; cursor: pointer; }
.topo-editor svg.del-mode .topo-node { cursor: crosshair; }

/* 拓扑链路动效：光点不挡点击，系统减弱动效时静止 */
.topo-dot { pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .topo-scroll .topo-flow { animation: none; }
  .topo-dot { display: none; }
}

/* 协助人标签输入 */
.tag-input {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 36px;
  padding: 3px 7px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel);
}
.tag-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 124, 104, .12); }
.tag-chip {
  display: inline-flex; align-items: center; gap: 2px; background: var(--brand-50);
  color: var(--brand-dark); border: 1px solid var(--brand-100); border-radius: 6px;
  padding: 2px 4px 2px 8px; font-size: 12.5px; line-height: 1.6;
}
.chip-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.chip-x:hover { color: var(--red); }
.tag-add {
  border: 1px dashed var(--line); background: none; color: var(--muted); border-radius: 6px;
  padding: 3px 8px; font-size: 12px; cursor: pointer; height: 26px;
}
.tag-add:hover { color: var(--brand); border-color: var(--brand); }
.tag-entry { border: 0; outline: none; flex: 1 1 120px; min-width: 96px; height: 26px; font-size: 13px; background: transparent; }

/* 移动端菜单按钮 / 抽屉 */
.icon-btn {
  width: 36px; height: 36px; border: 0; background: none; border-radius: 9px;
  display: none; align-items: center; justify-content: center; color: var(--text-2);
  cursor: pointer; flex: 0 0 36px;
}
.icon-btn:hover { background: rgba(19, 35, 43, .06); }
.sidebar-close {
  display: none; width: 32px; height: 32px; border: 0; background: none; color: rgba(247, 243, 234, .6);
  border-radius: 8px; align-items: center; justify-content: center; cursor: pointer; margin-left: auto;
}
.sidebar-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar-close svg { width: 16px; height: 16px; stroke: currentColor; }
.sidebar-mask { display: none; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    width: 268px; flex: 0 0 268px; padding: 20px 14px 14px;
    transform: translateX(-102%); transition: transform .24s ease;
    box-shadow: none;
  }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar-mask {
    display: block; position: fixed; inset: 0;
    background: rgba(11, 26, 34, .55); backdrop-filter: blur(2px); z-index: 55;
  }
  .icon-btn.menu-btn { display: flex; }
  .sidebar-close { display: flex; }
  .main { width: 100%; }
  .login-left { display: none; }
  .login-right {
    width: 100%; flex: 1;
    background:
      radial-gradient(620px 420px at 100% 0%, rgba(14, 124, 104, .09), transparent 62%),
      var(--paper);
  }
  .login-mobile-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 36px; }
  .login-mobile-brand .mk {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(140deg, #19a98d, #0e7c68);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px;
    box-shadow: 0 8px 20px rgba(14, 124, 104, .30), inset 0 1px 0 rgba(255, 255, 255, .25);
  }
  .login-mobile-brand b { display: block; font-size: 15px; font-weight: 750; color: var(--ink); letter-spacing: .2px; }
  .login-mobile-brand span { display: block; font-size: 9.5px; color: var(--muted); letter-spacing: 2px; margin-top: 3px; }
  .content { padding: 20px; }
}

@media (max-width: 760px) {
  .content { padding: 12px; }
  .topbar { padding: 0 12px; gap: 8px; height: 56px; flex: 0 0 56px; }
  .card-hd { flex-wrap: wrap; row-gap: 8px; padding: 14px 16px; }
  .card-hd h3 { font-size: 14px; }
  .card-hd .muted.small { white-space: nowrap; }
  .card-hd .btn { margin-left: auto; }
  .page-title { font-size: 14.5px; }
  .page-title::before { height: 15px; }
  .back-btn { padding: 0 9px; }
  .back-btn span { display: none; }   /* 手机上只留箭头，省地方 */
  .topbar-search { flex: 0 0 36px; width: 36px; min-width: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .topbar-search input { display: none; }
  .topbar-search svg { position: static; width: 18px; height: 18px; }
  .topbar-search kbd { display: none; }
  /* 手机上点搜索图标 = 展开搜索框（2026-11-25 改成功能导航搜索） */
  .topbar-search.is-open { flex: 0 0 auto; width: min(320px, 62vw); justify-content: flex-start; }
  .topbar-search.is-open input { display: block; }
  .topbar-search.is-open svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; }
  .fs-panel { width: min(320px, 86vw); max-height: 70vh; }
  .grid-2, .grid-3, .grid-4, .stat-grid, .tile-grid { grid-template-columns: 1fr; }
  /* 活动方案明细在手机上竖着排，别把三列挤成一条缝 */
  .plan-row { flex-wrap: wrap; }
  .plan-row .plan-type { flex: 0 0 96px; width: 96px; }
  .plan-row .plan-name, .plan-row .plan-detail { flex: 1 1 140px; }
  .plan-row .btn { flex: 0 0 auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .setting-grid { grid-template-columns: 1fr; }
  .detail-title h1 { font-size: 20px; }
  .kv { grid-template-columns: 96px minmax(0, 1fr); gap: 9px 12px; }
  .toolbar .search-box { flex: 1 1 100%; }
  .toolbar .search-group { flex: 1 1 100%; }
  .toolbar .search-group .search-box { flex: 1 1 auto; }
  .toolbar select { flex: 1 1 auto; min-width: 0; }
  .toolbar #btn-query { flex: 1 1 100%; }
  .toolbar #filter-hint { flex: 1 1 100%; }
  .dev-row, .dev-row-printer { grid-template-columns: 1fr 1fr; }
  .dev-row .dev-note { grid-column: 1 / -1; }
  .dev-row .dev-paper, .dev-row .dev-cats { grid-column: 1 / -1; }
  .dev-row .dev-del { grid-column: 1 / -1; justify-self: end; }

  /* 弹窗全屏 */
  .modal-mask { padding: 0; align-items: stretch; backdrop-filter: none; }
  .modal, .modal.wide, .modal.narrow {
    max-width: 100%; width: 100%; min-height: 100vh; min-height: 100dvh;
    max-height: none; margin: 0; border-radius: 0; box-shadow: none; border: 0;
  }
  .modal-hd { position: sticky; top: 0; background: var(--panel); z-index: 3; }
  .modal-ft { position: sticky; bottom: 0; border-radius: 0; z-index: 3; }
  .modal-bd { padding: 15px; }
  .modal-ft .btn { height: 42px; }

  /* 触控尺寸 */
  .btn { height: 40px; }
  .btn-sm { height: 33px; }
  .btn-xs { height: 29px; }
  .nav-item { padding: 12px; }
  .tabs { margin-top: 16px; }
  .tab { padding: 12px 13px; }
  .chip { padding: 9px 13px; }

  /* 表格转卡片：表头由脚本写入 data-label */
  .table-wrap { overflow: visible; }
  .table-wrap table.table { display: block; width: 100%; font-size: 13px; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: block; }
  .table-wrap tr {
    display: block; background: var(--panel); border: 1px solid var(--line);
    border-radius: 12px; padding: 12px 15px; margin-bottom: 11px; box-shadow: var(--shadow-sm);
  }
  .table-wrap tr:hover td { background: transparent; }
  .table-wrap td {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
    padding: 6px 0; border: 0; white-space: normal; text-align: right;
  }
  .table-wrap td::before {
    content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 500;
    flex: 0 0 88px; text-align: left;
  }
  .table-wrap td:not([data-label])::before, .table-wrap td[data-label=""]::before { display: none; }
  .table-wrap td:first-child {
    display: block; text-align: left; padding: 0 0 9px; margin-bottom: 5px;
    border-bottom: 1px dashed var(--line);
  }
  .table-wrap td:first-child::before { display: none; }
  .table-wrap td[data-label="操作"] { justify-content: flex-end; padding-top: 9px; border-top: 1px dashed var(--line); margin-top: 5px; }
  .table-wrap td[data-label="操作"]::before { display: none; }
  .table-wrap td .actions { width: 100%; justify-content: flex-end; }
  .table-wrap td .cell-sub { white-space: normal; }
  .card > .table-wrap { padding: 0 11px; }
  .file-grid { grid-template-columns: 1fr; }
  .search-hero { padding: 16px 4px 12px; }
  .search-hero h1 { font-size: 21px; }
  .search-big input { padding-right: 88px; }
  .search-big .btn { padding: 0 13px; }
  .login-right { padding: 28px; }
  .stat { padding: 18px 20px 16px; }
  .stat .v { font-size: 30px; }
}

/* ---------------------------- 公司各软件测试账号 ---------------------------- */
/* 一个软件一块，下面挂它自己的多个测试账号 */
.ta-product { border: 1px solid var(--line-2); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.ta-product-hd { display: flex; align-items: center; gap: 8px; padding: 10px 13px; background: var(--panel-2); flex-wrap: wrap; }
.ta-product-hd .name { font-weight: 650; font-size: 13.5px; }
.ta-product-note { padding: 9px 13px 0; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.ta-product .table-wrap { border-top: 1px solid var(--line-2); }
.ta-product table.table { font-size: 12.5px; }
.ta-product table.table th { padding: 8px 13px; }
.ta-product table.table td { padding: 8px 13px; }
@media (max-width: 760px) {
  .ta-product-hd { gap: 6px; }
  .ta-product-hd .spacer { display: none; }
  .ta-product-hd .btn { flex: 0 0 auto; }
}

/* ---------------------------- 销售清单 ---------------------------- */
.sa-money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sa-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
/* 销售服务单的抬头：单号做成纸质单据右上角那种编号牌 */
.sa-code {
  font-size: 13px; color: var(--text-2); letter-spacing: .6px;
  padding: 3px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2);
  white-space: nowrap;
}
/* 单据信息区：项目名 / 说明这类长文本要能换行，别把布局撑破 */
.sa-bill .kv dt { min-width: 92px; }
.sa-bill .kv dd { word-break: break-word; }
.sa-file { align-items: center; }
.sa-file .fn { word-break: break-word; overflow-wrap: anywhere; }
.sa-thumb {
  width: 52px; height: 52px; object-fit: cover; flex: 0 0 52px;
  border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2);
}
/* 签收单卡片比普通附件宽一点，文件名才不会被挤成一列 */
.sa-files { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
@media (max-width: 760px) {
  .sa-thumb { width: 42px; height: 42px; flex: 0 0 42px; }
  .sa-files { grid-template-columns: 1fr; }
}
/* 明细编辑表：表单里可增删行，每行是「物料名称 / 单位 / 数量 / 单价 / 金额」 */
.sa-mat-help { line-height: 1.65; margin-bottom: 10px; }
.sa-mat-help b { color: var(--text-2); }
/* 这一张表挤在弹窗里（.modal.wide 880px，body 内边距 22px，
   弹窗内还有竖向滚动条 → 实际可用宽度约 824px），
   列宽**必须定死**：用 table-layout: fixed，宽度直接由表头 <th> 决定，
   绝不能再靠表格自动布局分配。
   不然表格自动布局会把「单位 / 数量」压到内容宽度以下：
   单位框只剩一个下拉箭头（.select 右边留了 30px 放箭头），
   数量框里的数字被裁掉看不见。
   台账那一列的文字允许换行，但不许被挤成竖排。 */
.sa-item-table { table-layout: fixed; width: 100%; min-width: 818px; }
/* ⚠️ 这几条必须写成 `table.sa-item-table td`（特异性 0,1,3）：
   全局的 `table.table td { padding: 11px 14px }` 是 (0,1,2)，
   写成 `.sa-item-table td`（0,1,1）会被它压住 ——
   每格多出 20px 内边距，输入框就只剩几十像素，数字又被裁掉了。 */
table.sa-item-table th, table.sa-item-table td { padding: 9px 9px; }
table.sa-item-table td { vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
/* 列宽定死之后，表里的输入框跟着单元格走，不要再自己定死宽度
   （输入框宽度 > 列宽会把整张表顶宽，把别的列挤扁）。 */
.sa-item-table .sa-mat,
.sa-item-table .sa-model,
.sa-item-table .sa-unit,
.sa-item-table .sa-qty,
.sa-item-table .sa-price { width: 100%; min-width: 0; }
/* 物料名称独占一行，「库存」小标签掉到下一行，别把输入框顶出格子 */
.sa-item-table .sa-mat { display: block; }
.sa-item-table .sa-inv { margin-top: 5px; }
.sa-item-table .sa-mat-tip { margin-top: 4px; line-height: 1.4; }
.sa-item-table .sa-unit,
.sa-item-table .sa-qty,
.sa-item-table .sa-price { height: 34px; }
/* 数字右对齐（跟「金额」一栏对得上）。
   ⚠️ Chrome 的数字框右侧有上下微调箭头，右对齐时数字会压在箭头底下被挡住，
   所以右边要额外留出箭头的位置。 */
.sa-item-table .sa-qty, .sa-item-table .sa-price { text-align: right; padding-right: 22px; }
table.sa-item-table tfoot td { border-top: 1px solid var(--line-2); font-weight: 700; padding-top: 10px; }
/* 台账那一栏：文字要能换行，但**不能被挤成竖排**。
   ⚠️ 必须写成 `.sa-item-table td[data-hw]`：
   `table.table td { white-space: nowrap }` 的特异性是 (0,1,2)，
   写成 `.sa-item-table [data-hw]`（0,2,0）虽然也压得住，但加 td 更明确、
   也扛得住以后有人改 `.sa-item-table` 的选择器。 */
.sa-item-table td[data-hw] { font-size: 12px; white-space: normal; }
.sa-item-table td[data-hw] .sa-mat-tip { width: 100%; word-break: break-word; }
/* 服务项目行（收银软件 / 门店运营服务这类收费项）：淡紫底跟硬件行区分开 */
table.sa-item-table tr.sa-svc td { background: #faf6fc; }
.sa-item-table .sa-model:disabled { background: var(--panel-2); color: var(--muted); cursor: not-allowed; }
@media (max-width: 760px) {
  /* 手机上表格转卡片布局，列宽不需要了；min-width 一定要去掉，
     不然整页会横向滚动。 */
  .sa-item-table { table-layout: auto; min-width: 0; }
  .sa-item-table .sa-mat,
  .sa-item-table .sa-model,
  .sa-item-table .sa-unit,
  .sa-item-table .sa-qty,
  .sa-item-table .sa-price { flex: 1 1 auto; max-width: 260px; }
}

/* ---------------------------- 企业微信接入 ---------------------------- */
/* 企微品牌绿，跟系统主色区分开，避免和「登录」主按钮混淆 */
.btn-wecom {
  background: #07c160; border-color: #07c160; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-wecom:hover { background: #06ad56; border-color: #06ad56; color: #fff; }
.btn-wecom svg { width: 15px; height: 15px; stroke: currentColor; }

/* 登录页的扫码入口：和密码框同宽，用一条淡线跟上面的账号密码区分 */
.login-alt { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.login-alt .btn-wecom { width: 100%; height: 44px; font-size: 14px; }
.login-alt .muted { text-align: center; line-height: 1.6; }

/* 设置页「企业微信接入」卡片 */
.wc-groups .row { flex-wrap: wrap; }
.wc-groups .row .input { min-width: 0; }
.wc-rules table.table { font-size: 12.5px; }
.wc-rules table.table th { padding: 8px 10px; white-space: nowrap; }
.wc-rules table.table td { padding: 8px 10px; vertical-align: middle; }
.wc-rules table.table .check { font-size: 12.5px; gap: 5px; }
.wc-logs table.table td { vertical-align: top; }
.wc-logs table.table td.wrap { word-break: break-word; }

/* 免登回调落地页 */
.wc-cb { max-width: 520px; margin: 0 auto; }

/* 企微授权过渡页的转圈 */
.wc-spinner {
  width: 34px; height: 34px; margin: 0 auto;
  border: 3px solid var(--brand-100); border-top-color: var(--brand);
  border-radius: 50%; animation: wc-spin .8s linear infinite;
}
@keyframes wc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wc-spinner { animation: none; } }

/* 通栏按钮（企微内展开密码登录用） */
.btn-block { width: 100%; }

/* 消息模板编辑器 */
.wc-tpl-editor { display: grid; gap: 12px; }
.wc-tpl-editor .textarea { min-height: 190px; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; }
.wc-ph { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wc-ph code {
  font-family: var(--mono); font-size: 11.5px; padding: 2px 6px;
  background: var(--brand-50); color: var(--brand-dark);
  border: 1px solid var(--brand-100); border-radius: 6px; cursor: pointer;
}
.wc-ph code:hover { background: var(--brand-100); }
.wc-preview {
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 9px;
  padding: 12px 13px; white-space: pre-wrap; word-break: break-word;
  font-size: 12.5px; line-height: 1.75; color: var(--text);
}
.wc-preview .wc-empty { color: var(--muted); font-style: italic; }

/* ---------------------------- 工作日志 ---------------------------- */
.wl-card { margin-bottom: 12px; }
/* 从站内消息点进来时高亮那一条（抄送通知的链接是 #/worklogs?log=123） */
.wl-card-hl {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
  animation: wl-hl 2.4s ease-out;
}
@keyframes wl-hl {
  0%, 40% { box-shadow: 0 0 0 3px var(--brand-50); }
  100% { box-shadow: 0 0 0 3px rgba(25, 169, 141, 0); }
}
.wl-card .card-hd { gap: 12px; flex-wrap: wrap; }
.wl-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wl-who .avatar { width: 30px; height: 30px; font-size: 13px; }
.wl-who-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wl-who-t b { font-size: 13.5px; }
.wl-who-t .small { font-size: 11.5px; }

.wl-sec { padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.wl-sec:last-child { border-bottom: 0; padding-bottom: 0; }
.wl-sec:first-child { padding-top: 0; }
.wl-sec-l { font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.wl-sec-v { font-size: 13.5px; line-height: 1.8; color: var(--text); white-space: pre-wrap; word-break: break-word; }

.wl-plan {
  margin-top: 14px; padding: 12px 14px;
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 9px;
}
.wl-plan-t { font-size: 12px; font-weight: 700; color: var(--brand-dark); margin-bottom: 5px; }

.wl-foot {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 20px; border-top: 1px solid var(--line-2); background: var(--panel-2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.wl-foot .btn { color: var(--text-2); }

.wl-form .form-grid { margin-bottom: 16px; }
.wl-sections { display: grid; gap: 14px; }

/* 模板栏目编辑行 */
.wl-tpl-sect { margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.wl-trow {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) 66px auto 32px;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.wl-trow .input { height: 34px; }
.wl-trow-num { text-align: center; }
.wl-trow .check { font-size: 12.5px; white-space: nowrap; }

@media (max-width: 760px) {
  .wl-trow { grid-template-columns: 1fr 1fr; }
  .wl-trow-num { width: 100%; }
}

/* ---------------------------- 谁加的 / 谁改的 ---------------------------- */
.stamp-meta {
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2);
  font-size: 11.5px; color: var(--muted);
}
.stamp-meta b { color: var(--text-2); font-weight: 600; }
.stamp-sep { color: var(--line); }

/* ---------------------------- 修改记录时间线 ---------------------------- */
.ch-timeline { display: flex; flex-direction: column; }
.ch-item {
  display: grid; grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2);
}
.ch-item:last-child { border-bottom: 0; }
.ch-when { display: flex; flex-direction: column; gap: 3px; }
.ch-time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ch-rel { font-size: 11px; color: var(--muted); }
.ch-body { min-width: 0; }
.ch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 13px; }
.ch-head b { font-size: 13.5px; }
.ch-entity { font-size: 12px; color: var(--muted); }
.ch-note { margin-top: 5px; font-size: 12.5px; color: var(--text-2); word-break: break-word; }
/* 字段级差异：按「字段 | 改之前 | → | 改之后」排成一张对齐的表。
   用 grid 而不是 flex —— flex + baseline 在这里渲染出来行距忽大忽小。
   对齐用 center 而不是 baseline：「→」的字体基线偏得厉害，baseline 对齐会把整行撑高。 */
.ch-diffs {
  margin-top: 7px;
  display: grid;
  grid-template-columns: minmax(58px, max-content) minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 7px 8px;
  align-items: center;
  font-size: 12.5px;
  line-height: 1.6;
}
.ch-field {
  color: var(--muted); font-weight: 600; font-size: 11.5px;
}
.ch-from { color: var(--muted); text-decoration: line-through; word-break: break-word; }
.ch-to { color: var(--text); font-weight: 600; word-break: break-word; }
/* 修饰类必须叫 is-blank：全局 .empty 是「空状态」样式（居中 + 48px 内边距），
   跟这里撞名会把每一行撑成 120px 高 */
.ch-from.is-blank, .ch-to.is-blank { color: var(--line); text-decoration: none; font-weight: 400; }
.ch-arrow { color: var(--line); text-align: center; line-height: 1.4; }

/* ---------------------------- 记录历史弹窗 ---------------------------- */
/* 点开某条记录（设备 / 门店 / 账号 / 硬件 / 工单…）时看：
   上面是这条记录现在的样子，下面是它被改过的每一次 */
.rec-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 13px; }
.rec-block { margin-bottom: 20px; }
.rec-block:last-child { margin-bottom: 0; }
.rec-hd {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700;
  padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--line-2);
}
.rec-hd svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.rec-kv { grid-template-columns: 92px minmax(0, 1fr); gap: 8px 14px; }
.rec-kv dt { font-size: 12px; }
.rec-kv dd { font-size: 13px; }
.rec-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .ch-item { grid-template-columns: 1fr; gap: 6px; }
  .ch-when { flex-direction: row; gap: 8px; align-items: baseline; }
  .rec-kv { grid-template-columns: 84px minmax(0, 1fr); }
  .ch-diffs { grid-template-columns: 44px minmax(0, 1fr) 14px minmax(0, 1fr); gap: 6px; }
}

/* ------------------------------ 运维路线 ------------------------------ */
.rt-cards { display: grid; gap: 12px; }
.rt-card .card-hd h3 { font-size: 15px; }
.rt-names { color: var(--text-2); margin-top: 6px; line-height: 1.6; }
.dot-sep { color: var(--line); }

.rt-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.rt-pick .card-bd { padding: 12px; }
.rt-store-list { max-height: 420px; overflow: auto; margin: 0 -6px; }
.rt-store { display: flex; gap: 8px; padding: 8px 6px; border-radius: 8px; cursor: pointer; align-items: flex-start; }
.rt-store:hover { background: var(--gray-bg); }
.rt-store.on { background: var(--brand-50); }
.rt-store input { margin-top: 3px; flex: none; }
.rt-store-bd { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.rt-store .nm { font-size: 13px; color: var(--text); }
.rt-store .ad { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rt-missing { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--text-2); }
.rt-miss-title { display: flex; align-items: center; gap: 4px; color: var(--orange); font-size: 12.5px; margin-bottom: 4px; }
.rt-miss-list { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; max-height: 140px; overflow: auto; }
.rt-miss-item { color: var(--text-2); font-size: 12px; }
.rt-miss-item:hover { color: var(--brand); }

.rt-map { height: 420px; border-radius: 10px; border: 1px solid var(--line); background: var(--gray-bg); overflow: hidden; position: relative; }
.rt-map-empty { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; font-size: 12.5px; color: var(--text-2); line-height: 1.8; }
.rt-meta { margin-top: 10px; gap: 8px; }

.rt-stops { margin-top: 6px; }
.rt-stop { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px dashed var(--line); }
.rt-stop:last-child { border-bottom: 0; }
.rt-stop .idx { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.rt-stop-bd { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rt-stop .nm { font-size: 13.5px; color: var(--text); }
/* 门店名后面的「用的哪套收银系统」标签（2026-11-05）：
   运维跑店时一眼看到这家用什么系统，不用再翻客户档案 */
.rt-stop .nm .rt-pos { margin-left: 6px; font-size: 11px; padding: 1px 7px; vertical-align: 1px; }
.rt-stop .ad { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-stop .leg { font-size: 11.5px; color: var(--text-3, var(--text-2)); }
.rt-stop.done .nm, .rt-stop.done .ad { text-decoration: line-through; color: var(--text-2); }
.rt-stop-ops { display: flex; align-items: center; gap: 4px; }
.rt-stop-ops .btn { padding: 0 7px; }

.rt-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.rt-form .field { margin: 0; }
.rt-form .full { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .rt-layout { grid-template-columns: minmax(0, 1fr); }
  .rt-map { height: 300px; }
  .rt-store-list { max-height: 260px; }
  .rt-form { grid-template-columns: minmax(0, 1fr); }
  .rt-stop { grid-template-columns: 24px minmax(0, 1fr); }
  .rt-stop-ops { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
}

/* 运维路线：坐标来自客户地址的小标签 */
.rt-tag { font-size: 10.5px; padding: 0 5px; margin-left: 6px; vertical-align: middle; }

/* 手动定位（地图选点） */
.map-pick-canvas { height: 300px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; background: var(--gray-bg); }
.map-pick-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.map-pick-coord { font-size: 12.5px; color: var(--text-2); }
.map-pick-num { height: 30px; width: 120px; font-size: 12.5px; }
@media (max-width: 640px) {
  .map-pick-canvas { height: 220px; }
  .map-pick-num { width: 96px; }
}

/* 店铺名称查询框 */
.geo-kw-wrap { display: inline-flex; align-items: center; gap: 6px; }
.geo-kw { height: 30px; width: 240px; font-size: 12.5px; }
@media (max-width: 640px) {
  .geo-kw-wrap { width: 100%; }
  .geo-kw { flex: 1 1 auto; width: auto; min-width: 0; }
}

/* 按名称查坐标：候选地点列表 */
.poi-list { display: flex; flex-direction: column; gap: 6px; }
.poi-item { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card, #fff); cursor: pointer; }
.poi-item:hover { border-color: var(--brand); background: var(--brand-50); }
.poi-title { font-size: 13.5px; color: var(--text); }
.poi-addr { font-size: 12px; color: var(--text-2); }

/* 运维路线：从客户里挑门店 */
.rt-empty { display: flex; align-items: center; gap: 6px; padding: 18px 6px; font-size: 13px; color: var(--text-2); justify-content: center; }
.rt-miss-line { margin-top: 10px; font-size: 12px; color: var(--orange); display: flex; align-items: center; gap: 5px; }
.pick-wrap { display: block; }
.cust-pick { max-height: 48vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.cust-item + .cust-item { border-top: 1px dashed var(--line); }
.cust-hd { display: flex; align-items: center; gap: 8px; padding: 9px 10px; cursor: pointer; }
.cust-hd:hover { background: var(--gray-bg); }
.cust-hd .nm { font-size: 13.5px; color: var(--text); }
.cust-caret { color: var(--text-2); font-size: 12px; }
.cust-stores { padding: 0 10px 10px 22px; display: flex; flex-direction: column; gap: 7px; }
.cust-store { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text); }
.cust-store input { margin-top: 2px; }
.cust-store > span { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.cust-store.disabled { opacity: .55; }


/* 手机上才显示的行内小标签（门店 / 工单）：桌面上表头已有列名，不必重复 */
.mini-lbl { display: none; }

/* ---------------------------- 客户档案（手机端紧凑列表） ---------------------------- */
/* 手机上每行只留「客户名 + 门店 / 工单 / 状态」，其它列收起；
   点整行进入客户详情，编辑在详情页里做，避免一行占掉半个屏幕。 */
@media (max-width: 900px) {
  .table-wrap tr.ct-row {
    position: relative; padding: 8px 32px 8px 10px; margin-bottom: 7px;
  }
  .table-wrap tr.ct-row td.col-opt { display: none !important; }
  .table-wrap tr.ct-row td:first-child {
    padding: 0 0 3px; margin-bottom: 0; border-bottom: 0;
  }
  .table-wrap tr.ct-row td:first-child .cell-main { font-size: 14.5px; display: inline; }
  .table-wrap tr.ct-row td:first-child .cell-sub { display: inline; margin-left: 6px; }
  .table-wrap tr.ct-row td.col-mini {
    display: inline-flex; width: auto; align-items: center; gap: 4px;
    padding: 2px 10px 0 0; text-align: left; font-size: 12.5px; color: var(--text-2);
  }
  .table-wrap tr.ct-row td.col-mini::before { display: none; }
  .table-wrap tr.ct-row td.col-mini .mini-lbl { display: inline; color: var(--muted); margin-right: 2px; }
  /* 服务状态开关（2026-11-01）：这是个能点的开关，手机上别藏起来 ——
     上面那条 td.col-opt { display:none } 会把它一起收掉，这里单独放出来。 */
  .table-wrap tr.ct-row td.col-svc {
    display: inline-flex !important; align-items: center; gap: 6px;
    padding: 4px 10px 0 0; text-align: left; font-size: 12.5px; color: var(--text-2);
  }
  .table-wrap tr.ct-row td.col-svc::before { display: none; }
  .table-wrap tr.ct-row::after {
    content: '›'; position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: 20px; line-height: 1;
  }
}


/* 客户档案：手机上「筛选」默认收起 */
.filter-toggle { display: none; }
.filter-more { display: contents; }
@media (max-width: 900px) {
  .filter-toggle { display: inline-flex; }
  .filter-toggle .caret { transition: transform .15s; }
  .filter-toggle.open .caret { transform: rotate(180deg); }
  .filter-more { display: none; width: 100%; gap: 8px; }
  .filter-more.show { display: flex; flex-wrap: wrap; }
  .filter-more .select { flex: 1 1 46%; min-width: 0; }
}


/* 门店卡片标题可点：切到这家门店 */
.store-card-hd h4 .store-jump {
  background: none; border: 0; padding: 0; font: inherit; color: var(--text);
  cursor: pointer; text-align: left;
}
.store-card-hd h4 .store-jump:hover { color: var(--brand); text-decoration: underline; }


/* 客户详情：全部门店时折叠成一行一个门店 */
.store-fold { display: flex; flex-direction: column; gap: 8px; }
.store-fold-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); cursor: pointer;
}
.store-fold-row:hover { border-color: var(--brand); background: var(--brand-50, #f2f8f6); }
.sf-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sf-name { font-size: 14px; color: var(--text); }
.sf-sum { flex: 1 1 auto; text-align: right; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-chev { color: var(--muted); font-size: 18px; line-height: 1; }
@media (max-width: 640px) {
  /* 手机上摘要换到第二行，别丢掉门店地址/设备数 */
  .store-fold-row { flex-wrap: wrap; }
  .sf-chev { order: 2; margin-left: auto; }
  .sf-sum { order: 3; flex: 1 1 100%; text-align: left; margin-top: 4px; white-space: normal; }
}


/* 修改记录里的附件：缩略图 + 预览/下载 */
.ch-file { display: flex; gap: 10px; align-items: flex-start; margin-top: 9px; }
.ch-file-thumb { display: block; line-height: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ch-file-thumb img { display: block; max-height: 120px; max-width: 220px; object-fit: cover; }
.ch-file-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ch-file-name { font-size: 12.5px; color: var(--text-2); word-break: break-all; }
.ch-file-acts { display: flex; gap: 6px; }
.ch-file-gone { margin-top: 6px; font-size: 12px; color: var(--muted); }


/* picker：下拉里选中「+ 新增…」时才展开的输入框 */
label.field > .picker-new { display: none; margin-top: 8px; }
label.field > .picker-new.on { display: block; }


/* 物料类型 / 单位管理 */
.opt-group { margin-bottom: 16px; }
.opt-hd { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 6px 5px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); font-size: 13px; color: var(--text);
}
.opt-chip.in-use { border-color: var(--brand-100); background: var(--brand-50); }
.opt-chip em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.opt-chip .opt-del {
  border: 0; background: none; cursor: pointer; color: var(--muted);
  width: 20px; height: 20px; border-radius: 50%; font-size: 15px; line-height: 1; padding: 0;
}
.opt-chip .opt-del:hover:not(:disabled) { background: var(--red-bg); color: var(--red); }
.opt-chip .opt-del:disabled { opacity: .35; cursor: not-allowed; }
.opt-add { display: flex; gap: 8px; margin-top: 2px; }
.opt-add .input { flex: 1; min-width: 0; }
.opt-add .select { max-width: 132px; }


/* 出入库单据：一张单多行物料 */
.inv-lines-hd {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 74px 92px 92px 32px;
  gap: 8px; padding: 0 2px 6px; font-size: 11.5px; color: var(--muted); font-weight: 600;
}
.inv-lines-hd.no-cost { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 74px 92px 32px; }
.inv-lines { display: flex; flex-direction: column; gap: 8px; }
.inv-line {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 74px 92px 92px 32px;
  gap: 8px; align-items: center;
}
.inv-line.no-cost { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 74px 92px 32px; }
.inv-line .input { width: 100%; min-width: 0; }
.inv-line .inv-line-del { justify-self: center; }
@media (max-width: 760px) {
  .inv-lines-hd { display: none; }
  .inv-line, .inv-line.no-cost { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
  .inv-line .inv-line-name { grid-column: 1 / 3; }
  .inv-line .inv-line-spec { grid-column: 1 / 2; }
  .inv-line .inv-line-unit { grid-column: 2 / 3; }
  .inv-line .inv-line-qty { grid-column: 1 / 2; }
  .inv-line .inv-line-cost { grid-column: 2 / 3; }
  .inv-line .inv-line-del { grid-column: 3 / 4; grid-row: 3; }
}


/* 企微一键自检结果 */
.wc-check-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.wc-check-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.wc-check-name { font-weight: 600; color: var(--text); min-width: 120px; }


/* ---------------------------- 实施信息：按门店折叠 ---------------------------- */
/* 同一家店的实施设备收成一行（客户/门店、设备台数、设备清单摘要），
   点「▸ 详情」才展开这家店的设备清单（设备名称 / 类型 / IP / 对应硬件 / 备注 / 最后修改 / 操作）。
   ⚠️ 主行没用 <table>：表格里 colspan 的详情格抢不到宽度，
   会被挤成第一列那么窄，详情铺不满整行折叠就没意义了，所以主行改成 grid 行。
   （展开区里的设备清单是普通表格，没有 colspan 问题。） */
.impl-list { width: 100%; }
.impl-hd, .impl-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 80px minmax(0, 2.2fr) 96px;
  gap: 12px; align-items: center;
}
.impl-hd {
  padding: 11px 14px; background: #f7f3eb; border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 650; color: #7d898d; letter-spacing: .7px;
}
.impl-item { border-bottom: 1px solid var(--line-2); }
.impl-item:last-child { border-bottom: 0; }
.impl-main { padding: 11px 14px; transition: background .13s; }
@media (hover: hover) and (pointer: fine) {
  .impl-main:hover { background: #fbf7ef; }
}
.impl-main .im-cell { min-width: 0; }
.impl-main .im-sum { color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.impl-toggle-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--text-2); font-size: 12px; cursor: pointer;
  white-space: nowrap;
}
.impl-toggle-btn:hover { border-color: var(--brand); color: var(--brand); }
.impl-toggle-btn .caret { display: inline-block; font-size: 11px; transition: transform .15s; }
.impl-toggle-btn.open .caret { transform: rotate(90deg); }
/* 展开区：整行铺开一块浅底，里面是这家店的设备清单 */
.impl-group-box { background: var(--panel-2); }
.impl-group-box[hidden] { display: none; }
.impl-dev-table { width: 100%; }
.impl-dev-table th { padding: 8px 14px; }
.impl-dev-table td { padding: 9px 14px; }
.impl-dev-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 900px) {
  .impl-hd, .impl-main { grid-template-columns: minmax(0, 1.1fr) 70px minmax(0, 1.8fr) 88px; gap: 8px; }
}
@media (max-width: 760px) {
  /* 手机上每家店折成一张卡 */
  .impl-hd { display: none; }
  .impl-main { grid-template-columns: 1fr; gap: 6px; }
  .impl-main .im-cell { display: flex; gap: 8px; align-items: center; }
  .impl-main .im-cell::before {
    content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 500;
    flex: 0 0 72px; text-align: left;
  }
  .impl-main .im-toggle::before { display: none; }
  .impl-main .im-sum { white-space: normal; }
  /* 展开区里的设备清单在窄屏转卡片（跟别的表格一样） */
  .impl-dev-table thead { display: none; }
  .impl-dev-table, .impl-dev-table tbody, .impl-dev-table tr, .impl-dev-table td { display: block; width: 100%; }
  .impl-dev-table tr { border-bottom: 1px solid var(--line-2); padding: 8px 0; }
  .impl-dev-table tr:last-child { border-bottom: 0; }
  .impl-dev-table td { border: 0; padding: 3px 14px; white-space: normal; }
  .impl-dev-table td::before {
    content: attr(data-label); color: var(--muted); font-size: 11.5px;
    display: inline-block; min-width: 72px; margin-right: 6px;
  }
  .impl-dev-table td:first-child::before { display: none; }
  .impl-dev-table td:last-child { text-align: left; }
  .impl-dev-table td:last-child .actions { justify-content: flex-start; }
}


/* ---------------------------- 实施工单：一张工单一行 ---------------------------- */
/* 跟实施信息页一样：主行是 grid 行（表格的 colspan 详情格抢不到宽度），
   点「▸ 详情」才展开这张工单的硬件清单和服务清单。 */
.io-list { width: 100%; }
.io-hd, .io-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, .95fr) minmax(0, 1fr) minmax(0, .9fr) 84px 92px;
  gap: 12px; align-items: center;
}
.io-hd {
  padding: 11px 14px; background: #f7f3eb; border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 650; color: #7d898d; letter-spacing: .7px;
}
.io-item { border-bottom: 1px solid var(--line-2); }
.io-item:last-child { border-bottom: 0; }
.io-main { padding: 11px 14px; transition: background .13s; }
@media (hover: hover) and (pointer: fine) {
  .io-main:hover { background: #fbf7ef; }
}
.io-main .io-cell { min-width: 0; font-size: 13px; }
.io-main .io-cell .cell-sub { color: var(--muted); font-size: 12px; }
.io-toggle { text-align: right; }
/* 展开区：整行铺开一块浅底，里面是硬件清单 / 服务清单 */
.io-box { background: var(--panel-2); }
.io-box[hidden] { display: none; }
.io-sec-title {
  padding: 10px 14px 6px; font-size: 12.5px; font-weight: 650; color: var(--text-2);
}
.io-sec-foot {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px 14px;
}
.io-sec-foot .spacer { flex: 1; }
.io-table { width: 100%; }
.io-table th { padding: 8px 14px; }
.io-table td { padding: 8px 14px; vertical-align: middle; }
.io-table tbody tr:last-child td { border-bottom: 0; }
.io-table .io-module { min-width: 140px; }
/* 新建工单时勾选明细 */
.io-pick { display: flex; flex-direction: column; gap: 2px; }
.io-pick-title { font-size: 12.5px; font-weight: 650; color: var(--text-2); margin: 8px 0 4px; }
.io-pick-title:first-child { margin-top: 0; }
.io-pick-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.io-pick-name { font-weight: 600; color: var(--text); }
@media (max-width: 1100px) {
  .io-hd, .io-main { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, .9fr) 84px 88px; gap: 8px; }
  .io-hd span:nth-child(3), .io-hd span:nth-child(5),
  .io-main .io-cell:nth-child(3), .io-main .io-cell:nth-child(5) { display: none; }
}
@media (max-width: 760px) {
  /* 手机上每张工单折成一张卡 */
  .io-hd { display: none; }
  .io-main { grid-template-columns: 1fr; gap: 6px; }
  .io-main .io-cell { display: flex; gap: 8px; align-items: center; }
  .io-main .io-cell::before {
    content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 500;
    flex: 0 0 72px; text-align: left;
  }
  .io-main .io-toggle::before { display: none; }
  .io-main .io-cell:nth-child(3) { display: flex; }
  .io-table thead { display: none; }
  .io-table, .io-table tbody, .io-table tr, .io-table td { display: block; width: 100%; }
  .io-table tr { border-bottom: 1px solid var(--line-2); padding: 8px 0; }
  .io-table tr:last-child { border-bottom: 0; }
  .io-table td { border: 0; padding: 3px 14px; white-space: normal; }
  .io-table td::before {
    content: attr(data-label); color: var(--muted); font-size: 11.5px;
    display: inline-block; min-width: 72px; margin-right: 6px;
  }
  .io-table td:first-child::before { display: none; }
  .io-table td:last-child { text-align: left; }
  .io-table td:last-child .actions { justify-content: flex-start; }
}


/* ---------------------------- 批量删除（顶部「删除」按钮 + 删除模式） ---------------------------- */
/* 复选框列：窄一点，别喧宾夺主 */
table.table th.col-pick, table.table td.col-pick {
  width: 34px; text-align: center; padding-left: 8px; padding-right: 4px;
}
table.table td.col-pick input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; vertical-align: middle; accent-color: var(--brand);
}
/* 未进入删除态时，整列勾选框藏起来 —— 平时列表干干净净，
   点顶部「删除」才出现（2026-10-31 用户口径）
   ⚠️ 权重是这里的关键，两条都得写：
   ① 「.batch-idle .col-pick」只有 2 个类选择器，
      权重比下面「label.col-pick.pick-row」（2 类 + 1 元素）低，
      不单独写一条的话卡片流的勾选框根本藏不住；
   ② 窄屏（≤900px）表格转卡片时，「.table-wrap td:first-child{display:block}」
      是 (0,2,1)，比「.batch-idle .col-pick」的 (0,2,0) 高 ——
      不压住的话手机上客户列表的勾选框**一直显示**，
      跟「平时没有勾选框、点删除才出现」的口径对不上（2026-11-02 修）。
      这里直接用 !important 一票压死，别再跟权重较劲。 */
.batch-idle .col-pick,
.batch-idle td.col-pick,
.batch-idle label.col-pick.pick-row { display: none !important; }
/* 卡片流（设备 / 附件 / 路线）里的勾选框：挂在行首，跟着 flex 排 */
label.col-pick.pick-row {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; margin-right: 8px; cursor: pointer;
}
label.col-pick.pick-row input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; vertical-align: middle; accent-color: var(--brand);
}
/* 卡片流没有表头，全选框放在顶部工具栏里，挨着「删除」按钮 */
label.col-pick.pick-all {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  font-size: 12.5px; color: var(--text-2); margin-right: 2px;
}
label.col-pick.pick-all input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; vertical-align: middle; accent-color: var(--brand);
}
/* 顶部「删除」「取消」按钮：别被工具栏的间距挤变形 */
.batch-arm, .batch-cancel { white-space: nowrap; }
/* 「取消」平时要藏起来（只有进了删除态才出现）。
   ⚠️ 不能光靠 hidden 属性 —— .btn 里的 display:inline-flex 权重比
   浏览器默认的 [hidden]{display:none} 高，hidden 会被压掉，
   结果「取消」按钮一直挂在工具栏上（2026-11-02 修）。 */
.batch-cancel[hidden] { display: none !important; }
.batch-arm svg, .batch-cancel svg { width: 15px; height: 15px; }
/* 已进入删除态但一条都没勾选：按钮灰化（但**不 disabled** ——
   disabled 的按钮点下去什么都不发生，用户只会觉得「没反应」，
   2026-11-01 用户报的「删除选中没反应」就是这个坑） */
.batch-arm.is-empty { opacity: .55; cursor: pointer; }

/* ---------------------------- 横向滚动提示 ---------------------------- */
/* 页签条（客户详情十来个页签）、宽表格在窄屏会溢出：
   右侧/左侧还有内容时盖一层渐变，滚到头就消失，明确「后面还有东西」 */
.hscroll-wrap { position: relative; }
.hscroll-wrap::before,
.hscroll-wrap::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 36px;
  pointer-events: none; opacity: 0; transition: opacity .18s; z-index: 3;
}
.hscroll-wrap::before { left: 0; background: linear-gradient(to right, var(--panel), transparent); }
.hscroll-wrap::after { right: 0; background: linear-gradient(to left, var(--panel), transparent); }
.hscroll-wrap.can-left::before,
.hscroll-wrap.can-right::after { opacity: 1; }

/* 宽表格：滚动条常显一点，让人知道右边还有列 */
.table-wrap { scrollbar-width: thin; scrollbar-color: rgba(19, 35, 43, .22) transparent; }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(19, 35, 43, .16); border-radius: 4px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }

/* 页签条：画个系统滚动条会把页签下边框顶开，所以不显示滚动条，
   靠右侧渐变提示 + 滚轮横向滚动（见 ui.js initHScroll） */
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { height: 0; }


/* ---------------------------- 巡检工单 ---------------------------- */
/* 列表一行一张单，点行展开：12 项检查表 + 上门服务信息 */
.ij-detail > td { background: var(--panel-2); padding: 0 !important; }
.ij-box { padding: 14px 16px 18px; }
.ij-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ij-kvs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; margin-top: 12px; }
.ij-kv { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; min-width: 0; }
.ij-kv b { font-weight: 600; word-break: break-word; }
.ij-sec {
  margin: 18px 0 8px; font-weight: 700; font-size: 12.5px; color: var(--text-2);
  border-left: 3px solid var(--brand); padding-left: 8px;
}
.ij-note { margin-top: 10px; font-size: 12.5px; display: flex; gap: 8px; }
.ij-note > div { flex: 1; white-space: pre-wrap; word-break: break-word; }
.ij-items th, .ij-items td { font-size: 12.5px; }
/* 查出问题的行：常驻标红（不靠 hover）。
   放在 td 上而不是 tr 上，否则悬停时全局的 tr:hover td 会把整行刷成米色，红色就没了。 */
.ij-items tr.ij-bad td { background: #fdf1ef; }
.ij-items tr.ij-bad td:nth-child(3), .ij-items tr.ij-bad td:nth-child(4) { color: var(--red); font-weight: 600; }
/* 未解决（问题没处理完）：更深一档，左边加红条，一眼能挑出来 */
.ij-items tr.ij-open td { background: var(--red-bg); }
.ij-items tr.ij-open td:first-child { box-shadow: inset 3px 0 0 var(--red); }
@media (hover: hover) and (pointer: fine) {
  .ij-items tr.ij-bad:hover td { background: #fbe6e2; }
  .ij-items tr.ij-open:hover td { background: #f9ddd8; }
}
.ij-items select, .ij-items input { width: 100%; }
@media (max-width: 900px) {
  .ij-kvs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* 巡检单的「客户确认」块 + 生成链接弹窗 */
.ij-sign {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  background: #fbf8f3; border: 1px dashed var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 2px;
}
.ij-sign.is-done { background: #eef7f3; border-color: #bfe0d3; border-style: solid; }
.ij-sign-main { font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.ij-sign-img { height: 54px; background: #fff; border: 1px solid var(--line-2); border-radius: 6px; }
.sgn-wrap { display: flex; gap: 18px; align-items: flex-start; }
.sgn-qr { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 10px; background: #fff; flex: 0 0 auto; }
.sgn-side { flex: 1; min-width: 0; }
.sgn-url { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
@media (max-width: 700px) {
  .sgn-wrap { flex-direction: column; align-items: center; }
  .sgn-side { width: 100%; }
}

.sgn-warn {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px; font-size: 12px; line-height: 1.7;
  background: var(--red-bg); border: 1px solid #efcbc6; color: #8c2f22;
}

/* 列表里「还有未解决问题」的单：左边一条红杠 + 浅浅的底，不展开也能挑出来 */
.ij-list tr.ij-has-open > td { background: #fdf5f3; }
.ij-list tr.ij-has-open > td:first-child { box-shadow: inset 3px 0 0 var(--red); }
@media (hover: hover) and (pointer: fine) {
  .ij-list tr.ij-has-open:hover > td { background: #fbeae6; }
}

/* 客户确认历史（作废的也列着，谁签的、谁作废的都留档） */
.ij-sign-hist { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; width: 100%; }
.ij-sign-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }

/* ---------------------------- 培训与私享会 ---------------------------- */
.tr-detail { font-size: 13px; }
.tr-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.tr-head-main { min-width: 0; flex: 1; }
.tr-head-ops { flex: 0 0 auto; }
.tr-note { display: flex; gap: 8px; margin-top: 8px; }
.tr-note > div { flex: 1; white-space: pre-wrap; word-break: break-word; }
.tr-sec {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 18px 0 8px; padding-left: 8px; border-left: 3px solid var(--brand);
  font-weight: 700; font-size: 12.5px; color: var(--text-2);
}
.tr-sec .spacer { flex: 1; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-obj-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 4px 3px 9px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 12px; max-width: 100%; word-break: break-word;
}
.tr-obj-x {
  border: 0; background: transparent; cursor: pointer; color: var(--text-3);
  font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 999px;
}
.tr-obj-x:hover { background: var(--line); color: var(--red); }
.tr-obj-box { width: 100%; }
.tr-stores { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tr-store { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.tr-mini th, .tr-mini td { font-size: 12.5px; }
.tr-tasks { display: flex; flex-direction: column; gap: 6px; }
.tr-task { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.tr-task.is-done { background: var(--panel-2); }
.tr-task.is-done .tr-task-bd > div:first-child { text-decoration: line-through; color: var(--text-3); }
.tr-task-bd { flex: 1; min-width: 0; }
.tr-files { display: flex; flex-direction: column; gap: 6px; }
.tr-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; }
.tr-file .mono { flex: 1; min-width: 0; word-break: break-all; }

/* ---------------------------- 日历 ---------------------------- */
.cal-toolbar { align-items: center; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-card { overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line); }
.cal-wd { text-align: center; font-size: 12px; color: var(--text-3); padding: 8px 0; font-weight: 600; }
.cal-day {
  min-height: 112px; padding: 6px 6px 5px; cursor: pointer;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.cal-grid > .cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: #f8faf9; }
.cal-day.is-out { background: #fbfbfb; }
.cal-day.is-out .cal-num { color: var(--text-3); }
.cal-day.is-today { background: #f3f8f5; }
.cal-day-hd { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.cal-num { font-size: 12px; font-weight: 600; color: var(--text-2); }
.cal-day.is-today .cal-num {
  background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 6px;
}
.cal-cnt { font-size: 10.5px; color: var(--text-3); }
.cal-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-ev {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: #eaf1fb; color: #1e3a63; border-radius: 5px;
  font-size: 11.5px; line-height: 1.6; padding: 1px 5px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cal-ev:hover { background: #dde9fa; }
.cal-ev.is-salon { background: #f3ecfb; color: #573a85; }
.cal-ev.is-salon:hover { background: #ebdffa; }
.cal-ev.is-done { opacity: .7; }
.cal-ev.is-cancel { background: #f1f1f1; color: #8b8b8b; text-decoration: line-through; }
.cal-ev-t { opacity: .72; margin-right: 3px; font-variant-numeric: tabular-nums; }
.cal-more {
  border: 0; background: transparent; color: var(--brand); cursor: pointer;
  font-size: 11.5px; padding: 0 5px; text-align: left;
}
.cal-legend { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding-left: 2px; }
.cal-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.cal-dot.is-training { background: #cfe0f7; }
.cal-dot.is-salon { background: #e4d6f7; }
.cal-dot.is-done { background: #9fbfae; }
.cal-dot.is-cancel { background: #d8d8d8; }
.cal-day-list { display: flex; flex-direction: column; gap: 8px; }
.cal-day-item { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.cal-day-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cal-day-time { flex: 0 0 74px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.cal-day-bd { flex: 1; min-width: 0; }
@media (max-width: 820px) {
  .cal-day { min-height: 74px; padding: 4px; }
  .cal-ev { font-size: 10.5px; padding: 1px 3px; }
  .cal-ev-t { display: none; }
  .cal-cnt { display: none; }
}

/* ---------------------------- 排班日历（技术部） ---------------------------- */
/* 人员一览：每个同事一个小卡片，点一下就只看这个人 */
.ro-staff-list { display: flex; gap: 8px; flex-wrap: wrap; }
.ro-staff {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 7px 11px; cursor: pointer; text-align: left; min-width: 150px;
}
.ro-staff:hover { border-color: var(--brand); background: #f7fbf9; }
.ro-staff.is-on { border-color: var(--brand); background: #eef6f2; box-shadow: inset 0 0 0 1px var(--brand); }
.ro-staff-n { font-size: 13.5px; font-weight: 650; color: var(--text-1); }
.ro-staff-d { font-size: 11px; color: var(--text-3); }
/* 统计按班次列（早班16 · 晚班9 · 休息4），一格放不下会换行 */
.ro-staff-t { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; line-height: 1.5; }

/* 日历格子里三类安排用颜色区分 */
.ro-ev.is-leave { background: #fdecec; color: #8c2f2f; }
.ro-ev.is-leave:hover { background: #fbdcdc; }
.ro-ev.is-duty { background: #e6f4ec; color: #1f6b42; }
.ro-ev.is-duty:hover { background: #d9efe2; }
/* 行政班 = 早班/白班这种正常上班，灰蓝低调色 */
.ro-ev.is-admin { background: #e9ecf1; color: #475261; }
.ro-ev.is-admin:hover { background: #e0e4ea; }
.ro-ev.is-impl { background: #eaf1fb; color: #1e3a63; }
.ro-ev.is-impl:hover { background: #dde9fa; }
.ro-ev.is-order { background: #f1f0f6; color: #5a5470; }
.ro-ev.is-order:hover { background: #e8e6f0; }
/* 调休 = 2026-11-21 用户要求：整天调休 / 调休半天都是「调休」这个类型，
   半天用更淡的底色 + 虚线区分（半天是时长上的细节，安排类型不变）。 */
.ro-ev.is-adj { background: #fdf0de; color: #8a5316; }
.ro-ev.is-adj:hover { background: #f9e6cb; }
.ro-ev.is-adj-half { background: #fef8ef; color: #a3701f; border: 1px dashed #d9b483; }
/* 待确认：虚线边框，跟「已确认」一眼能分开 */
.ro-ev.is-pending { border: 1px dashed currentColor; opacity: .85; }
.ro-dot-leave { background: #f0c4c4; }
.ro-dot-duty { background: #b6ddc6; }
.ro-dot-admin { background: #c6ccd6; }
.ro-dot-impl { background: #cfe0f7; }
.ro-dot-adj { background: #f0c98d; }
.ro-dot-order { background: #dcd9e8; }

/* ---------------------------- 月网格排班表（快速排班） ----------------------------
   一行一个人、一列一天。名字列吸左边，人多的时候横向滚也不丢人名。 */
.ro-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.ro-grid th, .ro-grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ro-grid thead th { background: #fafaf8; color: var(--text-3); font-weight: 600; padding: 5px 2px; text-align: center; }
.ro-grid thead th b { display: block; font-size: 13px; color: var(--text-1); }
.ro-grid thead th i { display: block; font-style: normal; font-size: 10.5px; }
.ro-grid thead th.is-we { background: #f6f3ea; }
.ro-grid thead th.is-today { background: var(--brand-50); color: var(--brand); }
.ro-grid .ro-gname {
  position: sticky; left: 0; z-index: 2; background: #fff; text-align: left;
  padding: 5px 10px; min-width: 96px; max-width: 140px; white-space: nowrap;
}
.ro-grid thead .ro-gname { background: #fafaf8; z-index: 3; }
.ro-grid tbody .ro-gname b { font-size: 12.5px; }
.ro-grid tbody .ro-gname i { display: block; font-style: normal; font-size: 10.5px; color: var(--text-3); }
.ro-grid td.ro-gc { padding: 0; text-align: center; min-width: 44px; height: 30px; cursor: pointer; }
.ro-grid td.ro-gc:hover { background: #f2f8f5; }
.ro-grid td.ro-gc span { display: block; padding: 4px 2px; font-size: 11px; line-height: 1.25; }
.ro-grid td.ro-gc.is-leave span { background: #fdecec; color: #8c2f2f; }
.ro-grid td.ro-gc.is-duty span { background: #e6f4ec; color: #1f6b42; }
.ro-grid td.ro-gc.is-admin span { background: #e9ecf1; color: #475261; }
.ro-grid td.ro-gc.is-impl span { background: #eaf1fb; color: #1e3a63; }
.ro-grid td.ro-gc.is-adj span { background: #fdf0de; color: #8a5316; }
.ro-grid td.ro-gc.is-adj-half span { background: #fef8ef; color: #a3701f; border: 1px dashed #d9b483; }
.ro-grid td.ro-gc.is-pending span { border: 1px dashed currentColor; }

/* 点格子选班次的按钮组 */
.ro-cell-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.ro-cell-pick .btn { font-size: 12.5px; padding: 6px 12px; }

/* 导入排班表弹窗 */
.ro-radio { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.ro-imp-detail { margin-top: 6px; }
.ro-imp-detail summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); padding: 3px 0; }

/* ---------- 服务状态开关（2026-11-01）----------
   客户档案列表「服务状态」列 + 客户编辑弹窗都用它。
   值存在隐藏 input 里，.sw 只管外观（见 public/js/ui.js 的 switchHtml）。 */
.sw-wrap { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.sw {
  position: relative; width: 38px; height: 21px; flex: none; padding: 0;
  border-radius: 11px; border: 1px solid var(--line); background: var(--gray-bg);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.sw .sw-knob {
  position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  transition: transform .15s;
}
.sw.on { background: var(--brand); border-color: var(--brand); }
.sw.on .sw-knob { transform: translateX(17px); }
.sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sw-wrap:hover .sw { border-color: var(--brand); }
.sw-txt { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.sw-wrap[data-sw-wrap] input[type="hidden"] { display: none; }
/* 列表里「N 家门店停服」的提示：橙色，跟停止服务的语义一致 */
.svc-stopped { color: var(--orange); font-weight: 600; }

/* ── 发版公告（2026-11-03）────────────────────────────────────────── */
.rl-hero {
  display: flex; gap: 20px; align-items: stretch; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 14px;
}
.rl-hero-l { min-width: 160px; padding-right: 20px; border-right: 1px solid var(--line-2); }
.rl-hero-ver { font-size: 30px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; margin: 2px 0 3px; }
.rl-hero-r { flex: 1; min-width: 240px; }
.rl-hero-line { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.7; color: var(--text-2); margin-bottom: 3px; }
/* ⚠️ 文字必须**包在 span 里**（2026-11-22 修）：
   .rl-hero-line 是 flex 容器 —— 直接放文字的话，
   每段文字和每个 <b>（mdBold 的粗体）都会各自变成**独立的 flex item**，
   一行文字被排成好几条竖条，看着像乱码。
   包一层 span 之后，span 整体是一个 flex item，里面的粗体正常接着排。 */
.rl-hero-line > span:last-child { flex: 1; min-width: 0; }
.rl-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 8px; flex: 0 0 7px; }
.rl-dot-add { background: var(--green); }
.rl-dot-fix { background: var(--orange); }

.rl-card { margin-bottom: 12px; }
.rl-card.is-current { border-color: var(--brand); }
.rl-hd { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.rl-ver { font-size: 16px; font-weight: 700; font-family: var(--mono, monospace); }
.rl-title { font-size: 13.5px; font-weight: 600; }
.rl-sec { margin-top: 12px; }
.rl-sec-t { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; margin-bottom: 6px; }
.rl-sec-t svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.rl-sec-t.rl-add { color: var(--green); }
.rl-sec-t.rl-fix { color: var(--orange); }
.rl-list { margin: 0; padding-left: 18px; }
.rl-list li { font-size: 13.5px; line-height: 1.85; color: var(--text-2); margin-bottom: 2px; }
.rl-notes {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 9px;
  padding: 9px 12px; font-size: 12.5px; line-height: 1.75; color: var(--muted);
}
.rl-notes svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; margin-top: 3px; flex: 0 0 14px; }

/* ── 需求工单（2026-11-22）────────────────────────────────────────────── */
.fr-panel { margin-bottom: 14px; }
.fr-panel .card-bd { padding: 14px 16px 16px; }
.fr-list { margin-top: 12px; }
.fr-card { margin-bottom: 10px; }
.fr-card:last-child { margin-bottom: 0; }
/* 从站内消息点进来时高亮那一条 */
.fr-card.is-hit { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(0, 122, 124, .12); }
.fr-title { font-size: 14px; font-weight: 600; margin: 8px 0 4px; line-height: 1.5; }
.fr-content {
  font-size: 13px; line-height: 1.7; color: var(--text-2);
  white-space: pre-wrap; word-break: break-word;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 9px; padding: 8px 11px;
}
/* ── 打印（2026-11-03）──────────────────────────────────────────────── */
/* 打印弹窗：上面选打印机/模板，下面是预览的小票 */
.prt-wrap { display: flex; flex-direction: column; gap: 14px; }
.prt-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.prt-form .field { flex: 1; min-width: 180px; }
.prt-preview-box { border-top: 1px solid var(--line-2); padding-top: 12px; }
.prt-paper {
  margin-top: 8px; padding: 14px 16px; background: #fffdf8;
  border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--mono, monospace); font-size: 13px; line-height: 1.6;
  color: var(--text); white-space: pre-wrap; word-break: break-all;
  box-shadow: var(--shadow-sm); min-height: 90px;
}
.prt-line { white-space: pre-wrap; min-height: 1em; }
.prt-token { display: flex; flex-direction: column; gap: 10px; }
.prt-token .input { font-family: var(--mono, monospace); font-size: 13px; }

/* 打印中心：左边模板列表，右边编辑器 */
.pc-tpl { display: grid; grid-template-columns: 268px 1fr; gap: 14px; align-items: start; }
.pc-tpl-list .card-bd { padding: 6px; max-height: 70vh; overflow: auto; }
.pc-tpl-item {
  display: block; width: 100%; text-align: left; border: 1px solid transparent;
  background: transparent; border-radius: 9px; padding: 8px 10px; cursor: pointer;
  font: inherit; color: inherit;
}
.pc-tpl-item:hover { background: var(--panel-2); }
.pc-tpl-item.active { background: var(--brand-50); border-color: var(--brand-100); }
.pc-tpl-item-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pc-editor { display: grid; grid-template-columns: 250px 1fr; gap: 14px; align-items: start; }
.pc-fields {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px;
  background: var(--panel-2); max-height: 460px; overflow: auto;
}
.pc-field-group { margin-bottom: 8px; }
.pc-field-group summary {
  cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--text-2);
  padding: 3px 2px; user-select: none;
}
.pc-field-items { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px 0 4px; }
.pc-field {
  border: 1px solid var(--line); background: var(--panel); border-radius: 20px;
  padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--text-2); font-family: inherit;
}
.pc-field:hover { border-color: var(--brand); color: var(--brand); }
.pc-field:disabled { opacity: .55; cursor: default; }
.pc-lines { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; }
.pc-line {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 8px; border-bottom: 1px dashed var(--line-2);
}
.pc-line:last-child { border-bottom: none; }
.pc-line-tag {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-50); border-radius: 5px; padding: 2px 7px;
}
.pc-line-text { font-size: 13px; color: var(--text); word-break: break-all; }
@media (max-width: 1000px) {
  .pc-tpl, .pc-editor { grid-template-columns: 1fr; }
}
/* ── 版本更新（2026-11-18）────────────────────────────────────────────── */
.upd-card { margin-bottom: 14px; }
.upd-ver {
  font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2;
  font-family: var(--mono, monospace); color: var(--brand);
}
.upd-notes {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 9px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.75; color: var(--text-2);
}
.upd-notes svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; margin-top: 3px; flex: 0 0 14px; }
.upd-note {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 14px;
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 9px;
  padding: 11px 13px; font-size: 12.5px; line-height: 1.85; color: var(--text-2);
}
.upd-note svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; margin-top: 4px; flex: 0 0 14px; color: var(--brand); }
.upd-phase { font-size: 15px; font-weight: 600; }
.upd-phase.upd-ok { color: var(--green); }
.upd-phase.upd-err { color: var(--red); }
.upd-phase.upd-run { color: var(--brand); }
/* 更新中的进度条：无限循环的滚动条 —— 表示「还在跑，不知道多久」 */
.upd-bar {
  margin-top: 16px; height: 5px; border-radius: 3px;
  background: var(--line-2); overflow: hidden; position: relative;
}
.upd-bar-in {
  position: absolute; top: 0; left: 0; height: 100%; width: 35%;
  background: var(--brand); border-radius: 3px;
  animation: upd-slide 1.4s ease-in-out infinite;
}
@keyframes upd-slide {
  0%   { left: -35%; }
  100% { left: 100%; }
}

/* ---------------- 系统设置的二级菜单（2026-11-18） ----------------
   「系统设置」现在每一项功能各占一页，页顶一条二级导航条切换。
   直接复用现成的 .tabs/.tab 页签样式（视觉跟别的页签一致），
   这里只补三件事：链接去掉下划线、图标跟文字对齐、选中态用 .is-active。 */
.sub-nav { margin: 0 0 16px; }
.sub-nav .tab {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--text-2);
}
.sub-nav .tab svg { width: 15px; height: 15px; flex: none; opacity: .7; }
.sub-nav .tab:hover { color: var(--text); }
.sub-nav .tab.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; }
.sub-nav .tab.is-active svg { opacity: 1; }

/* 窄屏放不下 9 个分页（笔记本小窗口 / 手机 / 侧边面板）：
   .tabs 默认横向滚动，而且滚动条是隐藏的 —— 后面几项没人找得到。窄一点就换行。 */
@media (max-width: 1180px) {
  .sub-nav { flex-wrap: wrap; overflow-x: visible; }
  .sub-nav .tab { padding: 9px 12px; }
}

/* 顶栏右侧的图标按钮（查资料 / 在新标签打开）
   ⚠️ 不能用 .icon-btn —— 那个默认 display:none（只有移动端菜单按钮用它）。 */
.topbar-btn {
  width: 36px; height: 36px; border: 0; background: none; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); cursor: pointer; flex: 0 0 36px;
}
.topbar-btn:hover { background: rgba(19, 35, 43, .06); color: var(--brand); }
.topbar-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; }

@media (max-width: 760px) {
  /* 窄屏顶栏挤：「在新标签打开」先藏起来，「查资料」留着（更常用） */
  #btn-new-tab { display: none; }
}

/* ── 快速查询抽屉（2026-11-20）────────────────────────────────────────────
 * 填表时想查资料，但弹窗是全屏遮罩、挡着什么都看不见。
 * 这个抽屉**叠在弹窗上面**（z-index 200 > modal-mask 100），
 * 不关掉表单就能查，查到还能一键填回表单。
 * ------------------------------------------------------------------------ */
.qf-mask {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(11, 26, 34, .22);
  animation: qf-fade .16s ease;
}
@keyframes qf-fade { from { opacity: 0; } to { opacity: 1; } }

.qf-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
  width: min(480px, 92vw);
  display: flex; flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 46px rgba(11, 26, 34, .18);
  transform: translateX(102%);
  transition: transform .2s cubic-bezier(.2, .8, .3, 1);
}
.qf-panel.is-open { transform: none; }
.qf-panel:focus { outline: none; }

.qf-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line-2);
}
.qf-search {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.qf-search:focus-within { border-color: var(--brand); background: #fff; }
.qf-search svg { width: 15px; height: 15px; flex: none; stroke: var(--muted); fill: none; }
.qf-search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 13.5px; color: var(--text);
}
.qf-search kbd {
  flex: none; font-size: 10px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}

.qf-body { flex: 1; overflow-y: auto; padding: 12px 14px 20px; }

.qf-sec { margin-bottom: 18px; }
.qf-sec h4 {
  margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.qf-list {
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; overflow: hidden;
}

.qf-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
}
.qf-item:last-child { border-bottom: 0; }
.qf-item:hover { background: var(--panel-2); }
.qf-ico {
  flex: none; width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand);
}
.qf-ico svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.qf-body-txt { flex: 1; min-width: 0; }
.qf-t { font-size: 13.5px; font-weight: 600; color: var(--text); word-break: break-all; }
.qf-url { font-weight: 400; font-size: 12px; color: var(--muted); }
.qf-s { font-size: 12px; color: var(--text-2); margin-top: 3px; word-break: break-all; }
.qf-s.mono, .mono { font-family: var(--mono); }
.qf-pw { letter-spacing: 1px; color: var(--text-2); }
.qf-act { flex: none; display: flex; flex-direction: column; gap: 6px; }

.qf-mini {
  border: 0; background: transparent; cursor: pointer; padding: 2px;
  color: var(--muted); border-radius: 5px; display: inline-flex;
}
.qf-mini:hover { color: var(--brand); background: var(--brand-50); }
.qf-mini.on { color: var(--brand); }
.qf-mini svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }

.qf-fill, .qf-newtab {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  border-radius: 7px; padding: 4px 8px; font-size: 11.5px; cursor: pointer;
  white-space: nowrap;
}
.qf-fill:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.qf-newtab:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.qf-newtab svg { width: 12px; height: 12px; stroke: currentColor; fill: none; }

.qf-ft {
  padding: 9px 14px; border-top: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--muted);
}

/* 表单头右上角的工具区（放「查资料」按钮） */
.modal-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.modal-hd h3 { margin-right: 12px; }
.qf-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.qf-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.qf-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }

/* 一键填表后高亮一下，让用户一眼看出填到哪儿了（填错了也能马上改） */
.qf-filled {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px var(--brand-50);
  background: var(--brand-50);
}

/* 侧边栏底部提示：Ctrl+点击菜单可在新标签打开 */
.nav-hint {
  padding: 6px 8px 8px;
  font-size: 10.5px; color: var(--muted);
  text-align: center; line-height: 1.5;
}

@media (max-width: 760px) {
  .qf-panel { width: 100%; }
  .qf-newtab span { display: none; }
}

/* ------------------------------ KDS 终端（2026-11-21） ------------------------------
   终端表里的「登录密码」默认打码，点眼睛临时显示明文。
   说明：后端仍然返回明文（跟系统里后台账号密码一个做法），
   这层遮罩只是**界面上不一眼看见**，不是加密。 */
.kds-pwd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 1px;
  color: var(--text-2);
  user-select: all;
}

/* ------------------------------ 站内消息（2026-11-21） ------------------------------
   侧边栏顶部「消息通知」的红色未读徽标 + 消息列表页。
   未读的行左边有一个红点、标题加粗 —— 一眼能分出哪几条还没看。 */
.nav-item .badge-dot[hidden] { display: none; }

.msg-list { display: flex; flex-direction: column; }
.msg-item {
  display: flex; gap: 12px; padding: 13px 16px;
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, .07));
  cursor: pointer; transition: background .14s ease;
}
.msg-item:last-child { border-bottom: 0; }
.msg-item:hover { background: rgba(25, 169, 141, .05); }
.msg-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: 0 0 8px;
  background: transparent;
}
.msg-item.is-unread .msg-dot { background: #e0483a; box-shadow: 0 0 0 3px rgba(224, 72, 58, .14); }
.msg-main { min-width: 0; flex: 1; }
.msg-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-title { font-size: 13.5px; color: var(--text-2); }
.msg-item.is-unread .msg-title { font-weight: 700; color: var(--text-1); }
.msg-time { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.msg-content {
  margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}
.msg-foot {
  margin-top: 7px; display: flex; gap: 12px; font-size: 11.5px; color: var(--muted);
}
.msg-go { color: var(--brand); font-weight: 600; }

/* ── 侧边栏分类：卡片手风琴（2026-11-22）────────────────────────────────────
   每个分类是**一张独立卡片**，标题在卡片上沿（点一下展开 / 收起该分类下的菜单项），
   展开时卡片下半部露出条目。四个候选版本里用户选的方案 C。
   收起时整块用 hidden 属性藏掉（不是 CSS 类 —— hidden 不用跟 .nav 的 flex 布局打架）。
   ⚠️ .nav-group **不能**再设 flex column —— 卡片要 overflow:hidden 裁圆角，
      flex + overflow 会把圆角切掉。组内条目由 .nav-group-items 自己排。 */
.nav-group {
  /* ⚠️ flex:0 0 auto 一定要写 —— .nav 是 flex column，卡片是它的 flex item，
     默认 flex-shrink:1 会被按比例压扁；卡片又有 overflow:hidden，
     导致「自动最小尺寸」归零（min-height:auto 失效），侧边栏内容一多
     卡片就被压成一条线、标题文字被裁掉（2026-11-22 实测：客户组 70px、
     销售组 16.7px）。写死不收缩，多出来的让 .nav 自己滚动。 */
  flex: 0 0 auto;
  margin: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .075);
  overflow: hidden;
}
.nav-group-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; margin: 0; padding: 10px 12px;
  border: 0; background: none; cursor: pointer;
  color: rgba(247, 243, 234, .74);
  font-size: 13px; font-weight: 650; letter-spacing: .3px; text-align: left;
  transition: background .16s ease, color .16s ease;
}
.nav-group-btn:hover { background: rgba(255, 255, 255, .07); color: #fbf8f0; }
.nav-group-btn.is-open { color: #eafff8; background: rgba(25, 169, 141, .16); }
.nav-group-btn .nav-group-name { flex: 1; min-width: 0; }
/* 分类下的条目数（按**当前可见**的条目算，权限不同看到的数不一样） */
.nav-group-count { font-size: 10.5px; font-weight: 700; color: rgba(247, 243, 234, .42); }
.nav-group-arrow {
  width: 13px; height: 13px; stroke: currentColor; fill: none;
  stroke-width: 2.2; opacity: .65; flex: 0 0 13px;
  transition: transform .18s ease;
}
.nav-group-btn.is-open .nav-group-arrow { transform: rotate(90deg); }
.nav-group-items { display: flex; flex-direction: column; gap: 3px; padding: 3px 6px 8px; }
.nav-group-items[hidden] { display: none; }
/* 卡片里的条目往右缩进一格，层级一眼看得出。
   ⚠️ 真机上卡片只有 196px 宽（侧边栏 244px − 内边距 28px − 卡片左右 margin 20px），
      缩进别超过 26px，否则「停止服务客户 / 软件测试账号」这种长名字会挤。 */
.nav-group-items .nav-item { padding-left: 26px; }

/* ── 需求工单页面头部（2026-11-22，从发版公告页里搬出来成独立页）────────── */
.fr-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fr-head-l { flex: 1; min-width: 220px; }
.fr-head-t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; margin-bottom: 3px; }
.fr-head-t svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; stroke-width: 1.7; flex: 0 0 18px; }

/* ── 到期延期弹窗（2026-11-22）──────────────────────────────────────────────
   「延期 7 天 / 15 天 / 30 天 / 一年」四个选项做成可选中的卡片：
   左边是期限，右边是延期后的新日期 + 剩余天数（后端算好的，前端不重算）。 */
.ex-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; user-select: none; background: #fff;
  transition: background .14s ease, border-color .14s ease;
}
.ex-opt:hover { background: var(--brand-50); }
.ex-opt.on { border-color: var(--brand); background: var(--brand-50); }
.ex-opt input { margin: 0; flex: 0 0 auto; }
.ex-opt-l { font-weight: 600; flex: 0 0 auto; }
.ex-opt-r { margin-left: auto; color: var(--muted); font-size: 12.5px; text-align: right; }

/* ── 门店选择器（2026-11-24）──────────────────────────────────────────────
   填单据时「没有对应客户就直接在门店名称栏打字新建」。
   建议列表**就地展开**（不是浮层）：弹窗正文 .modal-bd 是 overflow-y:auto，
   浮层会被裁掉 —— ui.js 的 .ms-pop 就踩过这个，展开的选项点不到。 */
.sp { position: relative; }
.sp-inp { width: 100%; }
.sp-pop {
  margin-top: 4px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; box-shadow: 0 6px 18px rgba(11, 26, 34, .07);
  max-height: 264px; overflow-y: auto;
}
.sp-pop[hidden] { display: none; }
.sp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 11px; cursor: pointer; font-size: 13.5px;
  border-bottom: 1px solid var(--line-2);
}
.sp-row:last-child { border-bottom: none; }
.sp-row:hover, .sp-row.on { background: var(--brand-50); }
.sp-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-s { color: var(--muted); font-size: 12px; flex: 0 0 auto; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-cust .sp-t { color: var(--text-2); }
.sp-new { color: var(--brand); font-weight: 600; }
.sp-empty { color: var(--muted); cursor: default; }
.sp-empty:hover { background: none; }
.sp-chip {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; padding: 3px 9px; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-dark);
  font-size: 12.5px; border: 1px solid var(--brand-100);
}
.sp-chip[hidden] { display: none; }
.sp-x { cursor: pointer; opacity: .6; padding: 0 2px; }
.sp-x:hover { opacity: 1; }
