/* =============================================================
   中科芯智达 · 进销存管理系统  设计系统 v2
   -------------------------------------------------------------
   规范基线：8pt 间距栅格 / 4 级字阶 / 统一线性图标 / 单主色 + 语义色
   主色 #165DFF · 成功 #12B76A · 警告 #F79009 · 错误 #F04438
   ============================================================= */

/* ---------------------------------------------------------- 设计令牌 */
:root {
  /* 品牌与语义色 */
  --primary: #165DFF;
  --primary-hover: #4080FF;
  --primary-active: #0E42D2;
  --primary-light: #EBF1FF;
  --primary-lighter: #F5F8FF;
  --success: #12B76A;
  --success-light: #E7F8EF;
  --warning: #F79009;
  --warning-light: #FEF4E6;
  --error: #F04438;
  --error-light: #FEECEB;
  --purple: #7A5AF8;
  --purple-light: #F1EDFE;

  /* 中性色阶 */
  --text-1: #101828;   /* 标题 / 主文本 */
  --text-2: #475467;   /* 次级文本 */
  --text-3: #667085;   /* 辅助文本 */
  --text-4: #98A2B3;   /* 占位 / 禁用 */
  --border: #E4E7EC;
  --border-light: #F2F4F7;
  --border-strong: #D0D5DD;
  --fill: #F2F4F7;
  --thead: #F9FAFB;
  --stripe: #FCFCFD;
  --hover: #F5F8FF;
  --bg: #F6F8FB;
  --card: #FFFFFF;

  /* 圆角 */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --radius: var(--r-md);
  --radius-sm: var(--r-sm);

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: var(--shadow-sm);
  --shadow-md: 0 4px 12px -2px rgba(16, 24, 40, .09), 0 2px 4px -2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 16px 40px -12px rgba(16, 24, 40, .18), 0 4px 12px -4px rgba(16, 24, 40, .08);

  /* 布局 */
  --side-w: 248px;
  --top-h: 64px;
  --focus-ring: 0 0 0 3px rgba(22, 93, 255, .14);
}

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

html { -webkit-text-size-adjust: 100%; }

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

button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
[v-cloak] { display: none; }
svg { display: block; }

::selection { background: rgba(22, 93, 255, .16); }

/* ---------------------------------------------------------- 登录页（app.html 内嵌） */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(1200px 600px at 12% 8%, rgba(22, 93, 255, .18), transparent 60%),
    radial-gradient(900px 500px at 88% 92%, rgba(18, 183, 106, .12), transparent 60%),
    linear-gradient(160deg, #05102B 0%, #0A1E45 55%, #0B2B63 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
}

.login-card {
  position: relative;
  width: 412px;
  max-width: 100%;
  margin: auto;
  background: #fff;
  border-radius: var(--r-2xl);
  padding: 34px 34px 26px;
  box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; align-items: center; gap: 11px; }
.login-logo {
  width: 40px; height: 40px; flex: none;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.login-logo svg { width: 40px; height: 40px; }
.login-title { font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
.login-sub { font-size: 12.5px; color: var(--text-3); margin: 14px 0 22px; line-height: 1.6; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field label .req { color: var(--error); margin-left: 2px; font-size: 13px; line-height: 1; vertical-align: -1px; }

input[type=text], input[type=password], input[type=number], input[type=date],
input[type=email], input[type=tel], input[type=search], select, textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--text-1);
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
  font-size: 14px;
}
textarea { height: auto; min-height: 76px; padding: 9px 12px; resize: vertical; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: var(--text-4); }
input:hover, select:hover, textarea:hover { border-color: #B8C0CC; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--fill); color: var(--text-4); cursor: not-allowed;
}
select {
  cursor: pointer;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 15px; height: 15px; }

.login-btn {
  width: 100%; height: 42px; margin-top: 6px;
  background: linear-gradient(180deg, #2A6BFF, var(--primary));
  color: #fff;
  border: none; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; letter-spacing: 2px; cursor: pointer;
  transition: filter .16s, transform .08s, box-shadow .16s;
  box-shadow: 0 4px 12px -3px rgba(22, 93, 255, .5);
}
.login-btn:hover { filter: brightness(1.06); }
.login-btn:active { transform: translateY(1px); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.login-tip {
  margin-top: 18px; padding: 12px 14px;
  background: var(--primary-lighter); border: 1px solid #E3EBFF;
  border-radius: var(--r-md);
  font-size: 12.5px; color: var(--text-2); line-height: 1.8;
}
.login-tip b { color: var(--text-1); }
.login-tip code {
  background: #fff; border: 1px solid var(--border);
  padding: 1px 6px; border-radius: var(--r-xs); font-size: 11.5px;
  color: var(--primary); cursor: pointer;
}
.login-err {
  margin-bottom: 14px; padding: 9px 12px;
  background: var(--error-light); color: #B42318;
  border: 1px solid #FBD5D2; border-radius: var(--r-md); font-size: 13px;
}
.login-ok {
  margin-bottom: 14px; padding: 9px 12px;
  background: var(--success-light); color: #027A48;
  border: 1px solid #C7EFDA; border-radius: var(--r-md); font-size: 13px; line-height: 1.6;
}
.login-tabs {
  display: flex; gap: 4px; background: var(--fill);
  border-radius: var(--r-md); padding: 4px; margin-bottom: 20px;
}
.login-tabs button {
  flex: 1; border: 0; background: transparent; padding: 8px 0;
  font-size: 13.5px; color: var(--text-3); border-radius: var(--r-sm);
  cursor: pointer; transition: all .16s;
}
.login-tabs button.active {
  background: #fff; color: var(--text-1); font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.reg-entry { font-size: 12.5px; color: var(--text-3); }
.reg-entry a { color: var(--primary); font-weight: 600; }
.login-reg { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-3); }
.login-reg a { color: var(--primary); font-weight: 600; }

/* 微信扫码 */
.wx-login { display: flex; flex-direction: column; align-items: center; padding: 4px 0 2px; }
.wx-qr-box {
  position: relative; width: 200px; height: 200px; padding: 10px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff;
}
.wx-qr-box.expired img, .wx-qr-box.expired canvas, .wx-qr-box.expired table { filter: blur(3px); opacity: .35; }
.wx-qr-mask {
  position: absolute; inset: 0; border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .95);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; color: var(--text-1);
}
.wx-tip { margin-top: 14px; font-size: 12.5px; color: var(--text-2); text-align: center; line-height: 1.7; }
.wx-state { margin-top: 6px; font-size: 12.5px; color: var(--text-4); }
.wx-state.scanned { color: var(--warning); font-weight: 600; }
.wx-state.confirmed { color: var(--success); font-weight: 600; }

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

/* 侧栏：深色，承载品牌与全部业务入口 */
.sidebar {
  width: var(--side-w); flex: none;
  background: linear-gradient(180deg, #0E1B2E 0%, #101F35 100%);
  display: flex; flex-direction: column;
  position: relative; z-index: 20;
}
.sidebar::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: rgba(255, 255, 255, .06);
}
.sidebar-head {
  height: var(--top-h); flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-mark svg { width: 32px; height: 32px; border-radius: 9px; }
.brand-text .t { font-size: 14.5px; font-weight: 600; color: #fff; letter-spacing: .4px; line-height: 1.25; }
.brand-text .s { font-size: 11px; color: rgba(255, 255, 255, .45); letter-spacing: .4px; margin-top: 1px; }

.sidebar-body { flex: 1; overflow-y: auto; padding: 8px 10px 16px; }
.sidebar-body::-webkit-scrollbar { width: 4px; }
.sidebar-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 2px; }

.nav-group {
  padding: 16px 10px 6px; font-size: 11px; font-weight: 500;
  color: rgba(255, 255, 255, .34); letter-spacing: 1px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 10px; margin-bottom: 2px;
  border-radius: var(--r-md); cursor: pointer;
  color: rgba(255, 255, 255, .72); font-size: 13.5px;
  transition: background .15s, color .15s;
  position: relative; user-select: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(22, 93, 255, .92), rgba(22, 93, 255, .68));
  color: #fff; font-weight: 500;
  box-shadow: 0 4px 14px -6px rgba(22, 93, 255, .8);
}
.nav-item .ico { width: 17px; height: 17px; flex: none; opacity: .92; }
.nav-item .ico svg { width: 17px; height: 17px; }
.nav-item .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--error); color: #fff; border-radius: 9px;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 500;
}
.sidebar-foot {
  flex: none; height: 44px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 11.5px; color: rgba(255, 255, 255, .38);
}
.sf-env { display: inline-flex; align-items: center; gap: 5px; }
.sf-env i { width: 5px; height: 5px; border-radius: 50%; background: #35D07F; box-shadow: 0 0 0 3px rgba(53, 208, 127, .18); }

/* 主区 */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--top-h); flex: none;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 14px;
  position: relative; z-index: 30;
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cb-group { color: var(--text-3); }
.cb-sep { color: var(--border-strong); font-size: 12px; }
.cb-cur { color: var(--text-1); font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 34px; height: 34px; border: 1px solid var(--border); background: #fff;
  border-radius: var(--r-md); color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lighter); }
.icon-btn svg { width: 17px; height: 17px; }
.only-mobile { display: none; }

.demo-flag {
  padding: 3px 9px; background: var(--warning-light); color: #B54708;
  border: 1px solid #FDE3C4; border-radius: var(--r-sm); font-size: 12px; font-weight: 500;
}

/* 用户区 + 下拉菜单 */
.user-wrap { position: relative; }
.userbox {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 4px 5px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: transparent; text-align: left;
  transition: background .15s, border-color .15s;
}
.userbox:hover, .userbox.on { background: var(--fill); border-color: var(--border); }
.avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, #4C86FF, #165DFF);
  color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.umeta { display: flex; flex-direction: column; line-height: 1.3; }
.userbox .nm { font-size: 13px; font-weight: 600; color: var(--text-1); }
.userbox .rl { font-size: 11.5px; color: var(--text-3); }
.uarrow { color: var(--text-4); transition: transform .18s; }
.uarrow svg { width: 15px; height: 15px; }
.uarrow.up { transform: rotate(180deg); }

.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 208px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 40;
  animation: pop .16s ease-out;
}
.um-head { padding: 9px 10px 10px; border-bottom: 1px solid var(--border-light); margin-bottom: 5px; }
.um-name { font-size: 13.5px; font-weight: 600; }
.um-role { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.um-item {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border: none; background: transparent; border-radius: var(--r-sm);
  font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left;
}
.um-item:hover { background: var(--fill); color: var(--text-1); }
.um-item.danger { color: var(--error); }
.um-item.danger:hover { background: var(--error-light); }
.um-ico { width: 16px; height: 16px; }
.um-ico svg { width: 16px; height: 16px; }
.um-sep { height: 1px; background: var(--border-light); margin: 5px 0; }
.menu-shade { position: fixed; inset: 0; z-index: 25; }

/* ---------------------------------------------------------- 内容区 */
.content { flex: 1; overflow-y: auto; padding: 24px 24px 48px; scroll-behavior: smooth; }

.page-head { display: flex; align-items: flex-start; margin-bottom: 18px; gap: 16px; }
.page-head h2 {
  font-size: 21px; font-weight: 650; letter-spacing: -.3px; line-height: 1.35; color: var(--text-1);
}
.page-head .desc {
  font-size: 13px; color: var(--text-3); margin-top: 6px; line-height: 1.65; max-width: 900px;
}
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }
.page-head .actions input[type=date] { width: 142px; min-width: 142px; }
.page-head .actions input:not([type=date]), .page-head .actions select { width: auto; min-width: 136px; }

/* ---------------------------------------------------------- 卡片 */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-xs);
  margin-bottom: 16px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.card-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -.1px; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

/* ---------------------------------------------------------- 统计卡 */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px; margin-bottom: 16px;
}
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 16px 18px 15px; box-shadow: var(--shadow-xs);
  transition: box-shadow .18s, transform .18s, border-color .18s;
  position: relative; overflow: hidden;
}
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: #D8E2FF; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat .lbl { font-size: 12.5px; color: var(--text-3); font-weight: 500; padding-top: 2px; }
.stat .si {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary);
}
.stat .si svg { width: 16px; height: 16px; }
.stat .val {
  font-size: 27px; font-weight: 700; margin-top: 10px; letter-spacing: -.8px;
  line-height: 1.15; color: var(--text-1); font-variant-numeric: tabular-nums;
}
.stat .val small { font-size: 12.5px; font-weight: 500; color: var(--text-3); margin-left: 4px; letter-spacing: 0; }
.stat .foot { font-size: 11.5px; color: var(--text-4); margin-top: 7px; line-height: 1.5; }
.stat.ok .si { background: var(--success-light); color: var(--success); }
.stat.ok .val { color: #027A48; }
.stat.warn .si { background: var(--warning-light); color: var(--warning); }
.stat.warn .val { color: #B54708; }
.stat.err .si { background: var(--error-light); color: var(--error); }
.stat.err .val { color: #B42318; }

/* ---------------------------------------------------------- 按钮 */
.btn {
  height: 34px; padding: 0 14px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text-2);
  border-radius: var(--r-md); cursor: pointer; font-size: 13.5px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: all .15s; white-space: nowrap; line-height: 1;
}
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lighter); }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn.primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 2px 6px -1px rgba(22, 93, 255, .35);
}
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn.primary:active { background: var(--primary-active); border-color: var(--primary-active); }
.btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.btn.success:hover { filter: brightness(1.06); color: #fff; }
.btn.danger { color: var(--error); border-color: #F5C2BE; background: #fff; }
.btn.danger:hover { background: var(--error); border-color: var(--error); color: #fff; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn.ghost {
  border-color: transparent; background: transparent; padding: 0 8px; color: var(--text-3);
}
.btn.ghost:hover { background: var(--primary-light); color: var(--primary); border-color: transparent; }
.btn.block { width: 100%; }
.btn .bi { display: inline-flex; width: 15px; height: 15px; flex: none; }
.btn .bi svg { width: 15px; height: 15px; }
.btn:disabled, .btn:disabled:hover {
  opacity: .45; cursor: not-allowed; border-color: var(--border); color: var(--text-4);
  background: #fff; transform: none; box-shadow: none;
}

/* ---------------------------------------------------------- 表格 */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.tb thead th {
  background: var(--thead); color: var(--text-3); font-weight: 600;
  text-align: left; padding: 11px 16px; white-space: nowrap;
  border-bottom: 1px solid var(--border); font-size: 12.5px;
  letter-spacing: .2px; position: sticky; top: 0; z-index: 2;
}
table.tb thead th:first-child { padding-left: 20px; }
table.tb thead th:last-child { padding-right: 20px; }
table.tb td {
  padding: 13px 14px; border-bottom: 1px solid var(--border-light);
  vertical-align: middle; color: var(--text-1); white-space: nowrap;
}
table.tb td:first-child { padding-left: 20px; }
table.tb td:last-child { padding-right: 20px; }
table.tb tbody tr { transition: background .12s; }
table.tb tbody tr:hover { background: #FAFBFF; }
table.tb tbody tr:last-child td { border-bottom: none; }
/* 操作列吸右：表格横向溢出时关键操作始终可见 */
table.tb thead th:last-child { position: sticky; right: 0; z-index: 3; background: var(--thead); }
table.tb tbody td:last-child {
  position: sticky; right: 0; z-index: 1; background: #fff;
}
table.tb tbody tr:hover td:last-child { background: #FAFBFF; }
table.tb .num { font-variant-numeric: tabular-nums; }
table.tb .main-txt { font-weight: 600; color: var(--text-1); }
table.tb .sub-txt {
  font-size: 11.5px; color: var(--text-4); margin-top: 3px; font-weight: 400;
  white-space: normal; max-width: 190px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
table.tb .right { text-align: right; }
table.tb .center { text-align: center; }
.tb-actions { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.tb-actions .btn { flex: none; }
.tb-actions .btn.danger {
  border-color: transparent; background: transparent; color: var(--error);
}
.tb-actions .btn.danger:hover { background: var(--error-light); border-color: transparent; color: #B42318; }

.empty { padding: 56px 20px; text-align: center; color: var(--text-4); font-size: 13px; }
.empty .big {
  width: 46px; height: 46px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--fill); color: var(--text-4);
}
.empty .big svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------- 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: var(--r-sm);
  font-size: 12px; line-height: 19px; white-space: nowrap; font-weight: 500;
  background: var(--fill); color: var(--text-2);
}
.tag.blue   { background: var(--primary-light); color: var(--primary); }
.tag.green  { background: var(--success-light); color: #027A48; }
.tag.orange { background: var(--warning-light); color: #B54708; }
.tag.red    { background: var(--error-light);   color: #B42318; }
.tag.gray   { background: var(--fill); color: var(--text-3); }
.tag.purple { background: var(--purple-light); color: #5B34D6; }
.tag.outline { background: #fff; border: 1px solid var(--border-strong); color: var(--text-2); }

/* ---------------------------------------------------------- 页签 */
.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--border-light);
  padding: 0 16px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 12px 11px; font-size: 13.5px; color: var(--text-3);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .14s, border-color .14s; font-weight: 500;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .cnt {
  display: inline-block; margin-left: 5px; padding: 0 6px;
  background: var(--fill); border-radius: 9px; font-size: 11px; line-height: 17px;
  color: var(--text-3); font-weight: 500;
}
.tab.active .cnt { background: var(--primary-light); color: var(--primary); }

/* ---------------------------------------------------------- 筛选栏 */
.filters {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--border-light);
  background: #FCFCFD;
}
.filters input, .filters select { width: auto; min-width: 150px; max-width: 220px; height: 34px; font-size: 13px; }
.filters input[type=date] { min-width: 138px; width: 138px; }
.filters .grow { flex: 1; min-width: 220px; max-width: none; }
.filters .spacer { margin-left: auto; }
.filters .sub-txt { font-size: 12.5px; color: var(--text-4); }

/* ---------------------------------------------------------- 分页 */
.pager {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; border-top: 1px solid var(--border-light);
  font-size: 13px; color: var(--text-3);
}
.pager .spacer { margin-left: auto; }
.pager button {
  min-width: 32px; height: 32px; padding: 0 9px;
  border: 1px solid var(--border-strong); background: #fff; border-radius: var(--r-md);
  cursor: pointer; color: var(--text-2); font-size: 13px; transition: all .14s;
}
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager button.cur { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------------------------------------------------- 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .48);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 56px 20px; z-index: 1000; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: var(--r-2xl); width: 640px; max-width: 100%;
  box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2, .8, .3, 1);
  display: flex; flex-direction: column; max-height: calc(100vh - 112px);
}
.modal.wide { width: 920px; }
@keyframes pop { from { transform: translateY(-10px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; padding: 18px 24px;
  border-bottom: 1px solid var(--border-light); flex: none;
}
.modal-head h3 { font-size: 16.5px; font-weight: 650; letter-spacing: -.2px; }
.modal-head .close {
  margin-left: auto; width: 30px; height: 30px; border: none; background: transparent;
  font-size: 20px; color: var(--text-4); cursor: pointer; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.modal-head .close:hover { background: var(--fill); color: var(--text-1); }
.modal-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 24px; border-top: 1px solid var(--border-light);
  background: #FCFCFD; border-radius: 0 0 var(--r-2xl) var(--r-2xl); flex: none;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-hint { font-size: 12px; color: var(--text-4); margin-top: 5px; line-height: 1.6; }
.form-sec {
  grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--text-1);
  padding: 4px 0 10px; margin-top: 6px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 8px;
}
.form-sec::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--primary);
}

/* 多值字段编辑器 */
.tags-editor {
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: #fff; padding: 8px 10px 10px;
}
.tags-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 4px 2px 8px; border-radius: var(--r-sm);
  font-size: 12px; line-height: 18px;
  background: var(--primary-light); color: var(--primary);
}
.tag-x {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0 3px; opacity: .55;
}
.tag-x:hover { opacity: 1; }
.tags-add { display: flex; align-items: center; gap: 8px; }
.tags-add input[type=text] { flex: 1; min-width: 0; }
.tags-add .btn { flex: none; height: 38px; }

.chip-cell { display: flex; flex-wrap: wrap; gap: 4px; }

/* 多选（兼任部门权限等）：横向换行的复选框组 */
.multi-check {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: #fff; padding: 12px 14px;
}
.mc-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-1); cursor: pointer;
  font-weight: 400; margin: 0; user-select: none;
}
.mc-item input[type=checkbox] {
  width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer;
}

/* 只读信息行 */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.info-row { display: flex; gap: 10px; font-size: 13px; line-height: 1.7; }
.info-row .k { color: var(--text-4); flex: 0 0 84px; text-align: right; }
.info-row .v { color: var(--text-1); flex: 1; word-break: break-all; }
.info-row.full { grid-column: 1 / -1; }

/* ---------------------------------------------------------- 分批回款概览 */
.pay-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px;
  padding: 14px 16px; margin-bottom: 16px;
  background: var(--primary-lighter); border: 1px solid #DCE7FF; border-radius: var(--r-lg);
}
.pay-summary > div { display: flex; flex-direction: column; gap: 2px; }
.pay-summary span { font-size: 11.5px; color: var(--text-3); }
.pay-summary b { font-size: 15px; color: var(--text-1); font-variant-numeric: tabular-nums; }
.pay-summary b.ok { color: #027A48; }
.pay-summary b.warn { color: #B54708; }
.pay-summary .tip { flex: 1 1 100%; font-size: 11.5px; color: var(--text-4); margin: 2px 0 0; }

/* ---------------------------------------------------------- 业务附件 */
.att-box {
  margin-top: 16px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: #FCFCFD;
}
.att-pending { background: #FFFCF5; border-color: #F5DFB8; }
.att-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 10px;
}
.att-head .btn { cursor: pointer; font-weight: 500; }
.att-list { display: flex; flex-direction: column; gap: 6px; }
.att-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: #fff;
  border: 1px solid var(--border-light); border-radius: var(--r-md);
}
.att-name {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-meta { flex: none; font-size: 11.5px; color: var(--text-4); }
.att-item .btn { flex: none; }

/* ---------------------------------------------------------- 借用归还登记 */
.ret-head {
  padding: 12px 16px; margin-bottom: 14px;
  background: var(--primary-lighter); border: 1px solid #DCE7FF; border-radius: var(--r-lg);
}
.ret-head p { margin: 0; font-size: 12.5px; line-height: 1.85; color: var(--text-2); }
.ret-head b.ok { color: #027A48; }
.ret-head b.bad { color: var(--error); }
.ret-list {
  max-height: 340px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--r-lg);
}
.ret-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--border-light);
}
.ret-row:last-child { border-bottom: 0; }
.ret-row:nth-child(odd) { background: #FCFCFD; }
.ret-no {
  flex: none; width: 28px; height: 22px; line-height: 22px; text-align: center;
  font-size: 11.5px; color: var(--text-3); background: var(--fill); border-radius: var(--r-xs);
}
.ret-sn {
  flex: 0 0 152px; font-size: 12.5px; color: var(--text-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ret-opts { flex: none; display: flex; gap: 12px; }
.ret-opts label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
}
.ret-remark { flex: 1; min-width: 0; height: 32px; font-size: 12.5px; }
.ret-tip { margin: 6px 0 0 !important; font-size: 12px; color: var(--text-4); }
.ret-tools { margin-bottom: 8px; }
.ret-tools .chk-line { font-size: 12.5px; color: var(--text-2); }
.ret-pick { flex: none; display: inline-flex; align-items: center; }
.ret-row.off { opacity: .45; }
.ret-row.off .ret-sn { text-decoration: line-through; }

.borrow-check {
  margin-top: 12px; padding: 12px 16px;
  background: var(--primary-lighter); border: 1px solid #DCE7FF; border-radius: var(--r-lg);
}
.bc-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--text-2); padding: 3px 0;
}
.bc-row b { font-size: 13.5px; }
.bc-row b.ok { color: #027A48; }
.bc-row b.bad { color: var(--error); }
.borrow-check .form-hint { margin-top: 6px; }

/* 借用看板 */
.borrow-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.bb-item {
  flex: 1 1 150px; min-width: 132px;
  padding: 14px 16px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-xs);
}
.bb-item .bb-n { font-size: 22px; font-weight: 700; color: var(--text-1); line-height: 1.2; font-variant-numeric: tabular-nums; }
.bb-item .bb-t { font-size: 12px; color: var(--text-4); }
.bb-item.warn { border-color: #FDE3C4; background: #FFFCF5; }
.bb-item.warn .bb-n { color: #B54708; }
.bb-item.bad { border-color: #FBD5D2; background: #FFFAFA; }
.bb-item.bad .bb-n { color: #B42318; }

.bare-sn-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
.bare-sn {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
  padding: 3px 8px; background: var(--fill); border-radius: var(--r-xs); color: var(--text-1);
}

/* ---------------------------------------------------------- Toast */
.toast-box {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  padding: 11px 18px; border-radius: var(--r-lg); font-size: 13px;
  box-shadow: var(--shadow-lg); animation: pop .2s;
  background: #fff; border: 1px solid var(--border);
  border-left: 3px solid var(--primary); min-width: 200px; color: var(--text-1);
}
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--error); }
.toast.warn { border-left-color: var(--warning); }

/* ---------------------------------------------------------- 图表 */
.chart {
  display: flex; align-items: flex-end; gap: 16px; justify-content: space-around;
  height: 210px; padding: 24px 4px 0; position: relative;
}
.chart::before {
  content: ""; position: absolute; left: 4px; right: 4px; top: 24px; bottom: 30px;
  background: repeating-linear-gradient(to top, var(--border-light) 0 1px, transparent 1px 25%);
  pointer-events: none;
}
.chart .bar-col {
  flex: 1 1 0; max-width: 108px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  height: 100%; justify-content: flex-end; position: relative; z-index: 1;
}
.chart .bar {
  width: 100%; max-width: 48px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #6E9BFF, #165DFF);
  position: relative; transition: filter .15s; min-height: 4px;
}
.chart .bar:hover { filter: brightness(1.08); }
.chart .bar .v {
  position: absolute; top: -21px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--text-3); white-space: nowrap; font-weight: 500;
}
.chart .x { font-size: 11.5px; color: var(--text-4); }

.bars { display: flex; flex-direction: column; gap: 14px; }
.bars .row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.bars .row .n { flex: 0 0 86px; color: var(--text-2); font-size: 12.5px; }
.bars .row .track { flex: 1; height: 7px; background: var(--fill); border-radius: 4px; overflow: hidden; }
.bars .row .fill { height: 100%; border-radius: 4px; background: var(--primary); transition: width .4s ease; }
.bars .row .v { flex: 0 0 42px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; }

.alerts { display: flex; flex-direction: column; }
.alert-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px dashed var(--border-light); font-size: 13px;
}
.alert-row:last-child { border-bottom: none; }
.alert-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); flex-shrink: 0; }
.alert-row .dot.red { background: var(--error); }
.alert-row b { font-weight: 600; }

/* 明细表 */
.items-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.items-table th {
  background: var(--thead); padding: 9px 10px; text-align: left;
  font-weight: 600; color: var(--text-3); font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.items-table td { padding: 9px 10px; border-bottom: 1px solid var(--border-light); }
.items-table tbody tr:last-child td { border-bottom: none; }
.items-table tfoot td { border-bottom: none; padding-top: 14px; font-weight: 600; }
.items-table th.right, .items-table td.right { text-align: right; }
.items-table .num { font-variant-numeric: tabular-nums; }
.items-table .main-txt { font-weight: 500; }
.items-table .sub-txt { font-size: 11.5px; color: var(--text-4); margin-top: 2px; }
.req { color: var(--error); margin-left: 2px; }

/* 时间轴 */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.tl-item::before {
  content: ""; position: absolute; left: 5px; top: 15px; bottom: 0; width: 1px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-item .dot {
  width: 11px; height: 11px; border-radius: 50%; background: #fff;
  border: 2px solid var(--border-strong); flex-shrink: 0; margin-top: 4px; z-index: 1;
}
.tl-item.done .dot { border-color: var(--success); background: var(--success); }
.tl-item.cur .dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px rgba(22, 93, 255, .14); }
.tl-item .t { font-size: 13px; font-weight: 600; }
.tl-item .d { font-size: 12px; color: var(--text-4); margin-top: 3px; line-height: 1.6; }

.hint-bar {
  padding: 11px 16px; background: var(--primary-lighter); color: #1A46B8;
  border: 1px solid #DCE7FF; border-radius: var(--r-lg);
  font-size: 12.5px; line-height: 1.7; margin-bottom: 16px;
}
.hint-bar.warn { background: #FFFCF5; color: #B54708; border-color: #FDE3C4; }

.row-2 { display: grid; grid-template-columns: 1.85fr 1fr; gap: 16px; align-items: start; }

/* ---------------------------------------------------------- 客户注册 */
.cust-type { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.cust-type label {
  display: block; padding: 14px 16px; background: #fff;
  border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
}
.cust-type label b { display: block; font-size: 13.5px; color: var(--text-1); margin-bottom: 4px; }
.cust-type label span { font-size: 11.5px; color: var(--text-4); line-height: 1.6; }
.cust-type label:hover { border-color: #B9CDF2; }
.cust-type label.on {
  border-color: var(--primary); background: var(--primary-lighter);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, .09);
}
.cust-type label.on b { color: var(--primary); }
.chk-line {
  display: flex !important; align-items: center; gap: 8px; cursor: pointer;
  font-size: 13px; color: var(--text-1);
}
.chk-line input[type=checkbox] { margin: 0; }
.cust-done .done-ico {
  width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--success); color: #fff;
  box-shadow: 0 6px 18px -4px rgba(18, 183, 106, .45);
}
.cust-done .done-ico svg { width: 22px; height: 22px; stroke-width: 2.4; }
.cust-done .done-title { text-align: center; font-size: 15.5px; font-weight: 650; color: var(--text-1); }
.cust-more { margin: 2px 0 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff; }
.cust-more > summary {
  position: relative; padding: 11px 36px 11px 16px; cursor: pointer;
  font-size: 13px; color: var(--text-2); list-style: none; user-select: none;
}
.cust-more > summary::-webkit-details-marker { display: none; }
.cust-more > summary::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px;
  border-right: 1.6px solid var(--text-4); border-bottom: 1.6px solid var(--text-4);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s;
}
.cust-more[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.cust-more[open] > summary {
  border-bottom: 1px solid var(--border-light); margin-bottom: 14px;
  color: var(--text-1); font-weight: 600;
}
.cust-more .form-grid { padding: 0 16px 4px; }
.cust-account {
  margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg); background: var(--stripe);
}
.cust-account .tt { font-size: 12px; color: var(--text-4); margin-bottom: 8px; }
.cust-account .row {
  display: flex; justify-content: space-between; gap: 12px; font-size: 13px;
  padding: 5px 0; color: var(--text-2);
}
.cust-account .row b {
  color: var(--text-1); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px;
}
.cust-acc-ops { margin-top: 10px; display: flex; gap: 8px; }
.modal-body.cust-reg-body { max-height: 74vh; }
.cust-reg-body .field { margin-bottom: 14px; }
.cust-reg-body .form-hint { margin-top: 4px; }
.cust-reg-body .cust-type { margin-bottom: 16px; }

/* ---------------------------------------------------------- 库存统计面板 */
.inv-stats { margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }
.inv-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.inv-card {
  flex: 1; min-width: 136px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 15px 18px; box-shadow: var(--shadow-xs);
}
.inv-card .v {
  font-size: 20px; font-weight: 700; color: var(--text-1);
  font-variant-numeric: tabular-nums; letter-spacing: -.3px;
}
.inv-card .v.green { color: #027A48; }
.inv-card .v.gold { color: #B54708; }
.inv-card .t { font-size: 12px; color: var(--text-4); margin-top: 5px; }
.inv-breakdowns { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.inv-table {
  flex: 1; min-width: 320px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.inv-table .tt {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  padding: 11px 16px; background: var(--thead); border-bottom: 1px solid var(--border-light);
}
.inv-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-table th, .inv-table td { padding: 8px 16px; text-align: left; border-bottom: 1px solid var(--border-light); }
.inv-table th { background: var(--thead); color: var(--text-3); font-weight: 600; font-size: 12px; }
.inv-table th.r, .inv-table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.inv-table tbody tr:last-child td { border-bottom: none; }
.inv-table .empty-cell { text-align: center; color: var(--text-4); padding: 18px; }
.inv-table tbody tr:hover td { background: #FAFBFF; }

/* ---------------------------------------------------------- 表头筛选 */
.th { position: relative; }
table.tb thead th { position: relative; }
.th-filter {
  display: inline-block; margin-left: 4px; cursor: pointer; font-size: 10px;
  color: var(--text-4); padding: 0 3px; border-radius: 3px; user-select: none;
}
.th-filter:hover { color: var(--primary); background: var(--primary-light); }
.th-filter.on { color: var(--primary); font-weight: 700; }
.th-filter.open { color: #fff; background: var(--primary); }
.th-panel {
  position: fixed; z-index: 300; min-width: 176px; max-height: 264px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 5px;
}
.th-item {
  padding: 7px 10px; font-size: 12.5px; color: var(--text-1);
  cursor: pointer; border-radius: var(--r-sm); white-space: nowrap;
}
.th-item:hover { background: var(--fill); }
.th-item.on { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.sn-box { margin-top: 10px; }
.sn-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sn-tip-inline { font-size: 12.5px; color: var(--text-2); font-weight: 600; }

/* ---------------------------------------------------------- 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #CDD3DD; border-radius: 5px; border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #AEB6C2; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------- 响应式 */
.side-mask { display: none; }

@media (max-width: 1360px) {
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .row-2 { grid-template-columns: 1.6fr 1fr; }
}
@media (max-width: 1180px) {
  .row-2 { grid-template-columns: 1fr; }
  .content { padding: 20px 20px 40px; }
}
@media (max-width: 900px) {
  .form-grid, .info-grid, .cust-type { grid-template-columns: 1fr; }
  .only-mobile { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 900;
    transform: translateX(-100%); transition: transform .24s cubic-bezier(.2, .8, .3, 1);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .side-mask {
    display: block; position: fixed; inset: 0; background: rgba(16, 24, 40, .45);
    z-index: 890; backdrop-filter: blur(2px);
  }
  .topbar { padding: 0 16px; gap: 10px; }
  .content { padding: 16px 16px 40px; }
  .page-head { flex-direction: column; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .page-head h2 { font-size: 19px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .modal { max-height: calc(100vh - 40px); }
  .mask { padding: 20px 12px; }
  .umeta { display: none; }
  .uarrow { display: none; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 14px 12px; }
  .stat .val { font-size: 23px; margin-top: 8px; }
  .stat .foot { font-size: 11px; }
  .stat .si { width: 26px; height: 26px; border-radius: 8px; }
  .filters { gap: 8px; }
  .filters input, .filters select { min-width: 0; flex: 1; max-width: none; }
  .filters .grow { min-width: 100%; }
}
@media (max-width: 340px) {
  .stat-grid { grid-template-columns: 1fr; }
}
