/* ============================================================
   StoreOS 门店管理系统 - 样式
   基于 WMS 深蓝风格升级：更精致、更柔和、品牌暖色点缀
   ============================================================ */
:root {
  --dark: #1a2942;          /* 左侧栏深蓝 */
  --dark-hover: #24385c;
  --blue: #1890ff;
  --blue-light: #e6f4ff;
  --brand: #e8590c;         /* 品牌暖橙红（呼应小熊魔锅辣味橙红） */
  --brand-light: #fff3e8;
  --green: #2f9e44;
  --green-light: #e9f7ec;
  --red: #e03131;
  --red-light: #fdeaea;
  --amber: #f08c00;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #2b3445;
  --text-2: #6b7a90;
  --text-3: #9aa7ba;
  --border: #e4e9f2;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(26,41,66,.06), 0 4px 14px rgba(26,41,66,.06);
  --shadow-hover: 0 4px 10px rgba(26,41,66,.12), 0 8px 24px rgba(26,41,66,.10);
  --line: #e8edf5;
  /* 看板指标色系（单一语义色系，避免彩虹杂色） */
  --m-revenue: #3b6df6;    --m-revenue-bg: #edf2ff;
  --m-customers: #17a06b;  --m-customers-bg: #e6f6ef;
  --m-tables: #e08a00;     --m-tables-bg: #fdf3e1;
  --m-groupbuy: #7a5af8;   --m-groupbuy-bg: #f0ecff;
  --m-member: #d9476a;     --m-member-bg: #fceef2;
  --m-hours: #0f9ba6;      --m-hours-bg: #e4f7f8;
  --m-att: #5b6b82;        --m-att-bg: #edf0f6;
  --shadow-card: 0 1px 2px rgba(26,41,66,.04), 0 10px 28px -14px rgba(26,41,66,.14);
  --shadow-card-hover: 0 2px 4px rgba(26,41,66,.05), 0 18px 38px -14px rgba(26,41,66,.20);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ==================== 登录页 ==================== */
.login-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a2942 0%, #24385c 55%, #2c4470 100%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
  padding: 40px 36px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo { display: flex; align-items: center; gap: 14px; justify-content: center; }
.logo-bear {
  width: 58px; height: 58px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: linear-gradient(135deg, var(--brand), #f59f00);
  box-shadow: 0 6px 16px rgba(232,89,12,.3);
}
.logo-text h1 { font-size: 22px; font-weight: 700; color: var(--dark); letter-spacing: 1px; }
.logo-text p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.login-sub { text-align: center; color: var(--text-3); font-size: 13px; margin: 10px 0 26px; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.form-item input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  outline: none; transition: border .2s, box-shadow .2s; background: #fafbfd;
}
.form-item input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,144,255,.12); background: #fff; }
.btn {
  border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 500;
  transition: all .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #d34e0a; box-shadow: 0 4px 12px rgba(232,89,12,.3); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #0e7fe0; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; border-radius: 8px; }
.login-error { color: var(--red); font-size: 13px; text-align: center; margin-top: 12px; min-height: 18px; }
.login-tip { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 20px; }

/* ==================== 主框架 ==================== */
.app-view { display: flex; height: 100vh; overflow: hidden; }
/* 左侧导航栏（WMS 同款：图标+文字，140px） */
.sidebar {
  width: 140px; background: var(--dark); display: flex; flex-direction: column;
  flex-shrink: 0; z-index: 100; box-shadow: 2px 0 8px rgba(0,0,0,.15);
}
.side-brand {
  height: 50px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}
.side-brand-logo { font-size: 22px; line-height: 1; }
.side-brand-text { font-size: 14px; font-weight: 600; color: #fff; }
.side-nav { flex: 1; display: flex; flex-direction: column; gap: 0; padding: 6px 0; overflow-y: auto; }
.side-nav::-webkit-scrollbar { width: 0; }
.side-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border: none; background: transparent; color: rgba(255,255,255,.92);
  font-size: 15px; font-weight: 500; transition: all .15s; position: relative; text-align: left;
  width: 100%; white-space: nowrap;
}
.side-btn:hover { background: var(--dark-hover); color: #fff; }
.side-btn.active { background: var(--brand); color: #fff; }
.side-btn.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #fff;
}
.side-icon { font-size: 19px; line-height: 1; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 22px; text-align: center; }
.side-label { font-size: 15px; letter-spacing: .3px; }
.side-arrow { margin-left: auto; font-size: 14px; opacity: .5; transition: transform .15s; }
.side-btn:hover .side-arrow, .side-btn.active .side-arrow { opacity: 1; transform: translateX(2px); }
.side-bottom { margin-top: auto; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); }

/* ===== 飞出子目录（WMS 同款） ===== */
.nav-flyout {
  position: fixed; top: 0; left: 140px; bottom: 0; z-index: 199;
  width: 220px; background: #fff; box-shadow: 3px 0 12px rgba(0,0,0,.12);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  animation: flyoutIn .15s ease-out;
}
@keyframes flyoutIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.nav-flyout-header {
  height: 50px; display: flex; align-items: center; padding: 0 18px;
  border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; color: var(--text);
  background: #fafbfd;
}
.nav-flyout-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-flyout-group-title {
  padding: 8px 18px 4px; font-size: 11.5px; color: var(--text-3); font-weight: 600;
  letter-spacing: .5px;
}
.nav-flyout-item {
  display: flex; align-items: center; padding: 10px 18px 10px 28px;
  color: var(--text-2); font-size: 14px; cursor: pointer; transition: all .15s;
  border-left: 3px solid transparent; gap: 8px;
}
.nav-flyout-item:hover { color: var(--blue); background: var(--blue-light); }
.nav-flyout-item.active {
  color: var(--blue); background: var(--blue-light); border-left-color: var(--blue);
  font-weight: 500;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; background: var(--card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  box-shadow: 0 1px 4px rgba(26,41,66,.03); flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-left h2 { font-size: 17px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.icon-btn { border: none; background: transparent; font-size: 18px; color: var(--text-2); }
.mobile-menu-btn { display: none; }
.msg-bell { position: relative; font-size: 18px; cursor: pointer; padding: 6px; }
.bell-dot {
  position: absolute; top: 2px; right: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 2px solid #fff;
}
.user-chip { display: flex; align-items: center; gap: 10px; position: relative; cursor: pointer; user-select: none; padding: 4px 8px; border-radius: 10px; transition: background .15s; }
.user-chip:hover { background: rgba(0,0,0,.04); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--dark); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
}
.user-avatar.sm { width: 34px; height: 34px; font-size: 13px; flex-shrink: 0; }
.user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-meta .user-role-tag { font-size: 11px; color: var(--brand); font-weight: 500; }
.user-caret { font-size: 10px; color: var(--text-3); transition: transform .15s; }
.user-chip.open .user-caret { transform: rotate(180deg); }

/* ===== 跨页面高亮员工行 ===== */
@keyframes rowHighlightPulse {
  0%, 100% { background-color: rgba(255, 193, 7, 0); }
  50%      { background-color: rgba(255, 193, 7, .28); }
}
.row-highlight {
  animation: rowHighlightPulse 1.2s ease-in-out 3;
  box-shadow: inset 3px 0 0 #ffc107, inset -3px 0 0 #ffc107;
}

/* ===== 考勤详情弹窗 - 跳转设置按钮 ===== */
.att-jump-fix {
  background: linear-gradient(135deg, #fff7e6, #fff1cc);
  border: 1px solid #ffa726; color: #d46b08; padding: 5px 12px;
  border-radius: 6px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.att-jump-fix:hover { background: linear-gradient(135deg, #ffe7b3, #ffd980); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(255, 167, 38, .35); }

/* ===== 右上角账号下拉菜单 ===== */
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 300;
  min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(30, 41, 59, .14); padding: 6px; overflow: hidden;
  animation: userMenuIn .14s ease;
}
@keyframes userMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.user-menu-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px;
  border-bottom: 1px solid #f1f3f7; margin-bottom: 4px;
}
.user-menu-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--text); cursor: pointer; transition: background .12s;
}
.user-menu-item:hover { background: #f4f6fa; }
.user-menu-item.danger { color: var(--red); }
.user-menu-item.danger:hover { background: var(--red-light); }
.user-menu-divider { height: 1px; background: #f1f3f7; margin: 4px 8px; }

/* ===== 个人中心 ===== */
.profile-box { display: flex; align-items: center; gap: 14px; padding: 8px 0 16px; border-bottom: 1px solid #f1f3f7; }
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #f2784b);
  color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.profile-meta { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.profile-rows { margin-top: 12px; }
.profile-row {
  display: flex; justify-content: space-between; align-items: center; padding: 7px 2px;
  border-bottom: 1px dashed #eef1f6; font-size: 13px;
}
.profile-row span { color: var(--text-3); }
.profile-row b { font-weight: 600; max-width: 62%; text-align: right; word-break: break-all; }

.content { flex: 1; overflow-y: auto; padding: 20px; }

/* 浏览器式页面页签（v240） */
.page-tabs { display: flex; gap: 6px; padding: 6px 10px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 0; z-index: 30; }
.page-tab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; color: var(--text-2); background: #f7f9fc; white-space: nowrap; cursor: pointer; }
.page-tab:hover { border-color: var(--brand); color: var(--brand); }
.page-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.page-tab-close { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 12px; color: inherit; opacity: .7; }
.page-tab-close:hover { background: rgba(0, 0, 0, .15); opacity: 1; }
.loading { text-align: center; color: var(--text-3); padding: 60px 0; }

/* ==================== 卡片 ==================== */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px;
  min-width: 0;   /* v444：卡片作为 flex/grid 子项时允许收缩，让内部表格自己横向滚动，不再把卡片撑破屏幕 */
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title .sub { font-size: 12px; color: var(--text-3); font-weight: 400; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
  position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; cursor: default;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-card .stat-label { font-size: 12px; color: var(--text-2); }
.stat-card .stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-card .stat-icon { position: absolute; right: 14px; top: 14px; font-size: 26px; opacity: .18; }
.stat-card .stat-foot { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.stat-card.green .stat-value { color: var(--green); }
.stat-card.brand .stat-value { color: var(--brand); }
.stat-card.blue .stat-value { color: var(--blue); }
.stat-card.red .stat-value { color: var(--red); }
.stat-card.amber .stat-value { color: var(--amber); }
.stat-card.gray .stat-value { color: var(--text-3); }

/* 营业报表：日期展开当日各门店明细（v211） */
.rep-day-btn { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--blue); cursor: pointer; }
.rep-day-btn:hover { text-decoration: underline; }
.rep-exp td { background: #fafbfc; padding: 4px 12px 14px; }
.rep-exp-wrap { border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; margin: 6px 0; background: #fff; }
.rep-exp-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.rep-total td { background: #f2f5f9; font-weight: 600; color: var(--text); border-top: 2px solid #d9e0ea; }
.rep-cat-head td { background: #f7f9fc; border-top: 2px solid #e3e8f0; padding: 9px 12px; }
.rep-cat-name { font-size: 13.5px; font-weight: 700; }
.rep-cat-meta { font-size: 12px; color: var(--text-3); margin-left: 10px; font-weight: 400; }
.rep-cat-meta b { color: var(--text-1); }
.rep-view-tabs { display: flex; gap: 6px; margin: 2px 0 12px; flex-wrap: wrap; }
.rep-view-tab { padding: 7px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 13px; cursor: pointer; color: var(--text-2); transition: .15s; }
.rep-view-tab:hover { border-color: var(--blue); color: var(--blue); }
.rep-view-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.exp-stat-click { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.exp-stat-click:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31, 41, 55, .08); }
.pl-block { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fbfcfe; }
/* v617：仓库/公司/全公司损益三卡按容器宽度自适应（原来写死 repeat(3,1fr)，360 手机上每列被压到 143px 并撑出 121px 整页横向滚动） */
.pl-3col { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.pl-block-total { background: #f2f6ff; border-color: #cfdcf3; }
.pl-block-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.pl-click { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.pl-click:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31, 41, 55, .08); }
.pl-view-link { font-size: 11.5px; font-weight: 400; color: var(--blue); margin-left: 8px; }
.pl-line { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-2); padding: 6px 0; border-bottom: 1px dashed #eef1f6; }
.pl-line b { color: var(--text); font-variant-numeric: tabular-nums; }
.pl-line.pl-total { border-bottom: none; border-top: 2px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 14px; font-weight: 700; color: var(--text); }
.pl-line.pl-total b { font-size: 15px; }
.pl-sec-title { font-size: 13.5px; font-weight: 700; color: var(--text-1); margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pl-exp-row td { padding: 10px 14px !important; }
.pl-clickable { cursor: pointer; }
.pl-clickable:hover { background: #f2f6ff; }
.pl-clickable.open span { color: var(--blue); }
.plv-exp table { margin: 0; }
.nr-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.nr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nr-title { font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nr-desc { font-size: 11.5px; color: var(--text-3); }
.nr-fields { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.nr-fields input, .nr-fields select { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; background: var(--bg); }
.nr-page .card { margin-bottom: 14px; }
.nr-compose label { font-size: 12.5px; color: var(--text-2); }
.nr-compose input, .nr-compose select, .nr-compose textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--bg); box-sizing: border-box; margin-top: 4px; }
.nr-targets { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.nr-tg-label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.nr-tg-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; font-size: 12.5px; }
.nr-tg-name { flex-shrink: 0; width: 44px; color: var(--text-3); padding-top: 5px; }
.nr-tg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nr-chip { border: 1px solid var(--line); border-radius: 14px; padding: 4px 11px; font-size: 12.5px; background: #fff; color: var(--text-2); cursor: pointer; transition: .12s; }
.nr-chip:hover { border-color: var(--blue); color: var(--blue); }
.nr-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.nr-user-sel { width: 100%; min-height: 84px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; padding: 6px; background: var(--bg); }
.nr-new-item { border: 2px dashed var(--blue); background: #f7faff; }
.oi-modal { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; }
.oi-sec { font-size: 13px; font-weight: 700; color: var(--text-1); }
.oi-entity-row { display: flex; gap: 8px; flex-wrap: wrap; }
.oi-chip { flex: 1; min-width: 110px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13.5px; color: var(--text-2); cursor: pointer; text-align: center; transition: .12s; }
.oi-chip:hover { border-color: var(--blue); color: var(--blue); }
.oi-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(232, 89, 12, .25); }
.oi-field { display: flex; flex-direction: column; gap: 5px; }
.oi-field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.oi-field input, .oi-field select, .oi-field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; background: var(--bg); box-sizing: border-box; }
.oi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oi-tip { font-size: 12px; color: var(--text-3); background: #f6f9ff; border: 1px dashed #c9d8f2; border-radius: 8px; padding: 8px 10px; }
/* ==================== 企业知识库（v616：目录树/分页/回收站/三档布局） ==================== */
/* S1 基线：热修2 包 styles 6fb6c0b6 + 601px 薪资护栏 + 补回桌面 ver-tag 段；本段替换旧 v216 .kb-* 全套，旧 .kbed-* 编辑器规则迁移保留在段尾 */
.kbp-page { display: flex; flex-direction: column; gap: 14px; position: relative; }

/* ---------- 顶部 ---------- */
.kbp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kbp-dir-btn { display: none; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text-2); font-size: 15px; line-height: 1; cursor: pointer; align-items: center; justify-content: center; padding: 0; }
.kbp-dir-btn:hover { border-color: var(--brand); color: var(--brand); }
.kbp-collapsed .kbp-dir-btn { display: inline-flex; }
.kbp-title { font-size: 17px; font-weight: 750; color: var(--text); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kbp-sub { font-size: 12px; font-weight: 400; color: var(--text-3); }
.kbp-head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kbp-search { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 10px; border: 1px solid var(--border); border-radius: 9px; background: #fff; min-width: 250px; box-sizing: border-box; }
.kbp-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232, 89, 12, .08); }
.kbp-search-ic { font-size: 12.5px; opacity: .6; flex: 0 0 auto; }
.kbp-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--text); }
.kbp-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.kbp-search-clear { display: none; border: 0; background: none; color: var(--text-3); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; flex: 0 0 auto; }
.kbp-search input:not(:placeholder-shown) + .kbp-search-clear { display: block; }

/* ---------- 三栏骨架 ---------- */
.kbp-layout { display: flex; gap: 14px; align-items: flex-start; }
.kbp-side { width: 248px; flex: 0 0 248px; box-sizing: border-box; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 12px; max-height: calc(100vh - 130px); z-index: 3; }
.kbp-collapsed .kbp-side { display: none; }
.kbp-side-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text-2); padding: 0 2px; flex: 0 0 auto; }
.kbp-side-close { width: 26px; height: 26px; border: 0; border-radius: 7px; background: none; color: var(--text-3); font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.kbp-side-close:hover { background: #f2f5fa; color: var(--text); }
.kbp-side-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 0 0 auto; }
.kbp-side-acts .btn { width: 100%; padding: 6px 4px; font-size: 12.5px; }
.kbp-tree { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; min-height: 80px; flex: 1 1 auto; margin: 0 -4px; padding: 0 4px; }
.kbp-tree-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; background: none; font-size: 13.5px; color: var(--text-2); cursor: pointer; text-align: left; box-sizing: border-box; }
.kbp-tree-item:hover { background: #f7f9fc; color: var(--text); }
.kbp-tree-item.active { background: #fff2e8; color: var(--brand); font-weight: 650; border-color: #ffe0c7; }
.kbp-tree-cats { display: flex; flex-direction: column; gap: 1px; }
.kbp-tree-empty { font-size: 12px; color: var(--text-3); padding: 12px 8px; line-height: 1.6; text-align: center; border: 1px dashed var(--line); border-radius: 9px; }
.kbp-tnode { display: flex; flex-direction: column; }
.kbp-tree-row { display: flex; align-items: center; gap: 5px; padding: 7px 8px; border: 1px solid transparent; border-radius: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer; min-width: 0; box-sizing: border-box; }
.kbp-tree-row:hover { background: #f7f9fc; color: var(--text); }
.kbp-tree-row.active { background: #fff2e8; color: var(--brand); font-weight: 650; border-color: #ffe0c7; }
.kbp-tree-row.kbp-drop { outline: 2px dashed var(--brand); outline-offset: -2px; background: #fff8f2; }
.kbp-caret { width: 20px; height: 20px; flex: 0 0 20px; border: 0; background: none; color: var(--text-3); font-size: 10px; line-height: 1; cursor: pointer; padding: 0; border-radius: 6px; }
.kbp-caret:hover { background: #eef2f8; }
.kbp-caret-empty { cursor: default; }
.kbp-caret-empty:hover { background: none; }
.kbp-ti { font-size: 14px; flex: 0 0 auto; }
.kbp-tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbp-tcount { font-size: 10.5px; color: var(--text-3); background: #f2f5fa; border-radius: 8px; padding: 1px 6px; flex: 0 0 auto; font-weight: 500; }
.kbp-tree-item.active .kbp-tcount, .kbp-tree-row.active .kbp-tcount { background: #ffe4d1; color: var(--brand); }
.kbp-tacts { display: none; gap: 0; flex: 0 0 auto; }
.kbp-tnode:hover > .kbp-tree-row .kbp-tacts { display: inline-flex; }
.kbp-tacts button { border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 11.5px; line-height: 1; padding: 4px 3px; border-radius: 5px; }
.kbp-tacts button:hover { background: #eef2f8; color: var(--blue); }
.kbp-tchildren { display: flex; flex-direction: column; gap: 1px; }
.kbp-side-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; flex: 0 0 auto; }
.kbp-side-link { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left; box-sizing: border-box; }
.kbp-side-link:hover { background: #f7f9fc; }
.kbp-side-link.active { background: #f2f5fa; color: var(--text); font-weight: 650; }

/* ---------- 主列 ---------- */
.kbp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.kbp-main-top { display: flex; flex-direction: column; gap: 8px; }
.kbp-main-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kbp-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); min-height: 20px; }
.kbp-crumb button { border: 0; background: none; color: var(--text-2); font-size: 12.5px; cursor: pointer; padding: 2px 0; }
.kbp-crumb button:hover { color: var(--brand); }
.kbp-sep { color: var(--text-3); opacity: .6; }
.kbp-cur { color: var(--text); font-weight: 600; }
.kbp-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kbp-list-title { font-size: 15px; font-weight: 700; color: var(--text); }
.kbp-count { font-size: 12px; color: var(--text-3); }
.kbp-clear { border: 0; background: none; color: var(--brand); font-size: 12px; cursor: pointer; padding: 0; }
.kbp-flex { flex: 1; }
.kbp-sel { height: 32px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--text-2); padding: 0 8px; cursor: pointer; }
.kbp-sel:focus { outline: none; border-color: var(--brand); }

/* ---------- 首页 ---------- */
.kbp-hero { display: flex; align-items: center; gap: 16px; background: linear-gradient(120deg, #1a2942, #2f4a72); border-radius: 16px; padding: 22px 24px; color: #fff; overflow: hidden; }
.kbp-hero-txt { flex: 1; min-width: 0; }
.kbp-hero-title { font-size: 20px; font-weight: 750; letter-spacing: .02em; }
.kbp-hero-sub { font-size: 12.5px; color: rgba(255, 255, 255, .72); margin-top: 6px; line-height: 1.7; }
.kbp-hero-stats { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.kbp-hero-stats span { font-size: 12px; color: rgba(255, 255, 255, .66); }
.kbp-hero-stats b { font-size: 19px; color: #fff; margin-right: 2px; }
.kbp-hero-ic { font-size: 64px; opacity: .28; line-height: 1; flex: 0 0 auto; }

/* ---------- 分区与文档行 ---------- */
.kbp-sec { display: flex; flex-direction: column; gap: 8px; }
.kbp-sec-title { font-size: 13.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 7px; }
.kbp-sec-cnt { font-size: 11px; font-weight: 600; color: var(--brand); background: #fff2e8; border-radius: 8px; padding: 1px 7px; }
.kbp-rows { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kbp-row { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; min-width: 0; box-sizing: border-box; }
.kbp-row:last-child { border-bottom: 0; }
.kbp-row:hover { background: #f8faff; }
.kbp-row.kbp-drop { background: #fff8f2; outline: 2px dashed var(--brand); outline-offset: -2px; }
.kbp-row-ic { font-size: 19px; flex: 0 0 26px; text-align: center; }
.kbp-row-main { flex: 1; min-width: 0; }
.kbp-row-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); min-width: 0; }
.kbp-rt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kbp-row-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbp-row-prog { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.kbp-row-prog i { display: block; height: 4px; background: var(--green); border-radius: 3px; max-width: 160px; }
.kbp-row-prog span { font-size: 10.5px; color: var(--green); }
.kbp-row-ops { display: flex; gap: 2px; flex: 0 0 auto; opacity: 0; transition: opacity .12s; }
.kbp-row:hover .kbp-row-ops { opacity: 1; }
.kbp-op { width: 28px; height: 28px; border: 1px solid transparent; border-radius: 7px; background: none; font-size: 13px; cursor: pointer; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.kbp-op:hover { background: #f0f4fa; border-color: var(--line); }
.kbp-row-arrow { color: var(--text-3); font-size: 17px; flex: 0 0 auto; }
.kbp-tag-red { display: inline-block; font-size: 10px; font-weight: 600; color: #c0392b; background: #ffe9e6; border-radius: 4px; padding: 1px 5px; flex: 0 0 auto; }
.kbp-tag-gray { display: inline-block; font-size: 11px; color: var(--text-2); background: #f1f4f9; border-radius: 5px; padding: 2px 8px; }

/* ---------- 目录卡片 ---------- */
.kbp-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.kbp-folder { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; min-width: 0; transition: box-shadow .15s, border-color .15s; box-sizing: border-box; }
.kbp-folder:hover { border-color: #d7e2f0; box-shadow: 0 4px 14px rgba(31, 42, 68, .07); }
.kbp-folder.kbp-drop { border-color: var(--brand); background: #fff8f2; }
.kbp-folder-ic { font-size: 19px; flex: 0 0 auto; }
.kbp-folder-main { flex: 1; min-width: 0; }
.kbp-folder-name { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbp-folder-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.kbp-folder-ops { display: none; gap: 0; flex: 0 0 auto; }
.kbp-folder:hover .kbp-folder-ops { display: flex; }
.kbp-folder-ops button { border: 0; background: none; cursor: pointer; font-size: 12px; padding: 4px 3px; border-radius: 5px; color: var(--text-3); }
.kbp-folder-ops button:hover { background: #eef2f8; color: var(--blue); }
.kbp-folder-arrow { color: var(--text-3); font-size: 16px; flex: 0 0 auto; }

/* ---------- 空态 / 加载更多 ---------- */
.kbp-empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 44px 12px; background: #fff; border: 1px dashed var(--line); border-radius: 12px; line-height: 1.8; }
.kbp-empty-hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.kbp-more { display: flex; justify-content: center; padding: 4px 0 8px; }

/* ---------- 回收站 ---------- */
.kbp-trash { display: flex; flex-direction: column; gap: 10px; }
.kbp-tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.kbp-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.kbp-tbl th { text-align: left; padding: 9px 12px; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: #f7f9fc; border-bottom: 1px solid var(--border); white-space: nowrap; }
.kbp-tbl td { padding: 10px 12px; border-bottom: 1px solid #f0f2f7; color: var(--text-2); vertical-align: middle; }
.kbp-tbl tr:last-child td { border-bottom: 0; }
.kbp-td-title { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); }
.kbp-td-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.kbp-td-ic { flex: 0 0 auto; }
.kbp-td-ops { white-space: nowrap; text-align: right; }
.kbp-td-ops .btn { margin-left: 6px; }
.kbp-tcards { display: none; }
.kbp-tcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kbp-tcard-title { display: flex; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; }
.kbp-tcard-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbp-tcard-meta { font-size: 11.5px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.kbp-tcard-ops { display: flex; gap: 8px; margin-top: 9px; }
.kbp-trash-foot { font-size: 11.5px; color: var(--text-3); }

/* ---------- 弹窗 / 统计 ---------- */
.kbp-modal-pad { padding: 2px 0 4px; }
.kbp-modal-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin: 12px 0 4px; }
.kbp-modal-label:first-child { margin-top: 0; }
.kbp-modal-hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }
.kbp-modal-p { font-size: 13px; line-height: 1.7; color: var(--text-2); margin: 0 0 8px; }
.kbp-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- 详情（桌面宽屏右侧栏 / 平板整列） ---------- */
.kbp-detail { display: none; flex-direction: column; flex: 0 0 380px; width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 14px; position: sticky; top: 12px; max-height: calc(100vh - 130px); overflow: hidden; box-sizing: border-box; }
.kbp-layout.kbp-detail-open .kbp-detail { display: flex; }
.kbp-detail[hidden] { display: none !important; }
.kbp-detail-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.kbp-detail-htitle { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 650; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbp-detail-hacts { display: flex; gap: 2px; flex: 0 0 auto; }
.kbp-icon-btn { width: 30px; height: 30px; border: 1px solid transparent; border-radius: 8px; background: none; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex: 0 0 auto; padding: 0; }
.kbp-icon-btn:hover { background: #f2f5fa; border-color: var(--line); }
.kbp-icon-danger:hover { background: #fff0ee; color: #c0392b; }
.kbp-detail-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 22px; -webkit-overflow-scrolling: touch; }
.kbp-detail-tags { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.kbp-detail-title { margin: 0; font-size: 19px; line-height: 1.45; color: var(--text); }
.kbp-detail-meta { font-size: 11.5px; color: var(--text-3); margin: 6px 0 14px; }
.kbp-doc-body { font-size: 14px; line-height: 1.85; color: var(--text); }
.kbp-doc-body img, .kbp-img { max-width: 100%; border-radius: 8px; }
.kbp-doc-body h2 { font-size: 17px; margin: 16px 0 8px; }
.kbp-doc-body h3 { font-size: 15px; margin: 14px 0 6px; }
.kbp-doc-body p { margin: 0 0 10px; }
.kbp-doc-body a { color: var(--blue); }
.kbp-doc-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kbp-doc-body th, .kbp-doc-body td { border: 1px solid var(--line); padding: 7px 9px; }
.kbp-video { width: 100%; border-radius: 10px; background: #000; display: block; }
.kbp-frame { width: 100%; height: 60vh; min-height: 320px; border: 0; border-radius: 10px; background: #f5f6f8; }
.kbp-detail-summary { font-size: 13px; line-height: 1.75; color: var(--text-2); background: #f7f9fc; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 9px 12px; margin-top: 14px; }
.kbp-file-big { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; background: #fafbfd; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.kbp-file-big-ic { font-size: 38px; }
.kbp-file-big-name { font-size: 14px; font-weight: 600; color: var(--text); word-break: break-all; }
.kbp-file-big-meta { font-size: 12px; color: var(--text-3); }
.kbp-file-attach { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-top: 12px; background: #fafbfd; }
.kbp-file-attach-ic { font-size: 24px; flex: 0 0 auto; }
.kbp-file-attach-main { flex: 1; min-width: 0; }
.kbp-file-attach-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbp-file-attach-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- 手机全屏详情 ---------- */
.kbp-overlay { position: fixed; inset: 0; z-index: 950; background: #fff; display: flex; flex-direction: column; }
.kbp-overlay-head { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; border-bottom: 1px solid var(--line); background: #fff; flex: 0 0 auto; }
.kbp-ov-title { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 650; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbp-overlay-body { flex: 1; overflow-y: auto; padding: 14px 14px calc(30px + env(safe-area-inset-bottom, 0px)); -webkit-overflow-scrolling: touch; }
body.kbp-lock { overflow: hidden; }
body.kbp-lock #content { overflow: hidden; }

/* ---------- 平板（768–1199）：目录 + 主列，详情整列替换主列 ---------- */
@media (min-width: 768px) and (max-width: 1199px) {
  .kbp-side { width: 220px; flex-basis: 220px; }
  .kbp-layout.kbp-detail-open .kbp-main { display: none; }
  .kbp-detail { display: none; flex: 1 1 auto; width: auto; position: static; max-height: none; }
  .kbp-layout.kbp-detail-open .kbp-detail { display: flex; }
  .kbp-detail-body { overflow-y: visible; }
}

/* ---------- 宽屏：详情栏 440 ---------- */
@media (min-width: 1360px) {
  .kbp-detail { flex-basis: 440px; width: 440px; }
}

/* ---------- 手机（≤767）：左树抽屉 + 全屏详情 ---------- */
@media (max-width: 767px) {
  .kbp-page { gap: 10px; }
  .kbp-dir-btn { display: inline-flex; }
  .kbp-head { gap: 8px; }
  .kbp-title { font-size: 15.5px; }
  .kbp-sub { font-size: 11px; }
  .kbp-head-right { width: 100%; margin-left: 0; gap: 6px; }
  .kbp-search { flex: 1 1 100%; min-width: 0; height: 36px; }
  .kbp-search input { font-size: 14px; }
  .kbp-layout { display: block; }
  .kbp-side { display: flex !important; position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 300px); flex-direction: column; max-height: none; border-radius: 0 16px 16px 0; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-103%); transition: transform .22s ease; box-shadow: 12px 0 32px rgba(20, 28, 42, .18); z-index: 950; overflow-y: auto; }
  .kbp-page.kbp-drawer-open .kbp-side { transform: translateX(0); }
  .kbp-side-head { font-size: 14px; }
  .kbp-side-close { width: 30px; height: 30px; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
  .kbp-side-acts .btn { padding: 7px 4px; font-size: 13px; }
  .kbp-tree { max-height: none; overflow: visible; margin: 0; padding: 0; }
  .kbp-tree-item { padding: 9px 10px; font-size: 14px; }
  .kbp-tree-row { padding: 9px 8px; font-size: 14px; }
  .kbp-tacts { display: inline-flex; }
  .kbp-tacts button { padding: 5px 4px; font-size: 13px; }
  .kbp-side-foot { margin-top: 12px; }
  .kbp-mask { display: none; position: fixed; inset: 0; z-index: 940; background: rgba(20, 28, 42, .45); -webkit-tap-highlight-color: transparent; }
  .kbp-page.kbp-drawer-open .kbp-mask { display: block; }
  .kbp-main-top { gap: 6px; }
  .kbp-toolbar { gap: 6px; }
  .kbp-sel { height: 34px; }
  .kbp-list-title { font-size: 14px; }
  .kbp-row { padding: 11px 10px; gap: 9px; }
  .kbp-row-ops { opacity: 1; }
  .kbp-row-arrow { display: none; }
  .kbp-row-ic { flex-basis: 24px; font-size: 18px; }
  .kbp-row-prog i { max-width: 120px; }
  .kbp-op { width: 34px; height: 34px; font-size: 15px; }
  .kbp-folders { grid-template-columns: 1fr; gap: 8px; }
  .kbp-folder { padding: 10px 11px; }
  .kbp-folder-ops { display: flex; }
  .kbp-hero { padding: 16px; gap: 10px; border-radius: 14px; }
  .kbp-hero-title { font-size: 17px; }
  .kbp-hero-sub { font-size: 12px; }
  .kbp-hero-ic { font-size: 44px; }
  .kbp-hero-stats { gap: 12px; margin-top: 10px; }
  .kbp-sec-title { font-size: 13px; }
  .kbp-detail { display: none !important; }
  .kbp-tbl-wrap { display: none; }
  .kbp-tcards { display: flex; flex-direction: column; gap: 8px; }
  .kbp-stats-grid { grid-template-columns: 1fr; }
  .kbp-detail-title { font-size: 18px; }
  .kbp-doc-body { font-size: 15px; }
  .kbp-frame { height: 52vh; min-height: 240px; }
  .kbp-overlay { z-index: 960; }
  .kbp-modal-p { font-size: 13.5px; }
}

/* ---------- 旧版编辑器（kbed）：工具栏/content 规则迁移保留 ---------- */
.kbed-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; border: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 6px; background: #f7f9fc; }
.kbed-toolbar button { min-width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--text-1); }
.kbed-toolbar button:hover { border-color: var(--brand); color: var(--brand); }
.kbed-toolbar select { height: 30px; border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; background: #fff; }
.kbed-toolbar + .kbed-content { border-top: 0; border-radius: 0 0 10px 10px; }
.kbed-content img { max-width: 100%; border-radius: 6px; }

/* ==================== 数据表格 ==================== */
/* v295：separate+0 间距保证 sticky 表头滚动时边框/背景不抖动（视觉与 collapse 一致） */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table thead { position: sticky; top: 0; z-index: 5; }   /* v295：表头吸顶，长列表滚动时列名不消失 */
.data-table th {
  text-align: left; padding: 10px 12px; font-size: 12px; color: var(--text-2); font-weight: 600;
  background: #f7f9fc; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid #f0f2f7; font-size: 13.5px; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #f8faff; }
.data-table .empty { text-align: center; color: var(--text-3); padding: 36px 0; }
/* v295：长列表内部滚动容器——表头吸顶以本容器为参照，滚动内容时表头固定不消失 */
.tbl-scroll { overflow: auto !important; max-height: calc(100vh - 230px); -webkit-overflow-scrolling: touch; }
/* v444：滚动容器里的表格按内容定宽（容器不够宽就横向滚动），
   否则列被压到"一个字一行"（门店名竖排），看起来像渲染坏了 */
.tbl-scroll .data-table { width: max-content; min-width: 100%; }
#modal-body .tbl-scroll { max-height: 52vh; }
.tbl-scroll .data-table thead { position: sticky; top: 0; z-index: 5; }
/* v299：审批模板全屏设计器（钉钉式） */
.tpl-edit-grid { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }
@media (max-width: 960px) {
  .tpl-edit-grid { grid-template-columns: 1fr; }
  .tpl-edit-grid .card[style*="sticky"] { position: static !important; }
}
/* v300：方形卡片网格（模板/审批类卡片通用，避免超长卡片） */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tpl-card {
  display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; background: #fff; min-height: 168px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.tpl-card:hover { box-shadow: 0 4px 14px rgba(26,41,66,.08); transform: translateY(-1px); border-color: #d7deea; }
.tpl-card-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tpl-card-desc { font-size: 12px; color: var(--text-3); line-height: 1.5; min-height: 34px; }
.tpl-card-fields { display: flex; flex-wrap: wrap; gap: 4px; }
.tpl-card-fields .badge { font-size: 10.5px; padding: 1px 7px; }
.tpl-card-ops { margin-top: auto; display: flex; gap: 6px; }
.tpl-card-ops .btn { flex: 1; }
/* 发起申请：模板选择小卡片 */
.ac-tpl-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ac-tpl-pick-item {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer;
  background: #fff; transition: border-color .12s, background .12s;
}
.ac-tpl-pick-item:hover { border-color: var(--brand); }
.ac-tpl-pick-item.sel { border-color: var(--brand); background: #eef4ff; box-shadow: 0 0 0 1px var(--brand); }
.ac-tpl-pick-item b { font-size: 13px; display: block; }
.ac-tpl-pick-item span { font-size: 11px; color: var(--text-3); }

/* ==================== 徽章 ==================== */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge.green { background: var(--green-light); color: var(--green); }
.badge.red { background: var(--red-light); color: var(--red); }
.badge.amber { background: #fff4e6; color: var(--amber); }
.badge.blue { background: var(--blue-light); color: var(--blue); }
.badge.gray { background: #f1f3f8; color: var(--text-2); }
.badge.brand { background: var(--brand-light); color: var(--brand); }

/* ==================== 弹窗 / Toast ==================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,28,44,.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 480px; max-height: 85vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,.2); animation: modalIn .18s ease;
}
@keyframes modalIn { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 15px; }
.modal-close { border: none; background: transparent; font-size: 16px; color: var(--text-3); padding: 4px; }
.modal-body { padding: 20px; overflow-y: auto; }

.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 3000;
  background: var(--dark); color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ==================== 表单 ==================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-item-full { grid-column: 1 / -1; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  outline: none; background: #fafbfd; transition: border .2s, box-shadow .2s;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,144,255,.1); background: #fff;
}
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ==================== 列表项（消息/待办） ==================== */
.msg-list { list-style: none; }
.msg-item {
  display: flex; gap: 12px; padding: 13px 6px; border-bottom: 1px solid #f0f2f7; cursor: pointer;
  transition: background .12s; align-items: flex-start;
}
.msg-item:hover { background: #f8faff; }
.msg-item.unread .msg-title { font-weight: 600; }
.msg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-top: 6px; flex-shrink: 0; }
.msg-item.read .msg-dot { background: transparent; }
.msg-title { font-size: 14px; }
.msg-content { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.msg-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ==================== 人员管理（旧HR风格） ==================== */
.emp-toolbar {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: #fff; padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 14px; flex-wrap: wrap;
}
.emp-select {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px; outline: none;
  background: #fff; font-size: 13.5px; min-width: 140px;
}
.emp-search {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px; outline: none;
  background: #fafbfd; font-size: 13.5px; min-width: 220px; flex: 1; max-width: 360px;
  transition: border .2s, box-shadow .2s;
}
.emp-search:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,144,255,.1); background: #fff; }
.emp-group { border-bottom: 1px solid var(--border); overflow-x: auto; }
.emp-group:last-child { border-bottom: none; }
.emp-group-title {
  padding: 11px 18px; background: #fafbfd; font-size: 13px; font-weight: 600;
  color: var(--text); border-bottom: 1px solid #eef1f6; display: flex; align-items: center; gap: 8px;
}
.emp-group-title .sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
/* 人员管理：每个门店组独立表格，统一列宽避免上下组错位 */
.emp-group .data-table { table-layout: fixed; width: 100%; min-width: 1300px; }
.emp-group .data-table th:nth-child(1), .emp-group .data-table td:nth-child(1) { width: 96px; }   /* 姓名 */
.emp-group .data-table th:nth-child(2), .emp-group .data-table td:nth-child(2) { width: 72px; }   /* 全/兼职 */
.emp-group .data-table th:nth-child(3), .emp-group .data-table td:nth-child(3) { width: 150px; }  /* 岗位职级 */
.emp-group .data-table th:nth-child(4), .emp-group .data-table td:nth-child(4) { width: 100px; }  /* 薪资 */
.emp-group .data-table th:nth-child(5), .emp-group .data-table td:nth-child(5) { width: 148px; }  /* 银行卡号 */
.emp-group .data-table th:nth-child(6), .emp-group .data-table td:nth-child(6) { width: 128px; }  /* 电话 */
.emp-group .data-table th:nth-child(7), .emp-group .data-table td:nth-child(7) { width: 74px; }   /* 钉钉 */
.emp-group .data-table th:nth-child(8), .emp-group .data-table td:nth-child(8) { width: 70px; }   /* 状态 */
.emp-group .data-table th:nth-child(9), .emp-group .data-table td:nth-child(9) { width: 96px; }   /* 入职日期 */
.emp-group .data-table th:nth-child(10), .emp-group .data-table td:nth-child(10) { width: 132px; } /* 健康证 */
.emp-group .data-table th:nth-child(11), .emp-group .data-table td:nth-child(11) { width: 230px; } /* 操作 */
.emp-group .data-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== 排班表 ==================== */
.sched-select, .sched-week { font-size: 13px; }
.sched-select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; outline: none; background: #fff;
}
.sched-week { color: var(--text-2); font-weight: 500; white-space: nowrap; }
.sched-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.sched-grid-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.sched-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.sched-table th {
  background: #f7f9fc; padding: 10px 8px; font-size: 12.5px; text-align: center;
  border-bottom: 1px solid var(--border); font-weight: 600;
}
.sched-date { font-size: 11px; color: var(--text-3); font-weight: 400; }
.sched-table td { border: 1px solid #eef1f6; padding: 6px; vertical-align: top; }
.sched-emp-col { width: 110px; background: #fafbfd; }
.sched-emp-name { font-weight: 600; font-size: 13px; }
.sched-emp-pos { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.sched-day-col { min-width: 96px; }
.sched-cell { min-height: 44px; cursor: pointer; transition: background .12s; }
.sched-cell:hover { background: var(--blue-light); }
.sched-cell.empty-cell { background: #fcfdff; }
.sched-cell.empty-cell:hover { background: var(--blue-light); }
.sched-shift {
  background: var(--brand); color: #fff; border-radius: 6px; padding: 5px 8px;
  font-size: 12px; margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; transition: opacity .12s; position: relative;
}
.sched-shift:hover { opacity: .88; }
.sched-shift-x { margin-left: 6px; opacity: .65; font-size: 11px; padding: 0 2px; }
.sched-shift-x:hover { opacity: 1; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #2b8a3e; }

/* ==================== 排班表（30分钟刻度划线版 · flex 布局） ==================== */
.sched2-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; padding: 12px 16px; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.sched2-bar select, .sched2-bar input[type="number"] {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px;
  outline: none; background: #fff; font-size: 13.5px;
}
.sched2-bar .sched2-week { font-size: 13.5px; color: var(--text-2); font-weight: 500; }

/* ---- 周一到周日 Tab（放大清晰版） ---- */
.sched2-day-tabs {
  display: flex; gap: 8px; align-items: stretch;
  background: #fff; padding: 10px 12px; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px; overflow-x: auto;
}
.sched2-day-tab {
  border: 1px solid var(--border); background: #fafbfd;
  padding: 10px 18px; border-radius: 10px; font-size: 14px;
  color: var(--text-2); cursor: pointer; white-space: nowrap;
  transition: all .15s; display: flex; align-items: center; gap: 8px;
  font-weight: 500;
}
.sched2-day-tab .tab-dayname { font-size: 14px; }
.sched2-day-tab .tab-daydate { font-size: 12.5px; opacity: .85; font-variant-numeric: tabular-nums; }
.sched2-day-tab .tab-today {
  background: var(--green); color: #fff; font-size: 11px; border-radius: 10px;
  padding: 1px 7px; font-weight: 600;
}
.sched2-day-tab .tab-weather {
  font-size: 11px; opacity: .9; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 3px; white-space: nowrap;
}
.sched2-day-tab.active .tab-weather { opacity: .95; }
.sched2-day-tab:hover { border-color: var(--blue); color: var(--blue); background: #fff; }
.sched2-day-tab.active {
  background: var(--brand); color: #fff; border-color: var(--brand);
  box-shadow: 0 3px 10px rgba(232,89,12,.3);
}
.sched2-day-tab.active .tab-daydate { opacity: .9; }

/* ---- 当前排班信息条：星期 + 完整日期 + 天气 ---- */
.sched2-dayinfo {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 16px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.sched2-dayinfo-name { font-size: 16px; font-weight: 700; color: var(--brand); }
.sched2-dayinfo-date { font-size: 15px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.sched2-dayinfo-today {
  font-size: 11px; font-weight: 600; color: #fff; background: var(--brand);
  padding: 2px 8px; border-radius: 99px;
}
.sched2-dayinfo-weather {
  font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 4px;
}

/* ---- 网格（flex 布局，员工列/工时列 sticky） ---- */
.sched2-grid-wrap {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow-x: auto; overflow-y: visible; margin-bottom: 14px;
  position: relative;
}
.sched2-grid { min-width: 1180px; display: flex; flex-direction: column; }
.sched2-head { display: flex; background: #f7f9fc; border-bottom: 1px solid var(--border); }
.sched2-head-emp {
  flex: 0 0 170px; width: 170px; padding: 10px 12px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); position: sticky; left: 0; background: #f7f9fc; z-index: 3;
}
.sched2-head-times { flex: 1; min-width: 900px; }
.sched2-head-hours { display: flex; height: 24px; }
.sched2-head-hour {
  flex: 2; min-width: 56px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text);
  border-left: 1px solid #e4e9f2; font-variant-numeric: tabular-nums;
}
.sched2-head-halves { display: flex; height: 20px; }
.sched2-head-half {
  flex: 1; min-width: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-3); border-left: 1px solid #eef1f6;
}
.sched2-head-sum {
  flex: 0 0 64px; width: 64px; padding: 6px 0; text-align: center;
  font-size: 12px; color: var(--text-2); font-weight: 600;
  border-left: 1px solid var(--border); position: sticky; right: 0; background: #f7f9fc; z-index: 3;
}
.sched2-body { display: flex; flex-direction: column; }
.sched2-row { display: flex; border-bottom: 1px solid #eef1f6; min-height: 56px; }
.sched2-row:last-child { border-bottom: none; }
.sched2-row:hover { background: #fcfdff; }
.sched2-row-emp {
  flex: 0 0 170px; width: 170px; padding: 10px 12px;
  background: #fafbfd; position: sticky; left: 0; z-index: 2;
  border-right: 1px solid #eef1f6;
}
.sched2-emp-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.sched2-emp-meta { display: flex; gap: 4px; margin-top: 4px; align-items: center; font-size: 11px; color: var(--text-3); flex-wrap: wrap; }
.sched2-row-cells {
  flex: 1; min-width: 900px; height: 56px; position: relative; display: flex;
}
.sched2-cell {
  flex: 1; min-width: 28px; border-left: 1px solid #eef1f6;
  transition: background .08s; position: relative;
}
.sched2-cell.hour-edge { border-left-color: var(--border); }
.sched2-cell:hover { background: rgba(24,144,255,.06); }
.sched2-cell.drag-hot { background: rgba(24,144,255,.25); }
.sched2-row-sum {
  flex: 0 0 64px; width: 64px; display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; font-size: 13px;
  background: #fff; border-left: 1px solid var(--border); position: sticky; right: 0; z-index: 2;
}
.sched2-block {
  position: absolute; top: 5px; bottom: 5px;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500; color: #fff;
  cursor: pointer; user-select: none; z-index: 3;
  box-shadow: 0 1px 2px rgba(0,0,0,.12); overflow: hidden;
  transition: filter .12s;
}
.sched2-block:hover { filter: brightness(1.06); }
.sched2-block.fulltime { background: linear-gradient(135deg, #1890ff, #4db8ff); }
.sched2-block.parttime { background: linear-gradient(135deg, #f08c00, #ffb257); }
.sched2-block-text { padding: 0 4px; white-space: nowrap; pointer-events: none; font-size: 10.5px; }
.sched2-block-x {
  position: absolute; top: 2px; right: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: rgba(255,255,255,.35); display: flex;
  align-items: center; justify-content: center; font-size: 9px; opacity: 0;
  transition: opacity .12s;
}
.sched2-block:hover .sched2-block-x { opacity: 1; }
.sched2-block-x:hover { background: rgba(255,255,255,.65); }

/* ---- 已审核盖章 ---- */
.sched2-stamp {
  position: absolute; top: 34px; right: 96px; transform: rotate(-14deg);
  border: 4px solid var(--red); color: var(--red); border-radius: 12px;
  padding: 10px 30px; font-size: 30px; font-weight: 900; letter-spacing: 10px;
  opacity: .55; pointer-events: none; z-index: 50; text-indent: 10px;
  box-shadow: inset 0 0 0 2px rgba(224,49,49,.12);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* ---- 统计卡片 ---- */
.sched2-stats {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px;
  margin-bottom: 14px;
}
.sched2-stat {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
  transition: all .12s;
}
.sched2-stat-label { font-size: 12px; color: var(--text-3); }
.sched2-stat-value { font-size: 18px; font-weight: 700; color: var(--text); margin-top: 2px; font-variant-numeric: tabular-nums; }
.sched2-stat-sub { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.sched2-stat.ft { border-left: 3px solid var(--blue); }
.sched2-stat.pt { border-left: 3px solid var(--amber); }
.sched2-stat.amt { border-left: 3px solid var(--brand); }

/* 移动端 */
@media (max-width: 768px) {
  .sched2-stats { grid-template-columns: repeat(2, 1fr); }
  .sched2-head-emp, .sched2-row-emp { flex-basis: 108px; width: 108px; padding: 8px; }
}

/* ==================== 考勤统计（新页面） ==================== */
.att-page { display: flex; flex-direction: column; gap: 12px; }
.att-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; padding: 10px 14px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.att-bar-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.att-bar select, .att-bar input[type="date"] {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
  background: #fff; outline: none;
}
.att-summary-strip {
  display: flex; align-items: stretch; min-height: 44px;
  background: linear-gradient(100deg, #e9f5ff 0%, #f5f9ff 58%, #fff 100%);
  border: 1px solid #b9dcff; border-radius: 9px;
  box-shadow: 0 5px 14px -12px rgba(34, 88, 152, .42);
  overflow: hidden;
}
.att-range-banner {
  display: flex; align-items: center; flex: 0 1 auto; min-width: 0;
  padding: 8px 14px; color: #2878bd; font-size: 12.5px; font-weight: 600;
  white-space: nowrap;
}
.att-live-inline {
  min-width: 0; flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-end;
  padding: 6px 12px; border-left: 1px solid rgba(76, 145, 213, .18);
}
.att-live-inline-main {
  min-width: 0; width: 100%; display: flex; align-items: center; justify-content: flex-end;
  gap: 6px 13px; flex-wrap: wrap; color: #536a83;
}
.att-live-state {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  background: #eef4fb; color: #4f637c; white-space: nowrap;
}
.att-live-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.att-live-state.ok { background: #e8f8ed; color: #188346; }
.att-live-state.ok i { box-shadow: 0 0 0 3px rgba(24, 131, 70, .10); animation: att-live-pulse 2s infinite; }
.att-live-state.warn { background: #fff4df; color: #b86e00; }
.att-live-state.bad { background: #fff0ef; color: #c92a2a; }
.att-live-state.muted { background: #f1f3f6; color: #667085; }
.att-live-kpi { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; font-size: 10.5px; }
.att-live-kpi > span { color: #6d8095; }
.att-live-kpi b { color: #17395f; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.att-live-kpi em { color: #71859b; font-size: 10px; font-style: normal; }
.att-live-latest {
  display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; max-width: 240px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px;
}
.att-live-latest > span { color: #6d8095; flex: none; }
.att-live-latest b { color: #17395f; font-variant-numeric: tabular-nums; flex: none; }
.att-live-latest em { overflow: hidden; text-overflow: ellipsis; color: #506981; font-style: normal; }
.att-live-updated { color: #8a9bad; font-size: 10px; white-space: nowrap; }
@keyframes att-live-pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(24,131,70,.08); } 50% { box-shadow: 0 0 0 5px rgba(24,131,70,.02); } }
.att-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.att-stat {
  background: #fff; border-radius: 10px; padding: 14px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden;
  border-left: 4px solid var(--border);
}
.att-stat.blue { border-left-color: var(--blue); }
.att-stat.green { border-left-color: var(--green); }
.att-stat.amber { border-left-color: var(--amber); }
.att-stat.brand { border-left-color: var(--brand); }
.att-stat.red { border-left-color: var(--red); }
.att-stat.purple { border-left-color: #7950f2; }
.att-stat-label { font-size: 12px; color: var(--text-3); }
.att-stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.att-stat-sub { font-size: 11px; color: var(--text-3); }

/* 数据看板首页：今日经营总览（9 项指标） */
.dash-page { display: flex; flex-direction: column; gap: 12px; }
.dash-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-title { font-size: 17px; font-weight: 700; }
.dash-sub { font-size: 12.5px; color: var(--text-3); }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.dash-stat {
  background: #fff; border-radius: 10px; padding: 14px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden; border-left: 4px solid var(--border);
}
.dash-stat.blue { border-left-color: var(--blue); }
.dash-stat.green { border-left-color: var(--green); }
.dash-stat.amber { border-left-color: var(--amber); }
.dash-stat.brand { border-left-color: var(--brand); }
.dash-stat.red { border-left-color: var(--red); }
.dash-stat.purple { border-left-color: #7950f2; }
.dash-stat-label { font-size: 12px; color: var(--text-3); }
.dash-stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-stat-sub { font-size: 11px; color: var(--text-3); }

.att-roster-card { padding: 16px; }
.att-roster-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.att-roster-title { font-size: 15px; font-weight: 600; }
.att-roster-datetime { font-size: 14px; font-weight: 700; color: var(--brand); background: linear-gradient(135deg, var(--brand-light), #fff); padding: 6px 14px; border-radius: 8px; border: 1px solid #ffd591; letter-spacing: 0.3px; box-shadow: 0 1px 4px rgba(255,180,80,.18); }
.att-roster-meta { font-size: 12px; color: var(--text-3); }
.att-roster-table { width: 100%; border-collapse: collapse; }
.att-roster-table th {
  background: #fafbfd; padding: 9px 10px; font-size: 12px; font-weight: 600;
  color: var(--text-2); text-align: left; border-bottom: 1px solid var(--border);
}
.att-roster-table td { padding: 9px 10px; border-bottom: 1px solid #f0f2f7; font-size: 13px; }
.att-roster-table tr.att-row-on { background: #f0fdf4; }
.att-roster-table tr.att-row-on:hover { background: #e6fcef; }
.att-roster-table tr.att-row-off { background: #fff; }
.att-roster-table tr.att-row-off:hover { background: #f8faff; }
.att-roster-table tr[data-att-emp], .att-roster-table tr[data-att-temp] { cursor: pointer; }
.att-seg-count {
  background: var(--brand); color: #fff; padding: 1px 6px; border-radius: 10px;
  font-size: 10px; margin-left: 4px; font-weight: 600;
}

.att-revenue-banner {
  background: linear-gradient(135deg, #fff7ed, #fffbf5);
  border: 1px solid #fdba74; padding: 12px 18px; border-radius: 10px;
  display: flex; align-items: center; gap: 18px; font-size: 14px;
}
.att-revenue-num { font-size: 26px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.att-revenue-meta { font-size: 12px; color: var(--text-3); }

.att-detail { display: flex; flex-direction: column; gap: 6px; }
.att-detail-row {
  display: flex; padding: 6px 0; border-bottom: 1px dashed #f0f2f7; font-size: 13px;
}
.att-detail-row .lbl { width: 110px; color: var(--text-3); }
.att-detail-row:last-child { border-bottom: none; }

@media (max-width: 1280px) {
  .att-stats { grid-template-columns: repeat(3, 1fr); }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .att-page { gap: 10px; }
  .att-bar {
    display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px;
    padding: 11px 12px; border-radius: 16px;
  }
  .att-bar-label { display: none; }
  .att-bar > span[style] { display: none; }
  .att-bar select { grid-column: 1 / -1; width: 100%; min-height: 42px; }
  .att-bar #att-date { grid-column: 1 / -1; width: 100%; min-height: 42px; }
  .att-bar #att-prev, .att-bar #att-next, .att-bar #att-today { width: 100%; padding-inline: 5px; }
  .att-bar #att-sync-ding { grid-column: 1 / -1; }
  .att-summary-strip { display: block; border-radius: 11px; }
  .att-range-banner { padding: 8px 11px; font-size: 11.5px; line-height: 1.45; white-space: normal; }
  .att-live-inline { padding: 7px 11px; border-left: 0; border-top: 1px solid rgba(76,145,213,.16); }
  .att-live-inline-main { justify-content: flex-start; gap: 6px 10px; }
  .att-live-state { padding: 3px 7px; font-size: 10.5px; }
  .att-live-latest { max-width: 100%; flex: 1 1 180px; }
  .att-live-updated { margin-left: auto; }
  .att-stats { grid-template-columns: repeat(2, 1fr); }
  .att-roster-card { padding: 13px; overflow: visible; }
  .att-roster-header { gap: 8px; }
  .att-roster-title { flex-basis: 100%; }
  .att-roster-datetime { font-size: 12px; padding: 5px 9px; }
  .att-roster-meta { flex: 1; min-width: 120px; font-size: 11px; }
  .att-roster-header #btn-add-temp { width: 100%; }
  .att-roster-table { display: block; border-collapse: separate; }
  .att-roster-table thead { display: none; }
  .att-roster-table tbody { display: flex; flex-direction: column; gap: 9px; }
  .att-roster-table tbody tr {
    display: grid; grid-template-columns: 34px minmax(0,1fr) minmax(72px,.55fr);
    grid-template-areas:
      "check name type"
      "check position segments"
      "check hours salary"
      "check action action";
    gap: 5px 7px; padding: 11px 10px; border: 1px solid #e8edf4;
    border-radius: 13px; background: #fff;
  }
  .att-roster-table tbody tr.att-row-on { background: linear-gradient(145deg,#f1fcf5,#fff); border-color: #ccefd8; }
  .att-roster-table tbody tr.att-row-off { background: #fafbfd; }
  .att-roster-table td { padding: 0; border: none; min-width: 0; font-size: 12px; }
  .att-roster-table td:nth-child(1) { grid-area: check; align-self: start; padding-top: 4px; }
  .att-roster-table td:nth-child(2) { grid-area: name; font-size: 14px; }
  .att-roster-table td:nth-child(3) { grid-area: type; text-align: right; }
  .att-roster-table td:nth-child(4) { grid-area: position; color: var(--text-3); }
  .att-roster-table td:nth-child(5) { grid-area: segments; text-align: right; line-height: 1.5; }
  .att-roster-table td:nth-child(6) { grid-area: hours; }
  .att-roster-table td:nth-child(7) { grid-area: salary; text-align: right; }
  .att-roster-table td:nth-child(8) { grid-area: action; display: flex; justify-content: flex-end; gap: 6px; margin-top: 2px; }
  .att-roster-table td:nth-child(6)::before,
  .att-roster-table td:nth-child(7)::before { display: block; font-size: 9.5px; color: var(--text-3); margin-bottom: 2px; font-weight: 500; }
  .att-roster-table td:nth-child(6)::before { content: "工时"; }
  .att-roster-table td:nth-child(7)::before { content: "工资预估"; }
  .att-roster-table td[colspan] { grid-column: 1 / -1; text-align: center; padding: 24px 0; }
  .att-revenue-banner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 12px; border-radius: 14px; }
  .att-revenue-banner > span:first-child { grid-column: 1 / -1; }
  .att-revenue-banner input { width: 100% !important; }
  .att-revenue-num { font-size: 21px; }
  .att-revenue-meta { grid-column: 1 / -1; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== 人力看板 ==================== */
.dh-summary { padding: 16px; }
.dh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.dh-stat {
  background: #fafbfd; border-radius: 8px; padding: 12px 14px;
  border-left: 3px solid var(--border);
}
.dh-stat.blue { border-left-color: var(--blue); }
.dh-stat.green { border-left-color: var(--green); }
.dh-stat.amber { border-left-color: var(--amber); }
.dh-stat.brand { border-left-color: var(--brand); }
.dh-stat.red { border-left-color: var(--red); }
.dh-stat.purple { border-left-color: #7950f2; }
.dh-stat-label { font-size: 11.5px; color: var(--text-3); }
.dh-stat-value { font-size: 18px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.dh-stat-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.dh-table { font-size: 12.5px; }
.dh-table th { background: #fafbfd; font-size: 12px; padding: 10px 8px; }
.dh-table td { padding: 10px 8px; }
.dh-table tbody tr { cursor: pointer; }

@media (max-width: 1280px) {
  .dh-stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .dh-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== 钉钉中心：分项配额 ==================== */
.quota-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.quota-cat { background: #fafbfd; border-radius: 10px; padding: 12px 14px; border-left: 4px solid var(--border); }
.quota-cat-name { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.quota-cat-row { font-size: 13px; margin-bottom: 8px; }
.quota-cat-used { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.quota-cat-bar { height: 8px; background: #eef1f6; border-radius: 5px; overflow: hidden; }
.quota-cat-bar-fill { height: 100%; border-radius: 5px; transition: width .4s; }
.quota-cat-foot { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.quota-detail { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; margin-top: 6px; }
.quota-api-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #fff; border: 1px solid #f0f2f7; border-radius: 6px; font-size: 12.5px; }
.quota-api-cat { font-size: 10px; background: var(--brand-light); color: var(--brand); padding: 1px 6px; border-radius: 8px; margin-left: 6px; }
@media (max-width: 900px) { .quota-grid { grid-template-columns: 1fr; } }

/* ==================== 账号管理 / 角色权限 ==================== */
.sys-store-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sys-store-scroll { max-height: 180px; overflow-y: auto; padding: 4px; background: #fafbfd; border-radius: 6px; }
.sys-pwd-section { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.sys-pwd-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.sys-store-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; background: #f7f9fc; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.sys-store-check input { accent-color: var(--brand); }
.sys-role-layout { display: grid; grid-template-columns: 260px 1fr; gap: 12px; align-items: start; }
.sys-role-side { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.sys-role-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.sys-role-item:hover { background: #f7f9fc; }
.sys-role-item.active { background: var(--brand-light); border-color: var(--brand); }
.sys-perm-panel { padding: 16px; }
.sys-perm-group { margin-bottom: 14px; border: 1px solid #eef1f6; border-radius: 8px; overflow: hidden; }
.sys-perm-group-title { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fafbfd; font-size: 13px; font-weight: 600; }
.sys-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; padding: 10px 12px; }
.sys-perm-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; }
.sys-perm-check input { accent-color: var(--brand); }
.sys-perm-check code { margin-left: auto; font-size: 10.5px; color: var(--text-3); }

/* ==================== 门店日报 ==================== */
.sdr-page { display: flex; flex-direction: column; gap: 12px; }
.sdr-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sdr-bar select, .sdr-bar input[type="date"] { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.sdr-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sdr-section { padding: 14px 16px; }
.sdr-section-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.sdr-yesterday { margin-top: 8px; font-size: 11.5px; color: var(--text-3); background: #fafbfd; padding: 5px 8px; border-radius: 5px; }
.sdr-live-bar { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 14px; background: #fff; border-radius: 8px; box-shadow: var(--shadow); font-size: 12.5px; color: var(--text-2); }
.sdr-live-bar b { color: var(--text); }
.sdr-warns { display: flex; flex-direction: column; gap: 4px; }
.sdr-warn { background: #fff7e6; border: 1px solid #ffd591; color: #d46b08; padding: 8px 12px; border-radius: 6px; font-size: 12.5px; }
.sdr-err { background: #fff1f0; border: 1px solid #ffa39e; color: #cf1322; padding: 8px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600; }
.sdr-ok { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; padding: 8px 12px; border-radius: 6px; font-size: 12.5px; }
.sdr-actions { display: flex; gap: 10px; justify-content: flex-end; }
.sdr-locked-banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff1f0; border: 1px solid #ffa39e; border-radius: 8px; color: #cf1322; font-size: 13px; flex-wrap: wrap; }
.sdr-confirm-box { background: #fafbfd; border: 1px dashed #d9d9d9; border-radius: 8px; padding: 10px 14px; margin: 8px 0; font-size: 13px; line-height: 1.9; }
.sdr-confirm-box b { color: var(--text); }
.sdr-headline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding: 10px 14px; background: linear-gradient(135deg, #fafbfd, #f0f7ff); border-radius: 10px; border: 1px solid #e0eaff; }
.sdr-title { font-size: 18px; font-weight: 700; color: var(--text); }
.sdr-headline-datetime { font-size: 14px; font-weight: 700; color: var(--brand); background: linear-gradient(135deg, var(--brand-light), #fff); padding: 6px 14px; border-radius: 8px; border: 1px solid #ffd591; letter-spacing: 0.3px; }
.sdr-note-section { padding: 14px 16px; }
.sdr-note-section .sdr-section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.sdr-sub-tip { font-size: 12px; color: var(--text-3); font-weight: 400; }
.sdr-note { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; line-height: 1.7; background: #fafbfd; resize: vertical; min-height: 120px; }
.sdr-note:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(24,144,255,.1); }

/* ==================== 排班 vs 出勤 ==================== */
.sc-page { display: flex; flex-direction: column; gap: 10px; }
.sc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-bar select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.sc-warn { margin: 10px 0; padding: 10px 14px; background: #fff8e6; border: 1px solid #f0d48a; border-radius: 8px; font-size: 12.5px; color: #8a6d1a; line-height: 1.7; }
.mgr-todos { display: flex; flex-direction: column; gap: 8px; }
.mgr-todo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: background .12s, transform .12s; }
.mgr-todo:hover { background: #f8f9fb; transform: translateX(2px); }
.mgr-todo-ic { font-size: 16px; flex: none; }
.mgr-todo-lb { flex: 1; font-size: 13px; color: var(--text-1); }
.mgr-todo-cnt { background: var(--brand); color: #fff; border-radius: 20px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; padding: 0 6px; }
.mgr-todo-go { color: var(--text-3); font-size: 16px; }
.mgr-empty { padding: 26px 10px; text-align: center; color: var(--green); font-size: 13.5px; }
.mgr-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mgr-shortcuts .btn { width: 100%; text-align: left; }
@media (max-width: 900px) { .mgr-grid { grid-template-columns: 1fr !important; } }
.sc-week { font-size: 13px; font-weight: 600; color: var(--text-2); }
.sc-day-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-day-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; }
.sc-day-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.sc-day-date { font-size: 11px; opacity: .8; }
.sc-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); align-items: center; }
.sc-legend-dot { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.sc-legend-dot.plan { background: #1890ff; }
.sc-legend-dot.actual { background: #52c41a; }
.sc-legend-dot.miss { background: repeating-linear-gradient(45deg, #ff4d4f 0 4px, #fff 4px 8px); }
.sc-legend-dot.extra { background: #fa8c16; }
.sc-grid-wrap { overflow-x: auto; background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.sc-grid { min-width: 980px; }
.sc-head { display: flex; border-bottom: 2px solid var(--border); background: #f7f9fc; }
.sc-head-emp { width: 150px; min-width: 150px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; position: sticky; left: 0; background: #f7f9fc; z-index: 2; display: flex; align-items: center; }
.sc-head-tracks { flex: 1; display: flex; flex-direction: column; }
.sc-head-hours { display: flex; }
.sc-head-hour { flex: 2 1 0; min-width: 0; text-align: center; font-size: 11px; color: var(--text-3); border-left: 1px solid #eef1f6; padding: 3px 0; }
.sc-head-halves { display: flex; }
.sc-head-half { flex: 1 1 0; min-width: 0; text-align: center; font-size: 10px; color: var(--text-4, #b0b8c4); border-left: 1px solid #f2f4f8; }
.sc-head-times { width: 300px; min-width: 300px; display: flex; }
.sc-head-times span { flex: 1; padding: 8px 6px; font-size: 12px; font-weight: 600; text-align: center; border-left: 1px solid #eef1f6; }
.sc-body { }
.sc-row { display: flex; border-bottom: 1px solid #f0f2f7; }
.sc-row-emp { width: 150px; min-width: 150px; padding: 8px 12px; position: sticky; left: 0; background: #fff; z-index: 1; display: flex; flex-direction: column; justify-content: center; }
.sc-emp-name { font-size: 13px; font-weight: 600; }
.sc-emp-meta { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); }
.sc-row-tracks { flex: 1; }
.sc-track { position: relative; height: 30px; }
.sc-track-cells { display: flex; height: 100%; }
.sc-cell { flex: 1 1 0; min-width: 0; border-left: 1px solid #f2f4f8; }
.sc-cell.hour-edge { border-left-color: #e4e9f2; }
.sc-track-plan { background: rgba(24, 144, 255, .05); border-bottom: 1px dashed #eef1f6; }
.sc-track-actual { background: rgba(82, 196, 26, .04); }
.sc-block { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; color: #fff; font-size: 10.5px; display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; pointer-events: none; }
.sc-block.plan { background: #1890ff; }
.sc-block.actual { background: #52c41a; }
.sc-block.actual.live { background: linear-gradient(90deg, #52c41a, #95de64); }
.sc-block.miss { background: repeating-linear-gradient(45deg, #ff4d4f 0 5px, #ffa39e 5px 10px); }
.sc-block.extra { background: #fa8c16; }
.sc-row-times { width: 300px; min-width: 300px; display: flex; align-items: stretch; }
.sc-row-times .sc-t { flex: 1; padding: 8px 6px; font-size: 11.5px; display: flex; align-items: center; justify-content: center; text-align: center; border-left: 1px solid #f0f2f7; line-height: 1.4; word-break: break-all; }
.sc-t.col-plan { color: var(--blue); }
.sc-t.col-actual { color: var(--green); }
.sc-t.col-diff { font-weight: 600; }
.sc-t.col-diff.over { color: var(--amber); }
.sc-t.col-diff.less { color: var(--red); }
.sc-absent { color: var(--red); font-weight: 600; }
.sc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.sc-stat { background: #fff; border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); border-left: 4px solid var(--border); }
.sc-stat .lbl { font-size: 12px; color: var(--text-3); }
.sc-stat .val { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-stat .val.blue { color: var(--blue); } .sc-stat .val.green { color: var(--green); } .sc-stat .val.red { color: var(--red); } .sc-stat .val.brand { color: var(--brand); }
.sc-stat .sub { font-size: 11px; color: var(--text-3); }
@media (max-width: 900px) { .sdr-form-grid { grid-template-columns: 1fr; } .sys-role-layout { grid-template-columns: 1fr; } .sc-stats { grid-template-columns: repeat(2, 1fr); } }

/* ==================== 移动端 ==================== */
.mobile-overlay {
  position: fixed; inset: 0; background: rgba(20,28,44,.5); z-index: 90;
}
@media (max-width: 768px) {
  .sidebar { width: 52px; }
  .side-brand-text, .side-label, .side-arrow { display: none; }
  .side-btn { padding: 13px; justify-content: center; }
  .side-btn.active::before { display: none; }
  .side-btn.active { border-radius: 10px; margin: 2px 6px; width: auto; }
  .nav-flyout { left: 52px; width: 200px; }
  .mobile-menu-btn { display: block; }
  .user-meta { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 12px; }
}

/* ==================== 数据填报（财务） ==================== */
.fin-page { display: flex; flex-direction: column; gap: 12px; }
.fin-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.fin-tb-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.fin-toolbar select, .fin-toolbar input[type="date"] {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
  background: #fff; outline: none;
}
.fin-compare-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px;
}
.fin-cmp {
  flex: 1; min-width: 150px; background: #fafbfd; border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.fin-cmp .lbl { font-size: 11px; color: var(--text-3); }
.fin-cmp .val { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-cmp .sub { font-size: 11px; color: var(--text-3); }
.fin-compare-empty { color: var(--text-3); font-size: 13px; padding: 8px; }

.fin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fin-stat {
  background: #fff; border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 3px; border-left: 4px solid var(--border);
}
.fin-stat.blue { border-left-color: var(--blue); }
.fin-stat.green { border-left-color: var(--green); }
.fin-stat.amber { border-left-color: var(--amber); }
.fin-stat.brand { border-left-color: var(--brand); }
.fin-stat.red { border-left-color: var(--red); }
.fin-stat.purple { border-left-color: #7950f2; }
.fin-stat-label { font-size: 12px; color: var(--text-3); }
.fin-stat-value { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-stat-sub { font-size: 11px; color: var(--text-3); }

.fin-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.fin-form { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.fin-form-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.fin-form-sub { font-size: 12.5px; color: var(--text-3); }
.fin-form-body { padding: 14px 18px; }
.fin-group { margin-bottom: 16px; }
.fin-group-title {
  font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 10px;
  padding-left: 10px; border-left: 3px solid var(--brand);
}
.fin-group-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fin-field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 500; }
.fin-field input {
  width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fafbfd; outline: none; transition: border .2s, box-shadow .2s;
  font-variant-numeric: tabular-nums;
}
.fin-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,144,255,.1); background: #fff; }
.fin-field-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.fin-form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fafbfd; outline: none; resize: vertical; font-size: 13px;
}
.fin-form-actions {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.fin-calc-hint {
  display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2);
  background: #fafbfd; padding: 8px 12px; border-radius: 8px; flex: 1; min-width: 260px;
}
.fin-calc-hint b { color: var(--text); }
.fin-auto-stats { width: 100%; background: linear-gradient(180deg, #f7f9fc, #fbfcfe); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.fin-auto-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.fin-auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.fin-auto-item { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.fin-auto-l { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.fin-auto-v { font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.fin-side { display: flex; flex-direction: column; gap: 12px; }
.fin-month-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
/* v617：标题 + 长口径说明允许换行；标题文字不参与压缩（原来无 flex-wrap，360 上标题被口径说明挤成 296×73 的竖条） */
.fin-month-title { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 4px; }
.fin-month-h { flex: 0 0 auto; }
.fin-month-note { flex: 1 1 auto; min-width: 0; line-height: 1.65; }
@media (max-width: 768px) { .fin-month-title .fin-month-note { flex: 1 1 100%; } }
.fin-month-sub { font-size: 11.5px; color: var(--text-3); font-weight: 400; }
.fin-month-list { max-height: 320px; overflow-y: auto; }
.fin-month-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px;
  cursor: pointer; font-size: 12.5px; border-bottom: 1px solid #f4f6fa;
}
.fin-month-item:hover { background: #f8faff; }
.fin-month-item.active { background: var(--brand-light); }
.fin-month-item .d { font-variant-numeric: tabular-nums; color: var(--text-2); }
.fin-month-item .rev { flex: 1; text-align: right; font-weight: 600; }
.fin-month-empty { color: var(--text-3); font-size: 12.5px; padding: 12px; text-align: center; }
.fin-month-summary { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.fin-ms-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px dashed #f0f2f7; font-size: 12.5px;
}
.fin-ms-row:last-child { border-bottom: none; }
.fin-ms-row span { color: var(--text-2); }
.fin-ms-row b { font-variant-numeric: tabular-nums; }

@media (max-width: 1400px) {
  .fin-stats { grid-template-columns: repeat(4, 1fr); }
  .fin-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .fin-group-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .fin-stats { grid-template-columns: repeat(2, 1fr); }
  .fin-group-grid { grid-template-columns: 1fr; }
}

/* ==================== 财务管理 v36 新增 ==================== */
.fin-tabs { display: flex; gap: 8px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; width: fit-content; flex-wrap: wrap; }
.fin-tab { padding: 8px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: all .15s; }
.fin-tab:hover { background: rgba(24,144,255,.06); color: var(--blue); }
.fin-tab.active { background: linear-gradient(135deg, #FF7043, #E64A19); color: #fff; box-shadow: 0 3px 8px rgba(230,74,25,.3); }
.fin-help { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: #e6e9ef; color: #8a94a6; font-size: 10.5px; font-weight: 700; margin-left: 4px; cursor: help; vertical-align: middle; }
.fin-help:hover { background: var(--blue); color: #fff; }
.fin-tb-sub { font-size: 12px; color: var(--text-3); }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.fin-alerts { display: flex; flex-direction: column; gap: 6px; }
.fin-alert { padding: 9px 13px; border-radius: 9px; font-size: 13px; background: #fff; box-shadow: var(--shadow); border-left: 4px solid var(--blue); }
.fin-alert.warn { border-left-color: var(--amber); }
.fin-alert.danger { border-left-color: var(--red); background: #fff5f5; }
.fin-alert.info { border-left-color: var(--blue); }
.fin-alert.ok { border-left-color: var(--green); }
.fin-toolbar input[type="month"] { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13.5px; background: #fff; }
.fin-toolbar input[type="month"]:focus { border-color: var(--blue); outline: none; }
.fin-main .card { background: #fff; }
.fin-form-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.fin-form-head .btn { margin-left: auto; }

/* ===== 数据看板 ===== */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
.cell-num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-red { color: #dc2626; font-weight: 600; }
.cell-amber { color: #d97706; font-weight: 600; }
.cell-green { color: #16a34a; font-weight: 600; }

/* ===== 前后端版本报警条 ===== */
.version-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 999; background: #7f1d1d; color: #fff; padding: 8px 16px; font-size: 13px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.version-banner b { color: #ffd166; }
.ver-tag {
  position: fixed;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  font-size: 10.5px;
  color: rgba(43, 52, 69, .55);
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(228, 233, 242, .8);
  border-radius: 6px;
  padding: 2px 8px;
  pointer-events: none;
  user-select: none;
}
/* v615 热修2：手机端不再用浮动版本号遮正文（原来 fixed 右下压住列表/表头文字），版本号移到手机顶部标题栏右侧 */
body.mobile-app .ver-tag { display: none; }
/* v615 热修2：桌面端版本号收进页签条右端，避免 fixed 右下压住正文/卡片 */
@media (min-width: 769px) {
  .ver-tag { top: 62px; right: 14px; bottom: auto; }
}

/* ===== 费用管理（凭证样式 + 票据留底） ===== */
#modal-overlay .modal.expense-wide { max-width: 1600px; width: 97vw; }
#modal-overlay .modal.expense-wide { resize: both; overflow: hidden; min-width: 980px; min-height: 560px; max-height: 94vh; }
/* ???????v155???????? + ???? */
#modal-overlay .modal.voucher-wide { max-width: 1180px; width: 94vw; min-width: 920px; max-height: 92vh; resize: both; overflow: hidden; }
#modal-overlay .modal.voucher-wide .modal-body { overflow: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.voucher-box { background: #fff; border: 1px solid #dde1e8; border-radius: 12px; padding: 20px 24px 16px; box-shadow: 0 2px 12px rgba(31, 42, 68, 0.06); margin-top: 16px; }
#exp-voucher-live { overflow-x: auto; }
#modal-overlay .voucher-box { overflow-x: auto; }
.voucher-title { text-align: center; font-size: 21px; font-weight: 700; letter-spacing: 12px; color: #1b2333; padding: 6px 0 12px; border-bottom: 2px solid #1b2333; }
.voucher-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 26px; padding: 12px 4px 10px; font-size: 13px; color: #556; }
table.voucher-table { width: 934px; min-width: 0; margin: 4px auto 0; border-collapse: collapse; table-layout: fixed; }
table.voucher-table th, table.voucher-table td { border: 1px solid #c9c9c9; font-size: 13px; }
table.voucher-table thead th { background: #f6f6f2; color: #2b3245; font-weight: 600; text-align: center; height: 36px; padding: 0 2px; letter-spacing: 0.02em; }
table.voucher-table tbody td { height: 46px; text-align: center; color: #1c2333; overflow: hidden; }
table.voucher-table td.vc-sum { text-align: left; padding-left: 14px; }
table.voucher-table td.vc-act { text-align: left; padding-left: 12px; }
table.voucher-table td.vc-sym { width: 16px; font-size: 12px; color: #8a93a5; padding: 0; }
table.voucher-table td.vc-digit { width: 20px; min-width: 18px; border-left-style: dashed; color: #1c2333; font-size: 13px; padding: 0; font-variant-numeric: tabular-nums; }
table.voucher-table td.vc-digit.has { font-weight: 700; }
table.voucher-table td.vc-digit.neg, table.voucher-table td.vc-sym.neg { color: #c0392b; }
table.voucher-table tr.vc-total td { background: #faf6e8; font-weight: 650; height: 48px; }
.voucher-upper { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding: 14px 6px 4px; font-size: 13.5px; color: #333; }
.voucher-upper b { letter-spacing: 1px; }
.voucher-sign { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 30px; padding: 22px 8px 4px; font-size: 13px; color: #444; }
.voucher-sign span { letter-spacing: 0.03em; }
@media (max-width: 900px) {
  #modal-overlay .modal.expense-wide { min-width: 0; resize: none; max-height: 92vh; }
}
.exp-modal { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.35fr); gap: 20px; }
@media (max-width: 900px) { .exp-modal { grid-template-columns: 1fr; } }
.exp-form { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fcfcfd; }
.exp-vhead { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--text); padding-bottom: 8px; margin-bottom: 14px; }
.exp-vhead-wide { margin-bottom: 12px; }
.exp-vtitle { font-size: 17px; font-weight: 750; letter-spacing: 4px; color: #16213a; }
.exp-vno { font-size: 12px; color: var(--text-3); }
.exp-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.exp-meta-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; min-width: 0; }
.exp-meta-ic { font-size: 15px; flex: none; }
.exp-meta-t { flex: none; }
.exp-meta input, .exp-meta select { flex: 1; min-width: 0; border: 1px solid #e3e9f2; background: #fbfcfe; border-radius: 7px; padding: 6px 9px; font-size: 13px; font-family: inherit; color: #1b2537; transition: border-color .15s ease, box-shadow .15s ease; }
.exp-meta input:focus, .exp-meta select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: #fff; }
@media (max-width: 760px) { .exp-meta { grid-template-columns: 1fr 1fr; } }
.exp-items-wrap { margin-top: 2px; }
.exp-items-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #16213a; }
.exp-items-hint { font-size: 11.5px; font-weight: 400; color: var(--text-3); flex: 1; }
.exp-items { width: 100%; border-collapse: collapse; table-layout: fixed; }
.exp-items th { text-align: left; padding: 9px 10px; font-size: 12px; color: #3d4a5f; background: #f3f5f9; border: 1px solid var(--line); letter-spacing: .02em; }
.exp-items td { padding: 8px; border: 1px solid var(--line); vertical-align: top; }
.exp-item-no { text-align: center; color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; padding-top: 12px !important; }
.exp-item-del { text-align: center; vertical-align: middle !important; }
.exp-del-row { width: 26px; height: 26px; border: 1px solid transparent; background: transparent; border-radius: 7px; color: #9aa3b2; cursor: pointer; font-size: 13px; line-height: 1; }
.exp-del-row:hover { color: var(--red); background: #fff1f0; border-color: rgba(220,53,69,.25); }
.exp-items textarea { width: 100%; box-sizing: border-box; border: 1px solid #e3e9f2; border-radius: 8px; background: #fbfcfe; padding: 9px 10px; font-size: 13.5px; line-height: 1.7; font-family: inherit; resize: vertical; min-height: 225px; color: #1b2537; transition: border-color .15s ease, box-shadow .15s ease; }
.exp-items textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: #fff; }
.exp-items input, .exp-items select { width: 100%; box-sizing: border-box; border: 1px solid #e3e9f2; background: #fbfcfe; padding: 8px 9px; font-size: 13.5px; border-radius: 8px; transition: border-color .15s ease, box-shadow .15s ease; }
.exp-items input:focus, .exp-items select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: #fff; }
.exp-cell-mid { vertical-align: middle !important; }
.exp-items input[type="number"] { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.exp-pay-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 14px; background: #f0f6ff; border: 1px solid #d6e4f8; border-radius: 10px; }
.exp-pay-lbl { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.exp-pay-row select { flex: 1; max-width: 240px; border: 1px solid #d6e4f8; border-radius: 8px; padding: 7px 10px; font-size: 13px; background: #fff; }
.exp-total-row { display: flex; align-items: baseline; gap: 14px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.exp-total-lbl { font-size: 12.5px; color: var(--text-2); font-weight: 650; }
.exp-total-num { font-size: 24px; font-weight: 780; color: #d9480f; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.exp-total-cn { font-size: 12.5px; color: var(--text-2); }
.exp-tip { font-size: 11.5px; color: var(--text-3); margin-top: 10px; line-height: 1.6; }

/* ===== 薪资结算（v74） ===== */
.sal-page { display: flex; flex-direction: column; gap: 12px; }
.sal-rule { font-size: 12.5px; color: #3d4a5f; background: #fff7f0; border: 1px solid rgba(232,89,12,.22); border-radius: 10px; padding: 8px 12px; }
.sal-table td, .sal-table th { white-space: nowrap; }
/* v328：薪资结算——表头吸顶 + 左侧门店/姓名列冻结（横向滚动行列不丢） */
.sal-scroll { overflow: auto !important; max-height: calc(100vh - 250px); -webkit-overflow-scrolling: touch; }
.sal-scroll .sal-table { min-width: max-content; }
.sal-scroll .sal-table thead { z-index: 8; }
.sal-scroll .sal-table thead th:nth-child(1),
.sal-scroll .sal-table thead th:nth-child(2) { z-index: 9; }
.sal-scroll .sal-table thead th:nth-child(1),
.sal-scroll .sal-table tbody tr:not(.sal-store-head):not(.sal-sum-row) td:nth-child(1) {
  position: sticky; left: 0; z-index: 3; background: #fff; box-shadow: 1px 0 0 #eef2f7;
}
.sal-scroll .sal-table thead th:nth-child(2),
.sal-scroll .sal-table tbody tr:not(.sal-store-head):not(.sal-sum-row) td:nth-child(2) {
  position: sticky; left: var(--sal-c1w, 150px); z-index: 3; background: #fff; box-shadow: 1px 0 0 #eef2f7;
}
.sal-scroll .sal-table tbody tr:not(.sal-store-head):not(.sal-sum-row):hover td:nth-child(1),
.sal-scroll .sal-table tbody tr:not(.sal-store-head):not(.sal-sum-row):hover td:nth-child(2) { background: #f8faff; }
/* v617：操作列（🧬套模板 / 删）固定在右侧——1440 下表宽 1281 > 容器 1210，末列默认被裁 71px，要横滑才点到。
   ≥601px 才启用：360 手机下左冻结两列 260 + 右冻结 112 会超过可视宽 312，反而盖住数据列 */
@media (min-width: 601px) {
  .sal-scroll .sal-table thead th:last-child,
  .sal-scroll .sal-table tbody tr[data-i] td:last-child {
    position: sticky; right: 0; z-index: 4; background: #fff; box-shadow: -1px 0 0 #eef2f7;
  }
  .sal-scroll .sal-table thead th:last-child { z-index: 9; }
  .sal-scroll .sal-table tbody tr[data-i]:hover td:last-child { background: #f8faff; }
}
.sal-table .sal-inp { width: 86px; box-sizing: border-box; border: 1px solid #e3e9f2; background: #fbfcfe; border-radius: 7px; padding: 6px 8px; font-size: 13px; font-family: inherit; color: #1b2537; transition: border-color .15s ease, box-shadow .15s ease; }
.sal-table .sal-inp:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); background: #fff; }
/* v381：上月带入的基本薪资/补贴——灰字灰底标记，提示"待核对"，手改后自动恢复常规样式 */
.sal-table .sal-inp.sal-carry { color: #8b95a5; background: #f4f6fa; border-color: #dfe5ee; border-style: dashed; font-style: normal; }
.sal-table .sal-inp.sal-carry:focus { color: #1b2537; background: #fff; border-style: solid; border-color: var(--blue); }
.sal-carry-note { margin: 6px 0 0; padding: 7px 12px; border-radius: 8px; background: #f4f6fa; border: 1px dashed #d8dee9; color: #5a6478; font-size: 12.5px; line-height: 1.6; }
/* v514：薪资模板——来自模板的金额蓝色标记（与「带入值」灰色区分）；模板说明条 */
.sal-table .sal-inp.sal-tpl { color: #1d4ed8; background: #eef4ff; border-color: #cddffb; border-style: dashed; }
.sal-table .sal-inp.sal-tpl:focus { color: #1b2537; background: #fff; border-style: solid; border-color: var(--blue); }
.sal-tpl-note { margin: 6px 0 0; padding: 7px 12px; border-radius: 8px; background: #eef4ff; border: 1px dashed #cddffb; color: #24457f; font-size: 12.5px; line-height: 1.6; }
/* v521：与薪资模板标准不一致的格子/提示条（老板要求"不匹配不应该出现"，改不掉的地方必须一眼看见） */
.sal-table .sal-inp.sal-tpl-bad { color: #b42318; background: #fff1f0; border-color: #f6b0a8; border-style: solid; box-shadow: 0 0 0 1px #f6b0a8 inset; }
.sal-table .sal-inp.sal-tpl-bad:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.sal-tpl-warn { margin: 6px 0 0; padding: 7px 12px; border-radius: 8px; background: #fff1f0; border: 1px dashed #f6b0a8; color: #b42318; font-size: 12.5px; line-height: 1.6; }
.sal-page .sal-tpl-warn { padding: 5px 10px; font-size: 12px; }
.sal-page .sal-tpl-note { padding: 5px 10px; font-size: 12px; }
#tpl-table .tpl-inp { text-align: right; font-variant-numeric: tabular-nums; }
/* v520：薪资模板里"不对口"的格子置灰（全职只用 7 项构成、兼职只用时薪） */
#tpl-table input.tpl-off { background: #f4f6fa; color: #c3cad6; border-color: #e8ecf4; border-style: dashed; }
#tpl-table input.tpl-off:focus { box-shadow: none; color: #c3cad6; }
/* v382：损益-竖向明细 菜品支出明细的占比小条与合计行 */
.plv-sum { font-size: 12px; color: #3d4a5f; margin-bottom: 6px; }
.plv-sum b { color: #16213a; font-size: 13px; }
.plv-bar { height: 4px; background: #edf0f5; border-radius: 3px; margin-top: 3px; overflow: hidden; }
.plv-bar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.sal-table td input[data-f="remark"] { width: 160px; }
.sal-num { text-align: right; font-variant-numeric: tabular-nums; color: #3d4a5f; }
.sal-net { font-weight: 700; color: #d9480f; }
/* v504：门店段内的小计——必须是真正的表格行（原来复用 .sal-store-sum 卡片类，display:inline-flex 会撑坏表格结构）
   并且整行 sticky 到左侧：表格是超宽的（横向滚动），右对齐会把"本店合计"甩到看不见的地方，看着就是一条空带 */
.sal-table tr.sal-sum-row > td {
  background: #f2f6fb !important; border-top: 1px dashed #d5dfec; border-bottom: 1px solid #e8edf5;
  text-align: left; font-size: 12px; font-weight: 700; color: #46536b;
  padding: 4px 12px !important; line-height: 1.35;
}
/* 单元格比滚动口还宽时 td 上的 sticky 会失效（横向滚动时"门店标题/本店合计"整条滑出屏幕、只剩空带），
   所以把文字放进一个窄的内层容器来钉在左侧。 */
.sal-table tr.sal-store-head > td > .sal-pin,
.sal-table tr.sal-sum-row > td > .sal-pin { position: sticky; left: 0; display: inline-block; white-space: nowrap; }
.sal-table tr.sal-sum-row > td b { color: #d9480f; font-size: 12.5px; margin: 0 1px; font-variant-numeric: tabular-nums; }
.sal-table tr.sal-col-head > td { font-weight: 600; color: var(--text-3); background: var(--bg-1, #f7f8fa); }
.sal-page .sal-table td { padding: 8px 10px; }
.sal-page .sal-table .sal-inp { padding: 5px 8px; }

/* ===== v508：薪资核算表「紧凑模式」=====
   目标：所有列挤进一屏，不再横向滚动。
   做法：固定列宽 + 铺满可用宽度（min-width 兜底，窗口再小才横向滚），
        同时把输入框/内边距/字号整体压一档。 */
.sal-page .sal-scroll { max-height: calc(100vh - 228px); }
.sal-page .sal-rule { padding: 5px 10px; font-size: 12px; }
.sal-page .sal-carry-note { padding: 5px 10px; font-size: 12px; }
.sal-page .fin-toolbar { gap: 6px; }
.sal-page .fin-toolbar .btn { padding: 5px 9px; font-size: 12.5px; }
.sal-page .sal-scroll .sal-table.sal-compact {
  width: 100%; min-width: 1010px; table-layout: fixed;
}
.sal-page .sal-table.sal-compact th {
  font-size: 11px; padding: 4px 4px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; color: #5a6478;
}
.sal-page .sal-table.sal-compact td { padding: 2px 2px; }
/* v525：两列冻结列禁止内容外溢 —— 否则姓名/银行卡会压住右边"底薪"输入框的首位数字（2200 显示成 200） */
.sal-page .sal-table.sal-compact tbody td:nth-child(1),
.sal-page .sal-table.sal-compact tbody td:nth-child(2) { overflow: hidden; }
.sal-page .sal-table.sal-compact .sal-inp {
  width: 100%; min-width: 0; padding: 2px 2px; font-size: 12px;
  border-radius: 6px; box-sizing: border-box;
}
/* [type=number] 的上下微调箭头会白占约 10px —— 紧凑模式里必须去掉，否则"2200"这种四位数都显示不全 */
.sal-page .sal-table.sal-compact input[type="number"]::-webkit-outer-spin-button,
.sal-page .sal-table.sal-compact input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; appearance: none; margin: 0;
}
.sal-page .sal-table.sal-compact input[data-f="remark"] { width: 100%; }
.sal-page .sal-table.sal-compact select.sal-store-sel {
  width: 100%; max-width: none !important; padding: 2px 1px; font-size: 11px;
}
.sal-page .sal-table.sal-compact .sal-num { font-size: 12px; }
.sal-page .sal-table.sal-compact .sal-net { font-size: 12.5px; }
.sal-page .sal-table.sal-compact td > b { font-size: 12.5px; }
.sal-page .sal-table.sal-compact .sal-bank { font-size: 9px !important; letter-spacing: -.2px !important; color: #6b7688; white-space: nowrap; overflow: hidden; }
.sal-page .sal-table.sal-compact .sal-del { padding: 2px 5px; font-size: 11px; line-height: 1.2; }
.sal-page .sal-table.sal-compact .badge { font-size: 10px; padding: 1px 5px; }
.sal-page .sal-table.sal-compact .sal-store-head td { padding: 4px 8px !important; font-size: 12px; }
.sal-page .sal-table.sal-compact .sal-sum-row > td { padding: 3px 8px !important; font-size: 11.5px; }
.sal-page .sal-table.sal-compact .sal-col-head > td { padding: 1px 4px !important; font-size: 10px !important; }
.sal-sums { display: flex; flex-wrap: wrap; gap: 10px; }
.sal-store-sum { display: inline-flex; gap: 12px; align-items: baseline; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 12.5px; background: #fbfcfe; }
.sal-store-name { font-weight: 700; color: #16213a; }
.sal-store-sum b { color: #d9480f; font-size: 14px; }
.sal-total { display: flex; gap: 18px; align-items: baseline; background: #16213a; color: #fff; border-radius: 12px; padding: 12px 18px; font-size: 13.5px; flex-wrap: wrap; }
.sal-total b { font-size: 18px; color: #ffb37a; }
.sal-paid-note { margin-left: auto; color: #aeb9cc; font-size: 12px; }
.sal-empty { color: var(--text-3); font-size: 12.5px; }
.sal-cycle-btn { white-space: nowrap; }
.sal-store-head td { background: #eef2f8; color: #16213a; font-weight: 700; font-size: 12.5px; padding: 6px 10px !important; border-top: 1px solid #dbe3ee; }
.sal-report td { padding: 8px 10px; }
.sal-report-total td { background: #fff3e8; font-weight: 700; border-top: 2px solid rgba(232,89,12,.35); }
.imp-preview { margin-top: 12px; }
.imp-note { font-size: 12px; color: #3d4a5f; margin: 6px 0; line-height: 1.7; background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }

/* ===== 督导门店打分 v329：月度累计榜 ===== */
.svm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 12px; align-items: start; }
.svm-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.svm-table .svm-rank { font-weight: 700; color: var(--text-3); }
.svm-rank-no.gold { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #f6c453, #e39b1a); color: #fff; font-size: 12px; }
.svm-store-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.svm-score-head { display: flex; align-items: baseline; gap: 6px; }
.svm-scorebar { height: 6px; background: #edf0f5; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.svm-score-fill { height: 100%; border-radius: 4px; min-width: 0; transition: width .3s ease; }
.svm-exp-row > td { background: #f7f9fc !important; padding: 8px 12px !important; }
.svm-exp-wrap { padding: 6px 2px; }
.svm-insight-line { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.svm-insight-line span { background: #eef2f8; border: 1px solid #e2e8f2; color: #3d4a5f; font-size: 11.5px; padding: 3px 8px; border-radius: 20px; }
.svm-visit { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: #fff; overflow: hidden; }
.svm-visit-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px dashed #e6eaf1; }
.svm-visit-head .svm-slot { background: #f1f4f9; color: #33405a; font-size: 11px; padding: 2px 8px; border-radius: 12px; margin-left: 6px; }
.svm-visit-nums { margin-left: auto; display: inline-flex; gap: 10px; font-size: 12.5px; align-items: center; }
.svm-vitems { padding: 4px 10px 10px; }
.svm-vitems-title { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin: 6px 0; }
.svm-vitems-ok { color: var(--green); font-size: 12.5px; padding: 8px 10px; }
.svm-item { display: flex; gap: 8px; align-items: flex-start; padding: 7px 4px; border-bottom: 1px dashed #eef1f6; }
.svm-item:last-child { border-bottom: none; }
.svm-item-body { flex: 1; min-width: 0; }
.svm-item-reason { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.svm-item-deduct { color: var(--red); font-weight: 700; font-size: 13px; white-space: nowrap; }
.svm-photos, .svm-item .sv-ph { display: flex; gap: 6px; flex-wrap: wrap; }
.svm-photos img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f2; cursor: zoom-in; }
.svm-mod-row { margin: 8px 0; }
.svm-mod-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #33405a; margin-bottom: 4px; }
.svm-bar { height: 6px; background: #edf0f5; border-radius: 4px; overflow: hidden; }
.svm-bar-fill { height: 100%; background: var(--red); border-radius: 4px; min-width: 2px; }
.svm-insight { display: flex; flex-direction: column; gap: 8px; }
.svm-warn { background: #fff7ed; border: 1px solid #f5d9b8; color: #7c4a03; font-size: 12px; padding: 8px 10px; border-radius: 8px; line-height: 1.6; }
.svm-top { display: flex; gap: 8px; align-items: flex-start; padding: 6px 2px; font-size: 12px; }
.svm-top-no { flex: 0 0 18px; height: 18px; border-radius: 50%; background: #eef2f8; color: #3d4a5f; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.svm-top-sub { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.svm-ai-note { font-size: 11.5px; color: #5b6b82; background: #f3f6fb; border-radius: 8px; padding: 7px 9px; line-height: 1.6; }
@media (max-width: 1100px) {
  .svm-grid { grid-template-columns: 1fr; }
}

/* ===== 督导管理（v79） ===== */
.sv-page { display: flex; flex-direction: column; gap: 12px; }
.sv-rule { font-size: 12.5px; color: #3d4a5f; background: #fff7f0; border: 1px solid rgba(232,89,12,.22); border-radius: 10px; padding: 7px 12px; }
.sv-sub-title { font-size: 13.5px; font-weight: 700; color: #16213a; margin-bottom: 8px; }
.sv-empty-text { color: var(--text-3); font-size: 12.5px; padding: 10px 0; }
.sv-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: #7b8798; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
.sv-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.sv-legend-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.sv-legend-dot.slot-kaidang { background: #e6b53a; }
.sv-legend-dot.slot-mid, .sv-legend-dot.slot-wushi { background: #4dabf7; }
.sv-legend-dot.slot-wuxiu { background: #69b263; }
.sv-legend-dot.slot-erkai { background: #9775fa; }
.sv-legend-dot.slot-eve, .sv-legend-dot.slot-wanshi { background: #f0655a; }
.sv-legend-dot.slot-close, .sv-legend-dot.slot-shoudang { background: #94a3b8; }
.sv-plan-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; padding: 10px 14px; border-radius: 14px; box-shadow: var(--shadow-card); }
.sv-weeknav { display: inline-flex; align-items: center; gap: 6px; background: #f4f6fa; border: 1px solid var(--line); border-radius: 12px; padding: 5px 6px; }
.sv-weeknav-btn { width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: var(--text-2); font-size: 17px; line-height: 1; cursor: pointer; transition: all .15s; }
.sv-weeknav-btn:hover { border-color: var(--brand); color: var(--brand); }
.sv-weeknav-btn:active { transform: scale(.93); }
.sv-weeknav-core { display: flex; flex-direction: column; align-items: center; min-width: 96px; line-height: 1.2; }
.sv-weeknav-label { font-size: 13px; font-weight: 750; color: #16213a; }
.sv-weeknav-range { font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sv-weeknav-now { border: 1px solid var(--brand); color: var(--brand); background: #fff; font-size: 11.5px; padding: 4px 10px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.sv-weeknav-now:hover { background: var(--brand); color: #fff; }
.sv-weeknav-jump { border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; color: var(--text); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.sv-weeknav-jump:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,89,12,.12); }
.sv-plan-stats { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; white-space: nowrap; }
.sv-plan-stats b { color: var(--brand); font-variant-numeric: tabular-nums; }
.sv-plan-req { font-size: 11.5px; color: #7b8798; background: #fff7f0; border: 1px solid rgba(232,89,12,.2); border-radius: 99px; padding: 5px 12px; }
.sv-plan-table { table-layout: fixed; }
.sv-plan-table th, .sv-plan-table td { padding: 8px 7px; vertical-align: top; }
.sv-grid-wrap { background: #fff; border-radius: 14px; box-shadow: var(--shadow-card); overflow: auto; }
.sv-col-store { width: 128px; background: #f6f8fb; position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--line); vertical-align: middle; }
.sv-store-cell { display: flex; align-items: center; gap: 8px; }
.sv-col-store .sv-store-ic { width: 24px; height: 24px; border-radius: 8px; background: var(--brand-light); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 750; flex: none; }
.sv-store-name { font-weight: 700; color: #16213a; font-size: 12.5px; line-height: 1.3; min-width: 0; }
.sv-day-head { text-align: center; font-size: 12px; }
.sv-day-name { display: block; color: #3d4a5f; font-weight: 650; }
.sv-day-date { display: block; font-size: 11px; color: #9aa3b2; margin-top: 1px; }
.sv-day-head.today { background: linear-gradient(180deg, #fff3e8, #fff8f1); }
.sv-day-head.today .sv-day-name { color: var(--brand); }
.sv-day-head.today .sv-day-date { color: #fff; font-weight: 700; background: var(--brand); border-radius: 99px; padding: 1px 8px; display: inline-block; margin-top: 2px; }
.sv-day-head.weekend .sv-day-name { color: #b07a1a; }
.sv-day-cell { min-height: 64px; }
.sv-day-cell.today { background: #fffaf3; }
.sv-day-cell.weekend { background: #fdfbf7; }
.sv-plan-cell { position: relative; border-radius: 10px; padding: 8px 9px 7px 12px; margin: 3px 2px 6px; border: 1px solid transparent; box-shadow: 0 1px 2px rgba(26,41,66,.05); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.sv-plan-cell::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: #c7d0dd; }
.sv-plan-cell:hover { transform: translateY(-1px); box-shadow: var(--shadow-card-hover); }
.sv-plan-cell.sv-slot-opening { background: #fff8e6; border-color: #f2dda6; }
.sv-plan-cell.sv-slot-mid { background: #eef6ff; border-color: #cfe3fa; }
.sv-plan-cell.sv-slot-eve { background: #fff0ef; border-color: #f6cfcc; }
.sv-plan-cell.sv-slot-close { background: #f0f1f5; border-color: #d8dbe4; }
.sv-plan-cell.sv-slot-kaidang { background: #fff8e6; border-color: #f2dda6; } .sv-plan-cell.sv-slot-kaidang::before { background: #e6b53a; }
.sv-plan-cell.sv-slot-wushi { background: #eef6ff; border-color: #cfe3fa; } .sv-plan-cell.sv-slot-wushi::before { background: #4dabf7; }
.sv-plan-cell.sv-slot-wuxiu { background: #f1f7ef; border-color: #d4e6cf; } .sv-plan-cell.sv-slot-wuxiu::before { background: #69b263; }
.sv-plan-cell.sv-slot-erkai { background: #f3efff; border-color: #ddd2f5; } .sv-plan-cell.sv-slot-erkai::before { background: #9775fa; }
.sv-plan-cell.sv-slot-wanshi { background: #fff0ef; border-color: #f6cfcc; } .sv-plan-cell.sv-slot-wanshi::before { background: #f0655a; }
.sv-plan-cell.sv-slot-shoudang { background: #f0f1f5; border-color: #d8dbe4; } .sv-plan-cell.sv-slot-shoudang::before { background: #8a97a8; }
.sv-plan-cell.sv-slot-none { background: #fbfcfe; border-color: #e3e9f2; }
.sv-plan-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-bottom: 3px; }
.sv-plan-slot { font-size: 10.5px; font-weight: 750; border-radius: 6px; padding: 1px 7px; background: #fff; border: 1px solid; }
.sv-slot-kaidang .sv-plan-slot { color: #b07a1a; border-color: #f2dda6; }
.sv-slot-wushi .sv-plan-slot { color: #2f7fd1; border-color: #cfe3fa; }
.sv-slot-wuxiu .sv-plan-slot { color: #3d8f43; border-color: #d4e6cf; }
.sv-slot-erkai .sv-plan-slot { color: #6f4fd1; border-color: #ddd2f5; }
.sv-slot-wanshi .sv-plan-slot { color: #c94a42; border-color: #f6cfcc; }
.sv-slot-shoudang .sv-plan-slot { color: #6b7889; border-color: #d8dbe4; }
.sv-slot-none .sv-plan-slot { color: #8a97a8; border-color: #e3e9f2; }
.sv-plan-note { flex: none; cursor: default; }
.sv-plan-focus { display: flex; flex-wrap: wrap; gap: 3px; margin: 3px 0; }
.sv-focus-tag { font-size: 10px; color: #b13a08; background: #fff; border: 1px solid #f3d9c8; border-radius: 5px; padding: 1px 5px; }
.sv-wb { margin-top: 4px; display: flex; flex-direction: column; gap: 4px; }
.sv-wb-line { font-size: 11.5px; color: #3d4a5f; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.sv-wb-time { font-size: 10.5px; color: var(--text-3); }
.sv-wb-done { background: #f2fbf2; border: 1px solid #d3ecd4; border-radius: 7px; padding: 5px 7px; }
.sv-wb-doing { background: #fff8e6; border: 1px solid #f2dda6; border-radius: 7px; padding: 5px 7px; }
.sv-plan-ops { display: flex; gap: 4px; margin-top: 4px; opacity: 0; transition: opacity .15s ease; }
.sv-plan-cell:hover .sv-plan-ops { opacity: 1; }
.sv-cell-empty { font-size: 12px; color: #a3adbd; padding: 10px 6px; border: 1px dashed #dbe1ea; border-radius: 8px; text-align: center; cursor: pointer; transition: all .15s ease; }
.sv-cell-empty:hover { border-color: var(--brand); color: var(--brand); background: #fff7f0; }
.sv-plan-suggest { background: #fff; border-radius: 14px; box-shadow: var(--shadow-card); padding: 14px 16px; }
.sv-suggest-list { display: flex; flex-direction: column; gap: 6px; }
.sv-suggest-item { font-size: 12.5px; background: #fbfcfe; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: #3d4a5f; }
.sv-module { margin-bottom: 14px; }
.sv-module-head { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: #16213a; margin-bottom: 6px; }
.sv-module-max { font-size: 11.5px; color: var(--text-3); }
.sv-it-table td { padding: 6px 8px; }
.sv-it-code { font-weight: 700; color: #7b8798; font-size: 12px; }
.sv-it-label { font-size: 13px; }
.sv-it-desc { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.sv-score-inp { width: 64px; border: 1px solid #e3e9f2; border-radius: 7px; padding: 5px 7px; font-size: 13px; }
.sv-reason { width: 100%; min-width: 120px; border: 1px solid #e3e9f2; border-radius: 7px; padding: 5px 7px; font-size: 12.5px; }
.sv-na { font-size: 12px; color: #7b8798; }
.sv-photos { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.sv-ph { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }
.sv-photos video.sv-ph { width: 70px; height: 46px; }
/* v585：证据缩略图——视频播放角标 + 右上角删除按钮（点图=看大图/放视频） */
.sv-thumb { position: relative; display: inline-block; line-height: 0; }
.sv-thumb > .sv-photos, .sv-thumb img, .sv-thumb video { display: block; }
.sv-thumb .sv-thumb-del {
  position: absolute; top: -5px; right: -5px; width: 15px; height: 15px; border-radius: 50%;
  background: #e5484d; color: #fff; font-size: 11px; line-height: 15px; text-align: center;
  font-style: normal; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.25); z-index: 2;
}
.sv-vwrap { position: relative; display: inline-block; line-height: 0; }
.sv-vwrap > video { pointer-events: none; }
.sv-vplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 18px; height: 18px; box-sizing: border-box; padding-left: 1px; border-radius: 50%;
  background: rgba(15,22,36,.6); color: #fff; font-size: 8px; line-height: 18px; text-align: center;
  font-style: normal; pointer-events: none;
}
.sv-live-total { font-size: 16px; font-weight: 700; color: #d9480f; }
.sv-bonus { border: 1px dashed #d3dbe8; border-radius: 10px; padding: 10px 12px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.sv-bonus-item { font-size: 12.5px; color: #3d4a5f; display: flex; gap: 6px; align-items: baseline; }
.sv-bonus-item span { color: var(--text-3); font-size: 11.5px; }
.sv-report-head { font-size: 17px; font-weight: 750; color: #16213a; margin-bottom: 10px; }
.sv-report-row { font-size: 13px; color: #3d4a5f; margin: 6px 0; line-height: 1.7; }
.sv-trend { display: flex; gap: 12px; align-items: flex-end; min-height: 90px; flex-wrap: wrap; }
.sv-trend-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sv-trend-bars { display: flex; gap: 3px; align-items: flex-end; height: 64px; }
.sv-trend-bar { width: 10px; border-radius: 3px 3px 0 0; }
.sv-trend-bar.lv-A { background: #e03131; }
.sv-trend-bar.lv-B { background: #f59f00; }
.sv-trend-bar.lv-C { background: #94a3b8; }
.sv-trend-bar.lv-excellent { background: #2f9e44; }
.sv-trend-date { font-size: 11px; color: var(--text-3); }
.sv-evidence { display: flex; gap: 6px; flex-wrap: wrap; }
.sv-focus-picker { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.sv-focus-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fbfcfe; }
.sv-focus-group-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #16213a; margin-bottom: 8px; }
.sv-focus-group-ops { display: flex; gap: 6px; }
.sv-focus-op { border: 1px solid #dfe5ee; background: #fff; color: #5b6472; font-size: 11.5px; padding: 3px 9px; border-radius: 7px; cursor: pointer; transition: all .15s ease; }
.sv-focus-op:hover { border-color: var(--brand); color: var(--brand); }
.sv-focus-items { display: flex; flex-wrap: wrap; gap: 7px; }
.sv-focus-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e0e6ef; background: #fff;
  border-radius: 9px; padding: 6px 11px; font-size: 12.5px; color: #3d4a5f; cursor: pointer;
  transition: all .16s ease; font-family: inherit;
}
.sv-focus-chip:hover { border-color: #c9d4e3; background: #f7f9fc; transform: translateY(-1px); }
.sv-focus-chip .sv-chip-box {
  width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid #c3ccda; background: #fff;
  color: transparent; font-size: 10px; line-height: 13px; text-align: center; font-weight: 800; flex: none;
  transition: all .16s ease;
}
.sv-focus-chip.on { border-color: var(--brand); background: linear-gradient(135deg, #fff3e8, #ffe9d6); color: #b13a08; box-shadow: 0 0 0 3px rgba(232,89,12,.10); }
.sv-focus-chip.on .sv-chip-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.sv-focus-count { margin-left: 8px; font-size: 11.5px; color: var(--brand); font-weight: 600; background: #fff3e8; padding: 1px 8px; border-radius: 99px; }
.sv-hint { font-size: 12px; color: #7b8798; background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.sv-hint.warn { color: #b13a08; background: #fff7f0; border-color: rgba(232,89,12,.28); }
.sv-slot-rows { display: flex; flex-direction: column; gap: 8px; }
.sv-slot-row { display: flex; align-items: center; gap: 8px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.sv-slot-lbl { font-size: 12px; color: #7b8798; }
.sv-slot-row select { min-width: 110px; }
.sv-slot-del { border: 1px solid #f1d5d2; background: #fff7f6; color: #d9480f; width: 24px; height: 24px; border-radius: 7px; line-height: 1; cursor: pointer; font-size: 12px; }
.sv-slot-del:hover { background: #ffe3df; }
.sv-ai { border: 1px solid #d9cdf5; background: linear-gradient(160deg, #faf7ff, #f4efff); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.sv-ai-head { font-size: 13px; font-weight: 700; color: #5a3eb5; }
.sv-ai-summary { font-size: 12.5px; color: #3d4a5f; line-height: 1.7; }
.sv-ai-row { font-size: 12.5px; color: #3d4a5f; }
.sv-ai-row.warn { color: #c0392b; font-weight: 600; }
.sv-ai-sug { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: #3d4a5f; border-top: 1px dashed #d8cdf0; padding-top: 7px; }
.sv-ai-sug b { color: #5a3eb5; }
.sv-ai-apply { border: 1px solid #7c5cd6; color: #5a3eb5; background: #fff; border-radius: 7px; font-size: 11.5px; padding: 2px 10px; cursor: pointer; }
.sv-ai-apply:hover { background: #7c5cd6; color: #fff; }
.att-sync-missed { font-size: 12.5px; color: #b13a08; background: #fff7f0; border: 1px solid rgba(232,89,12,.28); border-radius: 10px; padding: 8px 12px; line-height: 1.6; }
.sv-top-lost { display: flex; flex-direction: column; gap: 8px; }
.sv-top-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.sv-top-no { width: 20px; height: 20px; border-radius: 50%; background: #fff3e8; color: #b13a08; font-weight: 700; text-align: center; line-height: 20px; font-size: 11px; flex: none; }
.sv-top-label { min-width: 150px; color: #3d4a5f; }
.sv-top-rate { color: #d9480f; font-weight: 700; min-width: 72px; text-align: right; }
.sv-rate-bar { flex: 1; height: 7px; border-radius: 99px; background: #eef1f6; overflow: hidden; }
.sv-rate-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffb37a, #e8590c); }
.sv-scorebar { display: flex; align-items: center; gap: 16px; background: #16213a; color: #fff; border-radius: 14px; padding: 14px 18px; flex-wrap: wrap; }
.sv-scorebar-label { font-size: 12px; color: #aeb9cc; }
.sv-scorebar-num { font-size: 24px; font-weight: 780; color: #ffb37a; line-height: 1.1; }
.sv-scorebar-num span { font-size: 13px; color: #aeb9cc; font-weight: 500; }
.sv-scorebar-num.over { color: #ff8a80; }
.sv-scorebar-sub { font-size: 12px; color: #8fb5a0; margin-top: 2px; }
.sv-scorebar-sub.over { color: #ff8a80; }
.sv-scorebar-actions { display: flex; gap: 8px; }

/* ==================== 打分项管理 v87 深化 ==================== */
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid transparent; }
.btn-ghost:hover { background: #f2f5fa; color: var(--text); border-color: var(--line); }
.btn-danger-ghost { background: transparent; color: #c92a2a; border: 1px solid transparent; }
.btn-danger-ghost:hover { background: var(--red-light); border-color: #f3c6c6; }
.svg-hero { background: linear-gradient(135deg, #16213a 0%, #1f3050 58%, #263a5e 100%); border-radius: 16px; padding: 18px 22px; box-shadow: 0 10px 30px -12px rgba(22,33,58,.35); }
.svg-hero-main { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.svg-hero-numbox { min-width: 148px; }
.svg-hero-numbox .sv-scorebar-label { letter-spacing: .4px; }
.svg-hero-numbox .sv-scorebar-num { font-size: 30px; }
.svg-hero-mid { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 9px; }
.svg-segbar { height: 14px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.12); }
.svg-segbar-inner { display: flex; gap: 3px; height: 100%; min-width: 100%; }
.svg-seg { height: 100%; background: var(--seg); border-radius: 2px; transition: filter .15s ease; }
.svg-seg:hover { filter: brightness(1.15); }
.svg-seg-rest { height: 100%; background: rgba(255,255,255,.16); border-radius: 2px; }
.svg-seg-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.svg-seg-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #c7d2e4; }
.svg-seg-chip i { width: 8px; height: 8px; border-radius: 3px; background: var(--seg); flex: none; }
.svg-hero-btn { border-color: rgba(255,255,255,.18); color: #e8eef9; }
.svg-hero-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
.sv-mgmt-module { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; background: #fff; box-shadow: var(--shadow-card); transition: box-shadow .18s ease, border-color .18s ease; }
.sv-mgmt-module:hover { box-shadow: var(--shadow-card-hover); border-color: #d8e0ee; }
.sv-mgmt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.sv-mgmt-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sv-mgmt-badge { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 750; font-size: 13px; color: #fff; background: var(--mbg, var(--brand)); box-shadow: 0 3px 8px rgba(26,41,66,.16); flex: none; }
.sv-mgmt-namebox { min-width: 0; }
.sv-mgmt-name { font-size: 14px; font-weight: 650; color: #16213a; }
.sv-mgmt-meta { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.sv-mgmt-meta b { color: var(--brand); font-variant-numeric: tabular-nums; }
.sv-mgmt-ops { display: flex; gap: 6px; flex: none; }
.sv-mgmt-table th { background: #f8fafd; }
.sv-mgmt-table td { vertical-align: top; }
.sv-code-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #eef1f7; color: #4a5870; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sv-score-ctl { display: inline-block; }
.sv-mgmt-score { width: 62px; border: 1px solid #e3e9f2; border-radius: 8px; padding: 6px 8px; font-size: 13.5px; font-weight: 650; text-align: center; background: #fbfcfe; transition: border-color .15s, box-shadow .15s, background .15s; font-variant-numeric: tabular-nums; }
.sv-mgmt-score:hover { border-color: #c9d4e3; }
.sv-mgmt-score:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,89,12,.12); background: #fff; }
.sv-tags { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.sv-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.sv-tag-na { background: #eef1f7; color: #5b6b82; }
.sv-tag-food { background: var(--red-light); color: #c0392b; }
.sv-row-ops { display: flex; gap: 5px; flex-wrap: wrap; }
.svg-sug { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.svg-sug-line { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.svg-sug-val { font-size: 12.5px; font-weight: 750; color: #b13a08; background: #fff3e8; border: 1px solid rgba(232,89,12,.18); padding: 1px 8px; border-radius: 7px; }
.svg-sug-rate { font-size: 11px; color: var(--text-3); }
.sv-sug-apply { font-size: 11.5px; border: 1px solid var(--brand); color: var(--brand); background: #fff; border-radius: 7px; padding: 2px 10px; cursor: pointer; transition: all .15s; }
.sv-sug-apply:hover { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(232,89,12,.25); }
.sv-sug-apply:active { transform: scale(.97); }
.svg-bonus-add { display: inline-block; min-width: 34px; text-align: center; background: var(--green-light); color: var(--green); font-weight: 700; border-radius: 7px; padding: 2px 8px; font-size: 12.5px; }
.sv-mgmt-bonus { background: linear-gradient(180deg, #fff, #fbfcfe); }
.sv-mgmt-badge-bonus { background: var(--green); }
#modal-overlay .modal.sheet-wide { max-width: 640px; width: 96vw; }
#modal-overlay .modal.modal-lg { max-width: 900px; width: 96vw; }
.svg-form { display: flex; flex-direction: column; gap: 14px; }
.svg-budget { display: flex; align-items: center; gap: 10px; background: #f2f5fa; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.svg-budget .svg-budget-lbl { color: var(--text-2); font-weight: 500; }
.svg-budget b { font-size: 15px; color: #16213a; font-variant-numeric: tabular-nums; }
.svg-budget-diff { margin-left: auto; font-weight: 600; color: #5b6b82; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 12px; white-space: nowrap; }
.svg-budget.ok { background: var(--green-light); border-color: #cfe8d4; }
.svg-budget.ok .svg-budget-diff { color: var(--green); background: #fff; }
.svg-budget.over { background: var(--red-light); border-color: #f3c6c6; }
.svg-budget.over .svg-budget-diff { color: #c0392b; background: #fff; }
.svg-form textarea { resize: vertical; min-height: 54px; }
.svg-form .form-item input:focus, .svg-form .form-item select:focus, .svg-form .form-item textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,89,12,.1); background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .sv-mgmt-module, .svg-seg, .sv-sug-apply { transition: none; }
}
.exp-doc { border: 1px dashed #d3dbe8; border-radius: 12px; padding: 12px; background: #fff; }
.exp-doc-title { font-size: 13px; font-weight: 650; color: #16213a; margin-bottom: 8px; }
.exp-doc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.exp-stage { position: relative; min-height: 320px; background: #f2f4f8; border-radius: 8px; overflow: hidden; }
.exp-stage canvas { width: 100%; height: auto; display: block; }
.exp-stage video {
  display: none;
  width: 100%;
  height: auto;
  max-height: min(74vh, 760px);
  object-fit: contain;
  background: #16213a;
}
.exp-stage video:not([hidden]) { display: block; }
.exp-stage video[hidden] { display: none !important; }
.exp-stage .exp-cam-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 3;
}
.exp-stage .exp-cam-hint .btn {
  min-height: 42px;
  padding: 9px 26px;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.exp-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 12.5px; text-align: center; line-height: 1.9; }
.exp-doc-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.exp-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.exp-info { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin-bottom: 8px; }
.exp-preview-flash { animation: expFlash .8s ease 2; border-radius: 10px; }
@keyframes expFlash { 0%, 100% { background: transparent; } 50% { background: #d9f3e2; box-shadow: 0 0 0 3px rgba(47,158,68,.18); } }
.exp-preview-empty { color: var(--text-3); font-size: 12px; }
.exp-thumb { position: relative; width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.exp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.exp-thumb-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; line-height: 20px; cursor: pointer; }
input.ocr-suggest { color: #8a94a6; background: #f7f8fa; font-style: italic; }
.exp-preview img[src*="expense-attachments"] { cursor: zoom-in; }
/* 票据大图灯箱（图片永久留底、随时可查） */
#exp-lightbox { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; }
#exp-lightbox.hidden { display: none; }
.exp-lb-bg { position: absolute; inset: 0; background: rgba(10, 14, 24, .85); }
.exp-lb-img { position: relative; max-width: 94vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 24px 70px rgba(0, 0, 0, .55); cursor: zoom-out; }
.exp-lb-img { transition: transform .1s ease; }
.exp-lb-tip { position: absolute; top: 18px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.78); font-size: 13px; pointer-events: none; z-index: 2; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.exp-lb-close { position: absolute; top: 18px; right: 22px; width: 42px; height: 42px; border: none; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 19px; cursor: pointer; z-index: 2; }
.exp-lb-close:hover { background: rgba(255,255,255,.3); }

/* ===== 费用分类管理（双栏：左一级 / 右二级） ===== */
.catpane-head { margin-bottom: 12px; }
.catm { min-width: 640px; max-width: 94vw; }
.catm-stats { display: flex; align-items: center; gap: 16px; padding: 10px 14px; background: var(--bg-1,#f8f9fa); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.catm-add { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.catm-add input { flex: 2; min-width: 180px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; }
.catm-add select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--bg); }
.catm-list { max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.catm-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; transition: background .12s; }
.catm-row:last-child { border-bottom: none; }
.catm-row:hover { background: var(--bg-1,#f8f9fa); }
.catm-row.child { padding-left: 34px; background: var(--bg-1,#f8f9fa); }
.catm-row.l1 { padding-left: 40px; }
.catm-row.l2 { padding-left: 70px; background: var(--bg-1,#f8f9fa); }
.catm-caret { flex-shrink: 0; width: 18px; text-align: center; color: var(--text-3); cursor: pointer; }
.catm-row.parent { cursor: pointer; background: #fffdf5; }
.catm-row.parent:hover { background: #fff7e6; }
.catm-row.child:hover { background: #f1f3f5; }
.catm-name { flex: 1.4; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catm-row.child .catm-name { font-weight: 500; color: var(--text-2); }
.catm-type { flex-shrink: 0; font-size: 11px; padding: 2px 9px; border-radius: 12px; font-weight: 600; }
.catm-stat { flex-shrink: 0; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.catm-stat.muted { color: var(--text-3); }
.catm-ops { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; }
.catm-op { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12px; color: var(--text-2); }
.catm-op:hover { border-color: var(--brand); color: var(--brand); }
.catm-op.danger:hover { border-color: var(--red); color: var(--red); }
.catm-edit { flex: 1; padding: 6px 10px; border: 1px solid var(--brand); border-radius: 7px; font-size: 13.5px; }
.catm-empty { padding: 22px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.catpane-title { font-size: 15px; font-weight: 700; color: #16213a; }
.catpane-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.catpane { display: flex; gap: 14px; align-items: stretch; }
.catpane-panel { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; overflow: hidden; display: flex; flex-direction: column; }
.catpane-panel.left { flex: 0 0 42%; }
.catpane-phead { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.catpane-ptitle { font-size: 13px; font-weight: 700; color: #16213a; display: flex; align-items: center; gap: 8px; }
.catpane-count { font-size: 11px; font-weight: 600; color: #7b8798; background: #eef1f6; padding: 1px 8px; border-radius: 99px; }
.catpane-parent { font-size: 11.5px; font-weight: 600; color: var(--brand); background: #fff3e8; padding: 1px 9px; border-radius: 99px; margin-left: auto; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catpane-add { display: flex; gap: 6px; margin-top: 10px; }
.catpane-add input { flex: 1; min-width: 0; }
.catpane-add select { max-width: 92px; flex: none; }
.catpane-list { padding: 8px; overflow-y: auto; max-height: 52vh; min-height: 240px; }
.catpane-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; font-size: 13.5px; color: #3d4a5f; transition: background .15s ease, box-shadow .15s ease; }
.catpane-row:hover { background: #f1f4f9; }
.catpane-row.sel { background: #fff7f0; border-color: rgba(232,89,12,.32); box-shadow: 0 0 0 3px rgba(232,89,12,.08); }
.catpane-row.sel .catpane-name { font-weight: 650; color: #16213a; }
.catpane-row.editing { cursor: default; }
.catpane-ic { font-size: 15px; line-height: 1; flex: none; }
.catpane-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catpane-type { font-size: 10.5px; color: #7b8798; background: #eef1f6; padding: 2px 7px; border-radius: 99px; white-space: nowrap; flex: none; }
.catpane-ops { display: flex; gap: 2px; opacity: 0; transition: opacity .15s ease; flex: none; }
.catpane-row:hover .catpane-ops, .catpane-row.sel .catpane-ops { opacity: 1; }
.catpane-op { border: none; background: transparent; width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 13px; line-height: 1; color: #5b6472; display: inline-flex; align-items: center; justify-content: center; }
.catpane-op:hover { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.catpane-op.danger:hover { color: var(--red); background: #fff1f0; box-shadow: 0 0 0 1px rgba(220,53,69,.28); }
.catpane-edit { flex: 1; min-width: 0; border: 1px solid var(--blue); border-radius: 7px; padding: 5px 8px; font-size: 13px; font-family: inherit; }
.catpane-empty { color: var(--text-3); text-align: center; padding: 36px 12px; font-size: 12.5px; line-height: 1.8; }
@media (max-width: 760px) {
  .catpane { flex-direction: column; }
  .catpane-panel.left { flex: 1; }
  .catpane-list { max-height: 30vh; min-height: 140px; }
}

/* ===== 数据看板（驾驶舱风格 v3） ===== */
.db-shell { display: flex; flex-direction: column; gap: 14px; }

/* 页头 */
.db-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.db-range-pills { display: inline-flex; align-items: center; gap: 4px; background: #f1f4f9; border: 1px solid var(--line); border-radius: 11px; padding: 3px; flex-wrap: wrap; }
.db-range-pill { border: none; background: transparent; font-size: 12px; color: var(--text-2); padding: 5px 10px; border-radius: 8px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.db-range-pill:hover { background: #fff; color: var(--text); }
.db-range-pill.active { background: var(--brand); color: #fff; box-shadow: 0 2px 6px rgba(232,89,12,.3); }
.db-head-left { display: flex; align-items: center; gap: 12px; }
.db-head-icon {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fff3e8, #ffe9d6); color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(232,89,12,.14);
}
.db-head-icon svg { width: 22px; height: 22px; display: block; }
.db-head-title { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.015em; color: #101828; }
.db-head-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.db-head-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 通用面板：细线 + 轻阴影，克制不喧哗 */
.db-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(26,41,66,.03), 0 6px 20px -16px rgba(26,41,66,.14);
}
.db-panel-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.db-panel-title { font-size: 14.5px; font-weight: 650; color: #16213a; letter-spacing: -.005em; }
.db-panel-sub { font-size: 11.5px; color: var(--text-3); margin-left: auto; }

/* 主区：营收 + 门店排行 */
.db-hero { display: grid; grid-template-columns: 1.9fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .db-hero { grid-template-columns: 1fr; } }
.db-hero-main { position: relative; overflow: hidden; }
.db-hero-label { font-size: 13px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.db-delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 99px; }
.db-delta.up { color: var(--m-customers); background: var(--m-customers-bg); }
.db-delta.down { color: var(--m-member); background: var(--m-member-bg); }
.db-delta.flat { color: var(--text-3); background: #eef1f6; }
.db-hero-value {
  margin-top: 6px; font-size: 42px; font-weight: 780; line-height: 1.1;
  color: #101828; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.db-hero-value em { font-style: normal; font-size: 16px; font-weight: 650; color: var(--text-3); margin-left: 6px; }
.db-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.db-hero-meta i { width: 3px; height: 3px; border-radius: 50%; background: #d4dae4; }
.db-hero-meta span { font-variant-numeric: tabular-nums; }
.db-hero-trend { margin-top: 14px; }
.db-hero-trend canvas { width: 100%; height: 62px; display: block; }
.db-hero-trend-label { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.db-delta-sep { width: 1px; height: 14px; background: var(--line); }
.db-yoy { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); font-weight: 500; }

/* 门店营收排行 */
.db-rank { display: flex; flex-direction: column; gap: 3px; }
.db-rank-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px; margin: 0 -6px;
  border-radius: 8px; font-size: 12.5px; transition: background .15s ease;
}
.db-rank-row:hover { background: #f6f8fc; }
.db-rank-row.top .db-rank-name { color: var(--brand); font-weight: 650; }
.db-rank-no { width: 18px; flex: none; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: center; }
.db-rank-row.top .db-rank-no { color: var(--brand); font-weight: 700; }
.db-rank-name { width: 72px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3d4a5f; font-weight: 500; }
.db-rank-track { flex: 1; height: 7px; background: #eef2f8; border-radius: 99px; overflow: hidden; }
.db-rank-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5b7cf8, #8aa5ff); display: block; }
.db-rank-row.top .db-rank-fill { background: linear-gradient(90deg, var(--brand), #f59f00); }
.db-rank-val { width: 74px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; color: #1f2937; }
.db-rank-share { width: 42px; text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 11.5px; }

/* 核心指标块 */
/* v444：原来固定 6 列 1fr，窗口 1401~1500px 时 6 列的最小内容宽度撑破容器 →
   最后一卡被裁掉且出现横向滚动条（1440 屏必现）。改成自适应列数：挤不下就换行，绝不溢出。 */
.db-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 12px; }
@media (max-width: 1400px) { .db-metrics { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .db-metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .db-metrics { grid-template-columns: 1fr; } }
.db-metric {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px 12px; display: flex; flex-direction: column;
}
.db-metric-head { display: flex; align-items: center; gap: 7px; }
.db-metric-ic { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.db-metric-ic svg { width: 17px; height: 17px; }
.db-metric-name { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.db-metric-badge { margin-left: auto; font-size: 10.5px; font-weight: 650; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.db-metric-values { margin-top: 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.db-metric-main { font-size: 25px; font-weight: 760; color: #101828; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.15; }
.db-metric-main em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 3px; }
.db-metric-sec { font-size: 16px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-metric-sec::before { content: '· '; color: var(--text-3); font-weight: 500; }
.db-metric-sub { font-size: 11px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }
.db-metric-bars { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.db-mbar { display: flex; align-items: center; gap: 7px; font-size: 11.5px; }
.db-mbar-name { width: 56px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4a576b; }
.db-mbar-track { flex: 1; height: 4px; background: #eef2f8; border-radius: 99px; overflow: hidden; }
.db-mbar-fill { height: 100%; border-radius: 99px; display: block; }
.db-mbar-val { width: 56px; text-align: right; font-variant-numeric: tabular-nums; color: #1f2937; font-weight: 600; }
.db-mbar-sec { width: 74px; text-align: right; font-variant-numeric: tabular-nums; color: var(--brand); font-weight: 600; font-size: 11px; white-space: nowrap; }
.db-mbar-more { font-size: 10.5px; color: var(--text-3); }
.db-metric-empty { font-size: 12px; color: var(--text-3); margin-top: 10px; }

/* 经营洞察 */
.db-insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
@media (max-width: 900px) { .db-insight-grid { grid-template-columns: 1fr; } }
.db-insight { display: flex; gap: 11px; padding: 9px 4px; border-top: 1px solid #f1f4f9; }
.db-insight-ic {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #eef1f6; color: var(--m-att);
}
.db-insight-ic svg { width: 16px; height: 16px; }
.db-insight-ic.tone-up { background: var(--m-customers-bg); color: var(--m-customers); }
.db-insight-ic.tone-down { background: var(--m-member-bg); color: var(--m-member); }
.db-insight-ic.tone-hours { background: var(--m-hours-bg); color: var(--m-hours); }
.db-insight-ic.tone-member { background: var(--m-member-bg); color: var(--m-member); }
.db-insight-ic.tone-attendance { background: var(--m-att-bg); color: var(--m-att); }
.db-insight-title { font-size: 13px; font-weight: 650; color: #16213a; }
.db-insight-text { font-size: 12.5px; color: var(--text-2); line-height: 1.65; margin-top: 3px; }

/* 图表区 */
.db-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .db-charts { grid-template-columns: 1fr; } }
.chart-card .db-panel-head { margin-bottom: 6px; }
.chart-note { font-size: 11px; color: var(--text-3); margin-bottom: 6px; }

/* 明细表 */
.db-table-card { padding: 16px 0 14px; overflow: hidden; }
.db-table-card .db-panel-head { padding: 0 18px; }
.dash-table-wrap { border-top: 1px solid var(--line); background: var(--card); }
.dash-table-wrap .data-table th { background: #f7f9fd; white-space: nowrap; }
.dash-table-wrap .data-table tbody tr:hover { background: #f6f8fc; }
.dash-table-wrap .data-table td { color: #33405a; }

.db-empty { color: var(--text-3); font-size: 12.5px; padding: 22px 0; text-align: center; }

/* 超管长按拖拽排版：无把手，长按板块任意位置即可拖动 */
.db-section.is-draggable { cursor: grab; }
.db-shell.is-super .db-metric { cursor: grab; }
.db-section.is-draggable:active, .db-shell.is-super .db-metric:active { cursor: grabbing; }
body.db-drag-active { user-select: none; -webkit-user-select: none; }
body.db-drag-active * { cursor: grabbing !important; }
.db-dragging { opacity: .6; outline: 1px dashed #b9c4d6; }
.db-drag-tip { font-size: 11.5px; color: var(--text-3); }

/* ==================== 移动端深化适配 v90 ==================== */
/* 手机（≤768px）：精致图标导航 + 全屏弹窗 + 触摸目标 + 表格横滚 */
@media (max-width: 768px) {
  /* 侧边栏：深蓝渐变图标栏，激活项品牌橙胶囊 */
  .sidebar {
    width: 54px;
    background: linear-gradient(180deg, #141f36 0%, #1c2c4a 60%, #223455 100%);
  }
  .side-brand { height: 46px; }
  .side-brand-logo { font-size: 20px; }
  .side-btn { padding: 12px 0; }
  .side-btn.active {
    background: linear-gradient(135deg, #e8590c, #f08c00);
    border-radius: 13px;
    margin: 2px 7px;
    box-shadow: 0 4px 14px rgba(232, 89, 12, .38);
    width: auto;
  }
  .side-btn.active::after {
    content: '';
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background: #fff;
  }
  .side-icon { font-size: 19px; width: 26px; }

  /* 顶栏：紧凑 + 隐藏桌面安装按钮（手机上无用） */
  .topbar { height: 50px; padding: 0 12px; }
  .topbar-left h2 { font-size: 15.5px; }
  .topbar-right { gap: 8px; }
  #btn-desktop { display: none; }
  .icon-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
  .icon-btn:active { background: rgba(0, 0, 0, .06); }
  .msg-bell, .user-chip { padding: 6px; }
  .user-chip { gap: 4px; }
  .user-avatar { width: 30px; height: 30px; font-size: 13px; }
  .user-caret { display: none; }

  /* 内容区：底部留白避免 iOS 工具栏遮挡 */
  .content { padding: 12px 12px calc(88px + env(safe-area-inset-bottom, 0px)); }

  /* 卡片与容器：更大圆角、更轻阴影、更透气 */
  .card,
  .fin-toolbar,
  .sv-plan-toolbar,
  .sv-grid-wrap,
  .sv-plan-suggest,
  .sv-mgmt-module,
  .exp-form,
  .db-insight-card,
  .att-roster-card {
    border-radius: 16px;
  }
  .card { padding: 14px; }

  /* 触摸目标：≥40px，关键操作 ≥44px */
  .btn { min-height: 42px; }
  .btn-sm { min-height: 38px; padding: 6px 14px; }
  .btn-xs { min-height: 32px; padding: 3px 10px; }
  .btn:active, .btn-sm:active, .btn-xs:active { transform: scale(.97); }
  input, select, textarea { font-size: 16px !important; }

  /* 表格：大表格手机端横向滚动，禁止压缩 */
  .sv-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sv-plan-table { min-width: 860px; }
  .att-roster-table, .dash-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .att-roster-table .data-table, .dash-table-wrap .data-table { min-width: 640px; }
  .sv-mgmt-table { min-width: 640px; }
  .sv-grid-wrap::-webkit-scrollbar, .att-roster-table::-webkit-scrollbar { height: 6px; }

  /* 弹窗：手机端全屏底部滑出 */
  #modal-overlay { align-items: flex-end; padding: 0; }
  #modal-overlay .modal,
  #modal-overlay .modal.expense-wide,
  #modal-overlay .modal.sheet-wide,
  #modal-overlay .modal.voucher-wide {
    max-width: 100vw;
    width: 100vw;
    max-height: 92vh;
    min-width: 0;
    resize: none;
    border-radius: 20px 20px 0 0;
    animation: modalUp .28s cubic-bezier(.32, .72, 0, 1);
  }
  #modal-overlay .modal-header { padding: 14px 16px; }
  #modal-overlay .modal-body { padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
  #modal-overlay .modal-close { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
  @keyframes modalUp {
    from { transform: translateY(70px); opacity: .65; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* 工具栏：紧凑换行 */
  .fin-toolbar, .sv-plan-toolbar { padding: 10px 12px; gap: 8px; }
  .fin-tb-label { font-size: 12px; }
  .sv-plan-stats { padding: 5px 10px; }
  .sv-weeknav { padding: 4px 5px; }

  /* 统计卡片：两列紧凑 */
  .att-stats, .fin-stats, .sc-stats, .db-metrics { grid-template-columns: repeat(2, 1fr); }
  .att-stat, .fin-stat, .sc-stat, .db-metric { padding: 12px; }
  .att-stat-value, .fin-stat-value, .db-metric-value { font-size: 19px; }

  /* 数据看板 */
  .db-hero { grid-template-columns: 1fr; }
  .db-charts { grid-template-columns: 1fr; }
  .db-chart-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .db-chart-card canvas { min-width: 280px; }

  /* 财务/费用 */
  .exp-modal { grid-template-columns: 1fr; }
  .exp-meta { grid-template-columns: 1fr 1fr; }
  .exp-vhead { flex-wrap: wrap; }

  /* 图例、提示换行更紧凑 */
  .sv-legend { gap: 5px 12px; font-size: 11px; padding: 6px 10px; }
  .sv-rule { font-size: 11.5px; padding: 6px 10px; }

  /* 评分条（督导打分页顶部） */
  .sv-scorebar { padding: 14px; border-radius: 16px; }
  .sv-scorebar-num { font-size: 26px; }

  /* 系统管理 */
  .sys-role-layout { grid-template-columns: 1fr; }
  .quota-grid { grid-template-columns: 1fr 1fr; }
}

/* 小屏（≤420px）：统计卡片仍双列，弹窗更扁，日期控件自适应 */
@media (max-width: 420px) {
  .sv-weeknav-core { min-width: 84px; }
  .sv-weeknav-jump { max-width: 96px; }
  .exp-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #modal-overlay .modal { animation: none; }
}

/* 经营日报：菜么么自动带出值（灰色可改） */
.fin-auto { color: var(--text-3) !important; font-style: italic; }
/* v459：字段来源标签 —— 菜么么带出 / 平台直连；点标签或双击数值即为「确认」，标签消失 */
.fin-src-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px;
  font-size: 10.5px; line-height: 16px; font-weight: 500; font-style: normal;
  vertical-align: middle; cursor: pointer; user-select: none; white-space: nowrap; }
.fin-src-badge.is-cm { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.fin-src-badge.is-cm:hover { background: #fde68a; }
.fin-src-badge.is-plat { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.fin-src-badge.is-plat:hover { background: #bfdbfe; }
.fin-field label { display: flex; align-items: center; flex-wrap: wrap; }

/* ============================================================
   个人工作中心（v184）：我的工作台
   ============================================================ */
.p-shell { display: flex; flex-direction: column; gap: 14px; }
.p-head {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: linear-gradient(120deg, #1a2942 0%, #24385c 60%, #2c4470 100%);
  border-radius: 14px; color: #fff; box-shadow: var(--shadow);
}
.p-avatar {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ffb37a, #e8590c);
  font-size: 20px; font-weight: 750; color: #fff;
}
.p-head-meta { flex: 1; min-width: 0; }
.p-head-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.p-head-sub { font-size: 12.5px; color: #aeb9cc; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-head-right { display: flex; gap: 8px; flex: none; }
.p-head-chip {
  font-size: 11.5px; color: #c7d2e4; background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16); padding: 4px 10px; border-radius: 99px;
}
.p-tabs {
  display: flex; gap: 6px; background: #fff; border-radius: 12px; padding: 6px;
  box-shadow: var(--shadow); overflow-x: auto;
}
.p-tab {
  flex: 1; min-width: 64px; padding: 9px 12px; border: none; border-radius: 9px;
  background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 600;
  transition: all .18s;
}
.p-tab.active { background: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(232,89,12,.25); }
.p-grid2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.p-stat {
  display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px;
  padding: 14px 16px; box-shadow: var(--shadow-card); min-width: 0;
}
.p-stat-ic {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: var(--blue-light);
}
.p-stat.green .p-stat-ic { background: var(--green-light); }
.p-stat.amber .p-stat-ic { background: #fff4e6; }
.p-stat.rose .p-stat-ic { background: #fceef2; }
.p-stat.teal .p-stat-ic { background: #e4f7f8; }
.p-stat.slate .p-stat-ic { background: #edf0f6; }
.p-stat.blue .p-stat-ic { background: var(--blue-light); }
.p-stat-body { min-width: 0; }
.p-stat-label { font-size: 11px; color: var(--text-3); }
.p-stat-value { font-size: 17px; font-weight: 750; color: var(--text); margin-top: 2px; font-variant-numeric: tabular-nums; }
.p-stat-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-card {
  background: #fff; border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--shadow-card); min-width: 0;
}
.p-card-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; }
.p-card-title .sub { font-size: 11.5px; color: var(--text-3); font-weight: 500; margin-left: 6px; }
.p-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.p-chip {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.p-chip.blue { background: var(--blue-light); color: #0b6fd4; }
.p-muted { color: var(--text-3); font-size: 12.5px; }
.p-alert {
  border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600;
}
.p-alert.warn { background: #fff4e6; color: #c77700; }
.p-alert.info { background: var(--blue-light); color: #0b6fd4; }
.p-seg-list { display: flex; flex-direction: column; }
.p-seg-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 2px; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.p-seg-row:last-child { border-bottom: none; }
.p-seg-time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.p-seg-min { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.p-live { color: var(--brand); font-weight: 700; font-size: 12px; }
.p-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p-toolbar-mid { flex: 1; text-align: center; font-weight: 700; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.p-week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.p-day-card {
  background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow-card);
  border: 2px solid transparent; min-width: 0;
}
.p-day-card.today { border-color: var(--brand); background: #fffaf5; }
.p-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.p-day-week { font-size: 13px; font-weight: 700; color: var(--text); }
.p-day-today { color: var(--brand); font-size: 10.5px; font-weight: 800; }
.p-day-date { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.p-day-status { margin: 8px 0 6px; }
.p-day-shifts { margin-bottom: 6px; }
.p-day-shifts .p-chip { font-size: 11px; padding: 3px 8px; }
.p-day-none { font-size: 11.5px; }
.p-day-segs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.p-seg-tag {
  font-size: 10.5px; color: var(--text-2); background: #f2f4f8;
  border-radius: 6px; padding: 2px 6px; font-variant-numeric: tabular-nums;
}
.p-day-hours { margin-top: 6px; font-size: 11px; color: var(--brand); font-weight: 700; }
.p-table-card { padding: 14px 16px; }
.p-table-wrap { overflow-x: auto; }
.p-leave-list { display: flex; flex-direction: column; gap: 10px; }
.p-leave-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
.p-leave-head { display: flex; align-items: center; justify-content: space-between; }
.p-leave-type {
  font-size: 11.5px; font-weight: 700; color: var(--blue);
  background: var(--blue-light); padding: 2px 8px; border-radius: 6px;
}
.p-leave-title { font-size: 14px; font-weight: 650; margin: 7px 0 4px; }
.p-leave-foot { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-3); margin-top: 6px; flex-wrap: wrap; }
.p-msg-item {
  display: flex; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--line);
  cursor: pointer; align-items: flex-start;
}
.p-msg-item:last-child { border-bottom: none; }
.p-msg-item.unread { background: #fffdf9; }
.p-msg-dot { width: 8px; height: 8px; border-radius: 50%; background: #d8dee9; margin-top: 6px; flex: none; }
.p-msg-dot.on { background: var(--brand); box-shadow: 0 0 0 3px rgba(232,89,12,.15); }
.p-msg-body { flex: 1; min-width: 0; }
.p-msg-title { font-size: 13.5px; font-weight: 650; color: var(--text); }
.p-msg-content { font-size: 12.5px; color: var(--text-2); margin-top: 3px; line-height: 1.6; }
.p-msg-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.p-empty-card { text-align: center; padding: 40px 24px; }

@media (max-width: 1100px) {
  .p-grid2 { grid-template-columns: repeat(2, 1fr); }
  .p-week-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .p-week-grid { grid-template-columns: repeat(2, 1fr); }
  .p-head { flex-wrap: wrap; }
  .p-head-right { width: 100%; justify-content: flex-end; }
}
@media (max-width: 480px) {
  .p-grid2 { grid-template-columns: 1fr 1fr; }
  .p-week-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   通知中心（v185）：消息流 + 回执汇总
   ============================================================ */
.p-msg-group + .p-msg-group { margin-top: 14px; }
.p-msg-group.urgent { background: #fff7f5; border-radius: 10px; padding: 8px 10px; }
.p-msg-group-title {
  font-size: 11.5px; font-weight: 700; color: var(--text-3);
  padding: 6px 2px 4px; letter-spacing: .5px;
}
.p-msg-group.urgent .p-msg-group-title { color: var(--red); }
.p-msg-item { display: flex; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.p-msg-ic {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #f0f2f7; font-size: 17px;
}
.p-msg-item.unread .p-msg-ic { background: var(--brand-light); }
.p-msg-action { flex: none; padding-top: 2px; }
.p-action { font-size: 12px; font-weight: 650; color: var(--green); white-space: nowrap; }
.p-action-btn { min-width: 62px; }
.p-rcpt-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(120deg, #fff3e8, #ffe8d6);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 12px;
  font-size: 13px; font-weight: 650; color: #b4540a;
}
.p-rcpt-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.p-rcpt-row:last-child { border-bottom: none; }
.p-rcpt-main { flex: 1; min-width: 0; }
.p-rcpt-title { font-size: 13.5px; font-weight: 650; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-rcpt-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.p-rcpt-rate { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; width: 90px; }
.p-rate-num { font-size: 14px; font-weight: 750; color: var(--brand); font-variant-numeric: tabular-nums; }
.p-rate-bar { width: 90px; height: 6px; border-radius: 99px; background: #eef1f6; overflow: hidden; display: block; }
.p-rate-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb37a, #e8590c); }
.p-rcpt-list { margin-top: 12px; }
.p-rcpt-emp {
  display: grid; grid-template-columns: 1.2fr 1.4fr auto auto; gap: 10px;
  align-items: center; padding: 9px 2px; border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.p-rcpt-emp:last-child { border-bottom: none; }
.p-rcpt-emp-name { font-weight: 650; color: var(--text); }
.p-rcpt-emp-store { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-rcpt-emp-time { color: var(--text-3); font-size: 11px; }
@media (max-width: 520px) {
  .p-rcpt-emp { grid-template-columns: 1fr auto; }
  .p-rcpt-emp-store { display: none; }
}

/* ==================== v402：督导打分 / 整改 手机端上传与布局 ==================== */
/* 上传按钮：<input type=file> 直接透明覆盖在按钮上 → 用户点击=直接点在真实 input 上，
   安卓 WebView / 微信 / iOS Safari 都能原生唤起"拍照 / 相册"，不依赖 JS click() */
.sv-up-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.sv-up-btn > .sv-file-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 100px;
}
.sv-photos { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-right: 6px; vertical-align: middle; }
.sv-photos img, .sv-photos video { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }

/* 手机端：打分表每一项变成一张卡片（原来 10 列宽表要横向滚动，证据按钮藏在最右边点不到） */
@media (max-width: 768px) {
  .sv-it-table thead { display: none; }
  .sv-it-table, .sv-it-table tbody, .sv-it-table tr, .sv-it-table td { display: block; width: auto !important; }
  .sv-it-table tr {
    border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff;
  }
  .sv-it-table td { border: none !important; padding: 3px 0 !important; }
  .sv-it-table td[data-cap]::before {
    content: attr(data-cap) "："; font-size: 11.5px; color: var(--text-3); margin-right: 4px;
  }
  .sv-it-table td.sv-it-code { display: inline-block; font-weight: 700; color: #7b8798; }
  .sv-it-table td.sv-it-label { display: inline-block; font-size: 13.5px; }
  .sv-it-table td.sv-it-label .sv-it-desc { display: block; }
  .sv-it-table .sv-score-inp { width: 84px; }
  .sv-it-table .sv-reason { width: 100%; margin-top: 2px; }
  .sv-it-table td.sv-ph-cell { margin-top: 6px; }
  .sv-up-btn { width: 100%; min-height: 38px; margin-top: 4px; font-size: 13px; }
  .sv-photos { width: 100%; }
  .sv-module-head { font-size: 13px; }
  .sv-bonus-item { font-size: 12.5px; }

  /* 整改项目列表：手机端同样变卡片，避免「提交整改」按钮被横向滚动藏住 */
  .sv-rec-table thead { display: none; }
  .sv-rec-table, .sv-rec-table tbody, .sv-rec-table tr, .sv-rec-table td { display: block; width: auto !important; }
  .sv-rec-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
  .sv-rec-table td { border: none !important; padding: 2px 0 !important; }
  .sv-rec-table td[data-cap]::before { content: attr(data-cap) "："; font-size: 11.5px; color: var(--text-3); margin-right: 4px; }
  .sv-rec-table td.sv-rec-ops { display: flex; gap: 8px; margin-top: 8px; }
  .sv-rec-table td.sv-rec-ops .btn { flex: 1; }
}
/* v486：薪资结算里「历史人员」行（员工档案已删除/已离职）淡化并加时钟标记，便于识别 */
tr.sal-hist td { color: var(--text-3, #8b8b8b); }
tr.sal-hist td:first-child::before { content: "\1F550 "; }

/* ============================================================
   v559：外卖看板 · 产品统计（重做）
   结构：概览条 → 门店/平台结构 → 商品明细（可展开分门店+趋势）
   ============================================================ */
.tobp { display: flex; flex-direction: column; gap: 12px; }

.tobp-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow-card);
}
.tobp-hero-t { font-size: 15px; font-weight: 650; color: #16213a; letter-spacing: -.01em; }
.tobp-hero-s { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.tobp-kpis { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.tobp-kpi {
  min-width: 108px; padding: 8px 13px; border-radius: 11px;
  background: var(--bg); border: 1px solid var(--line);
}
.tobp-kpi b {
  display: block; font-size: 19px; font-weight: 680; color: #16213a;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.3;
}
.tobp-kpi span { font-size: 11px; color: var(--text-3); }
.tobp-kpi.hi { background: var(--brand-light); border-color: #ffd9bd; }
.tobp-kpi.hi b { color: var(--brand); }

.tobp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1000px) { .tobp-grid2 { grid-template-columns: 1fr; } }

.tobp-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden;
}
.tobp-card-h {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fcfdff;
}
.tobp-card-h h3 { font-size: 13.5px; font-weight: 650; color: #16213a; }
.tobp-card-h small { font-size: 11.5px; color: var(--text-3); }
.tobp-card-b { padding: 10px 16px 14px; }

/* 门店/平台结构行：名称 · 占比条 · 数字 */
.tobp-st { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.tobp-st + .tobp-st { border-top: 1px dashed var(--line); }
.tobp-st-n {
  width: 104px; flex: none; font-size: 12.5px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tobp-st-b { flex: 1; min-width: 60px; height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.tobp-st-b i { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.tobp-st-v {
  width: 132px; flex: none; text-align: right; font-size: 12.5px;
  font-variant-numeric: tabular-nums; color: #16213a;
}
.tobp-st-v em { font-style: normal; color: var(--text-3); font-size: 11px; margin-left: 9px; }

/* 商品明细表 */
.tobp-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.tobp-tools input, .tobp-tools select {
  padding: 5px 9px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 12.5px; background: #fff; color: var(--text);
}
.tobp-tools input { width: 160px; }
.tobp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
/* v564：商品明细加了「到手 / 单份成本 / 成本合计 / 毛利 / 毛利率」4 列 → 重排列宽并给表格最小宽度，
   窄屏时由 .tbl-scroll 横向滚动，避免列被压扁错位 */
.tobp-table { min-width: 1420px; }
.tobp-table th:first-child, .tobp-table td:first-child { width: 22%; }
.tobp-table th:nth-child(10), .tobp-table td:nth-child(10) { width: 11%; }
.tobp-table th {
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--text-3);
  padding: 9px 10px; background: #fafbfd; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tobp-table th.sortable { cursor: pointer; user-select: none; }
.tobp-table th.sortable:hover { color: var(--blue); }
.tobp-table th.on { color: var(--blue); }
.tobp-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tobp-table tbody tr.leaf:hover td { background: #fafcff; }
.tobp-table tbody tr.leaf.open td { background: #f6faff; }
.tobp-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* v563：表头必须跟数字列一样右对齐。
   原因：`.tobp-table th`（0,1,1）优先级高于 `.tobp-num`（0,1,0），所以带 tobp-num 的表头
   仍被强制 text-align:left，而 td 上的 tobp-num 生效 → 表头贴列左、数字贴列右，
   看起来就像「表头和表格错开一列」。这里用更高优先级（0,2,1）修正。 */
.tobp-table th.tobp-num { text-align: right; }
.tobp-todo { color: #d48806; cursor: pointer; border-bottom: 1px dashed #d48806; }
.tobp-todo:hover { color: #ad6800; }
/* v571：外卖看板「成本维护」的表格列宽 —— 之前列被内容撑开（外卖商品列 459px）留一大片空白，
   看起来像表头和表格没对齐；这里改成固定列宽布局。表格仍可横向滚动（.tbl-scroll 保证）。 */
.tbl-scroll table.tbc-mtable { table-layout: fixed; width: 100%; min-width: 1080px; }
.tbc-mtable th:nth-child(1), .tbc-mtable td:nth-child(1) { width: 40px; }
.tbc-mtable th:nth-child(2), .tbc-mtable td:nth-child(2) { width: 26%; }
.tbc-mtable th:nth-child(3), .tbc-mtable td:nth-child(3) { width: 20%; }
.tbc-mtable th:nth-child(4), .tbc-mtable td:nth-child(4) { width: 12%; }
.tbc-mtable th:nth-child(5), .tbc-mtable td:nth-child(5) { width: 11%; }
.tbc-mtable th:nth-child(6), .tbc-mtable td:nth-child(6) { width: 9%; }
.tbc-mtable th:nth-child(7), .tbc-mtable td:nth-child(7) { width: 11%; }
.tbc-mtable th:nth-child(8), .tbc-mtable td:nth-child(8) { width: 100px; text-align: center; }
.tbc-mtable td:nth-child(2), .tbc-mtable td:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-scroll table.tbc-ptable { table-layout: fixed; width: 100%; min-width: 900px; }
.tbc-ptable th:nth-child(1), .tbc-ptable td:nth-child(1) { width: 26%; }
.tbc-ptable th:nth-child(2), .tbc-ptable td:nth-child(2) { width: 16%; }
.tbc-ptable th:nth-child(3), .tbc-ptable td:nth-child(3) { width: 13%; }
.tbc-ptable th:nth-child(4), .tbc-ptable td:nth-child(4) { width: 15%; }
.tbc-ptable th:nth-child(5), .tbc-ptable td:nth-child(5) { width: 16%; }
.tbc-ptable th:nth-child(6), .tbc-ptable td:nth-child(6) { width: 14%; text-align: center; }
.tbc-ptable td:nth-child(1) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v571：成本维护主表 —— 容器给高度后内部滚动，配合既有的 .data-table thead 吸顶，表头就固定住了 */
.tbl-scroll table.tbc-ltable { table-layout: fixed; width: 100%; min-width: 1380px; }
.tbc-ltable th:nth-child(1), .tbc-ltable td:nth-child(1) { width: 21%; }
.tbc-ltable th:nth-child(2), .tbc-ltable td:nth-child(2) { width: 6%; }      /* 销量 */
.tbc-ltable th:nth-child(3), .tbc-ltable td:nth-child(3) { width: 7%; }      /* 销售额 */
.tbc-ltable th:nth-child(4), .tbc-ltable td:nth-child(4) { width: 7%; }      /* 到手 */
.tbc-ltable th:nth-child(5), .tbc-ltable td:nth-child(5) { width: 8.5%; }    /* 模式 */
.tbc-ltable th:nth-child(6), .tbc-ltable td:nth-child(6) { width: 6%; }      /* 克重 */
.tbc-ltable th:nth-child(7), .tbc-ltable td:nth-child(7) { width: 6.5%; }    /* 元/克 */
.tbc-ltable th:nth-child(8), .tbc-ltable td:nth-child(8) { width: 7%; }      /* 固定元/份 */
.tbc-ltable th:nth-child(9), .tbc-ltable td:nth-child(9) { width: 6.5%; }    /* 单份成本 */
.tbc-ltable th:nth-child(10), .tbc-ltable td:nth-child(10) { width: 7%; }    /* 成本合计 */
.tbc-ltable th:nth-child(11), .tbc-ltable td:nth-child(11) { width: 6.5%; }  /* 毛利 */
.tbc-ltable th:nth-child(12), .tbc-ltable td:nth-child(12) { width: 6%; }    /* 毛利率 */
.tbc-ltable th:nth-child(13), .tbc-ltable td:nth-child(13) { width: 5.5%; }  /* 状态 */
.tbc-ltable td:nth-child(1) { white-space: normal; }
.tbc-ltable td input { max-width: 100%; box-sizing: border-box; }
/* v574：按食材批量设克重面板 */
.tbl-scroll table.tbc-gtable { table-layout: fixed; width: 100%; min-width: 760px; }
.tbc-gtable th:nth-child(1), .tbc-gtable td:nth-child(1) { width: 22%; }
.tbc-gtable th:nth-child(2), .tbc-gtable td:nth-child(2) { width: 12%; }
.tbc-gtable th:nth-child(3), .tbc-gtable td:nth-child(3) { width: 48%; }
.tbc-gtable th:nth-child(4), .tbc-gtable td:nth-child(4) { width: 18%; }
/* v575：套餐/组合 批量填固定成本面板 */
.tbl-scroll table.tbc-ctable { table-layout: fixed; width: 100%; min-width: 860px; }
.tbc-ctable th:nth-child(1), .tbc-ctable td:nth-child(1) { width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbc-ctable th:nth-child(2), .tbc-ctable td:nth-child(2) { width: 10%; }
.tbc-ctable th:nth-child(3), .tbc-ctable td:nth-child(3) { width: 14%; }
.tbc-ctable th:nth-child(4), .tbc-ctable td:nth-child(4) { width: 14%; }
.tbc-ctable th:nth-child(5), .tbc-ctable td:nth-child(5) { width: 16%; }
.tobp-pname { font-weight: 600; color: #16213a; cursor: pointer; }
.tobp-pname:hover { color: var(--blue); }
.tobp-pname .caret { color: var(--text-3); font-size: 11px; margin-right: 4px; }
.tobp-chip {
  display: inline-block; padding: 1px 6px; border-radius: 6px;
  font-size: 10.5px; line-height: 1.6; margin-left: 6px; vertical-align: 1px;
  background: var(--bg); color: var(--text-2); border: 1px solid var(--line);
}
.tobp-share { display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.tobp-share .bar { width: 54px; height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; flex: none; }
.tobp-share .bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.tobp-share span { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 12px; min-width: 42px; text-align: right; }
.tobp-detail > td { background: #f8fbff !important; padding: 0 !important; border-bottom: 1px solid var(--line); }
.tobp-detail-in { padding: 12px 16px 14px; }
.tobp-detail-in h4 { font-size: 12.5px; font-weight: 650; color: var(--text-2); margin: 8px 0 6px; }
.tobp-detail-in h4:first-child { margin-top: 0; }
.tobp-dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .tobp-dgrid { grid-template-columns: 1fr; } }
.tobp-pager {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); background: #fcfdff;
}
.tobp-pager .btn { padding: 3px 10px; font-size: 12px; }
.tobp-pager .sp { margin-left: auto; }
.tobp-empty { padding: 34px 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.tobp-empty b { display: block; color: var(--text-2); font-size: 13.5px; margin-bottom: 6px; }
@media (max-width: 900px) {
  .tobp-hide-sm { display: none !important; }
  .tobp-kpi { min-width: 92px; padding: 7px 10px; }
  .tobp-kpi b { font-size: 17px; }
  .tobp-st-n { width: 84px; }
  .tobp-st-v { width: 110px; }
}

/* ============================================================
   v588：外卖看板 ·「订单明细」重做
   概览 KPI → 工具条（订单流 / 商品榜）→
   订单流：订单卡片（平台色条 + 状态胶囊 + 件数/实付/实收）+ 原地展开菜品 + 右侧门店·平台结构
   商品榜：排名 + 销量占比条 + 销量/金额/均价
   ============================================================ */
.tobx { display: flex; flex-direction: column; gap: 12px; }

/* —— 概览 —— */
.tobx-hero {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 18px 15px; box-shadow: var(--shadow-card);
}
.tobx-hero-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tobx-hero-main { min-width: 0; }
.tobx-hero-t { font-size: 15px; font-weight: 650; color: #16213a; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.tobx-live {
  font-size: 10.5px; font-weight: 600; color: #17a06b; background: var(--green-light);
  border: 1px solid #cdeada; border-radius: 999px; padding: 1px 7px; letter-spacing: .02em;
}
.tobx-hero-s { font-size: 11.5px; color: var(--text-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.tobx-chk {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2);
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 6px 11px; cursor: pointer;
  transition: border-color .18s, color .18s;
}
.tobx-chk:hover { border-color: #cfd8e6; color: #16213a; }
.tobx-chk input { accent-color: var(--brand); }
.tobx-kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.tobx-kpi { flex: 1 1 0; min-width: 112px; padding: 8px 13px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.tobx-kpi b {
  display: block; font-size: 18px; font-weight: 680; color: #16213a; line-height: 1.26;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.tobx-kpi span { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.tobx-kpi.hi { background: var(--brand-light); border-color: #ffd9bd; }
.tobx-kpi.hi b { color: var(--brand); }
.tobx-kpi.warn { background: var(--red-light); border-color: #f7cfcf; }
.tobx-kpi.warn b { color: var(--red); }

/* —— 工具条 —— */
.tobx-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 14px; box-shadow: var(--shadow-card);
}
.tobx-seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.tobx-seg button {
  border: 0; background: transparent; padding: 5px 14px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  transition: background .18s, color .18s, box-shadow .18s;
}
.tobx-seg button:hover { color: #16213a; }
.tobx-seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(26,41,66,.14); }
.tobx-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tobx-pill {
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  padding: 4px 11px; border-radius: 999px; font-size: 12px;
  transition: border-color .18s, color .18s, background .18s;
}
.tobx-pill em { font-style: normal; color: var(--text-3); font-size: 11px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.tobx-pill:hover { border-color: #cfd8e6; color: #16213a; }
.tobx-pill.on { background: #16213a; border-color: #16213a; color: #fff; }
.tobx-pill.on em { color: rgba(255,255,255,.7); }
.tobx-field { display: inline-flex; align-items: center; gap: 7px; }
.tobx-in, .tobx-sel {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 12.5px; background: #fff; color: var(--text); outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.tobx-in:focus, .tobx-sel:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,89,12,.10); }
.tobx-in { width: 196px; }
.tobx-meta { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tobx-meta b { color: #16213a; font-weight: 650; }

/* —— 卡片骨架 —— */
.tobx-2col { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 12px; align-items: start; }
.tobx-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden; }
.tobx-card-h {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fcfdff;
}
.tobx-card-h h3 { font-size: 13px; font-weight: 650; color: #16213a; }
.tobx-card-h small { font-size: 11.5px; color: var(--text-3); }
.tobx-card-b { padding: 10px 16px 14px; }
.tobx-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* —— 订单卡片流 —— */
.tobx-olist { padding: 9px 11px 12px; display: flex; flex-direction: column; gap: 7px; max-height: calc(100vh - 330px); min-height: 240px; overflow: auto; }
.tobx-orow {
  position: relative; border: 1px solid var(--line); border-radius: 11px; background: #fff;
  padding: 10px 13px 10px 16px; cursor: pointer; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.tobx-orow::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--tobx-pc, var(--brand));
}
.tobx-orow:hover { border-color: #d7e0ee; box-shadow: 0 8px 20px -16px rgba(26,41,66,.55); }
.tobx-orow:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,89,12,.12); }
.tobx-orow.open { border-color: #cfe0f8; background: #f8fbff; }
.tobx-orow.void { opacity: .72; background: #fbfbfc; }
.tobx-oline1 { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tobx-ot { font-size: 13.5px; font-weight: 680; color: #16213a; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tobx-oid { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tobx-ostore { font-size: 12.5px; color: var(--text-2); max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tobx-oline2 { display: flex; align-items: baseline; gap: 15px; flex-wrap: wrap; margin-top: 7px; }
.tobx-metric { font-size: 11.5px; color: var(--text-3); }
.tobx-metric b { font-size: 13.5px; font-weight: 660; color: #16213a; font-variant-numeric: tabular-nums; margin-left: 4px; }
.tobx-caret { margin-left: auto; font-size: 11.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }
.tobx-caret i { font-style: normal; display: inline-block; transition: transform .2s; }
.tobx-orow.open .tobx-caret i { transform: rotate(180deg); }
.tobx-orow:hover .tobx-caret { color: var(--brand); }

/* 平台标签 / 状态胶囊 */
.tobx-pf { font-size: 11px; padding: 2px 8px; border-radius: 7px; background: var(--bg); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.tobx-pf.meituan { background: #fff6e8; border-color: #ffe0b2; color: #b26a00; }
.tobx-pf.shangou { background: #eef6ff; border-color: #cfe6ff; color: #1b6fc4; }
.tobx-pf.jd { background: #fff0ef; border-color: #ffd7d4; color: #c02b2b; }
.tobx-st { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.tobx-st.ok { background: var(--green-light); border-color: #cdeada; color: #1f7a37; }
.tobx-st.warn { background: #fff7e6; border-color: #ffe2ab; color: #a86b00; }
.tobx-st.bad { background: var(--red-light); border-color: #f7cccc; color: #c02b2b; }
.tobx-void-tag { font-size: 11px; color: var(--red); background: var(--red-light); border-radius: 6px; padding: 1px 7px; }

/* 展开的菜品明细 */
.tobx-dish { margin-top: 9px; border-top: 1px dashed var(--line); padding-top: 9px; }
.tobx-dish-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tobx-dish-t th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text-3); padding: 3px 6px; }
.tobx-dish-t td { padding: 4px 6px; border-top: 1px solid #f1f5fa; }
.tobx-dish-t td.n, .tobx-dish-t th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tobx-dish-t tfoot td { border-top: 1px solid var(--line); font-weight: 650; color: #16213a; padding-top: 5px; }
.tobx-dish-foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 9px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tobx-dish-foot b { color: #16213a; font-weight: 650; }

/* —— 门店 / 平台结构 —— */
.tobx-srow { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.tobx-srow + .tobx-srow { border-top: 1px dashed var(--line); }
.tobx-srow-t { width: 96px; flex: none; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tobx-srow-b { flex: 1; min-width: 50px; height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.tobx-srow-b i { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.tobx-srow-v { width: 128px; flex: none; text-align: right; font-size: 12.5px; color: #16213a; font-variant-numeric: tabular-nums; }
.tobx-srow-v em { font-style: normal; color: var(--text-3); font-size: 11px; margin-left: 8px; }

/* —— 商品榜 —— */
.tobx-prow {
  display: grid; gap: 12px; align-items: center;
  grid-template-columns: 34px minmax(0,1fr) 132px 62px 92px 76px;
  padding: 9px 16px;
}
.tobx-phead {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  padding: 7px 16px; border-bottom: 1px solid var(--line); background: #fafbfd;
}
.tobx-phead .n { text-align: right; }
.tobx-plist { max-height: calc(100vh - 330px); min-height: 240px; overflow: auto; }
.tobx-plist .tobx-prow { border-top: 1px solid var(--line); }
.tobx-plist .tobx-prow:first-child { border-top: 0; }
.tobx-plist .tobx-prow:hover { background: #fafcff; }
.tobx-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 22px; border-radius: 7px; font-size: 11.5px; font-weight: 700;
  color: var(--text-3); background: var(--bg); font-variant-numeric: tabular-nums;
}
.tobx-rank.r1 { background: #fff2d8; color: #b26a00; }
.tobx-rank.r2 { background: #eef1f6; color: #5b6b82; }
.tobx-rank.r3 { background: #fdeee2; color: #a9603a; }
.tobx-pname { font-size: 13px; font-weight: 600; color: #16213a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tobx-pmeta2 { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.tobx-pbar { height: 7px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.tobx-pbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg,#ffb27a,var(--brand)); }
.tobx-pnum { text-align: right; font-size: 13px; color: #16213a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tobx-pnum b { font-weight: 660; }
.tobx-pnum small { display: block; font-size: 10.5px; color: var(--text-3); }

/* —— 空态 —— */
.tobx-empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.tobx-empty .ico { display: block; font-size: 28px; opacity: .5; margin-bottom: 10px; }
.tobx-empty b { display: block; font-size: 13.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 650; }
.tobx-mini-empty { padding: 22px 4px; text-align: center; color: var(--text-3); font-size: 12px; }

/* —— 响应式 —— */
@media (max-width: 1180px) { .tobx-2col { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .tobx-chk { margin-left: 0; }
  .tobx-kpi { flex: 1 1 40%; min-width: 88px; padding: 6px 10px; }
  .tobx-kpi b { font-size: 16.5px; }
  .tobx-field { flex: 1; min-width: 140px; }
  .tobx-in { width: 100%; }
  .tobx-meta { margin-left: 0; }
  .tobx-olist, .tobx-plist { max-height: none; }
  .tobx-prow { grid-template-columns: 28px minmax(0,1fr) 62px 84px; padding: 9px 12px; }
  .tobx-pcell-bar, .tobx-pcell-avg { display: none; }
  .tobx-pname { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tobx-srow-t { width: 78px; }
  .tobx-srow-v { width: 108px; }
}

/* ============================================================
   v589：数据看板 ·「产品分析」版面重做
   统一工具栏（档位构成 / 单品榜 / 门店对比）
   ============================================================ */
.pa2 { display: flex; flex-direction: column; gap: 12px; }

/* —— 工具栏 —— */
.pa2-bar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 14px; box-shadow: var(--shadow-card);
}
.pa2-lb { font-size: 12px; color: var(--text-3); font-weight: 600; }
.pa2-sp { flex: 1; }
.pa2-seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.pa2-seg button {
  border: 0; background: transparent; padding: 5px 14px; border-radius: 8px; font-size: 12.5px;
  font-weight: 600; color: var(--text-2); transition: background .18s, color .18s, box-shadow .18s;
}
.pa2-seg button:hover { color: #16213a; }
.pa2-seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(26,41,66,.14); }
.pa2-in, .pa2-sel {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 9px; font-size: 12.5px;
  background: #fff; color: var(--text); outline: none; transition: border-color .18s, box-shadow .18s;
}
.pa2-in:focus, .pa2-sel:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,89,12,.10); }
.pa2-in.sm { width: 168px; }
.pa2-pill {
  border: 1px solid var(--line); background: #fff; color: var(--text-2); padding: 4px 11px;
  border-radius: 999px; font-size: 12px; transition: border-color .18s, color .18s;
}
.pa2-pill:hover { border-color: #cfd8e6; color: #16213a; }

/* —— KPI —— */
.pa2-kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.pa2-kpi {
  flex: 1 1 0; min-width: 138px; padding: 10px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.pa2-kpi b { display: block; font-size: 19px; font-weight: 680; color: #16213a; line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pa2-kpi span { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.pa2-kpi em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.pa2-kpi.hi { background: var(--brand-light); border-color: #ffd9bd; }
.pa2-kpi.hi b { color: var(--brand); }
.pa2-kpi.warn { background: #fff8e8; border-color: #ffe2ab; }
.pa2-kpi.warn b { color: #a86b00; }

.pa2-note {
  background: #fdf6ee; border: 1px solid #f0dfc8; color: #8a5a22; border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px; line-height: 1.75;
}
.pa2-note.warn { background: #fff8e8; border-color: #ffe2ab; color: #8a5a22; }
.pa2-note b { color: #7a4a15; }
.pa2-note .btn { margin-left: 8px; }

/* —— 卡片骨架 —— */
.pa2-2col { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 12px; align-items: start; }
.pa2-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden; }
.pa2-card + .pa2-card { margin-top: 12px; }
.pa2-card-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fcfdff; }
.pa2-card-h h3 { font-size: 13px; font-weight: 650; color: #16213a; }
.pa2-card-h small { font-size: 11.5px; color: var(--text-3); }
.pa2-card-b { padding: 10px 16px 14px; }
.pa2-side { display: flex; flex-direction: column; min-width: 0; }

/* —— 档位行 —— */
.pa2-trow { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.pa2-trow:last-child { border-bottom: 0; }
.pa2-trow.mute { opacity: .82; }
.pa2-trow-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pa2-tname { font-size: 13px; font-weight: 650; color: #16213a; }
.pa2-tchip { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid transparent; font-variant-numeric: tabular-nums; }
.pa2-chip { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 10.5px; line-height: 1.6; background: var(--bg); color: var(--text-2); border: 1px solid var(--line); }
.pa2-chip.cost { background: #fff3e8; border-color: #ffd9bd; color: #b26a00; }
.pa2-tbar { height: 7px; border-radius: 999px; background: var(--bg); overflow: hidden; margin: 7px 0 6px; }
.pa2-tbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffb27a, var(--brand)); }
.pa2-trow-f { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pa2-trow-f b { color: #16213a; font-weight: 650; }
.pa2-trow-f em { font-style: normal; color: var(--text-3); margin-left: 5px; }
.pa2-dk { font-style: normal; font-weight: 650; }
.pa2-dk.up { color: var(--green); }
.pa2-dk.down { color: var(--red); }
.pa2-dk.flat { color: var(--text-3); }

/* —— 门店结构行 —— */
.pa2-srow { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.pa2-srow + .pa2-srow { border-top: 1px dashed var(--line); }
.pa2-srow-t { width: 96px; flex: none; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa2-srow-b { flex: 1; min-width: 46px; height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.pa2-srow-b i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.pa2-srow-v { width: 152px; flex: none; text-align: right; font-size: 12.5px; color: #16213a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pa2-srow-v em { font-style: normal; color: var(--text-3); font-size: 10.5px; margin-left: 7px; }
.pa2-qline { font-size: 12px; color: var(--text-2); line-height: 1.7; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pa2-qline:last-child { border-bottom: 0; }

/* —— 单品榜 / 门店对比 行 —— */
.pa2-prow {
  display: grid; gap: 10px; align-items: center; padding: 9px 16px;
  grid-template-columns: 32px minmax(0,1fr) 96px 62px 72px 92px 88px 84px 72px;
}
.pa2-prow.st { grid-template-columns: minmax(0,1fr) 104px 96px 92px 78px 86px 88px; }
.pa2-phead { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 7px 16px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.pa2-phead .n, .pa2-prow .n { text-align: right; }
.pa2-plist { max-height: calc(100vh - 380px); min-height: 220px; overflow: auto; }
.pa2-prow[data-pid] { border-top: 1px solid var(--line); cursor: pointer; outline: none; transition: background .16s; }
.pa2-plist .pa2-prow:first-child { border-top: 0; }
.pa2-prow:hover { background: #fafcff; }
.pa2-prow.open { background: #f8fbff; }
.pa2-prow.tot { background: var(--bg); font-weight: 650; }
.pa2-rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 22px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--text-3); background: var(--bg); font-variant-numeric: tabular-nums; }
.pa2-rank.r1 { background: #fff2d8; color: #b26a00; }
.pa2-rank.r2 { background: #eef1f6; color: #5b6b82; }
.pa2-rank.r3 { background: #fdeee2; color: #a9603a; }
.pa2-pname { font-size: 13px; font-weight: 600; color: #16213a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa2-pmeta { font-size: 10.5px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa2-pbar { height: 5px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-top: 5px; width: 62%; }
.pa2-pbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffc79a, var(--brand)); }
.pa2-pcell-tier { min-width: 0; }
.pa2-pnum { text-align: right; font-size: 13px; color: #16213a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pa2-pnum b { font-weight: 660; }
.pa2-pnum small { display: block; font-size: 10.5px; color: var(--text-3); font-weight: 400; }
.pa2-pexp { grid-column: 1 / -1; }
.pa2-pbreak { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; }
.pa2-bt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pa2-bt th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text-3); padding: 3px 6px; }
.pa2-bt td { padding: 4px 6px; border-top: 1px solid #f1f5fa; }
.pa2-bt td.n, .pa2-bt th.n { text-align: right; font-variant-numeric: tabular-nums; }
.pa2-foot { padding: 9px 16px; border-top: 1px solid var(--line); background: #fcfdff; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pa2-foot b { color: #16213a; font-weight: 650; }
.pa2-empty { padding: 38px 20px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.pa2-empty b { display: block; font-size: 13.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 650; }
.pa2-mini-empty { padding: 20px 4px; text-align: center; color: var(--text-3); font-size: 12px; }

/* —— 档位 × 门店 矩阵 —— */
.pa2-mtx-wrap { overflow: auto; padding: 12px 16px 16px; }
.pa2-mtx { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12.5px; }
.pa2-mtx th { font-size: 11px; font-weight: 650; color: var(--text-3); text-align: center; padding: 4px 6px; white-space: nowrap; }
.pa2-mtx th.corner { text-align: left; }
.pa2-mtx td { text-align: center; padding: 7px 6px; border: 1px solid var(--line); border-radius: 9px; font-variant-numeric: tabular-nums; }
.pa2-mtx td b { display: block; font-size: 13px; font-weight: 680; }
.pa2-mtx td small { display: block; font-size: 10.5px; opacity: .75; margin-top: 1px; }
.pa2-mtx td.rowhead { text-align: left; font-weight: 650; color: #16213a; background: var(--bg); border-color: var(--line); white-space: nowrap; }
.pa2-mtx td.nil { color: var(--text-3); background: #fbfcfd; }

/* —— 响应式 —— */
@media (max-width: 1180px) {
  .pa2-2col { grid-template-columns: 1fr; }
  .pa2-prow { grid-template-columns: 28px minmax(0,1fr) 88px 60px 70px 88px 84px; }
  .pa2-prow > :nth-child(8), .pa2-prow > :nth-child(9) { display: none; }
  .pa2-prow.st { grid-template-columns: minmax(0,1fr) 100px 92px 88px 74px; }
  .pa2-prow.st > :nth-child(6), .pa2-prow.st > :nth-child(7) { display: none; }
}
@media (max-width: 900px) {
  .pa2-kpi { flex: 1 1 44%; min-width: 120px; }
  .pa2-in.sm { width: 100%; }
  .pa2-plist { max-height: none; }
  .pa2-prow { grid-template-columns: 26px minmax(0,1fr) 84px; padding: 9px 12px; }
  .pa2-prow > :nth-child(n+4) { display: none; }
  .pa2-prow > .pa2-pexp { display: block; }
  .pa2-prow.st { grid-template-columns: minmax(0,1fr) 96px 84px; }
}


/* v627 品牌 logo（2026-11-05） */
.login-logo { flex-direction: column; }
.login-logo-img { width: 224px; max-width: 78%; height: auto; display: block; }
.side-brand-logo { height: 20px; width: auto; display: block; }
.side-brand-text { display: none; }

/* v627b 侧栏收起时的品牌图标（2026-11-05） */
.side-brand-icon { display: none; }
@media (max-width: 768px) {
  .side-brand-logo { display: none !important; }
  .side-brand-icon { display: block; width: 26px; height: 26px; border-radius: 7px; }
}

/* v654 expense preview failure states */
.exp-thumb .exp-preview-retry{position:absolute;inset:0;width:100%;height:100%;padding:6px;border:0;background:#fff3e8;color:#915719;font-size:12px;cursor:pointer}.exp-thumb .exp-preview-retry[hidden]{display:none}.exp-thumb img[hidden]{display:none}.exp-thumb .exp-thumb-del{z-index:1}

/* v659: session restoration is a real state, not a misleading login prompt. */
#login-session-panel{text-align:center;padding:18px 0 10px}#login-session-panel h2{font-size:21px;color:#1a2942;margin:16px 0 10px}#login-session-panel p{font-size:15px;line-height:1.8;color:#5d6b81}.login-session-mark{width:38px;height:38px;border:3px solid #e6eaf1;border-top-color:#c64c0d;border-radius:50%;margin:0 auto;animation:login-restore-turn 1s linear infinite}.login-session-status{font-size:13px;color:#66768d;margin:16px 0}.auth-retry .login-session-mark{animation:none;border-color:#d9e1ec;border-top-color:#8595ab}#login-session-panel .btn{margin-top:12px;min-height:46px}.auth-retry #login-session-note{color:#52627a}@keyframes login-restore-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.login-session-mark{animation:none}}
