/* ===================================================================
   ipms/web/styles.css — 浅色科技风 · 三档断点自适应
   S(<600)  手机企微：卡片流 + 底部导航
   M(600-1024) 平板/小窗：双列卡片 + 折叠侧栏
   L(>=1024) 电脑企微：左侧导航 + 真表格
   =================================================================== */

:root {
  /* 浅色科技风主色 */
  --c-primary: #2b6cff;
  --c-primary-dark: #1d54d6;
  --c-primary-light: #eaf1ff;
  --c-cyan: #12b8c8;
  --c-violet: #7b5cff;

  --c-bg: #f5f7fb;
  --c-surface: #ffffff;
  --c-surface-2: #fafbfe;
  --c-border: #e6ebf5;
  --c-border-strong: #d3dcec;

  --c-text: #1a2233;
  --c-text-2: #5a6478;
  --c-text-3: #8b96ad;

  --c-success: #10a45c;
  --c-success-bg: #e8f8ef;
  --c-warn: #e8940c;
  --c-warn-bg: #fff6e5;
  --c-danger: #e5484d;
  --c-danger-bg: #fdecec;
  --c-info: #2b6cff;
  --c-info-bg: #eaf1ff;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(26, 34, 51, .04), 0 2px 8px rgba(26, 34, 51, .04);
  --shadow: 0 4px 16px rgba(26, 34, 51, .07);
  --shadow-lg: 0 12px 40px rgba(26, 34, 51, .12);

  --nav-w: 216px;
  --header-h: 56px;
  --tabbar-h: 58px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--c-primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

/* ---------- 布局骨架 ---------- */
#app { height: 100%; }

.boot {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  color: var(--c-text-2);
}
.boot .logo {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-cyan));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(43, 108, 255, .3);
}

.shell { display: flex; height: 100%; overflow: hidden; }

/* 侧边导航（L 档） */
.sidebar {
  width: var(--nav-w); flex: 0 0 var(--nav-w);
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex; flex-direction: column;
  transition: width .2s ease, flex-basis .2s ease;
  z-index: 30;
}
.sidebar.collapsed { width: 64px; flex-basis: 64px; }
.sidebar.collapsed .nav-label, .sidebar.collapsed .brand-text { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0 0; }

.brand {
  height: var(--header-h); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid var(--c-border); flex: 0 0 auto;
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-cyan));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.brand-text { font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.brand-text small { display: block; font-size: 11px; color: var(--c-text-3); font-weight: 400; }

.nav { flex: 1; overflow-y: auto; padding: 10px 8px 20px; }
.nav-group { margin-bottom: 4px; }
.nav-group-title {
  font-size: 11px; color: var(--c-text-3); padding: 10px 10px 6px;
  letter-spacing: .5px; white-space: nowrap;
}
.sidebar.collapsed .nav-group-title { display: none; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 10px; border-radius: var(--radius-sm);
  color: var(--c-text-2); cursor: pointer; white-space: nowrap;
  border: none; background: none; width: 100%; text-align: left;
  font-size: 13.5px; margin-bottom: 2px;
}
.nav-item:hover { background: var(--c-surface-2); color: var(--c-text); }
.nav-item.active {
  background: var(--c-primary-light); color: var(--c-primary); font-weight: 600;
}
.nav-item .ico { width: 18px; flex: 0 0 18px; text-align: center; font-size: 15px; }
.nav-item .badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--c-danger); color: #fff;
  font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.sidebar.collapsed .nav-item .badge { display: none; }

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

.topbar {
  height: var(--header-h); flex: 0 0 var(--header-h);
  background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  position: relative; z-index: 20;
}
.topbar h1 { font-size: 16px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--c-text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
  position: relative;
}
.icon-btn:hover { background: var(--c-surface-2); border-color: var(--c-border); }
.icon-btn .dot {
  position: absolute; top: 5px; right: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--c-danger); border: 1.5px solid var(--c-surface);
}

.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--c-primary-light);
  color: var(--c-primary); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex: 0 0 30px;
}
.userbox { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.userbox:hover { background: var(--c-surface-2); }
.userbox .uname { font-size: 13px; font-weight: 500; }
.userbox .urole { font-size: 11px; color: var(--c-text-3); }

.content { flex: 1; overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; }
.content.no-pad { padding: 0; }

/* ---------- 通用组件 ---------- */
.page-head { margin-bottom: 16px; }
.page-head h2 { font-size: 18px; margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--c-text-3); font-size: 12.5px; }

.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 16px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--c-border);
}
.card-head h3 { font-size: 14px; }
.card-head .spacer { flex: 1; }

.stat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  margin-bottom: 16px;
}
.stat {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat::after {
  content: ''; position: absolute; right: -20px; top: -20px; width: 64px; height: 64px;
  border-radius: 50%; background: var(--c-primary-light); opacity: .55;
}
.stat .k { font-size: 12px; color: var(--c-text-3); margin-bottom: 6px; position: relative; z-index: 1; }
.stat .v { font-size: 22px; font-weight: 700; letter-spacing: -.5px; position: relative; z-index: 1; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--c-text-3); margin-left: 3px; }
.stat.danger .v { color: var(--c-danger); }
.stat.warn .v { color: var(--c-warn); }
.stat.success .v { color: var(--c-success); }
.stat.info .v { color: var(--c-primary); }

.btn {
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--c-border-strong); background: var(--c-surface);
  color: var(--c-text); cursor: pointer; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap; transition: all .15s;
}
.btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: var(--c-primary); border-color: var(--c-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(43, 108, 255, .22);
}
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--c-text-2); }
.btn-ghost:hover { background: var(--c-surface-2); color: var(--c-text); }
.btn-danger { color: var(--c-danger); border-color: #f7c9ca; }
.btn-danger:hover { background: var(--c-danger-bg); border-color: var(--c-danger); color: var(--c-danger); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }

.input, .select, .textarea {
  height: 34px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--c-border-strong); background: var(--c-surface);
  outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 72px; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(43, 108, 255, .12);
}
.input::placeholder { color: var(--c-text-3); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--c-text-2); margin-bottom: 5px; }
.field label .req { color: var(--c-danger); margin-left: 2px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar .spacer { flex: 1; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
  background: var(--c-surface-2); color: var(--c-text-2); border: 1px solid var(--c-border);
}
.tag.blue { background: var(--c-info-bg); color: var(--c-primary); border-color: #cfe0ff; }
.tag.green { background: var(--c-success-bg); color: var(--c-success); border-color: #bfe8d1; }
.tag.orange { background: var(--c-warn-bg); color: var(--c-warn); border-color: #fbe0b4; }
.tag.red { background: var(--c-danger-bg); color: var(--c-danger); border-color: #f8cdce; }
.tag.violet { background: #f1ecff; color: var(--c-violet); border-color: #ddd1ff; }
.tag.gray { background: #f1f3f7; color: var(--c-text-3); }

/* 数据表格（L 档） */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--c-border); background: var(--c-surface); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data thead th {
  background: var(--c-surface-2); color: var(--c-text-2); font-weight: 600;
  font-size: 12px; text-align: left; padding: 10px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 2;
}
table.data thead th .th-filter {
  margin-top: 6px; height: 26px; font-size: 11.5px; padding: 0 6px;
  border: 1px solid var(--c-border); border-radius: 6px; width: 100%; min-width: 70px;
  background: var(--c-surface); outline: none;
}
table.data thead th .th-filter:focus { border-color: var(--c-primary); }
table.data tbody td {
  padding: 10px 12px; border-bottom: 1px solid var(--c-border);
  color: var(--c-text); vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: #fbfcff; }
table.data tbody tr.selected td { background: var(--c-primary-light); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }
table.data tfoot td {
  padding: 10px 12px; background: var(--c-surface-2); font-weight: 600;
  border-top: 1px solid var(--c-border-strong); font-variant-numeric: tabular-nums;
}
table.data .col-check { width: 36px; text-align: center; }

/* 分页 */
.pager {
  display: flex; align-items: center; gap: 6px; justify-content: flex-end;
  padding: 10px 2px 0; font-size: 12.5px; color: var(--c-text-2); flex-wrap: wrap;
}
.pager .spacer { flex: 1; }
.pager-btn { min-width: 28px; padding: 0 8px; font-size: 15px; line-height: 1; }

/* 空状态 */
.empty {
  padding: 48px 20px; text-align: center; color: var(--c-text-3);
}
.empty .ico { font-size: 32px; opacity: .45; margin-bottom: 10px; }
.empty p { margin: 0 0 4px; font-size: 13px; }

.loading { padding: 40px; text-align: center; color: var(--c-text-3); font-size: 13px; }

/* 卡片流（S 档） */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.item-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm);
}
.item-card .ic-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.item-card .ic-title { font-size: 14px; font-weight: 600; flex: 1; line-height: 1.4; word-break: break-all; }
.item-card .ic-sub { font-size: 12px; color: var(--c-text-3); margin-bottom: 8px; }
.item-card .ic-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px;
  font-size: 12.5px;
}
.item-card .ic-grid .kv { display: flex; gap: 6px; min-width: 0; }
.item-card .ic-grid .kv .k { color: var(--c-text-3); flex: 0 0 auto; }
.item-card .ic-grid .kv .v { color: var(--c-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card .ic-foot {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--c-border);
}
.item-card .ic-foot .spacer { flex: 1; }

/* 底部导航（S 档） */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-border); z-index: 40;
}
.tabbar .tabs { display: flex; height: var(--tabbar-h); }
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; border: none; background: none; color: var(--c-text-3);
  font-size: 10.5px; cursor: pointer; position: relative;
}
.tabbar .tab .ico { font-size: 19px; line-height: 1; }
.tabbar .tab.active { color: var(--c-primary); }
.tabbar .tab .dot {
  position: absolute; top: 8px; left: 50%; margin-left: 6px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--c-danger);
}

/* 底部批量操作条 */
.bulkbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: var(--c-surface); border-top: 1px solid var(--c-border-strong);
  box-shadow: 0 -4px 20px rgba(26, 34, 51, .1);
  padding: 10px 16px; display: flex; align-items: center; gap: 12px;
  transform: translateY(110%); transition: transform .22s ease;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.bulkbar.show { transform: translateY(0); }
.bulkbar .info { flex: 1; font-size: 13px; }
.bulkbar .info b { color: var(--c-primary); font-size: 16px; }

/* 弹层 / 抽屉 */
.overlay {
  position: fixed; inset: 0; background: rgba(20, 28, 45, .42);
  z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(16px); opacity: .6 } to { transform: none; opacity: 1 } }

.modal {
  background: var(--c-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 560px;
  max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  animation: slideUp .2s ease;
}
.modal.wide { max-width: 880px; }
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--c-border); flex: 0 0 auto;
}
.modal-head h3 { font-size: 15px; flex: 1; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 14px 20px; border-top: 1px solid var(--c-border); flex: 0 0 auto;
}
.modal-foot .spacer { flex: 1; }

/* 抽屉（右侧滑出，电脑端编辑） */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: var(--c-surface); box-shadow: var(--shadow-lg); z-index: 101;
  display: flex; flex-direction: column; animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .7 } to { transform: none; opacity: 1 } }

/* Toast */
.toasts {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(92vw, 480px);
}
.toast {
  background: rgba(26, 34, 51, .93); color: #fff; padding: 10px 16px;
  border-radius: 10px; font-size: 13px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px; animation: slideUp .2s ease;
  max-width: 100%;
}
.toast.ok { background: rgba(16, 164, 92, .95); }
.toast.err { background: rgba(229, 72, 77, .95); }
.toast.warn { background: rgba(232, 148, 12, .95); }

/* 登录页 */
.login-wrap {
  height: 100%; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 15% -10%, #e8f0ff 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, #e6fbfd 0%, transparent 55%),
    var(--c-bg);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 380px; background: var(--c-surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 32px 28px; border: 1px solid var(--c-border);
}
.login-card .mark {
  width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-cyan));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; box-shadow: 0 8px 24px rgba(43, 108, 255, .3);
}
.login-card h2 { text-align: center; font-size: 18px; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--c-text-3); font-size: 12.5px; margin-bottom: 24px; }
.demo-users { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.demo-user {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  cursor: pointer; background: var(--c-surface-2);
}
.demo-user:hover { border-color: var(--c-primary); background: var(--c-primary-light); }
.demo-user .nm { font-size: 13px; font-weight: 500; }
.demo-user .rl { font-size: 11.5px; color: var(--c-text-3); margin-left: auto; }

/* 时间轴 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--c-border);
}
.timeline .tl-item { position: relative; padding-bottom: 16px; }
.timeline .tl-item::before {
  content: ''; position: absolute; left: -20px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c-primary); border: 2px solid var(--c-surface);
  box-shadow: 0 0 0 1.5px var(--c-primary);
}
.timeline .tl-item.warn::before { background: var(--c-warn); box-shadow: 0 0 0 1.5px var(--c-warn); }
.timeline .tl-item.danger::before { background: var(--c-danger); box-shadow: 0 0 0 1.5px var(--c-danger); }
.timeline .tl-time { font-size: 11.5px; color: var(--c-text-3); margin-bottom: 2px; }
.timeline .tl-text { font-size: 13px; }

/* 分段控件 */
.segmented {
  display: inline-flex; background: var(--c-surface-2); border: 1px solid var(--c-border);
  border-radius: 9px; padding: 3px; gap: 2px;
}
.segmented button {
  height: 28px; padding: 0 12px; border: none; background: transparent;
  border-radius: 7px; font-size: 12.5px; color: var(--c-text-2); cursor: pointer;
}
.segmented button.active {
  background: var(--c-surface); color: var(--c-primary); font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* 详情列表 */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dl .dl-item { min-width: 0; }
.dl .dl-k { font-size: 11.5px; color: var(--c-text-3); margin-bottom: 2px; }
.dl .dl-v { font-size: 13.5px; font-weight: 500; word-break: break-all; }

/* 隐藏 */
.hide { display: none !important; }

/* =================== M 档：600–1024 =================== */
@media (max-width: 1023px) {
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: var(--shadow-lg); width: 240px; flex-basis: 240px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.collapsed { width: 240px; flex-basis: 240px; }
  .sidebar.collapsed .nav-label, .sidebar.collapsed .brand-text { display: block; }
  .content { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .stat .v { font-size: 19px; }
}

/* =================== S 档：<600 =================== */
@media (max-width: 599px) {
  :root { --header-h: 52px; }
  .tabbar { display: block; }
  .content { padding: 12px 12px calc(var(--tabbar-h) + 20px); }
  .content.no-pad { padding-bottom: calc(var(--tabbar-h) + 8px); }

  .topbar { padding: 0 12px; gap: 8px; }
  .topbar h1 { font-size: 15px; }
  .userbox .uname, .userbox .urole { display: none; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 11px 12px; border-radius: 10px; }
  .stat .k { font-size: 11px; margin-bottom: 4px; }
  .stat .v { font-size: 17px; }

  .card { border-radius: 10px; }
  .card-pad { padding: 12px; }
  .card-head { padding: 12px; }

  /* 手机端隐藏真表格，改用卡片流 */
  .table-wrap { display: none; }
  .pager { padding: 8px 2px 0; }

  .modal {
    max-width: 100% !important; max-height: calc(100vh - 24px);
    border-radius: 16px 16px 0 0; position: fixed; bottom: 0; left: 0; right: 0;
    width: 100%; animation: sheetUp .22s ease;
    padding-bottom: env(safe-area-inset-bottom);
  }
  @keyframes sheetUp { from { transform: translateY(100%) } to { transform: none } }
  .overlay { padding: 0; align-items: flex-end; }

  .drawer { width: 100%; }
  .bulkbar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .bulkbar.show ~ .tabbar { display: none; }
  .btn { height: 36px; }
  .row > * { min-width: 100%; }
  .dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toasts { top: calc(var(--header-h) + 8px); }
}

/* 打印 */
@media print {
  .sidebar, .topbar, .tabbar, .toolbar, .bulkbar, .pager { display: none !important; }
  .content { padding: 0; overflow: visible; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* 多选筛选下拉 */
.mfilter { position: relative; display: inline-block; }
.mfilter summary { list-style: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mfilter summary::-webkit-details-marker { display: none; }
.mfilter summary:after { content: ' \25BE'; opacity: .5; }
.mfilter .th-filter { width: auto; max-width: 110px; }
.mfilter-pop { position: absolute; z-index: 30; top: 100%; left: 0; margin-top: 4px; min-width: 130px;
  max-height: 240px; overflow-y: auto; background: var(--c-card, #fff); color: var(--c-text, #222);
  border: 1px solid var(--c-border, #ddd); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: 6px 8px; }
.mfilter-pop label { display: flex; align-items: center; gap: 6px; padding: 4px 2px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.mfilter-toolbar summary { min-width: 90px; }

/* 年/月筛选下拉（商标台账·注册日期，2026-11-11） */
.mfilter .ym-pop { min-width: 172px; padding: 8px 10px; }
.ym-pop .ym-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ym-pop .ym-row:last-child { margin-bottom: 0; }
.ym-pop .ym-row label { width: 14px; color: var(--c-text-3); font-size: 12px; }
.ym-pop .ym-row .select { flex: 1; height: 28px; font-size: 12.5px; padding: 0 4px; }