/* 资产台账管理系统 - 全局样式 */
:root {
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --bg: #f3f5f9;
  --card: #ffffff;
  --line: #e3e8ef;
  --line-2: #eef2f7;
  --primary: #1f5f8b;
  --primary-d: #16496b;
  --primary-l: #eaf2f8;
  --teal: #0f766e;
  --ok: #15803d;
  --ok-l: #e8f5ec;
  --warn: #b45309;
  --warn-l: #fdf3e5;
  --danger: #b91c1c;
  --danger-l: #fdecec;
  --sidebar: #101827;
  --sidebar-2: #17233a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: .2px; }
p { margin: 0; }
input, select, textarea, button { font-family: inherit; font-size: 13.5px; }
table { border-collapse: collapse; width: 100%; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.mono { font-family: "Consolas", "SFMono-Regular", monospace; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex: 0 0 232px;
  background: #f7f8fa; border-right: 1px solid var(--line);
  color: var(--ink-2); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.brand { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.brand-logo { display: block; width: 100%; max-width: 196px; height: auto; }
.brand-sub { margin-top: 7px; color: var(--ink-3); font-size: 11px; letter-spacing: .5px; }

.nav { flex: 1; overflow-y: auto; padding: 8px 10px 24px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: #d5dce6; border-radius: 3px; }
.nav-group { margin-top: 12px; }
.nav-group:first-child { margin-top: 2px; }
.nav-label { padding: 6px 12px; color: #8a94a6; font-size: 11px; letter-spacing: .5px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 8px; color: #47536b; margin: 1px 0; font-size: 13px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: #eceff4; color: var(--ink); }
.nav-item.active { background: #2c3547; color: #fff; }
.nav-item.active svg { opacity: 1; }
.nav-item svg { width: 15px; height: 15px; opacity: .65; flex: 0 0 15px; }
.nav-item .dot { width: 4px; height: 4px; border-radius: 50%; background: #4d9cc9; flex: 0 0 4px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16px; font-weight: 600; }
.topbar .crumb { color: var(--ink-3); font-size: 12px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.org-switch {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.org-switch-label { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.org-switch-select {
  height: 26px; max-width: 190px; border: 0; background: transparent; color: var(--ink);
  font-size: 12.5px; padding: 0 2px; outline: none; cursor: pointer;
}
.org-switch-select:focus { box-shadow: none; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary-l);
  color: var(--primary); display: grid; place-items: center; font-weight: 600; font-size: 12.5px;
}
.user-chip .uname { font-size: 12.5px; line-height: 1.2; }
.user-chip .urole { font-size: 10.5px; color: var(--ink-3); }
.content { padding: 20px 24px 40px; }

/* ---------- 卡片 / 面板 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-hd {
  padding: 13px 18px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-hd h2 { font-size: 14px; }
.card-hd .sub { color: var(--ink-3); font-size: 12px; }
.card-bd { padding: 16px 18px; }
.card-bd.tight { padding: 0; }
.card-ft { padding: 12px 18px; border-top: 1px solid var(--line-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: all .15s; font-size: 13px;
}
.btn:hover { border-color: #c6d0dc; color: var(--ink); background: #fbfcfe; }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); color: #fff; }
.btn-danger { background: #fff; border-color: #f0c8c8; color: var(--danger); }
.btn-danger:hover { background: var(--danger-l); border-color: #e5a8a8; }
.btn-teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-teal:hover { background: #0b5f59; color: #fff; }
.btn-sm { height: 27px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font-size: 12.5px; }
.link-btn.danger { color: var(--danger); }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; color: var(--ink-2); }
.field > label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 33px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 68px; padding: 8px 10px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: #7fb0cf; box-shadow: 0 0 0 3px rgba(31,95,139,.10);
}
.input:disabled, .select:disabled, .input[readonly] { background: #f6f8fa; color: var(--ink-3); }
.grid { display: grid; gap: 14px 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: span 4; }
.span-full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.hint { font-size: 11.5px; color: var(--ink-3); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-bar .field { min-width: 132px; }
.filter-bar .field.wide { min-width: 190px; }
.filter-bar .field.auto { min-width: 0; }
.filter-bar .input, .filter-bar .select { height: 32px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-2);
  background: #f8fafc; padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0;
}
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fafcff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; text-align: right; }
.table .empty td { padding: 40px; text-align: center; color: var(--ink-3); }
.table.compact td, .table.compact th { padding: 7px 10px; }

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px;
  border-radius: 999px; font-size: 11.5px; background: #eef2f7; color: var(--ink-2);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-l); color: var(--ok); }
.badge.warn { background: var(--warn-l); color: var(--warn); }
.badge.danger { background: var(--danger-l); color: var(--danger); }
.badge.info { background: var(--primary-l); color: var(--primary); }
.badge.gray { background: #f1f5f9; color: #64748b; }
.dot-ok, .dot-warn, .dot-danger, .dot-gray {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block;
}
.dot-ok { background: #22c55e; } .dot-warn { background: #f59e0b; }
.dot-danger { background: #ef4444; } .dot-gray { background: #cbd5e1; }
.dot-info { background: #2f7fb5; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px;
  border-radius: 50%; background: var(--primary-l); opacity: .7;
}
.stat .k { color: var(--ink-3); font-size: 12px; position: relative; }
.stat .v { font-size: 26px; font-weight: 600; margin-top: 4px; letter-spacing: .5px; position: relative; }
.stat .v small { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.stat .d { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; position: relative; }

/* ---------- 进度条 ---------- */
.bar { height: 6px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #2f7fb5, #0f766e); border-radius: 999px; }
.bar.sm { height: 4px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding: 12px 18px; }
.pager .pg {
  min-width: 28px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center;
  justify-content: center; border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink-2); background: #fff; font-size: 12.5px;
}
.pager .pg.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .pg.disabled { color: #cbd5e1; pointer-events: none; }
.pager .info { color: var(--ink-3); font-size: 12px; margin-right: auto; }

/* ---------- 提示 / 空态 ---------- */
.flashes { position: fixed; top: 68px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.flash {
  min-width: 240px; max-width: 420px; padding: 10px 14px; border-radius: 8px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13px; display: flex; gap: 8px; animation: slideIn .2s ease;
}
.flash.success { border-left: 3px solid var(--ok); }
.flash.error { border-left: 3px solid var(--danger); }
.flash .x { margin-left: auto; color: var(--ink-3); cursor: pointer; background: none; border: 0; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.empty {
  padding: 46px 20px; text-align: center; color: var(--ink-3);
}
.empty .ico { font-size: 22px; opacity: .5; }
.tip {
  background: #f8fafc; border: 1px dashed var(--line); border-radius: 8px;
  padding: 10px 14px; color: var(--ink-2); font-size: 12.5px;
}
.alert { padding: 10px 14px; border-radius: 8px; font-size: 12.5px; }
.alert.warn { background: var(--warn-l); color: #8a4409; }
.alert.info { background: var(--primary-l); color: var(--primary-d); }
.alert.ok { background: var(--ok-l); color: #10622f; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 4px; }
.tab {
  padding: 9px 14px; font-size: 13px; color: var(--ink-2); border-bottom: 2px solid transparent;
  cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-pane { display: none; padding-top: 16px; }
.tab-pane.active { display: block; }

/* ---------- 描述列表 ---------- */
.desc { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; }
.desc.two { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.desc-item { padding: 10px 0; border-bottom: 1px dashed var(--line-2); display: flex; gap: 10px; align-items: flex-start; }
.desc-item .k { color: var(--ink-3); font-size: 12px; flex: 0 0 86px; }
.desc-item .v { color: var(--ink); flex: 1; min-width: 0; overflow-wrap: break-word; word-break: normal; }
.section-title {
  font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 12px;
  padding-left: 9px; border-left: 3px solid var(--primary);
}

/* ---------- 看板 ---------- */
/* ---------- 台账看板 ---------- */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kanban-col {
  background: #f8fafc; border: 1px solid var(--line); border-top: 3px solid var(--sc, #cbd5e1);
  border-radius: 10px; padding: 10px; min-width: 0;
}
.kanban-col h3 {
  font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 7px;
  margin: 2px 2px 10px;
}
.kanban-col h3 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc, #94a3b8); flex: 0 0 8px; }
.kanban-col h3 .cnt {
  margin-left: auto; font-size: 11px; font-weight: 600; color: var(--sc, #64748b);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px;
}
.kcard {
  display: block; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--sc, #cbd5e1); border-radius: 8px; padding: 10px 12px;
  margin-bottom: 8px; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.kcard:hover { transform: translateY(-1px); border-color: #c6d0dc;
  box-shadow: 0 6px 16px -10px rgba(15, 23, 42, .35); }
.kcard .code { color: var(--ink-3); font-size: 11px; }
.kcard .nm { font-weight: 600; font-size: 13px; margin: 3px 0 5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .meta { color: var(--ink-3); font-size: 11.5px; display: flex; gap: 6px; flex-wrap: wrap; }
.kcard .meta span { background: #f1f5f9; border-radius: 4px; padding: 1px 6px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .val { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line-2);
  font-size: 12px; font-weight: 600; color: var(--sc, var(--ink-2)); }
.kanban-empty {
  border: 1px dashed #dbe2ea; border-radius: 8px; padding: 18px 8px;
  text-align: center; color: var(--ink-3); font-size: 12px; background: rgba(255,255,255,.5);
}
@media (max-width: 1440px) {
  .kanban { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .kanban { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .kanban-col { min-width: 240px; flex: 0 0 240px; }
}

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 12px; }
.tl-item::before {
  content: ""; position: absolute; left: -17px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: #fff; border: 2px solid var(--primary);
}
.tl-item .t { font-size: 11.5px; color: var(--ink-3); }
.tl-item .c { font-size: 12.5px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 200;
  display: none; align-items: flex-start; justify-content: center; padding: 60px 20px;
  overflow-y: auto;
}
.modal.is-open { display: flex; }
.modal-box {
  background: #fff; border-radius: 12px; width: 640px; max-width: 100%;
  box-shadow: 0 24px 60px rgba(15,23,42,.28); animation: pop .16s ease;
}
.modal-box.wide { width: 820px; }
.modal-box.narrow { width: 480px; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-hd { padding: 15px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; }
.modal-hd h3 { font-size: 14.5px; }
.modal-hd .x { margin-left: auto; background: none; border: 0; font-size: 18px; color: var(--ink-3); cursor: pointer; line-height: 1; }
.modal-bd { padding: 18px 20px; }
.modal-ft { padding: 13px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff;
}
.login-side {
  background: linear-gradient(150deg, #0d1b2a 0%, #143049 55%, #0f766e 140%);
  color: #dbe6f0; padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-side::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.09); right: -140px; bottom: -160px;
}
.login-side::before {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.07); right: -10px; bottom: -60px;
}
.login-side h2 { font-size: 24px; color: #fff; line-height: 1.45; letter-spacing: .5px; }
.login-brand {
  width: 270px; margin-bottom: 36px; padding: 14px 18px;
  background: #fff; border-radius: 14px; box-shadow: 0 10px 26px rgba(0,0,0,.18);
}
.login-brand img { display: block; width: 100%; height: auto; }
.login-card-logo { width: 220px; margin-bottom: 22px; }
.login-card-logo img { display: block; width: 100%; height: auto; }
.login-side p { color: #9fb4c7; margin-top: 14px; font-size: 13px; line-height: 1.9; }
.login-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.login-badges span {
  font-size: 11.5px; color: #c8d8e6; border: 1px solid rgba(255,255,255,.18);
  padding: 3px 10px; border-radius: 999px;
}
.login-main { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 340px; }
.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-card .sub { color: var(--ink-3); font-size: 12.5px; margin-bottom: 26px; }
.login-card .field { margin-bottom: 14px; }
.login-card .input { height: 38px; }
.login-card .btn { height: 38px; margin-top: 6px; }
.login-foot { margin-top: 22px; color: var(--ink-3); font-size: 11.5px; line-height: 1.8; }

/* ---------- 单位选择 ---------- */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.org-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.org-card:hover { border-color: #7fb0cf; }
.org-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,95,139,.12); }
.org-card-code { font-family: "Consolas", "SFMono-Regular", monospace; font-size: 11.5px; color: var(--ink-3); }
.org-card-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.org-card-meta { font-size: 12px; color: var(--ink-3); }

/* ---------- 其他 ---------- */
.page-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-hd .title { font-size: 18px; font-weight: 600; }
.page-hd .desc { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.split-3 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.hbar { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
.hbar .lb { width: 96px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .bar { flex: 1; }
.hbar .vl { width: 54px; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.steps { display: flex; gap: 0; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.step .n {
  width: 20px; height: 20px; border-radius: 50%; background: #eef2f7; color: var(--ink-2);
  display: grid; place-items: center; font-size: 11px;
}
.step.done .n { background: var(--ok-l); color: var(--ok); }
.step.active .n { background: var(--primary); color: #fff; }
.step-sep { width: 22px; height: 1px; background: var(--line); margin: 0 10px; }
.col-toggle { position: relative; }
.col-menu {
  display: none; position: absolute; right: 0; top: 34px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow); padding: 10px; z-index: 40; width: 190px;
  max-height: 300px; overflow-y: auto;
}
.col-menu.open { display: block; }
.col-menu label { display: flex; gap: 7px; align-items: center; padding: 3px 4px; font-size: 12px; }

/* ---------- 列表工具：条件筛选 / 显示字段 / 导出 ---------- */
.grid-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.grid-tools .sub { color: var(--ink-3); font-size: 12px; }
.filter-panel {
  padding: 12px 18px; border-bottom: 1px solid var(--line-2); background: #f8fafc;
}
.filter-panel-hd {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-2);
}
.filter-panel-hd .select { width: auto; min-width: 80px; height: 28px; padding: 0 8px; }
.filter-panel-hd .link-btn { margin-left: auto; }
.cond-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.cond-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cond-row .select, .cond-row .input { width: auto; min-width: 130px; height: 30px; }
.filter-panel-ft { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table tr.grid-empty td.empty-cell {
  padding: 34px; text-align: center; color: var(--ink-3);
}

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .desc { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split-3 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 900px) {
  body { font-size: 14px; }
  .sidebar {
    display: block;
    position: fixed; top: 0; left: -260px;
    width: 250px; height: 100vh; z-index: 200;
    transition: left .25s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,.15);
  }
  .sidebar.open { left: 0; }
  .shell.drawer-open::before {
    content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 150;
  }
  .topbar { padding: 8px 12px; gap: 8px; position: sticky; top: 0; z-index: 10; }
  .topbar h1 { font-size: 15px; }
  .topbar-right { flex-wrap: wrap; gap: 6px; }
  .topbar-right .org-switch { padding: 0 6px; height: 30px; }
  .org-switch .org-switch-label { display: none; }
  .org-switch .org-switch-select { max-width: 130px; font-size: 12px; }
  .user-chip .urole { display: none; }
  .topbar-home, .topbar-pwd { display: none !important; }
  .user-chip { padding: 4px 8px; gap: 6px; }
  .btn.btn-sm { padding: 6px 10px; font-size: 13px; }
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; }
  .span2, .span3, .span4 { grid-column: span 1; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .content { padding: 10px; }
  .page-hd { padding: 10px 12px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-hd .actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .card { border-radius: 10px; }
  .card-hd { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .card-bd { padding: 12px; }
  .filter-bar { flex-wrap: wrap; gap: 8px; }
  .filter-bar .field { min-width: 0; flex: 1 1 45%; }
  .filter-bar .field.wide { min-width: 0; flex: 1 1 100%; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 900px; }
  .table th, .table td { white-space: nowrap; padding: 8px 6px; font-size: 13px; }
  .modal { padding: 12px; }
  .modal-box { width: 100%; max-height: 90vh; overflow-y: auto; }
  .modal-bd .g2, .modal-bd .g3 { grid-template-columns: 1fr; }
  .field label { font-size: 13px; }
  .input, .select, .textarea { height: 38px; font-size: 16px; } /* 防止 iOS 放大 */
  .textarea { height: 90px; }
  .grid-tools { margin-left: 0; width: 100%; justify-content: flex-start; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-card { padding: 10px; }
  .stat-card .num { font-size: 22px; }
}

/* 移动端汉堡按钮 */
.mobile-menu-btn {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
  color: var(--ink-2);
}
.mobile-menu-btn:hover { background: var(--line-2); }
@media (max-width: 900px) {
  .mobile-menu-btn { display: inline-flex; }
}

/* ---------- 打印 ---------- */
@media print {
  .sidebar, .topbar, .flashes, .no-print, .card-ft { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .print-title { display: block !important; text-align: center; font-size: 18px; font-weight: 600; margin: 0 0 6px; }
  .print-sub { display: block !important; text-align: center; color: #666; font-size: 11px; margin-bottom: 16px; }
  .print-block { page-break-inside: avoid; }
}
.print-title, .print-sub { display: none; }

/* ---------- 资产标签贴标状态 ---------- */
.tag-ok { background: var(--ok-l); color: var(--ok); border: 1px solid #c6e4d0; }

/* ---------- 批量操作栏 ---------- */
.batch-bar {
  padding: 10px 18px; border-top: 1px solid var(--line-2); background: #f8fafc;
}
.batch-bar-inner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.batch-select-all {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2);
  cursor: pointer;
}
.batch-select-all input { width: 14px; height: 14px; }
.batch-selected { font-size: 12.5px; color: var(--ink-3); }
.batch-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- 移动端卡片列表 ---------- */
.mobile-view { display: none; }
.desktop-view { display: block; }

.mobile-asset-card {
  margin: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05); overflow: hidden;
}
.mobile-card-link {
  display: flex; gap: 12px; padding: 12px;
  text-decoration: none; color: inherit;
  transition: box-shadow .15s;
}
.mobile-card-link:active { box-shadow: inset 0 0 8px rgba(0,0,0,.06); }
.mobile-label-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; height: 38px; border: 0; border-top: 1px solid var(--line-2);
  background: #f8fafc; color: var(--primary); font-size: 13px; cursor: pointer;
}
.mobile-label-btn:active { background: var(--primary-l); }
.mobile-label-btn svg { width: 14px; height: 14px; }

.mobile-card-img {
  width: 90px; height: 90px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden; background: var(--primary-l);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.mobile-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.mobile-card-placeholder {
  font-size: 32px; font-weight: 600; color: var(--primary);
}
.mobile-label-tag {
  position: absolute; top: 4px; right: 4px;
  font-size: 10px; padding: 2px 6px; border-radius: 3px;
  background: var(--line); color: var(--ink-3);
}
.mobile-label-tag.ok { background: var(--ok); color: #fff; }

.mobile-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-card-name {
  font-size: 15px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mobile-card-code {
  font-size: 12px; color: var(--primary); font-family: Consolas, monospace;
}
.mobile-card-meta {
  font-size: 12px; color: var(--ink-2);
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.mobile-meta-item { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-meta-sep { color: var(--ink-3); }
.mobile-card-user {
  font-size: 12px; color: var(--ink-3);
}
.mobile-empty {
  padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 14px;
}

@media (max-width: 900px) {
  .mobile-view { display: block; }
  .desktop-view { display: none; }
  .batch-bar { display: none; }
  .desktop-only { display: none; }
  .mobile-hide { display: none !important; }
  .split, .split-3 { grid-template-columns: 1fr; }
}

/* ---------- 可搜索下拉（兼容手机微信） ---------- */
.combo-wrap { position: relative; display: flex; gap: 6px; }
.combo-wrap .input { flex: 1 1 auto; min-width: 0; }
.combo-wrap select { display: none; }
.combo-btn {
  flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid var(--line);
  background: #fff; border-radius: 7px; color: var(--ink-2); font-size: 12px; cursor: pointer;
}
.combo-panel {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 60;
}
.combo-panel.open { display: block; }
.combo-item { padding: 9px 12px; font-size: 14px; cursor: pointer; }
.combo-item:hover, .combo-item:active { background: var(--line-2); }
.combo-empty { padding: 14px 12px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* ---------- 扫码 / 查询页 ---------- */
.scan-page { display: flex; justify-content: center; padding: 10px 0 30px; }
.scan-card {
  width: 100%; max-width: 520px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 24px 20px;
}
.scan-head { text-align: center; margin-bottom: 20px; }
.scan-head-icon { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.scan-head-title { font-size: 18px; font-weight: 600; color: var(--primary); }
.scan-head-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.scan-form { display: flex; gap: 8px; margin-bottom: 12px; }
.scan-form .input { flex: 1; height: 40px; }
.scan-form .btn { height: 40px; padding: 0 18px; }
.scan-cam-btn { height: 42px; margin-bottom: 14px; }
.scan-reader { width: 100%; margin-bottom: 10px; }
.scan-reader video, .scan-reader canvas { border-radius: 8px; }
.scan-msg { min-height: 20px; font-size: 12.5px; color: var(--ink-3); text-align: center; margin-bottom: 10px; }
.scan-tip {
  font-size: 12px; color: var(--ink-3); line-height: 1.7;
  background: var(--primary-l); border-radius: 8px; padding: 10px 12px;
}

/* ---------- 微信 web-view 环境适配 ---------- */
.wx-only { display: none; }
body.wx-webview .wx-only { display: inline-flex; }
body.wx-webview .user-chip .urole { display: none; }
body.wx-webview .topbar { padding-left: 8px; }

/* ---------- 侧栏底部：切换单位 / 退出 ---------- */
.sidebar-foot {
  flex: 0 0 auto; border-top: 1px solid var(--line);
  padding: 10px 12px 14px; background: #fff;
}
.sf-user { font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.sf-label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; }
.sf-select {
  width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 7px;
  padding: 0 8px; font-size: 13px; background: #fff; color: var(--ink);
}
.sf-logout {
  display: block; margin-top: 10px; text-align: center; height: 32px; line-height: 32px;
  border: 1px solid #f0c8c8; border-radius: 7px; color: var(--danger); font-size: 13px;
}
.sf-logout:hover { background: var(--danger-l); }

