/* ============================================================
   协同导航工作台 - 全站样式（响应式 / 浅色主题）
   ============================================================ */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --bg: #f3f5f9;
  --card: #ffffff;
  --border: #e5e9f2;
  --text: #1f2937;
  --muted: #8a94a6;
  --danger: #ef4444;
  --success: #10b981;
  --warn: #f59e0b;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* 防止类选择器覆盖 hidden 属性导致弹窗默认显示 */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 17px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 10px; min-height: 54px; flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; }
.topnav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topnav a { color: var(--text); font-size: 14px; }
.topnav a:hover { color: var(--primary); }
.link-plain { cursor: pointer; }
.userbox { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.userbox b, .userbox-name { font-weight: 600; }
/* 顶栏自己的名字：按钮化，点击打开「我的资料」 */
.userbox-name {
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; font-weight: 600; color: inherit; cursor: pointer;
}
.userbox-name:hover { color: var(--primary); text-decoration: underline; }
.userbox-name:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
/* 我的资料弹窗：密码区分隔标题 */
.mp-sec {
  margin: 14px 0 8px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: #334155;
}
#tdTransferUser { width: 100%; max-width: 100%; }
.role {
  font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: #eef2ff; color: #6366f1;
}
.role-1 { background: #ecfdf5; color: #059669; }
.role-2 { background: #fff7ed; color: #d97706; }

/* ---------- 顶栏：创建快捷方式按钮 + 全站待办角标 ---------- */
.brand-wrap { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.qs-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border: 1px solid #dbeafe; border-radius: 999px;
  background: #eff6ff; color: #1d4ed8; font-size: 12px; line-height: 1.5;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.qs-btn:hover { background: #dbeafe; border-color: #93c5fd; }
.qs-btn:active { transform: translateY(1px); }
.nav-wb { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.nav-todo-badge {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  padding: 0 4px; border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 11px; font-weight: 700; text-align: center;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .14);
}
.nav-todo-badge[hidden] { display: none; }

/* ---------- 创建快捷方式引导弹窗 ---------- */
.qs-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.qs-modal[hidden] { display: none; }
.qs-mask { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, .45); }
.qs-dialog {
  position: relative; width: 100%; max-width: 460px; max-height: 86vh; overflow: auto;
  background: #fff; border-radius: 16px; padding: 22px 22px 18px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .24);
}
.qs-dialog h3 { margin: 0 34px 12px 0; font-size: 17px; color: #0f172a; }
.qs-close {
  position: absolute; right: 12px; top: 12px; width: 28px; height: 28px;
  border: 0; border-radius: 8px; background: #f1f5f9; color: #64748b;
  cursor: pointer; font-size: 14px; font-family: inherit;
}
.qs-close:hover { background: #e2e8f0; }
.qs-body { font-size: 14px; line-height: 1.8; color: #334155; }
.qs-body p { margin: 0 0 10px; }
.qs-steps { margin: 0 0 12px; padding-left: 20px; }
.qs-steps li { margin-bottom: 4px; }
.qs-ok { color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; padding: 8px 12px; }
.qs-warn { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 12px; }
.qs-note { font-size: 12.5px; color: #64748b; }
.qs-url {
  word-break: break-all; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 8px 10px; font-size: 12px; color: #475569;
  font-family: ui-monospace, Consolas, monospace;
}
.qs-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.poll-cfg { max-width: 460px; }
.poll-cfg .field { margin-top: 8px; }
@media (max-width: 720px) {
  .qs-txt { display: none; }
  .qs-btn { padding: 3px 7px; font-size: 14px; }
}

/* ---------- 布局 ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 20px 16px 40px; }
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 4px 2px 14px; flex-wrap: wrap;
}
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 0 26px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 10px; padding: 8px 16px; font-size: 14px; cursor: pointer;
  transition: all .15s; user-select: none;
}
.btn:hover { border-color: #c9d4e5; background: #f8fafc; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover { background: #fef2f2; border-color: #fecaca; }
.btn-warn { color: #b45309; }
.btn-warn:hover { background: #fffbeb; border-color: #fde68a; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 13px; border-radius: 8px; }

/* ---------- 门禁 / 登录 / 注册 ---------- */
.auth-wrap { min-height: 62vh; display: flex; align-items: center; justify-content: center; padding: 30px 0; }
.auth-card {
  width: 100%; max-width: 380px; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); padding: 34px 28px;
}
.auth-icon { font-size: 40px; margin-bottom: 6px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card .muted { margin: 0 0 18px; font-size: 13.5px; }
.auth-card .notice { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; padding: 7px 10px; border-radius: 10px; }
.auth-card input {
  width: 100%; padding: 11px 13px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 14.5px;
  outline: none; transition: border .15s;
}
.auth-card input:focus { border-color: var(--primary); }
/* 记住账号：整行可点（label），原生 checkbox 兼容电脑/iOS/安卓，点击区≥40px 方便触屏 */
.auth-remember {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 40px; margin: 0 0 14px;
  padding: 2px 2px; text-align: left; cursor: pointer;
  font-size: 13.5px; color: var(--muted, #64748b); user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.auth-remember input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; padding: 0; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: 4px; outline: none;
  accent-color: var(--primary); cursor: pointer;
}
.auth-remember span { line-height: 1.4; }
.form-msg { min-height: 20px; margin: 4px 0 0; font-size: 13px; color: var(--danger); }
.form-msg.ok { color: var(--success); }
.auth-links { margin-top: 14px; }

/* ---------- 工作台 ---------- */
.wb-card { padding: 6px 0 16px; overflow: hidden; }
.tabs {
  display: flex; align-items: center; gap: 2px;
  border-bottom: 1px solid var(--border); padding: 0 10px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: none; background: none; padding: 13px 14px; font-size: 14.5px;
  color: var(--muted); cursor: pointer; position: relative; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
/* 后台标签较多：压缩内边距 + 允许换行，保证全部可见（不依赖横向滚动） */
.adm-tabs {
  flex-wrap: wrap; overflow-x: visible; row-gap: 0; padding-bottom: 0;
}
.adm-tabs .tab { padding: 10px 11px; font-size: 14px; }
.badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  padding: 0 5px; border-radius: 999px; background: #e2e8f0; color: #475569;
  font-size: 11.5px; font-weight: 700; text-align: center; vertical-align: 1px;
}
.badge-hot { background: var(--danger); color: #fff; }

.tab-panel { padding: 14px 16px 0; }
.list { display: flex; flex-direction: column; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }
.empty.small { padding: 10px; font-size: 13px; }

.item {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  background: #fdfefe; transition: box-shadow .15s;
}
.item:hover { box-shadow: var(--shadow); }
.item.done { opacity: .62; }
.item-body { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: 14.5px; word-break: break-all; }
.item-title .st { margin-left: 6px; }
.item-content { color: #4b5563; font-size: 13.5px; margin-top: 2px; white-space: pre-wrap; word-break: break-all; }
.item-meta { color: var(--muted); font-size: 12px; margin-top: 5px; }
.item-note {
  margin-top: 6px; font-size: 12.5px; color: #b91c1c;
  background: #fef2f2; border: 1px solid #fee2e2; border-radius: 8px; padding: 5px 9px;
}
.item-actions { margin-top: 9px; display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 15px; padding: 4px 7px; border-radius: 8px; flex-shrink: 0;
}
.icon-btn:hover { color: var(--danger); background: #fef2f2; }

.st { font-size: 11.5px; padding: 1.5px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.st-warn   { background: #fffbeb; color: #b45309; }
.st-info   { background: #eff6ff; color: #2563eb; }
.st-ok     { background: #ecfdf5; color: #059669; }
.st-danger { background: #fef2f2; color: #dc2626; }

/* 待办优先级标签 */
.pri { font-size: 11.5px; padding: 1.5px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; vertical-align: 1px; }
.pri-urgent   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.pri-important{ background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }

/* 待办类别标签 */
.cat-tag { font-size: 11.5px; padding: 1.5px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap; vertical-align: 1px; background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }

/* 待办详细说明：链接/图片工具条与插图 */
.todo-tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.todo-tools .btn-sm { flex: none; }
.rich-tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rich-tools .btn-sm { flex: none; }
.item-content a.lnk { color: #2563eb; word-break: break-all; text-decoration: underline; }
.todo-img-link { display: inline-block; max-width: 100%; }
.todo-img { display: block; max-width: 100%; max-height: 260px; width: auto; border-radius: 8px; border: 1px solid #e5e7eb; margin: 6px 0; background: #fafafa; }

/* 收到的待办：整项可点击打开详情 */
.todo-item.td-open { cursor: pointer; }
.todo-item.td-open:hover { border-color: #c7d2fe; background: #f8faff; }
.tag-fin { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.tag-arch { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tag-ok  { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.chk-inline { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: #64748b; margin-top: 8px; cursor: pointer; line-height: 1.5; }
.chk-inline input { margin-top: 2px; accent-color: var(--primary); flex: none; }
/* 发待办弹窗：两个勾选项的文字徽标 */
.chk-tag { display: inline-block; padding: 2px 8px; border-radius: 5px; border: 1px solid transparent; font-weight: 600; line-height: 1.5; }
.chk-tag-blue { background: #e8f1ff; color: #1d4ed8; border-color: #cfe0ff; }
.chk-tag-purple { background: #f4ecff; color: #7c3aed; border-color: #e6d8ff; }

/* 待办详情弹窗 */
.modal-wide { max-width: 640px; }
.td-meta { font-size: 13px; color: #475569; margin-bottom: 10px; }
.fin-flag { color: #047857; }
.td-content { font-size: 14px; color: #1f2937; line-height: 1.7; border: 1px solid #eef2f7; background: #fafbfc; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; word-break: break-word; }
.td-parts { margin-bottom: 12px; }
.td-msgs { max-height: 220px; overflow-y: auto; border: 1px solid #eef2f7; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: #fcfcfd; }
.td-no-msg { margin: 4px 0; }
.msg-row { padding: 8px 0; border-bottom: 1px dashed #e5e7eb; font-size: 13.5px; }
.msg-row:last-child { border-bottom: 0; }
.msg-kind { font-size: 11.5px; border-radius: 999px; padding: 1px 8px; margin-right: 8px; font-weight: 600; }
.kind-msg  { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.kind-note { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.msg-row b { margin-right: 8px; }
.msg-text { margin-top: 4px; color: #1f2937; line-height: 1.6; word-break: break-word; }
.td-msg-form { display: flex; gap: 8px; margin-top: 6px; }
.td-msg-form input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; font-family: inherit; }
.td-msg-form input:focus { border-color: var(--primary); }
.td-submit-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.td-sender-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.page-head-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 待办小方框网格（工作台 + 更多待办独立页共用）：默认一行 9 个 */
.todo-grid {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px;
}
.todo-box {
  position: relative;
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  padding: 10px 10px 9px; cursor: pointer; transition: all .15s; overflow: hidden;
}
/* 方框内嵌的勾选框与删除按钮（备忘录 / 我的同事复用待办小方框） */
.box-check {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
}
.box-check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.box-del { position: absolute; top: 6px; right: 6px; z-index: 2; }
.memo-box .todo-box-title, .colleague-box .todo-box-title { padding-right: 22px; }
.memo-box.has-check .todo-box-title { padding-left: 24px; }
.memo-box .memo-text { font-weight: 500; min-height: 35px; }
.colleague-box { cursor: default; }
.todo-box:hover {
  border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow);
}
.todo-box-title {
  font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-all; min-height: 35px;
}
.todo-box-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.todo-box-tags .st, .todo-box-tags .pri, .todo-box-tags .cat-tag { font-size: 11px; padding: 1px 7px; }
.todo-box-meta {
  font-size: 11px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.todo-more { text-align: center; margin-top: 16px; }
@media (max-width: 1400px) { .todo-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .todo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .todo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .todo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }

/* 用户分组（管理后台 + 同事列表） */
.groups-list { display: grid; gap: 12px; }
.grp-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; background: #fafafa; }
.grp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.grp-name { font-weight: 600; font-size: 15px; }
.grp-head .ops { margin-left: auto; }
.grp-members { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.grp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 999px;
  padding: 3px 6px 3px 10px; font-size: 13px;
}
.grp-chip-x {
  border: none; background: none; cursor: pointer; color: var(--muted);
  font-size: 12px; padding: 1px 4px; border-radius: 999px; line-height: 1;
}
.grp-chip-x:hover { color: #dc2626; background: #fef2f2; }
.grp-add { display: flex; gap: 8px; align-items: center; }
.grp-add select { flex: 0 1 240px; }
.grp-tag { background: #eff6ff; color: #2563eb; border-radius: 999px; padding: 1.5px 8px; font-size: 12px; white-space: nowrap; }

/* 备份文件名（等宽，便于辨认时间戳） */
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace; }
.tbl a.btn { text-decoration: none; line-height: 1.6; }

/* 勾选圆 */
.check {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px;
  display: inline-flex; align-items: center; justify-content: center;
}
.check input {
  width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; margin: 0;
}

/* 备忘录 */
.memo-add { display: flex; gap: 10px; margin-bottom: 10px; }
.memo-add input {
  flex: 1; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; outline: none;
}
.memo-add input:focus { border-color: var(--primary); }
.memo-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
#moreReceived, #moreSent, #moreMemo { margin-top: 12px; }

/* 我的同事 */
.my-emp {
  margin-left: auto; font-size: 13px; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  padding: 4px 11px; border-radius: 999px; font-weight: 600;
}
.colleague-add { display: flex; gap: 10px; margin-bottom: 8px; }
.colleague-add input {
  flex: 1; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; outline: none;
}
.colleague-add input:focus { border-color: var(--primary); }
.colleague-requests {
  background: color-mix(in srgb, var(--primary) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, #fff);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.colleague-requests .sub-title { margin: 0 0 10px; font-size: 14px; color: var(--primary); }
.colleague-item .item-actions, .request-item .item-actions { display: flex; gap: 8px; }

/* 待办参与者 */
.participants { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
.pt { font-size: 12px; color: var(--muted, #64748b); background: #f1f5f9; border-radius: 999px; padding: 2px 9px; }
.pt-primary { background: color-mix(in srgb, var(--primary) 14%, #fff); color: var(--primary); font-weight: 600; }
.ok-mark { color: #16a34a; font-weight: 600; margin-left: 2px; }
.wait-mark { color: #f59e0b; font-weight: 600; margin-left: 2px; }

/* 协作人勾选 */
.collab-box { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 150px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.collab-item { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.field-label { display: block; font-size: 13px; color: var(--muted, #64748b); margin-bottom: 6px; }

/* 后台工具栏 / 状态 */
.panel-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.us-dis { color: #dc2626; font-weight: 600; }
.us-lock { color: #b45309; font-weight: 600; }
.us-warn { color: #b45309; }
.ops { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-box {
  width: 100%; max-width: 430px; background: #fff; border-radius: 16px;
  padding: 22px 20px; box-shadow: 0 20px 40px rgba(16, 24, 40, .18);
  max-height: 90vh; overflow-y: auto;
}
.modal-box h3 { margin: 0 0 14px; font-size: 17px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-head h3 { margin: 0; }
.modal-x { border: none; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 6px; flex: none; }
.modal-x:hover { background: #f1f5f9; color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---------- 表单 ---------- */
.field { display: block; font-size: 13.5px; color: #374151; margin-bottom: 12px; }
.field > input, .field > select, .field > textarea {
  display: block; width: 100%; margin-top: 5px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; outline: none; font-family: inherit;
}
.field > input:focus, .field > select:focus, .field > textarea:focus { border-color: var(--primary); }
.field.chk { display: flex; align-items: center; gap: 8px; }
.field.chk input { width: auto; margin: 0; accent-color: var(--primary); }
.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.form-inline input, .form-inline select {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; outline: none;
}
.form-inline input:focus, .form-inline select:focus { border-color: var(--primary); }
.form-col { max-width: 460px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.filter { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #374151; }

/* ---------- 管理后台 ---------- */
.adm-tabs { margin-bottom: 14px; }
#adminPanel > .card { padding: 16px; margin-bottom: 14px; }
#adminPanel > .tab-panel.card { padding: 16px; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12.5px; background: #f8fafc; }
.tbl tr:last-child td { border-bottom: none; }
/* td 必须保持 table-cell，否则会脱离表格布局导致整列错位（内容用子元素间距替代 flex gap） */
.tbl td.ops { display: table-cell; vertical-align: middle; white-space: normal; }
.tbl td.ops > * { margin: 2px 6px 2px 0; }
.tbl td.wrap { white-space: normal; word-break: break-all; }
/* 用户管理表格：固定列宽，保证行与行之间整齐不抖动 */
#usersTable { table-layout: fixed; min-width: 1292px; }
#usersTable th, #usersTable td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 数据备份：详细说明块（备份内容 / 不包含 / 自动规则 / 恢复影响 / 下载删除） */
.backup-help {
  background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 14px; margin: 0 0 14px;
}
.backup-help-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
}
.backup-help-row:last-child { border-bottom: none; }
.backup-help .bk-label { flex: 0 0 128px; font-weight: 700; color: #1e293b; font-size: 13px; line-height: 1.7; }
.backup-help .bk-text { flex: 1 1 auto; color: #475569; font-size: 13px; line-height: 1.8; word-break: break-word; }
.backup-help .bk-text b { color: #b45309; font-weight: 700; }
.backup-help code {
  background: #eef2f7; border: 1px solid #e2e8f0; border-radius: 4px;
  padding: 0 5px; font-size: 12px; font-family: ui-monospace, Consolas, monospace; color: #334155;
}
@media (max-width: 720px) {
  .backup-help { padding: 4px 12px; }
  .backup-help-row { display: block; padding: 9px 0; }
  .backup-help .bk-label { display: block; margin-bottom: 2px; }
  .backup-help .bk-text { display: block; }
}
#usersTable td.col-grp { white-space: normal; word-break: break-all; }
#usersTable td.col-ops { white-space: normal; overflow: visible; }
#usersTable.hide-id { min-width: 1244px; }
#usersTable.hide-id col.col-id,
#usersTable.hide-id th.col-id,
#usersTable.hide-id td.col-id { display: none; }
/* 产品序号行内编辑 */
.pd-sort-cell { cursor: pointer; min-width: 56px; }
.pd-sort-cell:hover { background: #f1f5f9; }
.pd-sort-cell.editing { cursor: default; background: #fff; }
.pd-sort-input { width: 60px; padding: 4px 6px; border: 1px solid var(--primary); border-radius: 6px; font: inherit; font-size: 13px; outline: none; }
.pd-sort-input::-webkit-outer-spin-button,
.pd-sort-input::-webkit-inner-spin-button { opacity: 1; }
.img-preview { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.img-row { display: flex; gap: 8px; align-items: center; }
.img-row input { flex: 1; }
.upload-btn { position: relative; overflow: hidden; }
.link-form { margin-bottom: 14px; padding: 16px; }
.us-st-0 { color: #b45309; }
.us-st-1 { color: #059669; }
.us-st-2 { color: #dc2626; }

/* ---------- 网址导航 ---------- */
.nav-wrap { display: flex; flex-direction: column; gap: 16px; }
.cat-card { padding: 16px 18px; }
.cat-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cat-bar { width: 4px; height: 16px; border-radius: 2px; background: var(--primary); display: inline-block; }

/* 纯图片模式 */
.links.mode-1 {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 7px;
}
.links.mode-1 .link-card { padding: 12px 4px; flex-direction: column; }
.links.mode-1 img, .links.mode-1 .letter { width: 44px; height: 44px; font-size: 19px; }

/* 图片 + 文字 */
.links.mode-2 {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px;
}
.links.mode-2 .link-card { padding: 13px 6px; flex-direction: column; gap: 7px; }
.links.mode-2 img, .links.mode-2 .letter { width: 38px; height: 38px; font-size: 16px; }
.links.mode-2 .t { font-size: 12.5px; }

/* 纯文字 */
.links.mode-3 {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 5px;
}
.links.mode-3 .link-card { padding: 9px 12px; gap: 8px; }
.links.mode-3 .t { font-size: 13.5px; font-weight: 500; }

.link-card {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  color: var(--text); transition: all .15s; overflow: hidden;
  position: relative;
}
/* 个人导航卡片：右上已是编辑/删除按钮，复制图标移到左上避免重叠 */
.mylink-item .nav-copy { left: 5px; right: auto; }

/* 导航卡片右上角「复制网址」图标（不触发卡片跳转） */
.nav-copy {
  position: absolute; top: 5px; right: 5px; z-index: 3;
  width: 18px; height: 18px; padding: 2px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; background: rgba(255,255,255,.92); border: 1px solid transparent;
  color: var(--muted); cursor: pointer; opacity: .55; transition: opacity .15s, color .15s, background .15s;
}
.nav-copy svg { width: 100%; height: 100%; display: block; }
.link-card:hover .nav-copy, .nav-copy:focus-visible { opacity: 1; }
.nav-copy:hover { color: var(--primary); background: #fff; border-color: var(--border); }
@media (hover: none) { .nav-copy { opacity: .75; } }
.link-card:hover {
  border-color: var(--primary); color: var(--primary);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.link-card img {
  border-radius: 10px; object-fit: cover; display: block;
  background: #f8fafc; min-width: 1px; min-height: 1px;
}
.link-card .letter {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: linear-gradient(135deg, #60a5fa, #818cf8);
  color: #fff; font-weight: 700; flex-shrink: 0;
}
.link-card .t {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.links.mode-3 .link-card::before {
  content: "•"; color: var(--primary); font-size: 18px; line-height: 1;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: #111827; color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: 86vw; text-align: center;
}
.toast.err { background: var(--danger); }
.toast.ok { background: #059669; }

/* ---------- 工作流程 ---------- */
/* 列表：桌面一行 3 个方框卡片，平板 2 个，手机 1 个 */
.wf-list {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
@media (max-width: 1024px) {
  .wf-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wf-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
/* 单个流程方框：整卡可点进详情 */
.wf-list .wf-item {
  display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0;
  padding: 16px 16px 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.wf-list .wf-item:hover {
  transform: translateY(-2px);
  border-color: #bcd0f2;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .10);
}
.wf-list .item-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.wf-list .item-title {
  font-size: 18px; line-height: 1.45; font-weight: 700;
  word-break: break-word; letter-spacing: .2px;
}
.wf-list .item-title .st { margin-left: 4px; vertical-align: 2px; }
.wf-list .wf-title-link { border-bottom: none; }
.wf-list .wf-item:hover .wf-title-link { color: var(--primary-dark); }
.wf-list .item-meta { font-size: 12.5px; line-height: 1.65; margin-top: 8px; }
.wf-list .item-note { margin-top: 8px; }
.wf-list .item-actions { margin-top: auto; padding-top: 12px; gap: 6px; }

.wf-search {
  flex: 0 1 260px; min-width: 160px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 14px; outline: none; background: #fff;
  transition: border .15s, box-shadow .15s;
}
.wf-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }

/* ---------- 工作流程：步骤编辑与展示 ---------- */
.wf-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.wf-step {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; background: #f8fafc;
}
.wf-step-head { display: flex; align-items: center; margin-bottom: 8px; }
.wf-step-no { font-weight: 600; font-size: 13.5px; color: var(--primary); }
.wf-step-del { margin-left: auto; }
.wf-step textarea {
  display: block; width: 100%; resize: vertical;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; outline: none; font-family: inherit; background: #fff;
}
.wf-step textarea:focus { border-color: var(--primary); }
.wf-step-imgbar { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.wf-step-preview { display: flex; align-items: center; gap: 8px; }
.wf-step-thumb-wrap { position: relative; display: inline-block; }
.wf-step-thumb {
  width: 64px; height: 64px; object-fit: cover;
  border: 1px solid var(--border); border-radius: 8px; display: block; background: #fff;
}
.wf-thumb-del {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
  border-radius: 50%; border: none; background: var(--danger, #dc2626); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
}
.wf-step-imgbtn:disabled { opacity: .55; cursor: wait; }
.wf-step-paste-tip { font-size: 12px; color: var(--muted, #64748b); white-space: nowrap; }
.wf-step-uploading { font-size: 12.5px; color: var(--primary, #2563eb); }
@media (max-width: 600px) { .wf-step-paste-tip { flex-basis: 100%; } }
/* 步骤网址 */
.wf-step-urlbar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.wf-step-urltag { font-size: 12.5px; color: var(--muted, #64748b); flex: 0 0 auto; }
.wf-step-url {
  flex: 1 1 auto; min-width: 0; padding: 6px 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; outline: none; background: #fff; font-family: inherit;
}
.wf-step-url:focus { border-color: var(--primary); }

.wf-steps-view { margin: 8px 0 0; padding-left: 0; list-style: none; counter-reset: none; }
/* 每个步骤一张彩色卡片：6 色循环（底色 + 左侧色条 + 步骤徽标共用 --wf-* 变量），
   相邻步骤颜色不同，不再是一整片连在一起的灰色文字 */
.wf-steps-view li {
  --wf-c: #3b82f6; --wf-bg: #f5f9ff; --wf-bd: #dbeafe;
  background: var(--wf-bg);
  border: 1px solid var(--wf-bd);
  border-left: 4px solid var(--wf-c);
  border-radius: 12px;
  margin: 0 0 12px;
  padding: 10px 14px 12px;
  page-break-inside: avoid;
}
.wf-steps-view li:nth-child(6n+2) { --wf-c: #0891b2; --wf-bg: #f0fdff; --wf-bd: #cffafe; }
.wf-steps-view li:nth-child(6n+3) { --wf-c: #16a34a; --wf-bg: #f2fdf5; --wf-bd: #dcfce7; }
.wf-steps-view li:nth-child(6n+4) { --wf-c: #d97706; --wf-bg: #fffbeb; --wf-bd: #fef3c7; }
.wf-steps-view li:nth-child(6n+5) { --wf-c: #9333ea; --wf-bg: #faf5ff; --wf-bd: #f3e8ff; }
.wf-steps-view li:nth-child(6n+6) { --wf-c: #e11d48; --wf-bg: #fff1f2; --wf-bd: #ffe4e6; }
.wf-step-vhead {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--wf-c);
  background: #fff; border: 1px solid var(--wf-bd); border-radius: 999px;
  padding: 1px 10px; margin-bottom: 6px;
}
.wf-step-vtext { font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.wf-step-imgwrap { margin-top: 8px; }
/* 所有步骤图统一压缩到 300×300 方框内等比显示（不拉伸、不变形、不溢出） */
.wf-step-vimg {
  display: block; width: 300px; height: 300px; max-width: 100%;
  object-fit: contain; padding: 4px;
  background: #fff; border: 1px solid var(--wf-bd); border-radius: 10px;
  cursor: zoom-in; transition: box-shadow .15s, border-color .15s;
}
.wf-step-vimg:hover { border-color: var(--wf-c); box-shadow: 0 2px 10px rgba(15,23,42,.10); }
.wf-step-imghint { font-size: 12px; color: var(--muted, #8a94a6); margin-top: 4px; }
/* 手机 / 平板：按屏宽自适应缩小，仍保持正方形 */
@media (max-width: 600px) {
  .wf-steps-view .wf-step-vimg {
    width: 100%; max-width: 300px; height: auto; aspect-ratio: 1 / 1; max-height: 300px;
  }
}
/* 产品封面沿用外链图片样式 */
.wf-imglink {
  display: inline-block; line-height: 0; max-width: 100%;
  margin-top: 6px; vertical-align: top;
}

/* 列表标题行（点击标题在当前窗口打开详情） */
.wf-row { cursor: pointer; }
.wf-row:hover { box-shadow: 0 2px 10px rgba(15, 23, 42, .08); border-color: #c9d4e5; }
.wf-row-title:hover { color: var(--primary); }
.wf-title-link {
  color: inherit; text-decoration: none; font-weight: inherit;
  border-bottom: 1px dashed transparent;
}
.wf-title-link:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* 详情页步骤网址按钮 */
.wf-step-vurl { margin-top: 6px; }
.wf-step-vlink {
  display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; text-decoration: none;
}
/* 流程详情独立页 */
.wf-detail-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.wf-detail-head h1 { margin-right: auto; }
.wf-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wf-detail-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted, #64748b); margin-bottom: 12px;
}
.wf-detail-steps { font-size: 14px; }
.wf-detail-steps .wf-step-vimg { max-width: 100%; }
@media print {
  .topbar, .wf-detail-actions, .foot, .wf-step-imghint { display: none !important; }
  .wf-steps-view li { background: #fff !important; }
}
.set-hr { border: none; border-top: 1px solid var(--border); margin: 4px 0 12px; }
/* 顶部导航命名项 + 显示开关：勾选框整行可点、点击区够大，兼容电脑/手机触屏 */
.nav-name-field { margin-bottom: 12px; }
.nav-name-label { display: block; font-size: 13.5px; color: #374151; margin-bottom: 5px; }
.nav-show-chk {
  display: flex; align-items: center; gap: 7px;
  min-height: 30px; margin-top: 7px; font-size: 12.5px;
  color: var(--muted, #64748b); cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-show-chk input[type="checkbox"] {
  width: 17px; height: 17px; margin: 0; padding: 0; flex: 0 0 auto;
  accent-color: var(--primary); cursor: pointer;
}
.wf-detail-body { max-height: 60vh; overflow-y: auto; padding: 2px 2px 6px; }
.wf-item .wf-content {
  margin-top: 6px; white-space: normal; word-break: break-word;
  color: var(--text); background: #f8fafc;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; font-size: 13.5px; line-height: 1.7;
  max-height: 260px; overflow-y: auto;
}
.wf-tabs .tab { white-space: nowrap; }
.wf-cat > .muted.small { margin: 2px 0 12px; }

/* 前台展示的已审核流程卡片 */
.wf-public-wrap { margin-top: 8px; }
.wf-cat-card .wf-cards {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.wf-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 14px 15px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 0;
}
.wf-card-title { font-size: 15px; margin: 0 0 8px; line-height: 1.4; }
.wf-card-body {
  font-size: 13.5px; color: var(--text); line-height: 1.75;
  white-space: normal; word-break: break-word;
  max-height: 220px; overflow-y: auto; padding-right: 4px;
}
.wf-card-meta { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* ---------- 产品展示 ---------- */
.pd-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.pd-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.pd-card:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, .10); border-color: #c9d4e5;
  transform: translateY(-2px);
}
.pd-card-media {
  position: relative; width: 100%; padding-top: 75%; /* 4:3 占位，防止图片加载抖动 */
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0); overflow: hidden;
}
/* 产品卡片左上角角标：金色底 + 红字，数值 = 该产品所有配置中的最高值 */
.pd-card-badge {
  position: absolute; top: 0; left: 0; z-index: 3;
  padding: 3px 10px 4px; font-size: 13px; font-weight: 800; line-height: 1.25;
  color: #d00000; background: linear-gradient(135deg, #ffe9a3, #f5c33b);
  border-right: 1px solid rgba(160, 105, 0, .35);
  border-bottom: 1px solid rgba(160, 105, 0, .35);
  border-radius: 0 0 9px 0;
  box-shadow: 1px 1px 5px rgba(120, 80, 0, .2);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  pointer-events: none;
}
.pd-card-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block; background: #fff;
}
.pd-card-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: #94a3b8;
}
.pd-card-title {
  padding: 8px 10px 2px; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.7em; word-break: break-word;
}
.pd-card-meta { padding: 0 10px 10px; font-size: 12px; color: var(--muted); }
.pd-loading { text-align: center; padding: 14px; }
.pd-sentinel { height: 1px; }
/* 「加载更多」按钮（懒加载兜底：部分内置浏览器滚动监听不触发时手动点） */
.load-more { text-align: center; margin: 16px 0 6px; }
.load-more .btn { min-width: 220px; }
.load-more .btn[disabled] { opacity: .65; cursor: default; }

/* 多选比对模式 */
.pd-card-check {
  display: none; position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); border: 2px solid #cbd5e1;
  align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.pd-grid.selmode .pd-card { position: relative; cursor: pointer; }
.pd-grid.selmode .pd-card-check { display: flex; }
/* 多选比对时左上角让位给勾选圈，避免两个角标重叠 */
.pd-grid.selmode .pd-card-badge { display: none; }
.pd-card.picked .pd-card-check { background: #2563eb; border-color: #2563eb; }
.pd-card.picked .pd-card-check::after { content: '✓'; }
.pd-card.picked { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .25); }
.pd-cmpbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 18px; z-index: 90;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 24px);
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .18);
  padding: 10px 16px;
}
.pd-cmpbar-info { font-size: 13.5px; color: #334155; font-weight: 600; }
.pdc-sku-sel {
  width: calc(100% - 12px); margin: 4px 6px 0; font-size: 12px;
  border: 1px solid var(--border); border-radius: 8px; padding: 3px 4px; background: #f8fafc;
}
.pd-col-sub { font-size: 12px; color: var(--muted); margin-top: 4px; padding: 0 6px; }

/* 产品详情 */
.pd-detail-cover { margin: 6px 0 14px; }
.pd-cover-img {
  max-width: 160px; max-height: 130px; width: auto;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: zoom-in;
}
/* 产品详情：关联产品区块（一行一行排列，不够自动换行；PC / 手机均正常） */
.pd-relate-block { margin: 4px 0 16px; display: flex; flex-direction: column; gap: 12px; }
.pd-relate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pd-relate-label { font-size: 13px; font-weight: 700; color: #475569; flex: 0 0 100%; }
.pd-relate-items { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 auto; }
.pd-relate-item {
  display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 6px 12px 6px 6px; min-width: 150px; max-width: 240px;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.pd-relate-item:hover { box-shadow: 0 3px 12px rgba(15, 23, 42, .10); border-color: #c9d4e5; transform: translateY(-1px); }
.pd-relate-item img, .pd-relate-ph {
  width: 42px; height: 42px; border-radius: 8px; object-fit: contain;
  background: #f1f5f9; flex: 0 0 auto;
}
.pd-relate-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #94a3b8;
}
.pd-relate-name {
  font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}

/* 后台关联产品管理弹窗 */
.pd-relate-edit { display: flex; flex-direction: column; gap: 10px; padding: 2px 0 4px; }
.pd-relate-edit > .muted.small { margin: 4px 0 0; }
.pd-relate-card { position: relative; }
.pd-relate-rm {
  position: absolute; top: -7px; right: -7px; z-index: 2;
  width: 20px; height: 20px; border-radius: 50%; border: none;
  background: #ef4444; color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pd-relate-rm:hover { background: #dc2626; }
.pd-relate-add { position: relative; margin-top: 6px; }
.pd-relate-results {
  position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin-top: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14); max-height: 240px; overflow: auto;
}
.pd-relate-additem {
  padding: 8px 12px; cursor: pointer; font-size: 13.5px;
  border-bottom: 1px solid #f1f5f9;
}
.pd-relate-additem:last-child { border-bottom: none; }
.pd-relate-additem:hover { background: #f6f8fc; }

@media (max-width: 640px) {
  .pd-relate-item { min-width: 0; max-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); }
  .pd-relate-items { gap: 8px; }
}

/* 产品详情：多配置横向对比表（行=参数，列=配置，左右滑动对比） */
.pd-cmp-bar { margin: 12px 0 10px; }
.pd-cmp-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pd-cmp-stat { font-size: 13.5px; }
.pd-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.pd-legend .sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border); display: inline-block; }
.sw-diff { background: #fff6e3; border-color: #f0c274; }
.sw-base { background: #e7f0ff; border-color: #9dc0f5; }
.pd-cmp-tools { margin-top: 8px; }
.pd-check, .pd-sel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.pd-sel select {
  padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: 13px; max-width: 240px;
}
.pd-cmp-tip { margin: 6px 0 0; line-height: 1.5; }

.pd-cmp-wrap {
  overflow: auto; max-height: calc(100vh - 200px); min-height: 260px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  -webkit-overflow-scrolling: touch;
}
.pd-cmp { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.pd-cmp th, .pd-cmp td {
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  padding: 8px 10px; background: #fff; vertical-align: top; text-align: left;
  white-space: pre-wrap; word-break: break-word; font-weight: 400;
}
.pd-cmp thead th { position: -webkit-sticky; position: sticky; top: 0; z-index: 3; background: #f6f8fc; }
.pd-cmp .pd-cmp-key,
.pd-cmp tbody th.pd-cmp-kname {
  position: -webkit-sticky; position: sticky; left: 0; z-index: 2; background: #f8fafc;
  width: 132px; min-width: 112px; font-weight: 600; color: var(--muted);
}
.pd-cmp thead .pd-cmp-key { z-index: 4; }
.pd-cmp td, .pd-cmp .pd-cmp-col { width: 190px; min-width: 160px; }
.pd-cmp .pd-cmp-col { padding: 8px; }
.pd-cmp .pd-cmp-col.is-base { background: #eef4ff; }
.pd-col-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.pd-col-base {
  font-size: 11px; color: var(--muted); cursor: pointer;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap;
}
.pd-col-base.on { color: #1d4ed8; background: #e7f0ff; border-color: #9dc0f5; font-weight: 600; }
.pd-col-hide {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 4px;
}
.pd-col-hide:hover { color: #d33; }
/* 配置列头：管理员直接编辑该配置的角标数值（失焦自动保存） */
.pd-col-badge {
  flex: 0 1 64px; min-width: 0; height: 22px; padding: 1px 4px;
  font-size: 11.5px; text-align: center; font-weight: 700; color: #b91c1c;
  background: #fffbeb; border: 1px solid #e6bd55; border-radius: 5px; outline: none;
}
.pd-col-badge:focus { border-color: #d19a16; box-shadow: 0 0 0 2px rgba(245, 195, 59, .35); }
.pd-col-badge::placeholder { color: #b9a374; font-weight: 400; }
/* 配置列头：普通用户只读查看该配置的数值（金色底红字，与产品卡片角标一致；刷新/重绘不消失） */
.pd-col-badge-view {
  flex: 0 1 auto; max-width: 68px; box-sizing: border-box;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  height: 22px; line-height: 20px; padding: 0 7px;
  font-size: 11.5px; font-weight: 800; color: #d00000;
  background: linear-gradient(135deg, #ffe9a3, #f5c33b);
  border: 1px solid rgba(160, 105, 0, .35); border-radius: 5px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  cursor: default;
}
.pd-col-img {
  width: 100%; height: 96px; object-fit: contain; display: block;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
}
.pd-col-img.pd-col-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #94a3b8;
}
.pd-col-title { margin-top: 6px; font-size: 12.5px; font-weight: 600; line-height: 1.35; cursor: pointer; }
.pd-admin-line {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); align-items: center;
}
.pd-col-ops { display: flex; gap: 6px; margin-top: 6px; }
.pd-col-edit, .pd-col-del {
  font-size: 11px; padding: 2px 8px; cursor: pointer; border-radius: 8px; background: #fff;
}
.pd-col-edit { border: 1px solid var(--border); color: var(--primary); }
.pd-col-del { border: 1px solid #f0caca; color: #c0392b; }

/* 管理员编辑弹窗 */
.pd-modal { width: min(720px, 94vw); max-height: 88vh; overflow-y: auto; }
.pd-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pd-upload-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.pd-img-prev {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); background: #f8fafc;
}
.pd-attr-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--muted); margin: 6px 0 8px;
}
.pd-sec-title { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.pd-sec-actions { margin: 8px 0 4px; }
.pd-attr-vals { max-height: 34vh; overflow-y: auto; padding-right: 4px; margin-bottom: 8px; }
.pd-attr-vrow {
  display: grid; grid-template-columns: 220px 1fr; gap: 8px; align-items: center; margin-bottom: 6px;
}
.pd-attr-vname { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-attr-vrow input {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; font-size: 13px;
}
.pd-attr-manage { max-height: 40vh; overflow-y: auto; padding-right: 4px; }
.pd-attr-mrow {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 6px;
}
.pd-attr-mrow input {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; font-size: 13px;
}
.pd-attr-list { max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.pd-attr-row {
  display: grid; grid-template-columns: 150px 1fr 32px; gap: 8px; align-items: start;
  margin-bottom: 8px;
}
.pd-attr-row input, .pd-attr-row textarea {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; font-size: 13px; resize: vertical;
}
.pd-attr-row input:focus, .pd-attr-row textarea:focus { border-color: var(--primary); outline: none; }
.pd-attr-del {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 8px; cursor: pointer; height: 32px; line-height: 1;
}
.pd-attr-del:hover { color: #d33; border-color: #f0caca; }
/* 复制新增配置：源配置选择列表 */
.pd-copy-list { max-height: 50vh; overflow-y: auto; padding-right: 4px; margin: 6px 0; }
.pd-copy-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
  margin-bottom: 8px; cursor: pointer; font-size: 14px;
  transition: border-color .15s, background .15s;
}
.pd-copy-item:hover { border-color: #c9d4e5; background: #f8fafc; }
.pd-copy-item:last-child { margin-bottom: 0; }
.pd-copy-item input { accent-color: var(--primary); margin: 0; flex: none; width: 16px; height: 16px; }
.pd-copy-item.checked { border-color: var(--primary); background: #eff4ff; }
.pd-copy-name { word-break: break-all; }
@media (max-width: 640px) {
  .pd-form-grid { grid-template-columns: 1fr; }
  .pd-attr-row { grid-template-columns: 1fr 32px; }
  .pd-attr-row textarea { grid-column: 1 / 2; }
  .pd-attr-vrow, .pd-attr-mrow { grid-template-columns: 1fr; }
  .pd-attr-mrow { grid-template-columns: 1fr auto auto; }
  .pd-modal { max-height: 92vh; }
}
.pd-col-dcnt {
  margin-top: 4px; font-size: 11px; color: var(--muted);
  background: #f1f5f9; border-radius: 6px; padding: 2px 6px; display: inline-block;
}
.pd-col-dcnt.has { color: #92400e; background: #fdf0d5; font-weight: 600; }
.pd-col-del {
  margin-top: 6px; font-size: 11px; padding: 2px 8px; cursor: pointer;
  border: 1px solid #f0caca; color: #c0392b; background: #fff; border-radius: 8px;
}
.pd-cmp td:empty::before { content: '—'; color: #c3ccda; } /* 空参数占位，避免对比时看错列 */
.pd-cmp td.v-diff { background: #fff6e3; font-weight: 600; }
.pd-cmp tr.d-diff th.pd-cmp-kname { box-shadow: inset 3px 0 0 #f59e0b; }
.pd-cmp.only-diff tr.d-same { display: none; }
.pd-cmp tbody tr:hover td { background: #f9fbff; }
.pd-cmp tbody tr:hover td.v-diff { background: #ffefd2; }

@media print {
  .pd-cmp-wrap { max-height: none; overflow: visible; border: none; }
  .pd-cmp thead th, .pd-cmp .pd-cmp-key, .pd-cmp tbody th.pd-cmp-kname { position: static; }
  .pd-cmp-tools, .pd-cmp-tip { display: none; }
}
.pd-thumb {
  width: 40px; height: 40px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); display: block; background: #f8fafc;
}
.pd-thumb-txt {
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #94a3b8; font-size: 15px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1400px) { .pd-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .pd-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .pd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .pd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pd-card-title { font-size: 12.5px; padding: 6px 8px 2px; }
  .pd-card-meta { padding: 0 8px 8px; font-size: 11.5px; }
  .container { padding: 14px 12px 30px; }
  /* 对比表：手机上参数列更窄、配置列更紧凑，靠左右滑动查看 */
  .pd-cmp-wrap { max-height: 68vh; }
  .pd-cmp { font-size: 12px; }
  .pd-cmp th, .pd-cmp td { padding: 7px 8px; }
  .pd-cmp .pd-cmp-key, .pd-cmp tbody th.pd-cmp-kname { width: 96px; min-width: 84px; }
  .pd-cmp td, .pd-cmp .pd-cmp-col { width: 152px; min-width: 140px; }
  .pd-col-badge { flex-basis: 48px; font-size: 11px; padding: 1px 2px; }
  .pd-col-badge-view { max-width: 54px; font-size: 11px; padding: 0 5px; }
  .pd-card-badge { font-size: 12px; padding: 2px 8px 3px; }
  .pd-col-img, .pd-col-img.pd-col-ph { height: 74px; }
  .pd-cmp-tools { gap: 8px 10px; }
  .pd-sel select { max-width: 150px; }
  .topbar-inner { padding: 8px 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .links.mode-3 { grid-template-columns: 1fr; }
  .item { padding: 10px 11px; }
  .page-head h1 { font-size: 19px; }
}

/* 备忘录详情弹窗（小方框只显示两行，点开看完整内容） */
.memo-detail-body {
  white-space: pre-wrap; word-break: break-word; line-height: 1.75;
  font-size: 14.5px; background: #f8fafc; border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; max-height: 50vh; overflow-y: auto;
}

/* 发票信息（前台独立页 + 后台「发票管理」共用） */
.inv-list, .inv-shops { display: grid; gap: 14px; }
.inv-shop-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px;
}
.inv-shop-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.inv-shop-head h3 { margin: 0; font-size: 15.5px; }
.inv-shop-head .ops { margin-left: auto; }
.inv-note { font-size: 13px; font-weight: 600; }
.inv-tbl { min-width: 760px; }
.inv-tbl td { vertical-align: top; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quota-empty { color: #dc2626; }
.inv-tag {
  display: inline-block; font-size: 12px; padding: 1.5px 8px; border-radius: 6px;
  font-weight: 600; white-space: nowrap; border: 1px solid;
}
.inv-tag.tag-free   { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.inv-tag.tag-add    { background: #fff7ed; color: #ea580c; border-color: #fed7aa; }
.inv-tag.tag-plain  { background: #f4f4f5; color: #71717a; border-color: #e4e4e7; }
.inv-tag.tag-online { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.inv-tag.tag-offline{ background: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; }
.inv-tag.tag-contract{ background: #fdf2f8; color: #db2777; border-color: #fbcfe8; }
.inv-tag.tag-platform{ background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.inv-tag.tag-scan   { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.inv-tag.tag-bank   { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tag-platform-text { color: #0369a1; }
.tag-scan-text     { color: #0e7490; }
.tag-bank-text     { color: #b45309; }

/* 发票备注：文字 + 小方块缩略图（点击弹大图） */
.inv-remark { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inv-remark-txt { white-space: pre-wrap; word-break: break-word; }
.inv-thumb {
  width: 38px; height: 38px; flex: none; object-fit: cover; cursor: zoom-in;
  border: 1px solid #d6dce5; border-radius: 6px; background: #e0f2fe;
}
.inv-thumb:hover { border-color: #2f6fed; box-shadow: 0 0 0 2px rgba(47,111,237,.18); }

/* 大图弹层：整幅图居中 + 图片右上角关闭按钮；点图片外的空白 / Esc 也可关闭 */
.inv-lightbox {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; padding: 28px;
  background: rgba(15,23,42,.82);
}
.inv-lightbox.on { display: flex; }
.inv-lightbox-stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  max-width: 92vw; max-height: 86vh;
}
.inv-lightbox-img {
  display: block; max-width: 92vw; max-height: 86vh; object-fit: contain;
  border-radius: 10px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.inv-lightbox-close {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 36px; height: 36px; padding: 0;
  border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.94); color: #1f2937; font-size: 18px; line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
@media (max-width: 600px) {
  .inv-lightbox { padding: 12px; }
  .inv-lightbox-img { max-width: 96vw; max-height: 80vh; }
}
.inv-lightbox-close:hover { background: #fff; color: #dc2626; }

/* 发待办：主要负责人自定义下拉 + 处理中待办数蓝色徽标 */
.todo-badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px;
  margin-left: 6px; border-radius: 9px; background: #2f6fed; color: #fff;
  font-size: 12px; font-weight: 700; text-align: center; vertical-align: middle;
}
.sel-custom { position: relative; }
.sel-btn {
  width: 100%; text-align: left; padding: 9px 12px; border: 1px solid var(--border, #d6dce5);
  border-radius: 8px; background: #fff; color: var(--text, #1f2937); font-size: 14px; cursor: pointer;
}
.sel-btn:not(.filled) { color: #94a3b8; }
.sel-btn.filled { color: var(--text, #1f2937); font-weight: 600; }
.sel-pop {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--border, #d6dce5); border-radius: 8px;
  max-height: 240px; overflow-y: auto; box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}
.sel-item { padding: 8px 12px; cursor: pointer; font-size: 14px; display: flex; align-items: center; }
.sel-item:hover { background: #f0f4ff; }
.sel-item.active { background: #e3ebff; font-weight: 600; }
.sel-item[data-id="0"] { color: #94a3b8; }


/* 个人导航：条目 hover 显示编辑/删除小按钮 */
.mylink-item { position: relative; }
.mylink-ops { position: absolute; top: 5px; right: 5px; display: none; gap: 4px; z-index: 2; }
.mylink-item:hover .mylink-ops { display: flex; }
.mylink-ops button {
  width: 22px; height: 22px; padding: 0; line-height: 1;
  border: 1px solid #e4e4e7; border-radius: 6px; background: #fff;
  font-size: 12px; cursor: pointer; color: #52525b;
}
.mylink-ops button:hover { background: #f4f4f5; color: #18181b; }
.mylink-ops button:last-child:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

/* 发票页「复制」列：一键复制公司开票资料 */
.inv-tbl td.inv-copy, .inv-tbl th.inv-copy { text-align: center; white-space: nowrap; width: 1%; }
.inv-copy-btn { white-space: nowrap; }

/* ---------------- 问答模块 ---------------- */
/* 前台：方框网格（默认一行 4 个，卡片比旧版更窄；底部元信息行已去掉） */
.qa-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  margin-top: 10px;
}
.qa-card {
  position: relative;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 11px;
  cursor: pointer; background: #fff; transition: border .15s, box-shadow .15s, transform .15s;
  display: flex; flex-direction: column; min-height: 108px;
}
.qa-card:hover {
  border-color: var(--primary); transform: translateY(-2px);
  box-shadow: 0 2px 10px rgba(37, 99, 235, .14);
}
/* 问题标题：最多 2 行，超出省略号 */
.qa-card-q {
  font-weight: 600; font-size: 14.5px; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all; min-height: 42px; max-height: 42px;
}
/* 答案摘要：最多 5 行，超出省略号（旧内核无 line-clamp 时由 max-height 兜底截断） */
.qa-card-a {
  margin-top: 8px; font-size: 13px; line-height: 1.6; color: #475569;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word; max-height: 105px;
}
.qa-card-a-line + .qa-card-a-line { margin-top: 4px; }
.qa-card-a-more { margin-top: 4px; color: var(--primary); font-size: 12px; font-weight: 600; }
.qa-card-a-none { color: #94a3b8; font-size: 12.5px; }
/* 管理员「待审 N」改为卡片右上角小角标，不占主体宽度 */
.qa-card-pend {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  font-size: 10.5px; font-weight: 600; line-height: 17px; padding: 0 6px;
  border-radius: 999px; background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa;
}
.qa-card-has-pend .qa-card-q { padding-right: 54px; }
@media (max-width: 1280px) { .qa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .qa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .qa-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 10px; } }
.qa-badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px;
  border-radius: 999px; background: #eef2ff; color: #4f46e5; border: 1px solid #e0e7ff;
}
.qa-badge-pend { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.qa-detail-content {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin: 10px 0 4px; font-size: 14px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.qa-sub-title { margin: 14px 0 8px; font-size: 15px; }
.qa-answers { display: flex; flex-direction: column; gap: 10px; }
.qa-answer { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.qa-answer-pend { background: #fffbeb; border-color: #fde68a; }
.qa-answer-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.qa-answer-ops { margin-left: auto; display: inline-flex; gap: 6px; }
/* 每条答案正文前的「复制答案」按钮 */
.qa-answer-copybar { margin: 2px 0 5px; }
.qa-copy-ans { font-size: 12px; padding: 2px 9px; white-space: nowrap; }
.qa-answer-body { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.qa-answer-field { margin-top: 14px; }
/* 后台：待审核答案与答案管理 */
.qa-pend-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.qa-pend-item { border: 1px solid #fde68a; background: #fffbeb; border-radius: 8px; padding: 10px 12px; }
.qa-pend-q { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.qa-pend-ops { margin-top: 8px; display: flex; gap: 8px; }
.qa-mgr-answers { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.qa-mgr-ans { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.qa-mgr-ans-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------- 中央统一账号对接（后台设置）+ 降级登录提示 ---------------- */
.central-cfg {
  border: 1px solid var(--border); background: #f8fafc;
  border-radius: 10px; padding: 14px 16px; margin: 8px 0 4px;
}
.central-h { font-size: 15px; margin: 0 0 8px; color: #1e293b; }
.central-cfg .field { margin-top: 8px; }
.central-status {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px;
  background: #eef2ff; border: 1px solid #e0e7ff; color: #3730a3;
  font-size: 12.5px; line-height: 1.7; word-break: break-all;
}
.central-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.central-cfg input[readonly] {
  background: #f1f5f9; color: #475569;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px;
}
.btn-danger-ghost { color: #b91c1c; border-color: #fecaca; background: #fff; }
.btn-danger-ghost:hover { background: #fef2f2; }
.central-notice {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 10px 12px;
  border: 1px solid #fcd34d; background: #fffbeb; color: #92400e;
  border-radius: 8px; font-size: 13px;
}
.central-notice button {
  margin-left: auto; border: 0; background: transparent;
  color: #92400e; cursor: pointer; font-size: 15px;
}
.central-tip {
  margin: 12px 0 0; padding: 10px 12px;
  border: 1px solid #bfdbfe; background: #eff6ff; color: #1e3a8a;
  border-radius: 8px; font-size: 13px; line-height: 1.65;
}
.central-tip code { padding: 1px 4px; background: #dbeafe; border-radius: 4px; }
.central-check {
  margin: 10px 0 0; padding: 10px 12px;
  border: 1px solid #e2e8f0; background: #f8fafc;
  border-radius: 8px; font-size: 13px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-all;
}
.central-check[hidden] { display: none; }
.central-check .ok { color: #15803d; }
.central-check .warn { color: #b45309; }
.central-check .bad { color: #b91c1c; }
@media (max-width: 640px) {
  .central-cfg { padding: 12px; }
  .central-actions .btn { flex: 1 1 auto; }
}

/* ============================================================
   通知公告（蓝色角标 / 顶栏滚动播报 / 工作台方块 / 瀑布流详情）
   ============================================================ */
/* 蓝色角标：与待办的红色角标区分 */
.badge.badge-blue { background: #3b82f6; color: #fff; }
.nav-notice-badge {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  padding: 0 4px; border-radius: 999px; background: #2563eb; color: #fff;
  font-size: 11px; font-weight: 700; text-align: center;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .14);
}
.nav-notice-badge[hidden] { display: none; }

/* 工作台标题右侧：24 小时内最新通知滚动播报 */
.notice-ticker {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: min(520px, 46vw); height: 30px;
  padding: 0 12px 0 4px; margin-left: 6px;
  border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 999px;
  overflow: hidden; font-size: 13px; vertical-align: middle;
}
.notice-ticker[hidden] { display: none; }
.notice-ticker-tag {
  flex: none; padding: 3px 8px; border-radius: 999px;
  background: #2563eb; color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.notice-ticker-text {
  display: inline-block; min-width: 0; color: #1e3a8a; text-decoration: none;
  white-space: nowrap; overflow: hidden;
}
.notice-ticker-text:hover { color: #1d4ed8; text-decoration: underline; }
.notice-ticker.scrolling .notice-ticker-text {
  animation: nt-marquee 18s linear infinite;
  padding-left: 100%;
}
@keyframes nt-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* 工作台「通知」tab：一行方块（复用 todo-grid） */
#noticeGridWb .nt-box { cursor: pointer; }
.nt-box {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0; padding: 8px; border: 1px solid var(--border);
  border-radius: 10px; background: #fff; transition: all .15s; cursor: pointer;
  text-align: left;
}
.nt-box:hover { border-color: #3b82f6; box-shadow: var(--shadow); transform: translateY(-2px); }
.nt-box-thumb {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 7px; object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff); display: block;
}
.nt-box-letter {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #60a5fa, #818cf8); color: #fff;
  font-size: 24px; font-weight: 700;
}
.nt-box-title {
  font-size: 12.5px; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.nt-box-meta { font-size: 11px; color: var(--muted); }
.nt-box-status {
  font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; align-self: flex-start;
}
.nt-st-0 { background: #fef3c7; color: #b45309; }
.nt-st-1 { background: #dcfce7; color: #15803d; }
.nt-st-2 { background: #fee2e2; color: #b91c1c; }

/* 通知独立页：工具栏 / 瀑布流 / 加载 */
.notice-toolbar { display: flex; gap: 8px; align-items: center; padding: 10px 0 4px; }
.notice-panel { padding-top: 4px !important; }
.notice-tabs .tab { white-space: nowrap; }
.notice-grid { column-count: 4; column-gap: 12px; }
.notice-grid .nt-box { display: inline-block; width: 100%; margin: 0 0 12px; break-inside: avoid; }
@media (max-width: 1400px) { .notice-grid { column-count: 3; } }
@media (max-width: 980px)  { .notice-grid { column-count: 2; } }
@media (max-width: 620px)  { .notice-grid { column-count: 1; } }
.nt-loading, .nt-sentinel { text-align: center; padding: 10px 0; font-size: 13px; }

/* 通知详情弹窗内容 */
.nt-detail-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-size: 12.5px; color: var(--muted); margin: 2px 0 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.nt-detail-cover { margin: 0 0 12px; }
.nt-detail-cover img { max-width: 100%; max-height: 320px; border-radius: 10px; display: block; }
.nt-detail-body {
  font-size: 14px; line-height: 1.85; color: var(--text);
  white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto;
}
.nt-detail-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.nt-detail-actions[hidden] { display: none; }
.nt-cover-preview { margin-top: 8px; }
.nt-cover-preview img { max-width: 200px; max-height: 140px; border-radius: 8px; border: 1px solid var(--border); }

/* 后台通知管理子标签 */
.notice-adm-tabs { margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.notice-adm-tabs .tab { padding: 8px 12px; font-size: 13px; }
.nt-row-status { font-weight: 600; }

/* ============================================================
   发票信息页：搜索栏 / 显示更多按钮
   ============================================================ */
.inv-search-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.inv-search-input {
  flex: 1 1 360px; min-width: 220px; max-width: 560px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text); font-size: 14px;
}
.inv-search-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.inv-search-hint { flex: 1 1 100%; font-size: 12px; line-height: 1.5; }
.inv-more-cell { text-align: center; padding: 10px 0 4px !important; }
.inv-more-btn { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.inv-more-btn:hover { background: #dbeafe; border-color: #93c5fd; }

/* ---- 发票信息：手机端卡片式自适应 ----
   9 列宽表在小屏横向挤压难读，改为「一家公司一张卡片」，字段名用 data-label 显示 */
@media (max-width: 720px) {
  .inv-search-input { flex: 1 1 100%; min-width: 0; max-width: none; }
  .inv-search-bar .btn { flex: 0 0 auto; }
  .inv-search-hint { display: none; }

  .inv-shop-card { padding: 12px 12px 14px; }
  .inv-shop-head { gap: 6px 8px; margin-bottom: 10px; }
  .inv-shop-head h3 { flex: 1 1 100%; font-size: 15px; line-height: 1.5; word-break: break-word; }
  .inv-shop-head .inv-note { flex: 1 1 100%; font-size: 12.5px; font-weight: 500; line-height: 1.55; word-break: break-word; }
  .inv-shop-head .muted.small { font-size: 12px; }
  .inv-shop-head .ops { margin-left: 0; flex: 1 1 100%; }

  .inv-tbl { min-width: 0 !important; width: 100%; display: block; }
  .inv-tbl thead { display: none; }
  .inv-tbl tbody { display: block; }

  /* 每条开票公司记录 → 一张独立卡片 */
  .inv-tbl tr {
    display: block; position: relative;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    padding: 8px 12px 10px; margin: 0 0 12px;
  }
  .inv-tbl tr:last-child { margin-bottom: 0; }
  .inv-tbl td {
    display: block; width: auto !important; white-space: normal !important;
    border-bottom: none; padding: 6px 0; text-align: left !important;
    font-size: 13.5px; line-height: 1.6; word-break: break-word;
  }
  .inv-tbl td::before {
    content: attr(data-label);
    display: block; margin-bottom: 1px;
    color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
  }
  /* 复制 / 操作按钮不显示字段标签，占满一行 */
  /* 注意覆盖桌面端 .inv-tbl td.inv-copy 的 width:1%，否则块级布局下会被挤成 1% 宽 */
  .inv-tbl td.inv-copy { width: 100% !important; white-space: normal !important; border-bottom: 1px dashed var(--border); padding-bottom: 8px; margin-bottom: 2px; }
  .inv-tbl td.inv-copy::before, .inv-tbl td.ops::before { display: none; }
  .inv-tbl td.ops { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 4px; }
  .inv-tbl td.num { text-align: left !important; }

  /* 数字/等宽字段在卡片内允许换行（税号、账号过长时） */
  .inv-tbl td.mono { word-break: break-all; }

  /* 「显示更多 / 收起」跨列行 → 卡片式下居中一整块 */
  .inv-tbl tr.inv-more-row {
    background: transparent; border: none; padding: 2px 0; margin-bottom: 12px;
  }
  .inv-tbl td.inv-more-cell { text-align: center !important; padding: 4px 0 !important; }
  .inv-tbl td.inv-more-cell::before { display: none; }

  /* 后台「暂无开票公司」空行：卡片式下保持居中提示，不成空壳卡片 */
  .inv-tbl tr.inv-empty-row { background: transparent; border: none; padding: 8px 0; }
  .inv-tbl tr.inv-empty-row td { padding: 8px 0 !important; text-align: center !important; }
}

/* 通知详情：已读用户名单（仅管理员 / 发布者可见） */
.nt-readers {
  font-size: 12.5px; line-height: 1.7; color: #1e40af;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
  padding: 7px 11px; margin: 2px 0 14px; word-break: break-word;
}
.nt-readers[hidden] { display: none; }
.nt-readers-time { color: #64748b; }

/* ==================== 排班功能 ==================== */
.sched-tabs { flex-wrap: wrap; }
.sched-list { display: grid; gap: 10px; }
.sc-list-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.sc-li-main { flex: 1; min-width: 0; }
.sc-li-title { font-size: 15px; font-weight: 600; color: #0f172a; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-li-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.sc-li-note { font-size: 12px; color: #b45309; margin-top: 4px; }
.sc-li-ops { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sc-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; line-height: 1.6; }
.sc-tag-live { background: #dcfce7; color: #166534; }
.sc-tag-wait { background: #fef3c7; color: #92400e; }
.sc-tag-old { background: #f1f5f9; color: #64748b; }
.sc-tag-back { background: #fee2e2; color: #b91c1c; }
.sc-tag-draft { background: #e0e7ff; color: #3730a3; }

/* 月历网格（详情 + 编辑共用） */
.sched-detail-box { max-width: 96vw; width: 1200px; }
.sched-edit-box { max-width: 96vw; width: 1280px; }
.sched-detail-meta { margin: 4px 0 10px; }
.sched-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sched-grid-wrap, .sched-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 8px; }
.sched-month-tbl { border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.sched-month-tbl th, .sched-month-tbl td { border: 1px solid #e2e8f0; padding: 2px 3px; text-align: center; vertical-align: top; }
.sched-month-tbl thead th { background: #f1f5f9; position: sticky; top: 0; z-index: 2; }
.sched-month-tbl .sc-fest th, .sched-month-tbl .sc-fest td { height: 26px; font-size: calc(var(--sc-fs) - 1px); color: #b45309; background: #fffbeb; }
.sched-month-tbl .sc-date th, .sched-month-tbl .sc-date td { height: 40px; background: #f8fafc; }
.sched-month-tbl .sc-date td b { display: block; font-size: var(--sc-fs); color: #0f172a; }
.sched-month-tbl .sc-date td span { display: block; font-size: calc(var(--sc-fs) - 2px); color: #94a3b8; }
.sched-month-tbl th.sc-pos { min-width: 82px; max-width: 110px; background: #f8fafc; font-weight: 600; color: #334155; position: sticky; left: 0; z-index: 1; }
.sched-month-tbl td { min-width: 54px; height: 46px; word-break: break-all; }
.sc-name { display: block; font-size: 11px; line-height: 1.35; padding: 2px 3px; margin: 1px 0; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.sc-name i { font-style: normal; opacity: .8; font-size: 10px; margin-left: 3px; }
.sc-name-x { position: absolute; right: 1px; top: 0; cursor: pointer; font-weight: 700; opacity: .6; }
.sc-mark { display: block; font-size: 10px; margin-top: 2px; padding: 1px 3px; border-radius: 3px; }
.sc-mark-leave { background: #fee2e2; color: #b91c1c; }
.sc-mark-swap { background: #ede9fe; color: #6d28d9; }

/* 编辑器 */
.sched-editor { display: grid; grid-template-columns: 170px 1fr; gap: 12px; margin-top: 12px; }
.sched-pool { border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: #f8fafc; }
.sched-pool-title { font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.sched-pool-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.sc-pool-person { display: flex; align-items: center; gap: 7px; padding: 6px 8px; background: #fff; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; cursor: grab; user-select: none; }
.sc-pool-person:active { cursor: grabbing; }
.sc-pool-person.selected { border-color: var(--primary); background: #eff6ff; box-shadow: 0 0 0 2px rgba(59,130,246,.15); }
.sc-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.sc-pool-tag { margin-left: auto; font-size: 10px; color: #64748b; }
.sched-row-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sc-pos-sel { width: 100%; max-width: 96px; font-size: 11px; padding: 2px; border: 1px solid var(--border); border-radius: 4px; }
.sc-row-del { display: block; margin: 2px auto 0; border: none; background: none; color: #ef4444; cursor: pointer; font-size: 11px; }
.sc-cell.sc-cell-over { background: #dbeafe; outline: 2px dashed var(--primary); outline-offset: -2px; }
.sched-violations { margin-top: 12px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 14px; color: #991b1b; font-size: 13px; }
.sched-violations[hidden] { display: none; }
.sched-violations ul { margin: 6px 0; padding-left: 20px; }
.sched-shift-options { display: flex; flex-direction: column; gap: 8px; }
.sc-shift-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; text-align: left; }
.sc-shift-opt:hover { border-color: var(--primary); }
.sc-shift-swatch { display: inline-block; padding: 3px 10px; border-radius: 6px; font-weight: 600; font-size: 12.5px; }

/* 出勤统计 */
.sched-stats { margin-top: 18px; }
.sched-stats h4 { margin: 0 0 8px; font-size: 14px; color: #0f172a; }

/* 后台排班设置 */
.sched-adm-tabs { flex-wrap: wrap; margin-bottom: 14px; }
.stab-panel { padding-top: 4px; }
.stab-panel[hidden] { display: none; }
.rule-cond[hidden] { display: none; }
.spr-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 70px 40px; gap: 6px; margin-bottom: 6px; align-items: center; }
.spr-row input, .spr-row select { width: 100%; padding: 5px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }
.tbl .sc-shift-swatch { font-size: 11px; padding: 2px 8px; }

/* 我的同事今日班次 */
.colleague-shifts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.colleague-shift { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 5px; font-weight: 500; }
.colleague-shift.colleague-rest { background: #f1f5f9; color: #94a3b8; }

@media (max-width: 720px) {
  .sched-editor { grid-template-columns: 1fr; }
  .sched-pool-list { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .sched-pool-person { flex: 0 0 auto; }
  .sc-list-item { flex-direction: column; align-items: stretch; }
  .sc-li-ops { justify-content: flex-start; }
  .spr-row { grid-template-columns: 1fr 1fr; }
}

/* ==================== 框选批量排班 / 一键复制导入 ==================== */
.sched-row-controls { flex-wrap: wrap; }
.sc-batch-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #475569; white-space: nowrap; cursor: pointer; }
.sc-batch-toggle input { margin: 0; }
.sc-cell-sel { background: #dbeafe !important; outline: 2px dashed #3b82f6; outline-offset: -2px; }
.sc-shift-opt.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59,130,246,.18); }
.sc-src-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; margin: 10px 0; }
.sc-src-item { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; text-align: left; font-size: 13px; }
.sc-src-item:hover { border-color: var(--primary); background: #f8fbff; }
.sc-src-item b { color: #0f172a; }
@media (max-width: 720px) {
  .sc-batch-toggle { font-size: 11.5px; }
  .sched-row-controls { gap: 6px; }
}

/* ==================== 行 = 职位 + 同事，格子只放班次 ==================== */
.sched-editor { display: block; }
.sched-month-tbl th.sc-pos { width: 92px; min-width: 92px; max-width: 92px; }
.sched-month-tbl th.sc-who {
  width: 108px; min-width: 108px; max-width: 108px;
  position: sticky; left: 92px; z-index: 3;
  background: #f8fafc; font-weight: 600; color: #334155;
}
.sched-month-tbl thead th.sc-pos, .sched-month-tbl thead th.sc-who { z-index: 5; }
.sc-who-sel {
  width: 100%; max-width: 104px; font-size: var(--sc-fs); padding: 2px;
  border: 1px solid var(--border); border-radius: 4px; background: #fff;
}
@media (max-width: 720px) {
  .sched-month-tbl th.sc-pos { width: 78px; min-width: 78px; max-width: 78px; }
  .sched-month-tbl th.sc-who { width: 92px; min-width: 92px; max-width: 92px; left: 78px; }
  .sc-who-sel { max-width: 88px; }
}

/* ========== 竖屏紧凑：班次竖排（最多 3 字）+ 列宽 / 字号后台可配 ==========
   --sc-day-w 等四个基准值由排班页从后台配置写入根节点；
   --sc-fs 在手机断点自动切到 --sc-fs-mobile，所有字号由它派生。 */
:root {
  --sc-day-w: 30px;
  --sc-day-w-mobile: 20px;
  --sc-fs-desktop: 11px;
  --sc-fs-mobile: 10px;
  --sc-fs: var(--sc-fs-desktop);
}
.sched-month-tbl { font-size: var(--sc-fs); }
.sched-month-tbl th, .sched-month-tbl td { padding: 1px; }
.sched-month-tbl tbody td { vertical-align: middle; }
.sched-month-tbl .sc-fest th, .sched-month-tbl .sc-fest td { height: 18px; font-size: calc(var(--sc-fs) - 1px); }
.sched-month-tbl .sc-date th, .sched-month-tbl .sc-date td { height: 32px; }
.sched-month-tbl .sc-date td b { font-size: var(--sc-fs); }
.sched-month-tbl .sc-date td span { font-size: calc(var(--sc-fs) - 2px); }
.sched-month-tbl .sc-fest td, .sched-month-tbl .sc-date td { width: var(--sc-day-w); min-width: var(--sc-day-w); max-width: var(--sc-day-w); }
.sched-month-tbl td { min-width: var(--sc-day-w); height: 44px; word-break: normal; }
.sched-month-tbl th.sc-pos { width: 70px; min-width: 70px; max-width: 70px; }
.sched-month-tbl th.sc-who { width: 86px; min-width: 86px; max-width: 86px; left: 70px; }
.sc-name-v {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  writing-mode: vertical-rl;
  text-orientation: upright;
  vertical-align: middle;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
  line-height: 1.15;
  letter-spacing: 0;
  padding: 3px 2px;
  margin: 0 1px;
  font-size: var(--sc-fs);
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .18);
}
.sc-rest-v { background: #f1f5f9 !important; color: #94a3b8 !important; box-shadow: none; }
.sc-mark-v {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  vertical-align: middle;
  font-size: calc(var(--sc-fs) - 2px);
  line-height: 1.2;
  padding: 3px 1px;
  margin: 0 1px;
  max-width: none;
  overflow: visible;
  border-radius: 4px;
}
@media (max-width: 720px) {
  :root { --sc-fs: var(--sc-fs-mobile); }
  .sched-month-tbl th.sc-pos { width: 50px; min-width: 50px; max-width: 50px; }
  .sched-month-tbl th.sc-who { width: 62px; min-width: 62px; max-width: 62px; left: 50px; }
  .sc-who-sel { max-width: 58px; font-size: var(--sc-fs); }
  .sched-month-tbl .sc-fest td, .sched-month-tbl .sc-date td { width: var(--sc-day-w-mobile); min-width: var(--sc-day-w-mobile); max-width: var(--sc-day-w-mobile); }
  .sched-month-tbl td { min-width: var(--sc-day-w-mobile); height: 40px; }
  .sc-name-v { padding: 2px 2px; }
}
