/* 福建颢腾律师事务所内部业务管理系统 - 墨蓝金主题 */
:root {
  --ink: #1f3b63;
  --ink-2: #2c5282;
  --ink-3: #3d6ba8;
  --gold: #c8a45c;
  --gold-soft: #f4ecd9;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #1a202c;
  --muted: #64748b;
  --danger: #c53030;
  --danger-soft: #fed7d7;
  --success: #2f855a;
  --success-soft: #d7f0e0;
  --warn: #b7791f;
  --warn-soft: #feebc8;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(16, 32, 56, .06), 0 1px 2px rgba(16, 32, 56, .04);
  --shadow-lg: 0 8px 28px rgba(16, 32, 56, .14);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--page-font, "Microsoft YaHei", "微软雅黑", "PingFang SC", "Segoe UI", system-ui, sans-serif);
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--ink-2); text-decoration: none; }

/* ---------- 登录 / 初始化 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1f3b63 0%, #2c5282 55%, #3d6ba8 100%);
  position: relative; overflow: hidden;
}
.auth-wrap::after {
  content: ""; position: absolute; width: 620px; height: 620px; right: -180px; top: -180px;
  border-radius: 50%; background: radial-gradient(circle, rgba(200,164,92,.22), transparent 65%);
}
.auth-card {
  position: relative; z-index: 1; width: 400px; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 38px 36px 30px;
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.auth-seal {
  width: 38px; height: 38px; border-radius: 8px; background: var(--ink);
  display: flex; align-items: center; justify-content: center; color: var(--gold);
  font-size: 19px; font-weight: 700; letter-spacing: -1px;
}
.auth-title { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: .5px; }
.auth-sub { color: var(--muted); font-size: 12.5px; margin: 6px 0 22px; }
.auth-tip { margin-top: 16px; font-size: 12px; color: var(--muted); background: var(--bg); padding: 10px 12px; border-radius: 6px; line-height: 1.7; }
.remember { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.remember input { width: 15px; height: 15px; accent-color: var(--gold); cursor: pointer; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100dvh; }
.sidebar {
  width: 216px; flex: 0 0 216px; background: var(--ink); color: #dbe6f3;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 20;
}
.sidebar-head { padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.09); display: flex; gap: 10px; align-items: center; }
.sidebar-head .auth-seal { width: 32px; height: 32px; font-size: 16px; }
.sidebar-head .auth-title { color: #fff; font-size: 15px; }
.sidebar-sub { color: rgba(219,230,243,.6); font-size: 11.5px; margin-top: 2px; }
.menu { flex: 1; padding: 12px 8px; overflow-y: auto; }
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 7px;
  cursor: pointer; color: #cfdcec; font-size: 13.5px; margin-bottom: 2px; user-select: none;
}
.menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu-item.active { background: rgba(200,164,92,.18); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.menu-item .ico { width: 18px; text-align: center; opacity: .9; }
.menu-group { padding: 14px 20px 6px; font-size: 11px; color: rgba(219,230,243,.45); letter-spacing: 1px; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.09); font-size: 11.5px; color: rgba(219,230,243,.55); }

.main { flex: 1; margin-left: 216px; display: flex; flex-direction: column; min-width: 0; background: var(--page-bg, transparent); }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hamburger { display: none; }
.sb-mask { display: none; }
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  position: sticky; top: 0; z-index: 10;
}
.topbar .title { font-size: 16px; font-weight: 600; color: var(--ink); }
.topbar .right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.role-tag { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--gold-soft); color: #8a6a1f; font-weight: 600; }
.role-tag.principal { background: #e6effa; color: var(--ink-2); }
.content { padding: 20px 22px 40px; }

/* ---------- 通用组件 ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.card-head { padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text); cursor: pointer;
  font-size: 13px; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink-2); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #4a3a14; font-weight: 600; }
.btn.gold:hover { background: #b8934b; color: #fff; }
.btn.danger { color: var(--danger); border-color: #f0b4b4; }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: #fff; outline: none; transition: border-color .15s; font-size: 13px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(61,107,168,.12); }
.input[disabled], .select[disabled] { background: #f4f6f9; color: var(--muted); }
.textarea { min-height: 62px; resize: vertical; }
.grid { display: grid; gap: 0 16px; }
.grid.g3 { grid-template-columns: repeat(3, 1fr); }
.grid.g2 { grid-template-columns: repeat(2, 1fr); }
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1180px) { .grid.g3, .grid.g4 { grid-template-columns: repeat(2, 1fr); } }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin-bottom: 0; min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 220px; }

/* 表格字体/字号由「表格设置」面板控制，写在表格上的 --tf / --ts 上；没设就用默认值 */
table.tbl { width: 100%; border-collapse: collapse; font-family: var(--tf, var(--page-font, inherit)); font-size: var(--ts, 13px); }
table.tbl th {
  background: #f7f9fc; color: var(--muted); font-weight: 600; text-align: left;
  padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
  font-size: calc(var(--ts, 13px) - 0.5px);
}
/* 第一栏序号：跨页连续编号，居中、等宽数字 */
table.tbl .no-col { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl th.no-col { text-align: center; }
table.tbl td { padding: 9px 10px; border: 1px solid var(--border); vertical-align: top; text-align: var(--ta, justify); }
table.tbl tbody tr:hover { background: #fafcff; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .ops { white-space: nowrap; }
table.tbl .ops a { margin-right: 8px; cursor: pointer; }
.empty { padding: 42px 0; text-align: center; color: var(--muted); font-size: 13px; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; white-space: nowrap; }
.tag.grey { background: #eef2f7; color: var(--muted); }
.tag.blue { background: #e6effa; color: var(--ink-2); }
.tag.green { background: var(--success-soft); color: var(--success); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.orange { background: var(--warn-soft); color: var(--warn); }
.tag.gold { background: var(--gold-soft); color: #8a6a1f; }

.modal-mask { position: fixed; inset: 0; background: rgba(16,32,56,.42); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); width: 100%; max-width: 900px; }
.modal.wide { max-width: 1100px; }
.modal.narrow { max-width: 520px; }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15px; color: var(--ink); }
.modal-close { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; background: none; border: none; }
.modal-body { padding: 18px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: #fbfcfe; border-radius: 0 0 10px 10px; }
/* 系统蓝色主题弹窗（断点续填等） */
.modal.modal-blue { max-width: 480px; border-top: 4px solid #1f3b63; }
.modal.modal-blue .modal-head { background: #1f3b63; border-bottom: none; border-radius: 0; }
.modal.modal-blue .modal-head h3 { color: #fff; }
.modal.modal-blue .modal-close { color: #dbeafe; font-size: 22px; }
.modal.modal-blue .modal-close:hover { color: #fff; }
/* 断点续填正文 */
.resume-body { text-align: center; padding: 8px 6px 2px; }
.resume-icon { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.resume-text { font-size: 15px; color: #1f3b63; font-weight: 600; line-height: 1.7; }
.resume-info { margin-top: 8px; font-size: 12.5px; color: #64748b; }
/* 分页条 */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.pager-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-ops .mini.on { background: #1f3b63; color: #fff; border-color: #1f3b63; }
/* 机关级联选择 + 自定义机关标签 */
.org-cascade { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.org-cascade .field { min-width: 150px; }
.org-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.org-chip { display: inline-flex; align-items: center; gap: 5px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.org-chip b { font-weight: 600; }
.org-chip span { cursor: pointer; color: #64748b; }
.org-chip span:hover { color: #b91c1c; }

.section-title { font-size: 13px; font-weight: 600; color: var(--ink); margin: 4px 0 12px; padding-left: 8px; border-left: 3px solid var(--gold); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1180px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 12.5px; color: var(--muted); }
.stat-card .value { font-size: 25px; font-weight: 700; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-card .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat-card.accent { border-left: 3px solid var(--gold); }

.todo-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #eef2f7; cursor: pointer; }
.todo-item:hover { background: #fafcff; }
.todo-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: 0 0 7px; }
.todo-item.overdue .dot { background: var(--danger); }
.todo-item .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-item .when { font-size: 12px; color: var(--muted); }
.todo-item.overdue .when { color: var(--danger); font-weight: 600; }

.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .chart-row { grid-template-columns: 1fr; } }
.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: #fff; padding: 9px 20px; border-radius: 6px; font-size: 13px;
  box-shadow: var(--shadow-lg);
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: -18px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--ink-3); }
.tl-item.done::before { background: var(--success); border-color: var(--success); }
.tl-item.late::before { background: var(--danger); border-color: var(--danger); }
.tl-title { font-size: 13.5px; font-weight: 600; }
.tl-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tl-body { font-size: 12.5px; color: #475569; margin-top: 4px; white-space: pre-wrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tabs .tab { padding: 8px 16px; cursor: pointer; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs .tab.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--gold); }

.doc-preview { background: #fff; padding: 34px 40px; box-shadow: var(--shadow); border: 1px solid var(--border); min-height: 700px; position: relative; font-size: 15px; line-height: 2; }
.doc-preview h1 { text-align: center; font-size: 22px; margin-bottom: 26px; letter-spacing: 2px; }
.doc-preview p { text-indent: 2em; margin: 6px 0; }
.doc-preview .sign { margin-top: 46px; text-align: right; padding-right: 40px; }
.seal-img { position: absolute; width: 150px; height: 150px; opacity: .82; pointer-events: none; }
.seal-img.drag { pointer-events: auto; cursor: move; }
.seal-handle { position: absolute; border: 1px dashed var(--gold); padding: 2px 6px; font-size: 11px; color: #8a6a1f; background: var(--gold-soft); border-radius: 4px; cursor: move; }
.mask-note { font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 6px 10px; border-radius: 5px; margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.print-only { display: none; }
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; }
  .doc-preview { box-shadow: none; border: none; }
}

code {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 12px;
  color: #b45309;
}


/* ===================== 首页工作台（Feature 一） ===================== */
.home-root {
  --home-accent: #1f3b63; --home-accent2: #c8a45c; --home-panel: rgba(255,255,255,.92);
  --home-text: #1a202c; --home-muted: #64748b;
  min-height: 100%; padding: 18px; color: var(--home-text);
  background: linear-gradient(135deg,#eef2f8 0%,#e3eaf3 100%);
  transition: background .4s ease;
}
/* 工作台字号：随「工作台个性化设置·字号」变化（--wb-fs 由偏好写入 :root）；未设置时自动回落到原字号 */
.home-root .srow, .home-root .remind-item, .home-root .notice-item,
.home-root .notice-content, .home-root .notice-title, .home-root .notice-meta,
.home-root .hero-sub, .home-root .cal-lunar, .home-root .wt-row, .home-root .weather-tips {
  font-size: var(--wb-fs, inherit) !important;
}
/* 工作台顶部操作条（个性化设置入口） */
.home-actions { display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; }
.home-actions .btn.ghost { background: rgba(255,255,255,.7); border: 1px solid rgba(148,163,184,.4); color: var(--home-accent); }
.home-actions .btn.ghost:hover { background: #fff; border-color: var(--home-accent); }
.home-hero {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  background: var(--home-panel); border: 1px solid rgba(148,163,184,.25); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.hero-left .hero-hi { font-size: 20px; font-weight: 700; color: var(--home-accent); }
.hero-left .hero-sub { font-size: 13px; color: var(--home-muted); margin-top: 2px; }
.hero-right { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.clock-wrap, .weather { display: flex; align-items: center; gap: 8px; }
.clock-mode { display: flex; }
.mini {
  font-size: 12px; padding: 4px 10px; border: 1px solid var(--border-strong); background: #fff;
  color: var(--home-muted); border-radius: 6px; cursor: pointer; line-height: 1.4;
}
.mini.sel { padding: 4px 8px; }
.mini.on { background: var(--home-accent); color: #fff; border-color: var(--home-accent); }
.mini.upload { display: inline-flex; align-items: center; }
.clock-box { text-align: center; min-width: 120px; }
.analog { position: relative; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
  border: 2px solid var(--home-accent); background: rgba(255,255,255,.6); }
.analog .hand { position: absolute; left: 50%; bottom: 50%; transform-origin: bottom center;
  background: var(--home-accent); border-radius: 2px; }
.analog .h { width: 3px; height: 18px; margin-left: -1.5px; }
.analog .m { width: 2px; height: 26px; margin-left: -1px; background: var(--home-accent2); }
.analog .s { width: 1px; height: 28px; margin-left: -0.5px; background: #c0392b; }
.analog .pin { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--home-accent2); border-radius: 50%; }
.digital { font-size: 26px; font-weight: 700; color: var(--home-accent); font-variant-numeric: tabular-nums; }
.digital .sec { color: var(--home-accent2); font-size: 18px; }
.clock-date { font-size: 12px; color: var(--home-muted); }
.clock-tz { font-size: 11px; color: var(--home-muted); }
.weather-main { text-align: center; }
.wtemp { font-size: 22px; font-weight: 700; color: var(--home-accent); }
.wdesc { font-size: 12px; color: var(--home-text); }
.whum { font-size: 11px; color: var(--home-muted); }
.weather-err { font-size: 12px; color: #b7791f; }

.home-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 16px; margin-bottom: 16px; }
.home-grid > .card { margin-bottom: 0; }
.card-head h3 { color: var(--home-accent); }
.home-quote .quote-body { position: relative; padding: 8px 6px 4px; }
.quote-mark { position: absolute; top: -6px; left: -2px; font-size: 46px; color: var(--home-accent2); opacity: .35; font-family: Georgia, serif; }
.quote-text { font-size: 17px; line-height: 1.7; font-weight: 600; padding-left: 30px; color: var(--home-text); }
.quote-meta { margin-top: 10px; padding-left: 30px; font-size: 13px; color: var(--home-muted); }
.quote-meta .src { color: var(--home-accent2); }
.quote-nav { margin-top: 12px; padding-left: 30px; display: flex; align-items: center; gap: 10px; }
.q-idx { font-size: 12px; color: var(--home-muted); }
.stat-body .srow { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px dashed rgba(148,163,184,.3); font-size: 13px; }
.stat-body .srow:last-child { border-bottom: none; }
.stat-body .srow b { color: var(--home-accent); font-size: 16px; }
.remind-body .remind-item { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px dashed rgba(148,163,184,.3); font-size: 13px; }
.remind-body .remind-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--home-accent2); flex: 0 0 auto; }
.remind-body .remind-item.overdue .dot { background: #c0392b; }
.remind-body .remind-item.overdue .rtxt { color: #c0392b; font-weight: 600; }
.remind-body .rtxt { flex: 1; }
.remind-body .rwhen { font-size: 11px; color: var(--home-muted); }
.remind-body .x { border: none; background: none; color: var(--home-muted); cursor: pointer; font-size: 16px; }
.remind-add { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.input.sm { padding: 5px 8px; font-size: 12px; }
.approve-row { display: flex; gap: 10px; flex-wrap: wrap; }
.home-skin .skin-body { display: flex; gap: 28px; flex-wrap: wrap; }
.skin-block { min-width: 220px; }
.skin-label { font-size: 12px; color: var(--home-muted); margin-bottom: 8px; }
.theme-row { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-chip { padding: 6px 12px; border-radius: 16px; border: 2px solid transparent; color: #fff; cursor: pointer; font-size: 12px; opacity: .8; }
.theme-chip.on { border-color: var(--home-text); opacity: 1; box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.bg-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.bg-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.bg-swatch { width: 40px; height: 28px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.bg-swatch.on { border-color: var(--home-accent); }
.hint { font-size: 12px; color: var(--home-muted); }
@media (max-width: 980px) { .home-grid { grid-template-columns: 1fr; } }

/* ===== 工作台新增强化 ===== */
.home-clockset {
  background: var(--home-panel); border: 1px solid rgba(148,163,184,.25); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow);
  display: flex; gap: 22px; flex-wrap: wrap; align-items: center;
}
.cs-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--home-muted); }
.cs-label { white-space: nowrap; }
.cs-row input[type=range] { width: 160px; }

.quote-meta .lk { cursor: pointer; color: var(--home-accent2); text-decoration: none; border-bottom: 1px dashed var(--home-accent2); }
.quote-meta .lk:hover { color: var(--home-accent); }
.quote-detail { line-height: 1.9; font-size: 14px; color: var(--text); white-space: pre-wrap; }

.rh-ops { display: flex; gap: 6px; }
.remind-bulk { display: flex; gap: 6px; padding: 8px 2px; border-bottom: 1px dashed rgba(148,163,184,.3); flex-wrap: wrap; }
.remind-item input[type=checkbox] { width: 15px; height: 15px; }
.mini.danger { color: var(--danger); border-color: #f0b4b4; }
.mini.danger:disabled { color: #bbb; border-color: #eee; cursor: not-allowed; }

/* 日历板 */
.home-calendar { margin-bottom: 16px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-title { font-size: 14px; font-weight: 600; color: var(--home-accent); min-width: 86px; text-align: center; }
.cal-week { display: grid; grid-template-columns: repeat(7,1fr); margin-bottom: 6px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--home-muted); padding: 4px 0; }
.cal-wd:first-child, .cal-wd:nth-child(7) { color: #b7791f; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.cal-cell {
  position: relative; min-height: 74px; border: 1px solid rgba(148,163,184,.22); border-radius: 8px;
  background: rgba(255,255,255,.55); padding: 5px 6px; cursor: pointer; transition: all .12s; overflow: hidden;
}
.cal-cell:hover { border-color: var(--home-accent2); box-shadow: 0 2px 8px rgba(16,32,56,.08); }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell.today { border-color: var(--home-accent); box-shadow: 0 0 0 2px rgba(31,59,99,.12); background: rgba(31,59,99,.06); }
.cal-cell.weekend:not(.holiday):not(.adjust) { background: rgba(200,164,92,.10); }
.cal-cell.holiday { background: rgba(197,28,28,.08); border-color: rgba(197,28,28,.25); }
.cal-cell.adjust { background: rgba(47,133,90,.07); border-color: rgba(47,133,90,.25); }
.cal-top { display: flex; align-items: center; justify-content: space-between; }
.cal-d { font-size: 14px; font-weight: 600; color: var(--home-text); }
.cal-cell.today .cal-d { color: var(--home-accent); }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--home-accent2); }
.cal-lunar { font-size: 11px; color: var(--home-muted); margin-top: 2px; line-height: 1.3; }
.cal-tag { display: inline-block; font-size: 10.5px; padding: 0 4px; border-radius: 4px; margin-top: 3px; line-height: 16px; }
.cal-tag.hol { background: #fde8e8; color: #9b1c1c; }
.cal-tag.term { background: #eef6ff; color: #2c5282; }
.cal-badge { position: absolute; right: 5px; bottom: 5px; font-size: 10px; color: #fff; background: #c8932f; border-radius: 4px; padding: 0 4px; line-height: 15px; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--home-muted); }
.cal-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.cal-legend .lg.hol { background: rgba(197,28,28,.18); border: 1px solid rgba(197,28,28,.4); }
.cal-legend .lg.we { background: rgba(200,164,92,.25); }
.cal-legend .lg.ad { background: rgba(47,133,90,.2); }
.cal-legend .lg.jx { background: #c8932f; }
.cal-legend .lg.dot { background: var(--home-accent2); border-radius: 50%; }

/* 日历当日详情 */
.day-detail { font-size: 13.5px; }
.dd-row { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #eef2f7; }
.dd-row span { color: var(--home-muted); min-width: 42px; }
.dd-row b { font-weight: 600; color: var(--text); }
.dd-row b.ausp { color: #b7791f; }
.dd-row b.inausp { color: #9b1c1c; }
.dd-block { padding: 8px 0; border-bottom: 1px dashed #eef2f7; line-height: 1.9; }
.dd-block .yi { display: inline-block; min-width: 20px; color: #2f855a; font-weight: 700; }
.dd-block .ji { display: inline-block; min-width: 20px; color: #c53030; font-weight: 700; }
.dd-remind { margin-top: 10px; }
.dd-rh { font-size: 12.5px; color: var(--home-muted); margin-bottom: 6px; }
.dd-r { padding: 5px 8px; background: var(--gold-soft); border-radius: 6px; margin-bottom: 5px; font-size: 13px; }
.dd-remind.empty { color: var(--home-muted); font-size: 12.5px; }

/* ===== 下拉多选 x-ms ===== */
.ms { position: relative; display: inline-block; }
.ms-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border); background: #fff; border-radius: 7px; font-size: 13px; color: #334155; cursor: pointer; white-space: nowrap; }
.ms-btn:hover { border-color: var(--primary); }
.ms-btn.active { border-color: var(--primary); color: var(--primary); background: #f5f8fc; }
.ms-btn .caret { font-size: 10px; color: #94a3b8; }
.ms-panel { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; min-width: 180px; max-height: 280px; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.12); padding: 6px; }
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 13px; border-radius: 5px; cursor: pointer; }
.ms-opt:hover { background: #f1f5f9; }
.ms-empty { padding: 10px; font-size: 12px; color: #94a3b8; text-align: center; }

/* ===== 可搜索下拉 + 手动录入 x-combo ===== */
.combo-wrap { position: relative; }
.combo-panel { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.12); padding: 6px; }
.combo-opt { padding: 7px 9px; font-size: 13px; border-radius: 5px; cursor: pointer; color: #334155; }
.combo-opt:hover { background: #f1f5f9; }
.combo-empty { padding: 10px; font-size: 12px; color: #94a3b8; text-align: center; }

/* ===== 排序条 x-sort ===== */
.sortbar { display: inline-flex; align-items: center; gap: 8px; }
.sortbar-label { font-size: 13px; color: #64748b; }
.select.sm { padding: 6px 8px; font-size: 12.5px; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: #334155; }

/* ===== 标记弹窗预览 ===== */
.mark-preview { margin-top: 12px; padding: 10px 12px; border: 1px dashed #cbd5e1; border-radius: 6px; font-size: 13px; color: #475569; }

/* ===== 列表行标记角标 ===== */
.row-flag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; font-size: 11px; line-height: 16px; color: #fff; background: #c53030; vertical-align: middle; }

/* 筛选区多选并排 */
.filters .ms { margin-bottom: 8px; }

/* ===== 知识库模块（法律法规 / 案例 / 文书示范文本）===== */
.law-mod { display: block; }
.tabbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { padding: 9px 18px; border: 1px solid var(--border); background: #fff; border-radius: 9px 9px 0 0; font-size: 14px; color: #64748b; cursor: pointer; }
.tab:hover { color: var(--primary); }
.tab.on { color: #fff; background: var(--primary); border-color: var(--primary); font-weight: 600; }
.law-tip { margin-left: auto; font-size: 12px; color: #94a3b8; }

.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.filter-row .input { flex: 1; min-width: 220px; }

.law-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.law-item { border: 1px solid #e8eef5; border-radius: 10px; padding: 12px 14px; background: #fff; transition: box-shadow .15s; }
.law-item:hover { box-shadow: 0 6px 18px rgba(31,59,99,.08); }
.law-item-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.law-title { font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.law-title:hover { color: var(--primary); text-decoration: underline; }
.law-lv { font-size: 12px; color: #fff; background: #1f3b63; border-radius: 5px; padding: 1px 8px; }
.law-org { font-size: 12px; color: #64748b; }
.law-sum { font-size: 13px; color: #475569; margin: 7px 0 5px; line-height: 1.7; }
.law-src { font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.law-ops { display: flex; gap: 8px; flex-wrap: wrap; }

.law-detail { font-size: 14px; line-height: 1.9; }
.law-detail-meta { background: #f5f8fc; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #475569; margin-bottom: 12px; }
.law-detail-sec { font-weight: 700; color: #1f3b63; margin: 14px 0 6px; }
.law-detail-p { margin: 0 0 4px; white-space: pre-wrap; text-indent: 2em; color: #1a202c; }

.report { margin-top: 14px; border: 1px solid #dbe4ee; border-radius: 10px; padding: 14px 16px; background: #fbfdff; }
.report-h { font-weight: 700; color: #1f3b63; margin-bottom: 10px; }
.report-row { font-size: 13px; color: #334155; margin-bottom: 7px; line-height: 1.7; }
.report-row b { color: #475569; }
.report-row ul { margin: 4px 0 0; padding-left: 18px; }
.report-row li { margin-bottom: 3px; }

.gen-note { font-size: 12.5px; color: #64748b; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.7; }

/* ============ 登录后欢迎界面 ============ */
.welcome-screen { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.welcome-bg { position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, #1f3b63 0%, #142844 55%, #0b1422 100%); }
.welcome-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 78% 80%, rgba(200,164,92,.28) 0%, rgba(200,164,92,0) 45%); }
.welcome-card { position: relative; width: 66%; max-width: 920px; text-align: center; color: #f4f6fb; padding: 20px; animation: welFade .9s ease both; }
@keyframes welFade { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.welcome-firm { font-size: 15px; letter-spacing: 4px; color: #c8a45c; margin-bottom: 10px; }
.welcome-date { font-size: 14px; color: #aab6c8; margin-bottom: 26px; }
.welcome-word { font-size: clamp(46px, 9vw, 104px); font-weight: 800; line-height: 1.1; letter-spacing: 6px;
  background: linear-gradient(180deg, #f6d97a 0%, #e6bd5e 45%, #c8932f 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 18px rgba(200,164,92,.25); margin-bottom: 22px; }
.welcome-sub { font-size: clamp(15px, 2.2vw, 20px); color: #e6ecf5; letter-spacing: 1px; }
.welcome-hint { position: absolute; bottom: 42px; left: 0; right: 0; text-align: center; font-size: 13px; color: #9fb0c6; }
.welcome-cursor-tip { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 12px; color: #6c7c93; }

/* ============ 工作台：时间 / 天气 弹窗 + 提示 ============ */
.home-hero .clock-box, .home-hero .weather { cursor: pointer; }
.pop-mask { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 140; display: flex; align-items: flex-start; justify-content: center; padding-top: 120px; }
.pop-box { width: 420px; max-width: 92vw; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(15,23,42,.25); overflow: hidden; }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #eef2f7; }
.pop-head h3 { margin: 0; font-size: 15px; color: #1f3b63; }
.pop-close { border: none; background: none; font-size: 20px; cursor: pointer; color: #94a3b8; line-height: 1; }
.pop-body { padding: 14px 16px; }
.pop-sec { margin-bottom: 16px; }
.pop-sec:last-child { margin-bottom: 0; }
.pop-label { font-size: 13px; color: #64748b; margin-bottom: 8px; }
.pop-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.pop-chip { border: 1px solid #d8e0ea; background: #f8fafc; color: #334155; border-radius: 9px; padding: 8px 14px; cursor: pointer; font-size: 13px; }
.pop-chip.on { border-color: #1f3b63; background: #1f3b63; color: #fff; }
.pop-select { width: 100%; padding: 9px 10px; border: 1px solid #d8e0ea; border-radius: 9px; font-size: 13px; color: #334155; background: #fff; }

.wx-alert { display: flex; align-items: flex-start; gap: 8px; background: #fef2f2; border: 1px solid #fecaca; color: #b42318; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6; margin-top: 4px; }
.wx-alert.ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.wx-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.wx-tip { background: #f5f8fc; border-radius: 9px; padding: 9px 10px; }
.wx-tip b { display: block; font-size: 12px; color: #1f3b63; margin-bottom: 3px; }
.wx-tip span { font-size: 12.5px; color: #475569; line-height: 1.5; }

/* 天气主区显示类型 */
.weather-digital { font-size: 30px; font-weight: 700; color: var(--home-accent, #1f3b63); }
.weather-emoji { font-size: 40px; }
.weather-mini { font-size: 13px; color: var(--home-muted, #64748b); }
.weather-alert-inline { margin-top: 6px; font-size: 12px; color: #b42318; font-weight: 600; }

/* ============ 律所通知 ============ */
.notice-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.notice-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.notice-stat { font-size: 12px; color: #64748b; }
.notice-sort { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; font-size: 12.5px; color: #475569; }
.notice-sort select { padding: 4px 6px; border: 1px solid #d8e0ea; border-radius: 7px; font-size: 12.5px; }
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice-item { border: 1px solid #e6ecf3; border-radius: 10px; padding: 11px 12px; background: #fbfdff; }
.notice-item.pinned { border-color: #c8a45c; background: #fffdf5; }
.notice-item.unpub { opacity: .72; }
.notice-top { display: flex; align-items: center; gap: 8px; }
.notice-title { font-weight: 700; color: #1f3b63; flex: 1; }
.notice-title.pin { color: #b45309; }
.notice-badge { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: #1f3b63; color: #fff; }
.notice-badge.pin { background: #c8a45c; }
.notice-badge.draft { background: #94a3b8; }
.notice-meta { font-size: 12px; color: #94a3b8; margin: 4px 0 6px; }
.notice-content { font-size: 13.5px; color: #334155; line-height: 1.7; white-space: pre-wrap; }
.notice-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.notice-ck { margin-right: 4px; }
.notice-empty { color: #94a3b8; font-size: 13px; text-align: center; padding: 18px 0; }

/* 通知编辑弹层 */
.nf-row { margin-bottom: 12px; }
.nf-row label { display: block; font-size: 13px; color: #475569; margin-bottom: 5px; }
.nf-input, .nf-textarea { width: 100%; border: 1px solid #d8e0ea; border-radius: 9px; padding: 9px 10px; font-size: 13.5px; color: #1a202c; font-family: inherit; box-sizing: border-box; }
.nf-textarea { min-height: 110px; resize: vertical; }
.nf-row select { width: auto; }
.nf-inline { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* ============ 工作台 · 时间 / 天气 弹窗与区块（新） ============ */
.clickable { cursor: pointer; }
.home-hero .clock-wrap.clickable { flex-direction: column; align-items: center; gap: 6px; }
.home-hero .weather.clickable { flex-direction: column; align-items: flex-start; gap: 6px; }
.op-link { align-self: flex-start; border: 1px solid rgba(31,59,99,.28); background: rgba(255,255,255,.7); color: var(--home-accent, #1f3b63); font-size: 11.5px; padding: 2px 9px; border-radius: 20px; cursor: pointer; }
.home-hero .clock-wrap.clickable .op-link { align-self: center; }
.op-link:hover { background: #fff; border-color: var(--home-accent, #1f3b63); }
.clock-art { font-family: "LiSu", "STLiti", "KaiTi", serif; font-size: 40px; font-weight: 700; letter-spacing: 3px; color: var(--home-accent, #1f3b63); text-shadow: 1px 1px 0 rgba(200,164,92,.55), 2px 3px 6px rgba(31,59,99,.18); line-height: 1.1; }
.weather-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.wx-city { font-size: 13px; font-weight: 700; color: var(--home-accent, #1f3b63); }
.wicon { font-size: 42px; line-height: 1; margin: 2px 0; }
.weather-alert { margin-top: 8px; border: 1px solid #f5c2c0; background: #fef3f2; border-radius: 8px; padding: 7px 10px; max-width: 260px; }
.wa-h { font-size: 12px; font-weight: 700; color: #b42318; margin-bottom: 3px; }
.wa-row { font-size: 12px; color: #b42318; line-height: 1.6; }
.weather-tips { margin-top: 6px; font-size: 12px; color: #475569; display: flex; flex-direction: column; gap: 2px; }
.wt-row b { color: var(--home-accent, #1f3b63); margin-right: 6px; font-weight: 700; }
.seg { display: inline-flex; gap: 6px; }
.cs-row .seg .mini { min-width: 52px; }
.pop-preview { margin-top: 14px; padding: 14px 16px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #fbfdff; text-align: center; color: #1f3b63; }
.wx-alert-box { margin-top: 12px; border: 1px solid #f5c2c0; background: #fef3f2; border-radius: 9px; padding: 10px 12px; }
.wx-alert-box .wa-h { font-size: 12.5px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; cursor: pointer; }

/* ============ 工作台 · 律所通知（区块） ============ */
.home-notice .card-body { max-height: 440px; overflow: auto; }
.notice-sort { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.notice-sort .input.sm { flex: 1; min-width: 130px; }
.notice-bulk { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.home-notice .notice-item { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.home-notice .notice-item.pinned { border-color: #c8a45c; background: #fffdf5; }
.home-notice .notice-item.unpub { opacity: .72; }
.notice-main { flex: 1; min-width: 0; }
.home-notice .notice-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.npin { font-size: 12px; }
.home-notice .notice-ops { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; flex: 0 0 auto; }
.home-notice .notice-ops .mini { white-space: nowrap; }
.notice-preview { border: 1px dashed #cbd5e1; border-radius: 9px; padding: 10px 12px; background: #fbfdff; color: #334155; line-height: 1.7; white-space: pre-wrap; min-height: 42px; }
.home-notice .empty { color: #94a3b8; font-size: 13px; text-align: center; padding: 18px 0; }

/* 关联关键字标签云（文书/案例列表共用） */
.kw-cloud { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 4px; }
.kw-cloud.sm { margin: 4px 0 0; }
.kw-cloud .kw-label { font-size: 12.5px; color: #64748b; flex: 0 0 auto; }
.kw-tag {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none;
  font-size: 12px; color: #334155; background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 999px; padding: 2px 9px; line-height: 1.7; transition: all .15s;
}
.kw-tag:hover { background: #e0edff; border-color: #93c5fd; color: #1d4ed8; }
.kw-tag.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.kw-tag.alt { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.kw-tag.alt:hover { background: #d1fae5; }
.kw-tag i { font-style: normal; font-size: 11px; opacity: .65; }
.org-chip.alt { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }


/* ================================================================
   全系统版面统一美化（v1.2.0）
   ================================================================ */

/* ---- 卡片式分区：统一圆角、阴影、标题条 ---- */
.card { border-radius: 10px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .05); }
.card-head { padding: 12px 16px; background: linear-gradient(180deg, #fbfcfe, #f6f8fb); border-radius: 10px 10px 0 0; gap: 12px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; letter-spacing: .2px; }
.card-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px; font-size: 13px;
  background: var(--ink); color: #e7c979;
}
.head-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 14px 16px; }
.sec-title {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  margin: 14px 0 8px; padding-left: 8px; border-left: 3px solid var(--gold);
}

/* ---- 外部入口卡片网格（全系统统一） ---- */
.entry-search { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.entry-search .input { flex: 1; min-width: 220px; }
.entry-grid { display: grid; gap: 10px; margin-top: 10px; }
.entry-card {
  display: flex; gap: 12px; align-items: stretch; position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  padding: 12px 14px; cursor: pointer; transition: border-color .16s, box-shadow .16s, transform .16s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); min-height: 78px;
}
.entry-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--gold), #e7c979); opacity: 0; transition: opacity .16s;
}
.entry-card:hover {
  border-color: #d8b878; box-shadow: 0 6px 20px rgba(15, 23, 42, .10); transform: translateY(-2px);
}
.entry-card:hover::before { opacity: 1; }
.entry-card:active { transform: translateY(0); }
.entry-ico {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 11px; align-self: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff; box-shadow: 0 2px 7px rgba(15, 23, 42, .18);
}
.entry-ico.sm { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; box-shadow: none; }
.entry-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding-right: 14px; }
.entry-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.entry-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.entry-org { font-size: 11.5px; color: #94a3b8; margin-top: 1px; }
.entry-desc {
  font-size: 11.5px; color: #64748b; margin-top: 3px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.entry-eye {
  font-size: 11px; color: #94a3b8; border: 1px solid var(--border); border-radius: 20px;
  padding: 1px 8px; flex: 0 0 auto; background: #f8fafc; transition: all .12s;
}
.entry-eye:hover { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.entry-card:hover .entry-eye { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.entry-go {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%) translateX(-4px);
  font-size: 15px; color: var(--gold); font-weight: 700; opacity: .25; transition: all .16s; pointer-events: none;
}
.entry-card:hover .entry-go { opacity: 1; transform: translateY(-50%) translateX(0); }
.entry-grid.muted .entry-card { background: #f8fafc; border-style: dashed; }
.entry-grid.muted .entry-name { color: #94a3b8; }
/* 负责人拖动排序时的视觉反馈 */
.entry-card[draggable="true"] { cursor: grab; }
.entry-card.dragging { opacity: .4; border-style: dashed; border-color: var(--gold); }
.entry-card.drag-over { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(200, 164, 92, .35); }
/* 搜索引擎快捷胶囊 */
.engine-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.engine-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 20px; background: #fff;
  padding: 5px 13px 5px 6px; font-size: 12.5px; color: var(--ink); transition: all .15s;
}
.engine-chip:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(200,164,92,.18); transform: translateY(-1px); }

/* 版面模式选择 */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; margin-top: 10px; }
.theme-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; cursor: pointer;
  transition: all .15s ease;
}
.theme-swatch:hover { border-color: var(--ink-3); box-shadow: var(--shadow); }
.theme-swatch.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(200, 164, 92, .35); }
.theme-swatch .sw { width: 40px; height: 26px; border-radius: 6px; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.theme-swatch .sw i { position: absolute; right: 5px; bottom: 4px; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.theme-swatch .tn { font-size: 12.5px; color: var(--text); }
/* 自定义版面：可删除 + 新增一张卡（种类随之前后增减） */
.theme-item { position: relative; }
.theme-item .theme-swatch { width: 100%; }
.theme-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; line-height: 1;
  border-radius: 50%; border: 1px solid var(--border); background: #fff; color: #c53030;
  font-size: 14px; cursor: pointer; box-shadow: var(--shadow); }
.theme-del:hover { background: #c53030; color: #fff; border-color: #c53030; }
.theme-add { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 10px; background: #fbfcfe; }
.theme-add .input { width: 100%; }

/* 表格列宽拖动 */
.col-resizable { table-layout: auto; overflow: visible; }
.col-resizable th { position: relative; }
.col-rs { position: absolute; right: -4px; top: 0; width: 9px; height: 100%; cursor: col-resize; z-index: 2; }
.col-rs:hover { background: linear-gradient(var(--gold), var(--gold)); opacity: .35; }
.col-resizing { user-select: none; cursor: col-resize; }
.col-resizing .col-rs { background: var(--gold); opacity: .45; }
/* 业务/用章/文书/人员表格：行高随内容自适应，留白更舒适 */
table.tbl.col-resizable td { padding: 10px 12px; line-height: 1.55; }

/* ===== 表格交互增强：行高 / 列显隐 / 冻结表头 / 设置弹层 ===== */
/* 行高：由 --rh 控制（拖动右下角 ⇕ 或设置面板调整） */
table.tbl.has-rh > tbody > tr > td { height: var(--rh); }
/* 列显隐 */
table.tbl .col-hidden, table.tbl th.col-hidden, table.tbl td.col-hidden { display: none !important; }
/* 冻结表头：外层容器滚动，thead 吸顶 */
.tbl-wrap { position: relative; }
.tbl-wrap.freeze { max-height: 68vh; overflow: auto; }
.tbl-wrap.freeze > table.tbl > thead th { position: sticky; top: 0; z-index: 4; box-shadow: 0 1px 0 var(--border); }
/* 行高拖动柄：贴在滚动容器右下角 */
.row-rs {
  position: absolute; right: 2px; bottom: 2px; width: 22px; height: 22px; line-height: 20px;
  text-align: center; font-size: 12px; color: #94a3b8; cursor: ns-resize; user-select: none;
  border-radius: 6px; background: rgba(241,245,249,.92); box-shadow: inset 0 0 0 1px var(--border);
}
.row-rs:hover { color: var(--gold); background: #fff; box-shadow: inset 0 0 0 1px var(--gold); }
/* 表格设置弹层 */
.tbl-set { position: relative; display: inline-block; }
.tbl-set-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 268px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,.16); padding: 12px;
}
.tbl-set-panel .ts-title { font-size: 12px; color: #64748b; margin: 10px 0 6px; }
.tbl-set-panel .ts-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; max-height: 190px; overflow: auto; }
.tbl-set-panel .ts-chk { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; padding: 3px 0; }
.tbl-set-panel .ts-chk input { accent-color: var(--gold); }
.tbl-set-panel .ts-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tbl-set-panel .ts-row .select { flex: 1; min-width: 120px; }
.tbl-set-panel .ts-num { width: 88px; flex: none; padding: 5px 8px; }
.tbl-set-panel .ts-actions { display: flex; gap: 8px; margin-top: 10px; }
.tbl-set-panel .ts-hint { margin-top: 9px; font-size: 11.5px; line-height: 1.6; color: #94a3b8; }
/* 表头工具条：让排序条与设置按钮同一行、右对齐 */
.tbl-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tbl-tools .tbl-tools-right { display: flex; align-items: center; gap: 8px; }

/* ---- 左侧模块栏：竖列式 / 缩略图式 / 紧凑式；三种都显示模块名称 ---- */
.sidebar { transition: background .2s ease, color .2s ease; }
.sidebar .menu-item { color: inherit; opacity: .88; }
.sidebar .menu-item:hover { background: rgba(255, 255, 255, .12); color: inherit; opacity: 1; }
.sidebar .menu-item.active { background: rgba(255, 255, 255, .16); color: inherit; opacity: 1; }
.sidebar .menu-item .menu-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .menu-group { color: inherit; opacity: .55; }
.sidebar .sidebar-head { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.sidebar .sidebar-head .auth-title { color: inherit; }
.sidebar .sidebar-head .auth-seal { background: rgba(255, 255, 255, .14); color: inherit; border-color: rgba(255, 255, 255, .3); }
.sidebar .sidebar-sub { color: inherit; opacity: .62; }
.sidebar .sidebar-foot { color: inherit; opacity: .55; border-top: 1px solid rgba(255, 255, 255, .12); }

/* 竖向（默认）：一行一个模块，带分组标题 */
.sidebar.mode-list .menu { padding: 10px 8px; }
.sidebar.mode-list .menu-item { padding: 9px 12px; font-size: 13.5px; }

/* 缩略图式：两列方块，图标更大 */
.sidebar.mode-grid .menu { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 8px; align-content: start; }
.sidebar.mode-grid .menu-group { grid-column: 1 / -1; padding: 10px 6px 2px; opacity: .6; }
.sidebar.mode-grid .menu-item {
  flex-direction: column; justify-content: center; gap: 6px;
  padding: 10px 6px; text-align: center; border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .06); border-radius: 9px; font-size: 12px;
}
.sidebar.mode-grid .menu-item .ico { font-size: 19px; width: auto; opacity: 1; }
.sidebar.mode-grid .menu-item .menu-name { white-space: normal; line-height: 1.35; }
.sidebar.mode-grid .menu-item:hover { background: rgba(255, 255, 255, .14); }
.sidebar.mode-grid .menu-item.active { background: rgba(255, 255, 255, .20); box-shadow: none; }

/* 紧凑式：更密集的竖排 */
.sidebar.mode-compact .menu { padding: 6px 6px; }
.sidebar.mode-compact .menu-group { padding: 8px 10px 2px; font-size: 10.5px; }
.sidebar.mode-compact .menu-item { padding: 5px 10px; font-size: 12.5px; margin-bottom: 1px; border-radius: 5px; }
.sidebar.mode-compact .menu-item .ico { width: 15px; font-size: 12px; }

/* 图标式：大图标竖排，名称作提示 */
.sidebar.mode-icon .menu { padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.sidebar.mode-icon .menu-group { padding: 10px 6px 2px; opacity: .6; }
.sidebar.mode-icon .menu-item { flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 12px 6px; border-radius: 9px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
.sidebar.mode-icon .menu-item .ico { font-size: 22px; width: auto; opacity: 1; }
.sidebar.mode-icon .menu-item .menu-name { white-space: normal; line-height: 1.25; font-size: 11.5px; opacity: .85; }
.sidebar.mode-icon .menu-item.active { background: rgba(255,255,255,.18); box-shadow: none; }

/* 紧凑图标：两列小图标 */
.sidebar.mode-icon-sm .menu { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 10px 8px; align-content: start; }
.sidebar.mode-icon-sm .menu-group { grid-column: 1 / -1; padding: 8px 6px 2px; opacity: .6; }
.sidebar.mode-icon-sm .menu-item { flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; padding: 9px 4px; border-radius: 8px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
.sidebar.mode-icon-sm .menu-item .ico { font-size: 17px; width: auto; opacity: 1; }
.sidebar.mode-icon-sm .menu-item .menu-name { white-space: normal; line-height: 1.2; font-size: 10.5px; opacity: .82; }
.sidebar.mode-icon-sm .menu-item.active { background: rgba(255,255,255,.18); box-shadow: none; }

/* 极简文字：无图标纯文字 */
.sidebar.mode-mini .menu { padding: 8px 8px; }
.sidebar.mode-mini .menu-group { padding: 8px 10px 2px; font-size: 10.5px; }
.sidebar.mode-mini .menu-item { padding: 7px 12px; font-size: 13px; }
.sidebar.mode-mini .menu-item .ico { display: none; }

/* ---- 界面与功能开关 ---- */
.switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 10px; margin-top: 4px; }
.switch-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.switch-item input { cursor: pointer; }
.pref-preview {
  margin-top: 8px; border-radius: 8px; padding: 12px 14px; font-size: 13px;
  border: 1px solid var(--border); min-height: 86px; line-height: 1.9;
}
.chk-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; padding-top: 6px; }

/* ---- 搜索引擎 ---- */
.search-hero { display: flex; gap: 10px; align-items: stretch; background: linear-gradient(180deg, #f7f9fc, #eef3f9); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.search-input { flex: 1; height: 44px; font-size: 15px; border-radius: 9px; background: #fff; box-shadow: inset 0 1px 3px rgba(15,23,42,.06); }
.search-go { height: 44px; padding: 0 28px; font-size: 15px; }

/* ---- 司法速算器 ---- */
.calc-body { margin-top: 12px; }
.calc-comp .sec-title { margin-top: 14px; }
.calc-result { margin-top: 14px; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.calc-total {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; background: linear-gradient(180deg, #f8fafc, #eef2f7); border-bottom: 1px solid var(--border);
}
.calc-total-label { font-size: 13px; color: #475569; }
.calc-total-num { font-size: 26px; font-weight: 700; color: #14532d; letter-spacing: .5px; }
.calc-total-unit { font-size: 13px; color: #475569; }
.calc-result .tbl { margin: 0; border: 0; }
.calc-notes { padding: 10px 14px; font-size: 12px; color: #64748b; line-height: 1.8; background: #fffdf7; border-top: 1px solid var(--border); }

/* ---- 表格与按钮统一 ---- */
.tbl { border-radius: 8px; overflow: hidden; }
.tbl thead th { background: #f1f5f9; font-size: 12.5px; }
.btn { border-radius: 7px; }
.btn.sm { border-radius: 6px; }
.tabs { gap: 2px; }
.tab { border-radius: 7px 7px 0 0; }


/* ================================================================
   工作台重排与全模块扩充美化（v1.2.1）
   ================================================================ */

/* ---- ① 每日法言提醒 · 顶端横幅 ---- */
/* ---- ① 每日法言提醒 · 顶端横幅（艺术字 + 可切底纹） ---- */
.home-quotebar {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px;
  background: linear-gradient(120deg, #1f3b63 0%, #2c4f7c 55%, #3a608f 100%);
  border-radius: 12px; padding: 12px 18px; margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(31, 59, 99, .18); color: #fff; position: relative; overflow: hidden;
}
.home-quotebar::after {
  content: ''; position: absolute; right: -46px; top: -46px; width: 150px; height: 150px;
  border-radius: 50%; background: rgba(200, 164, 92, .16); pointer-events: none;
}
.home-quotebar::before {
  content: ''; position: absolute; right: 60px; bottom: -70px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none;
}
.qb-seal {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'STXingkai','KaiTi',serif; font-size: 26px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #c0392b, #9b1c1c); box-shadow: 0 2px 8px rgba(155,28,28,.4);
}
.qb-main { min-width: 0; }
.qb-text { font-size: 22px; font-weight: 600; line-height: 1.5; letter-spacing: .4px; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.qb-meta { margin-top: 4px; font-size: 12.5px; color: rgba(255,255,255,.72); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qb-meta .lk { cursor: pointer; color: #f0d49a; border-bottom: 1px dashed rgba(240,212,154,.7); }
.qb-meta .lk:hover { color: #fff; }
.qb-right {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding-left: 14px; border-left: 1px solid rgba(255,255,255,.18); min-width: 0; text-align: center; cursor: pointer;
}
.qb-right-num { font-size: 30px; font-weight: 700; line-height: 1.1; color: rgba(255,255,255,.92); font-variant-numeric: tabular-nums; }
.qb-right-num.hot { color: #ffd98a; }
.qb-right-label { font-size: 11.5px; color: rgba(255,255,255,.62); }
.qb-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qb-arrow {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.10); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; transition: all .15s;
}
.qb-arrow:hover { background: rgba(255,255,255,.24); }
.qb-idx { font-size: 11.5px; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
.qb-font {
  font-size: 11.5px; color: #ffe6b3; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08); border-radius: 16px; padding: 3px 10px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.qb-font:hover { background: rgba(255,255,255,.22); color: #fff; }
/* 底纹变体 */
.home-quotebar.deco-none { background: linear-gradient(120deg, #1f3b63 0%, #2c4f7c 55%, #3a608f 100%); }
.home-quotebar.deco-seal { background: linear-gradient(120deg, #7a1f1f 0%, #9b2c2c 55%, #b5392f 100%); }
.home-quotebar.deco-seal .qb-seal { background: linear-gradient(135deg, #f4d9a0, #c8932f); color: #7a1f1f; }
.home-quotebar.deco-ink { background: linear-gradient(120deg, #20242b 0%, #2f3640 55%, #3b4450 100%); }
.home-quotebar.deco-gold { background: linear-gradient(120deg, #6b4f1d 0%, #8a6a2a 55%, #a98a3c 100%); }
.home-quotebar.deco-bamboo { background: linear-gradient(120deg, #1f3b2e 0%, #2c5040 55%, #3a6350 100%); }
@media (max-width: 1100px) {
  .home-quotebar { grid-template-columns: auto 1fr; gap: 10px; }
  .qb-right { border: none; padding: 0; grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 10px; }
  .qb-ops { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---- 法言法语：语录管理 / 外观设置 弹层 ---- */
.qm-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; margin-bottom: 10px; }
.qm-row { display: flex; align-items: center; gap: 6px; }
.qm-no { flex: 0 0 22px; text-align: center; color: #94a3b8; font-size: 12px; }
.qm-t { flex: 3 1 auto; min-width: 0; }
.qm-a { flex: 1 1 120px; min-width: 90px; }
.qm-s { flex: 1 1 100px; min-width: 80px; }
.qm-del { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 6px; border: 1px solid #e2e8f0; background: #fff; color: #c0392b; cursor: pointer; font-size: 15px; }
.qm-del:hover { background: #fde8e8; }
.qm-empty { color: #94a3b8; font-size: 13px; padding: 6px 0 10px; }
.qm-field { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qm-field > label { flex: 0 0 72px; color: #64748b; font-size: 13px; }
.qm-field .select { flex: 1; max-width: 260px; }
.qm-field input[type=range] { flex: 1; accent-color: #1f3b63; max-width: 260px; }
.qm-colors { display: flex; gap: 6px; flex-wrap: wrap; }
.qm-color { width: 30px; height: 30px; border-radius: 6px; border: 1px solid #cbd5e1; cursor: pointer; font-size: 10px; color: #334155; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.qm-color.on { box-shadow: 0 0 0 2px #1f3b63; }
.qm-prev { margin-top: 4px; padding: 14px 16px; border-radius: 10px; background: linear-gradient(120deg,#1f3b63,#3a608f); color: #fff; text-align: center; }

/* 法言法语 · 自定义管理弹层（增/删/改，数量不限） */
.qm-tip { font-size: 12px; color: #64748b; background: rgba(241,245,249,.85); border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.6; }
.qm-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 11px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.qm-item.on { border-color: #1f3b63; background: rgba(31,59,99,.06); }
.qm-item .qm-text { flex: 1 1 240px; font-size: 14px; color: #1a202c; line-height: 1.5; }
.qm-item .qm-meta { flex: 1 1 160px; font-size: 12px; color: #64748b; }
.qm-item .qm-ops { flex: 0 0 auto; margin-left: auto; display: flex; gap: 6px; }
.qm-form { border-top: 1px dashed #cbd5e1; padding-top: 12px; }
.qm-form-h { font-size: 13px; font-weight: 700; color: #1f3b63; margin-bottom: 10px; }
.qm-form-ops { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ---- ② 顶部欢迎条：两端对齐（问候 | 时钟 · 天气） ---- */
.home-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafd 55%, #eef3fa 100%);
  border: 1px solid rgba(148,163,184,.25); border-radius: 12px;
  padding: 16px 22px; margin-bottom: 14px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.home-hero::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--home-accent2), rgba(200,164,92,.12));
}
.hero-left { min-width: 0; flex: 1 1 auto; }
.hero-left .hero-hi { font-size: 22px; font-weight: 700; color: var(--home-accent); letter-spacing: .5px; }
.hero-left .hero-sub { font-size: 13px; color: var(--home-muted); margin-top: 4px; }
.home-hero .hero-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.home-hero .clock-wrap.clickable { align-self: center; padding: 0 8px; }
.home-hero .weather.clickable { align-self: center; align-items: stretch; min-width: 0; }
.home-hero .weather-main { display: flex; align-items: center; gap: 10px; text-align: left; flex-wrap: wrap; }
.home-hero .wicon { font-size: 30px; line-height: 1; }
.home-hero .wtemp { font-size: 24px; }
.home-hero .weather-tips { margin-top: 4px; gap: 1px; }
.home-hero .wt-row { font-size: 11.5px; }
.home-hero .weather-alert { max-width: none; }
@media (max-width: 1180px) {
  .home-hero { padding: 14px 16px; }
  .home-hero .hero-right { gap: 14px; }
}

/* ---- ③ 日历（紧凑版，置于时间之前） ---- */
.home-calcompact { margin-bottom: 12px; }
.home-calcompact .card-head { padding: 8px 14px; }
.home-calcompact .card-head h3 { font-size: 13px; }
.home-calcompact .card-body { padding: 6px 14px 10px; }
.home-calcompact .cal-week { margin-bottom: 4px; }
.home-calcompact .cal-grid.compact { gap: 3px; }
.home-calcompact .cal-cell {
  min-height: 38px; padding: 2px 3px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  position: relative; cursor: pointer; transition: all .12s; overflow: hidden;
}
.home-calcompact .cal-cell:hover { border-color: var(--home-accent2); box-shadow: 0 2px 6px rgba(16,32,56,.08); }
.home-calcompact .cal-cell.empty { background: transparent; border: none; cursor: default; }
.home-calcompact .cal-cell.today { border-color: var(--home-accent); background: rgba(31,59,99,.06); box-shadow: 0 0 0 2px rgba(31,59,99,.10); }
.home-calcompact .cal-cell.weekend:not(.holiday) { background: rgba(200,164,92,.10); }
.home-calcompact .cal-cell.holiday { background: rgba(197,28,28,.07); border-color: rgba(197,28,28,.22); }
.home-calcompact .cal-cell.term { background: rgba(47,133,90,.07); }
.home-calcompact .cal-d { font-size: 13px; font-weight: 600; color: #1e293b; line-height: 1; }
.home-calcompact .cal-cell.today .cal-d { color: var(--home-accent); }
.home-calcompact .cal-lunar { font-size: 9.5px; color: var(--home-muted); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.home-calcompact .cal-tag-sm { font-size: 9px; line-height: 12px; color: #b45309; background: rgba(180,83,9,.12); border-radius: 3px; padding: 0 3px; }
.home-calcompact .cal-tag-sm.term { color: #2f855a; background: rgba(47,133,90,.12); }
.home-calcompact .cal-dot { position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: #c0392b; }

/* 日历嵌入 hero 右侧空白区 */
.home-hero .home-calcompact.inhero {
  margin-bottom: 0; box-shadow: none; background: rgba(255,255,255,.55);
  border: 1px solid rgba(148,163,184,.22); padding: 8px 10px; flex: 0 0 auto;
}
.home-hero .home-calcompact.inhero .cal-inhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.home-hero .home-calcompact.inhero .cal-nav .mini { padding: 1px 6px; font-size: 11px; }
.home-hero .home-calcompact.inhero .cal-week { margin-bottom: 2px; }
.home-hero .home-calcompact.inhero .cal-wd { font-size: 10px; padding: 2px 0; }
.home-hero .home-calcompact.inhero .cal-grid.compact { gap: 2px; }
.home-hero .home-calcompact.inhero .cal-cell { min-height: 30px; padding: 1px 2px; }
.home-hero .home-calcompact.inhero .cal-d { font-size: 12px; }
.home-hero .home-calcompact.inhero .cal-lunar { font-size: 8.5px; }

/* ---- ④ 五区块一排（法言法语升格横幅后：负责人 4 块 / 经办人 3 块） ---- */
.home-row { display: grid; gap: 14px; margin-bottom: 14px; align-items: stretch; }
.home-row.f4 { grid-template-columns: repeat(4, 1fr); }
.home-row.f3 { grid-template-columns: repeat(3, 1fr); }
.home-row > .card { margin-bottom: 0; display: flex; flex-direction: column; min-width: 0; }
.home-row .card-head { padding: 10px 13px; }
.home-row .card-head h3 { font-size: 13.5px; }
.home-row .card-body { padding: 10px 13px; flex: 1; min-height: 0; overflow: auto; max-height: 330px; }
.home-row .stat-body .srow { padding: 8px 2px; font-size: 12.5px; }
.home-row .stat-body .srow b { font-size: 15px; }
.home-row .quote-pad { padding-left: 0; }
.home-row .home-notice .notice-ops { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 5px; }
.home-row .home-notice .notice-item { margin-bottom: 8px; padding: 9px 10px; }
.home-row .home-notice .notice-content { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-row .home-notice .card-body { max-height: none; }
.home-row .remind-add { flex-direction: column; }
.home-row .remind-add .input.sm { width: 100%; }

/* ===================== 工作台视觉焕新（仅作用于首页工作台，不影响其它模块） ===================== */
.home-root .home-row > .card { transition: box-shadow .25s ease, transform .25s ease; }
.home-root .home-row > .card:hover { box-shadow: 0 3px 8px rgba(15,23,42,.08), 0 14px 30px rgba(15,23,42,.10); transform: translateY(-2px); }
.home-root .home-row .card-head { background: linear-gradient(180deg, #ffffff, #f6f8fc); }
.home-root .home-row .card-head h3 { border-left: 3px solid var(--home-accent2); padding-left: 9px; }
.home-root .home-row .card-body { scrollbar-width: thin; }
@media (max-width: 1620px) { .home-row.f4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1280px) { .home-row.f3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .home-row.f4, .home-row.f3 { grid-template-columns: 1fr; } }

/* 待负责人审批：竖排大按钮 */
.appr-body { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.appr-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  border: 1px solid var(--border); background: linear-gradient(180deg, #fff, #f8fafc);
  border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: all .15s; font-family: inherit;
}
.appr-btn:hover { border-color: #c8a45c; box-shadow: 0 4px 12px rgba(15,23,42,.10); transform: translateY(-1px); }
.appr-num { font-size: 24px; font-weight: 700; color: var(--home-accent); font-variant-numeric: tabular-nums; line-height: 1.2; }
.appr-num.hot { color: #c0392b; }
.appr-name { font-size: 13px; color: #334155; font-weight: 600; }
.appr-go { font-size: 11px; color: #94a3b8; transition: color .15s; }
.appr-btn:hover .appr-go { color: #b45309; }

/* ---- ⑤ 个性化设置条压缩 ---- */
.home-skin { margin-bottom: 0; }
.home-skin .card-head { padding: 9px 14px; }
.home-skin .card-body { padding: 10px 14px; }
.home-skin .skin-body { gap: 20px; }
.home-skin .bg-swatch { width: 34px; height: 24px; }

/* ---- ⑥ 左侧栏底部：布局快捷切换（全员可用，含负责人） ---- */
.sidebar-foot { display: flex; flex-direction: column; gap: 8px; }
.foot-modes { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.foot-label { font-size: 11px; opacity: .6; margin-right: 2px; }
.foot-mode {
  font-size: 11.5px; padding: 3px 9px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: inherit;
  transition: all .15s; font-family: inherit;
}
.foot-mode:hover { background: rgba(255,255,255,.2); }
.foot-mode.on { background: rgba(255,255,255,.9); color: #1e293b; border-color: transparent; font-weight: 600; }
.sb-ver { font-size: 11px; line-height: 1.5; }
.foot-link {
  align-self: flex-start; font-size: 11.5px; background: none; border: none; padding: 0;
  color: inherit; opacity: .75; cursor: pointer; text-decoration: underline dotted; font-family: inherit;
}
.foot-link:hover { opacity: 1; }
.foot-ver { font-size: 11px; opacity: .5; }

/* ============ 人员档案管理 ============ */
.staff-cell { display: inline-flex; align-items: center; gap: 8px; }
.staff-ava { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.staff-name { font-weight: 600; color: #1f3b63; white-space: nowrap; }
/* 人员档案表格：短字段列不换行，避免姓名 / 职务被挤成竖排 */
.staff-tbl td:nth-child(2), .staff-tbl th:nth-child(2),
.staff-tbl td:nth-child(3), .staff-tbl th:nth-child(3),
.staff-tbl td:nth-child(4), .staff-tbl th:nth-child(4),
.staff-tbl td:nth-child(5), .staff-tbl th:nth-child(5),
.staff-tbl td:nth-child(6), .staff-tbl th:nth-child(6),
.staff-tbl td:nth-child(7), .staff-tbl th:nth-child(7),
.staff-tbl td:nth-child(8), .staff-tbl th:nth-child(8) { white-space: nowrap; }
/* 第 9 列「社会职务」内容较长：拉宽并允许自然折行，便于查阅 */
.staff-tbl td:nth-child(9), .staff-tbl th:nth-child(9) {
  min-width: 380px; max-width: 560px; white-space: normal; word-break: break-word; line-height: 1.7;
}
/* 操作列固定靠右，不换行 */
.staff-tbl td:nth-child(10), .staff-tbl th:nth-child(10) { white-space: nowrap; }
/* 社会职务逐条一行，读起来不挤 */
.staff-office { font-size: 12.5px; color: #475569; }
.staff-office-item { padding: 1px 0; line-height: 1.65; }
.staff-office-item + .staff-office-item { border-top: 1px dashed #eef2f7; }
.staff-form { display: flex; flex-direction: column; gap: 2px; max-height: 72vh; overflow: auto; padding-right: 4px; }
.sf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sf-block { border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 6px; background: #fbfcfe; }
.sf-block-head { font-size: 13px; font-weight: 600; color: #1f3b63; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sf-add { font-size: 12px; color: #1d6fb8; cursor: pointer; font-weight: 400; }
.sf-add:hover { text-decoration: underline; }
.sf-tip { font-size: 11px; color: #94a3b8; font-weight: 400; }
.sf-subrow { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
/* 带勾选框的行：勾选框 + 原有各列 + 删除按钮 */
.sf-subrow.with-chk { grid-template-columns: auto 1.2fr 1fr 1.4fr auto; align-items: center; }
.sf-subrow.with-chk input[type="checkbox"], .sf-honor .sf-subrow input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; margin: 0 2px 0 0; }
.sf-del { font-size: 12px; color: #c53030; cursor: pointer; font-weight: 600; }
.sf-del:hover { text-decoration: underline; }
.sf-empty { font-size: 12px; color: #94a3b8; padding: 4px 0; }
/* 荣誉奖励：一行四个字段（年度 / 层级 / 名称 / 单位）+ 删除 */
.sf-honor { border-bottom: 1px solid #eef2f7; padding-bottom: 6px; margin-bottom: 8px; }
.sf-honor:last-child { border-bottom: none; }
.sf-honor .sf-subrow { grid-template-columns: .7fr 1fr 1.5fr 1.5fr auto; margin-bottom: 6px; }
/* 荣誉奖励带勾选框时：勾选框 + 年度 + 层级 + 名称 + 单位 + 删除 */
.sf-honor .sf-subrow.with-chk { grid-template-columns: auto .7fr 1fr 1.5fr 1.5fr auto; align-items: center; }
.sf-honor-file { display: flex; align-items: center; gap: 8px; padding-left: 2px; }
.sf-honor-file a { color: #1d6fb8; font-size: 12.5px; word-break: break-all; }
.sf-honor-file .muted { font-size: 12px; color: #94a3b8; }
.staff-detail .sd-honor { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.staff-detail .sd-honor .muted { font-size: 12px; color: #94a3b8; }
.sf-photo { display: flex; align-items: center; gap: 12px; }
.photo-prev { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.photo-ph { width: 64px; height: 64px; border-radius: 8px; background: #eef2f7; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #94a3b8; }
.sf-photo-ops { display: flex; flex-direction: column; gap: 6px; }
.sf-certs { display: flex; flex-direction: column; gap: 6px; }
.sf-cert { display: flex; align-items: center; gap: 8px; }
.sf-cert a { color: #1d6fb8; font-size: 12.5px; word-break: break-all; }
.staff-detail .sd-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.staff-detail .sd-ava { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.staff-detail .sd-name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.staff-detail .sd-sub { font-size: 13px; color: #64748b; margin-top: 2px; }
.staff-detail .sd-cert { display: inline-block; margin-right: 12px; color: #1d6fb8; font-size: 12.5px; }
.tbl.plain { background: #fff; }
.tbl.plain td { padding: 8px 10px; border-bottom: 1px solid #eef2f7; font-size: 13px; vertical-align: top; }
.tbl.plain td:nth-child(odd) { color: #64748b; width: 110px; background: #f8fafc; }

/* ============ 律师名片生成 ============ */
.card-maker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 20px; align-items: start; }
.cm-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: start; min-width: 0; }
.cm-span { grid-column: 1 / -1; }
.cm-row { display: flex; flex-direction: column; gap: 4px; }
.cm-row > label { font-size: 12.5px; color: #64748b; font-weight: 600; }
.cm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-up { display: flex; align-items: center; gap: 10px; }
.cm-ava { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.cm-up-lbl { font-size: 12.5px; color: #64748b; font-weight: 600; }
.cm-upload, .cm-segbox {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  font-size: 12.5px; padding: 5px 12px; border-radius: 16px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--border); background: #fff; color: #334155; transition: all .15s;
}
.seg button:hover { border-color: #c8a45c; }
.seg button.on { background: linear-gradient(180deg, #1f3b63, #2c4f7c); color: #fff; border-color: transparent; font-weight: 600; }
.cm-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cm-pick select { flex: 1 1 150px; min-width: 0; }
.cm-hint { font-size: 11.5px; color: #94a3b8; line-height: 1.6; margin-top: 2px; }
.cm-hint b { color: #1d6fb8; }
.cm-sec {
  font-size: 12px; font-weight: 700; color: #1f3b63;
  background: #eef2f8; border-radius: 6px; padding: 5px 10px; align-self: start;
}
.cm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cm-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 14px; }
.cm-prev-tip { font-size: 12px; color: #94a3b8; }
.card-canvas { max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 8px 24px rgba(15,23,42,.18); background: #fff; }

/* ---- 名片「在样本上直接点击修改」可编辑层 ---- */
.cm-stage { position: relative; display: inline-block; line-height: 0; max-width: 100%; }
.ce-layer { position: absolute; inset: 0; }
.ce-hit {
  position: absolute; color: transparent; caret-color: #ffd88a; outline: none; cursor: text;
  white-space: pre-wrap; word-break: break-word; border-radius: 4px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.ce-hit:hover, .ce-hit.on {
  background: rgba(226, 190, 114, .18);
  box-shadow: inset 0 0 0 1px rgba(226, 190, 114, .9);
}
.ce-hit:empty::before { content: '点此输入'; color: rgba(226, 190, 114, .85); font-size: 12px; }
.cm-editbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cm-edit-tip { font-size: 12px; color: #64748b; }

/* ---- 人员档案：批量生成名片 ---- */
.bc-wrap { display: flex; flex-direction: column; gap: 10px; }
.bc-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-view { max-height: 62vh; overflow: auto; background: #f1f5f9; border-radius: 10px; padding: 10px; text-align: center; }
.bc-img { max-width: 100%; border-radius: 6px; box-shadow: 0 6px 18px rgba(15, 23, 42, .18); }
@media (max-width: 900px) {
  .card-maker { grid-template-columns: 1fr; }
  .cm-edit { grid-template-columns: 1fr; }
  .sf-row, .sf-subrow, .cm-grid { grid-template-columns: 1fr; }
  .cm-preview { position: static; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
}

/* ---- ⑦ 模块页头（智能工具 / 律师业务实用功能 / 搜索引擎共用） ---- */
.page-intro {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(120deg, #1f3b63, #3a608f); color: #fff;
  border-radius: 12px; padding: 14px 18px; margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(31, 59, 99, .16); position: relative; overflow: hidden;
}
.page-intro::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(200, 164, 92, .16); pointer-events: none;
}
.page-intro .pi-title { font-size: 16.5px; font-weight: 700; letter-spacing: 1px; }
.page-intro .pi-sub { font-size: 12.5px; color: rgba(255,255,255,.78); line-height: 1.6; flex: 1; min-width: 260px; }

/* ---- ⑧ 三模块表格交互：列宽 / 行高 / 设置按钮 / 冻结表头 ---- */
/* 表头单元格定位：列宽拖动手柄 .col-rs 以它为锚点 */
table.tbl th { position: relative; }
/* 表格滚动容器：行高手柄 .row-rs 定位在右下角 */
.card-body.tbl-wrap { position: relative; overflow-x: auto; }
/* 冻结表头：纵向滚动时表头吸顶 */
table.tbl.freeze thead th { position: sticky; top: 0; z-index: 5; box-shadow: inset 0 -1px 0 var(--border); }
/* 拖动列宽时避免选中文字 */
table.tbl.col-resizing { user-select: none; }
/* 行高手柄：默认淡出，鼠标移入表格区域再显示 */
.row-rs { opacity: .45; transition: opacity .15s; }
.card-body.tbl-wrap:hover .row-rs { opacity: 1; }
/* 列宽手柄：默认透明，悬停表头时显形 */
.col-rs::after {
  content: ''; position: absolute; right: 3px; top: 6px; bottom: 6px; width: 2px;
  border-radius: 2px; background: var(--border); opacity: 0; transition: opacity .15s;
}
table.tbl th:hover .col-rs::after { opacity: 1; background: var(--gold); }

/* ---- ⑨ 名片版式设置：样本画廊（点样本即切换版式） ---- */
.cs-tip { font-size: 13px; line-height: 1.8; color: var(--muted); background: #f7f9fc; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px;
  max-height: 60vh; overflow-y: auto; padding: 2px; }
.cs-item { border: 2px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer;
  background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.cs-item:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-2px); }
.cs-item.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,161,90,.18); background: #fffdf7; }
.cs-canvas { width: 100%; display: block; border-radius: 6px; border: 1px solid var(--border); background: #fff; }
.cs-name { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.cs-cur { font-size: 11px; font-weight: 500; color: #fff; background: var(--gold); border-radius: 10px; padding: 1px 8px; }
.cs-desc { margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ================= ⑩ 整体版面优化：层次更清楚、看着更舒服 ================= */

/* 卡片标题：左侧一条金色竖条，一眼看清每个区块从哪开始 */
.card-head h3 { border-left: 3px solid var(--gold); padding-left: 9px; line-height: 1.35; }
.card-head { background: linear-gradient(180deg, #fcfdfe, #fff); border-radius: var(--radius) var(--radius) 0 0; }
/* 注意：这里不能给 .card 加 overflow:hidden —— 会把下拉面板、气泡等绝对定位的浮层裁掉 */
.card-body { line-height: 1.7; }
.card-body .hint, .card-body > .hint { line-height: 1.85; }

/* 顶栏与内容区：拉开层次，滚动时标题不糊在一起 */
.topbar { box-shadow: 0 1px 2px rgba(16,32,56,.04); background: rgba(255,255,255,.96); }
.topbar .title { letter-spacing: .3px; }
.content { padding: 18px 22px 44px; }

/* 表格：斑马纹让宽表不易看串行；hover 更明显，鼠标落在哪行一眼就看到 */
table.tbl tbody tr:nth-child(even) { background: #fbfcfe; }
table.tbl tbody tr:hover { background: #f2f7fd; }
table.tbl thead th { position: relative; background: linear-gradient(180deg, #f8fafc, #f1f5f9); color: #475569; letter-spacing: .2px; }
table.tbl td { line-height: 1.65; }
table.tbl tbody tr:last-child td { border-bottom: none; }
.card-body.tbl-wrap table.tbl { border-radius: 0 0 var(--radius) var(--radius); }

/* 空状态：留白更从容 */
.empty { padding: 52px 0; font-size: 13.5px; }
.card-body.tight .empty { padding: 52px 0; }

/* 表单：标签与控件别挤在一起 */
.field { margin-bottom: 14px; }
.field label { margin-bottom: 6px; }
.filters { gap: 12px; }
.filters .field { min-width: 160px; }

/* 细滚动条，长列表/弹窗里不抢视线 */
.card-body.tbl-wrap::-webkit-scrollbar, .modal-body::-webkit-scrollbar, .cs-grid::-webkit-scrollbar { height: 9px; width: 9px; }
.card-body.tbl-wrap::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb, .cs-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1; border-radius: 6px; }
.card-body.tbl-wrap::-webkit-scrollbar-thumb:hover, .modal-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 小屏（笔记本 / 分屏）时收紧留白，别出现横向滚动 */
@media (max-width: 1366px) {
  .content { padding: 14px 16px 36px; }
  .card-body { padding: 13px; }
  .topbar { padding: 0 16px; }
}

/* 分页条：每页条数下拉 + 页码 / 箭头 */
.pager-size { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; }
.pager-sel { width: auto; min-width: 76px; padding: 3px 6px; font-size: 12px; height: 26px; }
.pager-ops .mini { min-width: 30px; padding: 3px 8px; font-size: 12.5px; }
.pager-ops .mini[disabled] { opacity: .4; cursor: not-allowed; }

/* ===== 统计区块：字段/呈现方式/版面格式 ===== */
.stat-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .stat-blocks { grid-template-columns: 1fr; } }
.stat-block .card-head { flex-wrap: wrap; gap: 6px; }
.stat-block .card-head .btn-row { flex-wrap: wrap; gap: 4px; }
.select.sm { padding: 3px 6px; font-size: 12px; min-width: 0; }
.sb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.sb-tile { background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; text-align: center; }
.sb-tile .n { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-tile .v { font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.sb-tile .v small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 2px; }

/* 区块版面格式：不同场合挑不同观感 */
.stat-block.skin-inkgold { background: #fbfaf7; border-color: #e3d9c0; }
.stat-block.skin-inkgold .card-head { border-bottom-color: #e3d9c0; }
.stat-block.skin-inkgold .card-head h3, .stat-block.skin-inkgold .sb-tile .v { color: #1f3b63; }
.stat-block.skin-inkgold .sb-tile { background: #fff; border-color: #e3d9c0; }

.stat-block.skin-guofeng { background: #fdf8ee; border-color: #dfc89a; border-radius: 10px; }
.stat-block.skin-guofeng .card-head { border-bottom-color: #dfc89a; }
.stat-block.skin-guofeng .card-head h3, .stat-block.skin-guofeng .sb-tile .v { font-family: "KaiTi","楷体","STKaiti",serif; color: #9b2c2c; }
.stat-block.skin-guofeng .sb-tile { background: #fffdf7; border-color: #e6d3a8; border-radius: 6px; }

.stat-block.skin-mecha { background: #f2f4f7; border-color: #b9c2cc; border-radius: 2px; font-family: "Consolas","SimHei",monospace; }
.stat-block.skin-mecha .card-head { border-bottom-color: #b9c2cc; }
.stat-block.skin-mecha .card-head h3 { color: #0f172a; letter-spacing: 1px; }
.stat-block.skin-mecha .sb-tile { background: #e8ecf1; border-color: #aab4c0; border-radius: 2px; }

.stat-block.skin-wash { background: linear-gradient(180deg,#fbfcfd,#eef2f6); border-color: #dbe3ea; border-radius: 14px; }
.stat-block.skin-wash .card-head { border-bottom-color: #dbe3ea; }
.stat-block.skin-wash .card-head h3 { color: #33404d; }
.stat-block.skin-wash .sb-tile { background: rgba(255,255,255,.75); border-color: #dbe3ea; border-radius: 10px; }

.stat-block.skin-anime { background: linear-gradient(135deg,#fff7fb,#f2f8ff); border-color: #f3c8e0; border-radius: 16px; }
.stat-block.skin-anime .card-head { border-bottom-color: #f3c8e0; }
.stat-block.skin-anime .card-head h3 { color: #d1568f; font-weight: 800; }
.stat-block.skin-anime .sb-tile { background: #fff; border-color: #f3c8e0; border-radius: 14px; }
.stat-block.skin-anime .sb-tile .v { color: #3f7fd1; }

.stat-block.skin-fresh { background: #f6fbf6; border-color: #cfe3cf; }
.stat-block.skin-fresh .card-head { border-bottom-color: #cfe3cf; }
.stat-block.skin-fresh .card-head h3, .stat-block.skin-fresh .sb-tile .v { color: #22543d; }
.stat-block.skin-fresh .sb-tile { background: #fff; border-color: #cfe3cf; }

.stat-block.skin-night { background: #1e2530; border-color: #39445a; color: #e6ecf5; }
.stat-block.skin-night .card-head { border-bottom-color: #39445a; }
.stat-block.skin-night .card-head h3 { color: #f2f6fb; }
.stat-block.skin-night .hint, .stat-block.skin-night .legend, .stat-block.skin-night .empty { color: #9fb0c6; }
.stat-block.skin-night .sb-tile { background: #28303d; border-color: #39445a; }
.stat-block.skin-night .sb-tile .n { color: #9fb0c6; }
.stat-block.skin-night .sb-tile .v { color: #e6ecf5; }
.stat-block.skin-night table.tbl td { color: #e6ecf5; border-bottom-color: #39445a; }
.stat-block.skin-night table.tbl th { background: #28303d; color: #9fb0c6; border-bottom-color: #39445a; }

/* ==================== 导出中心（export-center） ==================== */
.exp-center .modal-body { padding: 0; }
.exp-tabs { display: flex; gap: 6px; padding: 10px 16px 0; border-bottom: 1px solid var(--border); }
.exp-tab { padding: 7px 16px; border: 1px solid var(--border); border-bottom: 0; background: #f4f6f9; color: #5b6b82;
  border-radius: 6px 6px 0 0; cursor: pointer; font-size: 13px; }
.exp-tab.on { background: #fff; color: var(--primary, #1f3b63); font-weight: 700; box-shadow: inset 0 2px 0 var(--primary, #1f3b63); }
.exp-pane { padding: 14px 16px; }
.exp-tiprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px;
  font-size: 12px; color: #5b6b82; }
.exp-tiprow .btn-row { display: inline-flex; gap: 6px; flex: none; }
.exp-fields { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 6px; padding: 8px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; }
.exp-f { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 4px; }
.exp-f:hover { background: #f4f6f9; }
.exp-f.on { background: #eef4ff; }
.exp-fn { font-size: 13px; color: #334; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-fmv { margin-left: auto; display: inline-flex; gap: 2px; }
.exp-fmv .mini { border: 1px solid var(--border); background: #fff; border-radius: 3px; cursor: pointer;
  padding: 0 5px; line-height: 18px; font-size: 11px; color: #5b6b82; }
.exp-fmv .mini:disabled { opacity: .35; cursor: default; }
.exp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; }
.exp-grid .field { display: flex; flex-direction: column; gap: 3px; }
.exp-grid .field > label { font-size: 12px; color: #5b6b82; }
.exp-chks { flex-direction: row !important; align-items: center; gap: 14px !important; flex-wrap: wrap; }
.exp-chks label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.exp-prev { margin-top: 14px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.exp-prev-hd { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px;
  background: #f4f6f9; font-size: 12px; color: #5b6b82; border-bottom: 1px solid var(--border); }
.exp-prev-box { max-height: 300px; overflow: auto; padding: 8px; }
table.tbl.exp-pv th { background: var(--thbg, #dce6f1); font-size: var(--thfs, 9pt); padding: var(--pad, 2px) 4px; }
table.tbl.exp-pv td { padding: var(--pad, 2px) 4px; text-align: var(--align, center); }
.exp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.exp-drafts { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.exp-acts { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 900px) {
  .exp-fields { grid-template-columns: repeat(2, 1fr); }
  .exp-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== 工作台 · 日历版面 / 时钟版面 / 历史上的今天 ==================== */
/* --- 通用小组件 --- */
.skin-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.skin-chip { padding: 4px 12px; border: 1px solid var(--border); border-radius: 14px; background: #fff;
  color: #5b6b82; font-size: 12px; cursor: pointer; }
.skin-chip:hover { border-color: #c8a45c; color: #8a6b23; }
.skin-chip.on { background: var(--primary, #1f3b63); border-color: var(--primary, #1f3b63); color: #fff; font-weight: 700; }

/* --- 日历单元格字号变量 --- */
.cal-grid { font-size: var(--cfs, 12px); }
.cal-grid .cal-d { font-size: var(--cfh, 14px); }
.cal-grid .cal-lunar { font-size: var(--cfl, 10px); }
.cal-grid .cal-wd { font-size: var(--cfl, 10px); }
.cal-grid.preview { pointer-events: none; }

/* --- 日历版面：国风 --- */
.cal-grid.csk-guofeng { background: linear-gradient(180deg, #fdf6e6, #f6e9cf); border: 1px solid #c8a45c; }
.cal-grid.csk-guofeng .cal-wd { background: #8c2f2f; color: #f7e7c8; border-color: #a8413f; letter-spacing: 2px; }
.cal-grid.csk-guofeng .cal-cell { border-color: #e0cba0; color: #5a3a1c; }
.cal-grid.csk-guofeng .cal-cell.today { background: #8c2f2f; color: #fff8e6; border-radius: 3px; }
.cal-grid.csk-guofeng .cal-cell.today .cal-lunar { color: #ffe9c0; }
.cal-grid.csk-guofeng .cal-cell.weekend { background: #f7ead2; }
.cal-grid.csk-guofeng .cal-cell.holiday { background: #f3d9a4; }
.cal-grid.csk-guofeng .cal-lunar { color: #96703f; }

/* --- 日历版面：机械 --- */
.cal-grid.csk-mecha { background: linear-gradient(180deg, #e9edf2, #d5dbe2); border: 1px solid #8b96a5; }
.cal-grid.csk-mecha .cal-wd { background: linear-gradient(180deg, #4a5563, #2d3748); color: #cbd5e1; border-color: #2d3748; font-family: Consolas, monospace; }
.cal-grid.csk-mecha .cal-cell { border-color: #aab3bf; color: #2d3748; border-radius: 2px; }
.cal-grid.csk-mecha .cal-cell.today { background: repeating-linear-gradient(45deg, #334155, #334155 4px, #475569 4px, #475569 8px); color: #fff; box-shadow: inset 0 0 0 2px #94a3b8; }
.cal-grid.csk-mecha .cal-cell.today .cal-lunar { color: #cbd5e1; }
.cal-grid.csk-mecha .cal-cell.weekend { background: #cfd6de; }
.cal-grid.csk-mecha .cal-lunar { color: #64748b; font-family: Consolas, monospace; }

/* --- 日历版面：商务 --- */
.cal-grid.csk-biz { background: #fff; border: 1px solid #d7dde5; }
.cal-grid.csk-biz .cal-wd { background: #1f3b63; color: #fff; border-color: #1f3b63; font-weight: 600; }
.cal-grid.csk-biz .cal-cell { border-color: #e6eaef; color: #243447; }
.cal-grid.csk-biz .cal-cell.today { background: #e8effa; box-shadow: inset 2px 0 0 #1f3b63; }
.cal-grid.csk-biz .cal-cell.weekend { background: #f7f9fb; }
.cal-grid.csk-biz .cal-cell.holiday { background: #fdf3e3; }
.cal-grid.csk-biz .cal-lunar { color: #8d9aab; }

/* --- 日历版面：时尚 --- */
.cal-grid.csk-fashion { background: linear-gradient(135deg, #fff1f5, #eef2ff); border: 1px solid #f0c8d8; }
.cal-grid.csk-fashion .cal-wd { background: linear-gradient(90deg, #ec4899, #8b5cf6); color: #fff; border-color: transparent; }
.cal-grid.csk-fashion .cal-cell { border-color: #f6dbe8; color: #4b3a52; border-radius: 8px; }
.cal-grid.csk-fashion .cal-cell.today { background: linear-gradient(135deg, #ec4899, #8b5cf6); color: #fff; }
.cal-grid.csk-fashion .cal-cell.today .cal-lunar { color: #ffe4f1; }
.cal-grid.csk-fashion .cal-cell.weekend { background: #fff0f6; }
.cal-grid.csk-fashion .cal-lunar { color: #b083a6; }

/* --- 日历版面：水墨 --- */
.cal-grid.csk-ink { background: #fbfaf7; border: 1px solid #d9d5cc; }
.cal-grid.csk-ink .cal-wd { background: #2f3430; color: #efece4; border-color: #2f3430; }
.cal-grid.csk-ink .cal-cell { border-color: #e6e2d8; color: #33372f; }
.cal-grid.csk-ink .cal-cell.today { background: #33372f; color: #f6f3ea; }
.cal-grid.csk-ink .cal-cell.today .cal-lunar { color: #d5d0c2; }
.cal-grid.csk-ink .cal-cell.weekend { background: #f2efe7; }
.cal-grid.csk-ink .cal-lunar { color: #8a8579; }

/* --- 时钟版面 --- */
.clock-wrap { padding: 8px 14px; border-radius: 10px; border: 1px solid transparent; }
.clock-wrap.cs-classic { background: rgba(255,255,255,.55); }
.clock-wrap.cs-guofeng { background: linear-gradient(180deg, #fdf6e6, #f3e2c0); border-color: #c8a45c; box-shadow: 0 2px 8px rgba(140,47,47,.15); }
.clock-wrap.cs-guofeng .clock-date { color: #7a5330; }
.clock-wrap.cs-mecha { background: linear-gradient(180deg, #3a4453, #232c38); border-color: #55606f; box-shadow: inset 0 0 12px rgba(0,0,0,.4); }
.clock-wrap.cs-mecha .clock-date, .clock-wrap.cs-mecha .digital, .clock-wrap.cs-mecha .clock-art { color: #cbd5e1; }
.clock-wrap.cs-mecha .analog { border-color: #94a3b8; box-shadow: inset 0 0 10px rgba(148,163,184,.35); }
.clock-wrap.cs-biz { background: #fff; border-color: #d7dde5; box-shadow: 0 1px 4px rgba(31,59,99,.12); }
.clock-wrap.cs-biz .clock-date { color: #5b6b82; }
.clock-wrap.cs-fashion { background: linear-gradient(135deg, #fff1f5, #eef2ff); border-color: #f0c8d8; box-shadow: 0 4px 14px rgba(236,72,153,.18); }
.clock-wrap.cs-fashion .clock-date { color: #8b5a7a; }
.clock-wrap.cs-ink { background: #fbfaf7; border-color: #d9d5cc; box-shadow: 0 2px 10px rgba(47,52,48,.12); }
.clock-wrap.cs-ink .clock-date { color: #6d6a60; }
.pop-preview { padding: 12px; border-radius: 8px; text-align: center; margin-top: 8px; border: 1px dashed var(--border); }
.pop-preview.cs-mecha { background: #2b3441; color: #cbd5e1; }
.pop-preview.cs-guofeng { background: #fdf6e6; }
.pop-preview.cs-biz { background: #fff; box-shadow: inset 0 0 0 1px #e6eaef; }
.pop-preview.cs-fashion { background: linear-gradient(135deg, #fff1f5, #eef2ff); }
.pop-preview.cs-ink { background: #fbfaf7; }

/* --- 历史上的今天（日历当日详情弹层内） --- */
.dd-hist { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.dd-hist-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dd-hist-title { font-weight: 700; color: #1f3b63; font-size: 14px; }
.dd-hist-cnt { font-size: 12px; color: #8d9aab; }
.dd-hist-list { max-height: 42vh; overflow: auto; }
.dd-hist-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border-radius: 6px; line-height: 1.7; }
.dd-hist-item:nth-child(odd) { background: #f7f9fb; }
.dd-hist-item .hh-no { flex: none; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%;
  background: #1f3b63; color: #fff; font-size: 11px; font-weight: 700; margin-top: 3px; }
.dd-hist-item.cn .hh-no { background: #8c2f2f; }
.dd-hist-item .hh-y { flex: none; font-family: Consolas, monospace; font-weight: 700; color: #243447; font-size: 12px; margin-top: 3px; }
.dd-hist-item .hh-side { flex: none; font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-top: 2px;
  background: #e8effa; color: #1f3b63; }
.dd-hist-item.cn .hh-side { background: #fbe9e9; color: #8c2f2f; }
.dd-hist-item .hh-t { flex: 1; font-size: 13px; color: #33404f; }
.dd-hist-empty { font-size: 12px; color: #8d9aab; line-height: 1.8; padding: 6px 2px; }
.cal-preview { border: 1px solid var(--border); border-radius: 6px; padding: 6px; margin-top: 10px; }

/* ==================== 业务跟踪模块 ==================== */
/* 业务列表 与 跟踪节点：横向两栏并排 */
.track-cols { display: grid; grid-template-columns: minmax(360px, 420px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .track-cols { grid-template-columns: 1fr; } }

/* 卡片头右侧操作区：按钮多了自动换行，不挤压标题 */
.card-head .rh-ops { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.card-head .rh-ops .btn-row { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* 勾选列 */
th.chk-col, td.chk-col { width: 34px; text-align: center; padding-left: 4px; padding-right: 4px; }
th.chk-col input, td.chk-col input { cursor: pointer; }

/* 待办项：选中态 */
.todo-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.todo-item.picked { background: #eef4fb; box-shadow: inset 3px 0 0 #1f3b63; }
.todo-item .who { font-size: 12px; color: #8d9aab; }
.todo-item input[type=checkbox] { cursor: pointer; }

/* 跟踪节点：选中态 */
.tl-item.picked { background: #eef4fb; box-shadow: inset 3px 0 0 #1f3b63; border-radius: 6px; padding-left: 8px; }
.tl-item input[type=checkbox] { cursor: pointer; margin-right: 6px; }

/* 提示行 */
.card-body .hint { font-size: 12px; color: #8d9aab; line-height: 1.7; margin-top: 8px; }

/* ==================== 业务跟踪模块 ==================== */
/* 业务列表 与 跟踪节点：横向两栏并排 */
.track-cols { display: grid; grid-template-columns: minmax(360px, 420px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .track-cols { grid-template-columns: 1fr; } }

/* 卡片头右侧操作区：按钮多了自动换行，不挤压标题 */
.card-head .rh-ops { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.card-head .rh-ops .btn-row { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* 勾选列 */
th.chk-col, td.chk-col { width: 34px; text-align: center; padding-left: 4px; padding-right: 4px; }
th.chk-col input, td.chk-col input { cursor: pointer; }

/* 待办项：选中态 */
.todo-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.todo-item.picked { background: #eef4fb; box-shadow: inset 3px 0 0 #1f3b63; }
.todo-item .who { font-size: 12px; color: #8d9aab; }
.todo-item input[type=checkbox] { cursor: pointer; }

/* 跟踪节点：选中态 */
.tl-item.picked { background: #eef4fb; box-shadow: inset 3px 0 0 #1f3b63; border-radius: 6px; padding-left: 8px; }
.tl-item input[type=checkbox] { cursor: pointer; margin-right: 6px; }

/* 提示行 */
.card-body .hint { font-size: 12px; color: #8d9aab; line-height: 1.7; margin-top: 8px; }

/* ==================== 统计报表：字段勾选 / 生成 / 导出 ==================== */
.stat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 12px; }
.sp-item { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; font-size: 13px; color: #33404f; cursor: pointer; }
.sp-item:hover { background: #f4f6f9; }
.sp-item.on { background: #eef4fb; color: #1f3b63; font-weight: 600; }
.sp-item input { cursor: pointer; }
.sp-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.sp-lab { font-size: 13px; color: #5b6b82; font-weight: 600; }
.sp-acts .hint { flex: 1; min-width: 220px; }

/* 每个统计图下面挂一个导出按钮 */
.sb-wrap { position: relative; }
.sb-export { margin: -6px 0 14px; text-align: right; }

/* ==================== 统计报表：字段勾选 / 生成 / 导出 ==================== */
.stat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 12px; }
.sp-item { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; font-size: 13px; color: #33404f; cursor: pointer; }
.sp-item:hover { background: #f4f6f9; }
.sp-item.on { background: #eef4fb; color: #1f3b63; font-weight: 600; }
.sp-item input { cursor: pointer; }
.sp-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.sp-lab { font-size: 13px; color: #5b6b82; font-weight: 600; }
.sp-acts .hint { flex: 1; min-width: 220px; }

/* 每个统计图下面挂一个导出按钮 */
.sb-wrap { position: relative; }
.sb-export { margin: -6px 0 14px; text-align: right; }

/* ==================== 律师名片 / 人员档案 设置区 ==================== */
/* 名片：恢复左右并排（编辑在左、实时预览在右），不再强制上下堆叠 */
@media (min-width: 901px) { .cm-edit { max-width: 100%; } }

/* 人员名单勾选区 */
.cn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.cn-item { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; font-size: 13px; cursor: pointer; }
.cn-item:hover { background: #f4f6f9; }
.cn-item.on { background: #eef4fb; }
.cn-item input { cursor: pointer; }
.cn-name { color: #1f3b63; }
.cn-name:hover { text-decoration: underline; }

/* 多字段排序编辑区 */
.sf-sec, .cns-sort { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.sf-sec-hd, .cns-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 600; color: #33404f; margin-bottom: 8px; }
.sf-spec, .cns-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.sf-no, .cns-no { flex: none; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%;
  background: #1f3b63; color: #fff; font-size: 11px; font-weight: 700; }
.cns-sort .btn { margin-top: 4px; }

/* 列表选中行 */
table.tbl tbody tr.picked { background: #eef4fb; }

/* ==================== 律师名片 / 人员档案 设置区 ==================== */
/* 名片：恢复左右并排（编辑在左、实时预览在右），不再强制上下堆叠 */
@media (min-width: 901px) { .cm-edit { max-width: 100%; } }

/* 人员名单勾选区 */
.cn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.cn-item { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; font-size: 13px; cursor: pointer; }
.cn-item:hover { background: #f4f6f9; }
.cn-item.on { background: #eef4fb; }
.cn-item input { cursor: pointer; }
.cn-name { color: #1f3b63; }
.cn-name:hover { text-decoration: underline; }

/* 多字段排序编辑区 */
.sf-sec, .cns-sort { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.sf-sec-hd, .cns-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 600; color: #33404f; margin-bottom: 8px; }
.sf-spec, .cns-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.sf-no, .cns-no { flex: none; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%;
  background: #1f3b63; color: #fff; font-size: 11px; font-weight: 700; }
.cns-sort .btn { margin-top: 4px; }

/* 列表选中行 */
table.tbl tbody tr.picked { background: #eef4fb; }

/* ==================== 知识库 · 实时更新维护 ==================== */
.kb-mt-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px;
  padding-top: 12px; border-top: 1px solid var(--border); }
.kb-mt-search .input { flex: 1; min-width: 240px; }
.kb-mt-log { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.kb-mt-log-hd { font-size: 13px; font-weight: 700; color: #33404f; margin-bottom: 6px; }
.kb-mt-log-row { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 4px; font-size: 12px; }
.kb-mt-log-row:nth-child(even) { background: #f7f9fb; }
.kb-mt-log-row .lt { flex: none; color: #8d9aab; font-family: Consolas, monospace; }
.kb-mt-log-row .la { flex: none; padding: 0 7px; border-radius: 10px; background: #e8effa; color: #1f3b63; }
.kb-mt-log-row .ld { flex: 1; color: #33404f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-mt-log-row .lu { flex: none; color: #8d9aab; }

/* ==================== 通用美化 ==================== */
/* 工具条按钮组：换行不挤压 */
.btn-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-ops { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* 迷你按钮 */
.mini { padding: 3px 9px; border: 1px solid var(--border); background: #fff; border-radius: 4px;
  font-size: 12px; color: #5b6b82; cursor: pointer; }
.mini:hover { border-color: #c8a45c; color: #8a6b23; }
.mini.on { background: var(--primary, #1f3b63); border-color: var(--primary, #1f3b63); color: #fff; }
.mini:disabled { opacity: .45; cursor: default; }
.mini.danger { color: #c53030; }
.mini.danger:hover { border-color: #c53030; background: #fdf2f2; }

/* 卡片：轻微圆角与投影，全站一致 */
.card { border-radius: 8px; }
.card-head { border-radius: 8px 8px 0 0; }

/* 表单分区标题 */
.cm-sec, .sf-sec { font-size: 13px; font-weight: 700; color: #1f3b63; margin: 6px 0 2px; }

/* 空状态 */
.empty { padding: 22px 12px; text-align: center; color: #8d9aab; font-size: 13px; }

/* 表格奇偶条纹，便于阅读 */
table.tbl tbody tr:nth-child(even) { background: #fbfcfd; }
table.tbl tbody tr:hover { background: #f2f7fd; }

/* ==================== 知识库 · 实时更新维护 ==================== */
.kb-mt-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px;
  padding-top: 12px; border-top: 1px solid var(--border); }
.kb-mt-search .input { flex: 1; min-width: 240px; }
.kb-mt-log { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.kb-mt-log-hd { font-size: 13px; font-weight: 700; color: #33404f; margin-bottom: 6px; }
.kb-mt-log-row { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 4px; font-size: 12px; }
.kb-mt-log-row:nth-child(even) { background: #f7f9fb; }
.kb-mt-log-row .lt { flex: none; color: #8d9aab; font-family: Consolas, monospace; }
.kb-mt-log-row .la { flex: none; padding: 0 7px; border-radius: 10px; background: #e8effa; color: #1f3b63; }
.kb-mt-log-row .ld { flex: 1; color: #33404f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-mt-log-row .lu { flex: none; color: #8d9aab; }

/* ==================== 通用美化 ==================== */
/* 工具条按钮组：换行不挤压 */
.btn-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-ops { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* 迷你按钮 */
.mini { padding: 3px 9px; border: 1px solid var(--border); background: #fff; border-radius: 4px;
  font-size: 12px; color: #5b6b82; cursor: pointer; }
.mini:hover { border-color: #c8a45c; color: #8a6b23; }
.mini.on { background: var(--primary, #1f3b63); border-color: var(--primary, #1f3b63); color: #fff; }
.mini:disabled { opacity: .45; cursor: default; }
.mini.danger { color: #c53030; }
.mini.danger:hover { border-color: #c53030; background: #fdf2f2; }

/* 卡片：轻微圆角与投影，全站一致 */
.card { border-radius: 8px; }
.card-head { border-radius: 8px 8px 0 0; }

/* 表单分区标题 */
.cm-sec, .sf-sec { font-size: 13px; font-weight: 700; color: #1f3b63; margin: 6px 0 2px; }

/* 空状态 */
.empty { padding: 22px 12px; text-align: center; color: #8d9aab; font-size: 13px; }

/* 表格奇偶条纹，便于阅读 */
table.tbl tbody tr:nth-child(even) { background: #fbfcfd; }
table.tbl tbody tr:hover { background: #f2f7fd; }

/* ==================== 系统设置页排版美化 ==================== */
.settings-card { overflow: hidden; }
/* 页头：图标 + 标题 + 说明 */
.settings-hero { justify-content: flex-start; align-items: center; gap: 14px;
  background: linear-gradient(120deg, #1f3b63 0%, #2c5282 62%, #34598f 100%); color: #fff; }
.settings-hero .sh-ico { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(231,201,121,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #e7c979; letter-spacing: 0; }
.settings-hero h3 { margin: 0; font-size: 17px; font-weight: 700; color: #fff; border-left: none; padding-left: 0; }
.settings-hero .sh-text { display: flex; flex-direction: column; gap: 3px; }
.settings-hero .sh-sub { font-size: 12.5px; color: rgba(219,230,243,.82); line-height: 1.5; }
/* 分段导航条：底纹轨道 + 墨蓝选中态 */
.settings-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 11px 12px; margin-bottom: 16px;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border: 1px solid var(--border); border-radius: 12px;
  position: sticky; top: 0; z-index: 5; }
.settings-tabs .tab { border: 1px solid var(--border); background: #fff; border-radius: 8px;
  color: #475569; font-size: 13px; padding: 7px 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.settings-tabs .tab:hover { color: var(--ink-2); border-color: #c8a45c; }
.settings-tabs .tab.on { background: var(--ink); color: #fff; border-color: var(--ink);
  font-weight: 600; box-shadow: 0 3px 10px rgba(31,59,99,.22); }
.settings-tabs .st-group-label { align-self: center; font-size: 11px; font-weight: 700;
  color: var(--gold); letter-spacing: 1px; padding: 0 2px 0 10px; position: relative; }
.settings-tabs .st-group-label:not(:first-child) { margin-left: 6px; }
.settings-tabs .st-group-label:not(:first-child)::before { content: ""; position: absolute;
  left: -2px; top: 50%; transform: translateY(-50%); width: 1px; height: 14px; background: #d6dee8; }

/* ===== 外部入口卡片：界面管理（风格类型 / 显示类型） ===== */
/* 视觉槽：图片与彩色字图标共用同一容器 */
.entry-visual { flex: 0 0 48px; width: 48px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.entry-img { width: 48px; height: 48px; border-radius: 11px; object-fit: cover; display: block; box-shadow: 0 2px 7px rgba(15, 23, 42, .18); }

/* 风格类型：用 CSS 变量统一卡片表面与强调色（挂在卡片上即可独立生效；子项可单独覆盖模块默认） */
.entry-card.eg-s-biz     { --eg-accent:#1f3b63; --eg-card:#ffffff; --eg-border:#e2e8f0; }
.entry-card.eg-s-guofeng { --eg-accent:#8a3324; --eg-card:#fbf6ef; --eg-border:#e7d8c4; }
.entry-card.eg-s-mech    { --eg-accent:#334155; --eg-card:#f1f5f9; --eg-border:#cbd5e1; }
.entry-card.eg-s-ink     { --eg-accent:#3b4a5a; --eg-card:#f8fafc; --eg-border:#e5e9f0; }
.entry-card.eg-s-fresh   { --eg-accent:#0f766e; --eg-card:#f0fdfa; --eg-border:#ccfbf1; }
.entry-card.eg-s-tech    { --eg-accent:#4338ca; --eg-card:#eef2ff; --eg-border:#c7d2fe; }
.entry-card.eg-s-warm    { --eg-accent:#be185d; --eg-card:#fdf2f8; --eg-border:#fbcfe8; }
.entry-card.eg-s-olive   { --eg-accent:#4d4d1a; --eg-card:#f7f7ea; --eg-border:#e2e2c4; }
.entry-card.eg-s-dark    { --eg-accent:#93c5fd; --eg-card:#0f172a; --eg-border:#1e293b; }
.entry-card.eg-s-grad    { --eg-accent:#6366f1; --eg-card:#f5f3ff; --eg-border:#ddd6fe; }
.entry-card.eg-s-glass   { --eg-accent:#0ea5e9; --eg-card:rgba(255,255,255,.72); --eg-border:rgba(255,255,255,.65); }
.entry-card.eg-s-gold    { --eg-accent:#b8934b; --eg-card:#fffdf7; --eg-border:#ecd9a8; }

/* 风格变量落到卡片各部位（任意 eg-s-* 卡片通用，子项可单独覆盖模块默认） */
.entry-card[class*="eg-s-"] { background: var(--eg-card, #fff); border-color: var(--eg-border, var(--border)); }
.entry-card[class*="eg-s-"]::before { background: var(--eg-accent, var(--gold)); }
.entry-card[class*="eg-s-"] .entry-name { color: var(--eg-accent, var(--ink)); }
.entry-card[class*="eg-s-"] .entry-go { color: var(--eg-accent, var(--gold)); }
.entry-card.eg-s-dark .entry-org, .entry-card.eg-s-dark .entry-desc { color: #94a3b8; }

/* 显示类型：图片+基本信息（默认，沿用行布局，无需额外覆盖） */

/* 字体重点：放大名称、弱化图标、隐藏机关 */
.entry-card.eg-d-font .entry-visual { flex: 0 0 30px; width: 30px; }
.entry-card.eg-d-font .entry-img { width: 30px; height: 30px; border-radius: 8px; }
.entry-card.eg-d-font .entry-ico { flex: 0 0 30px; width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.entry-card.eg-d-font .entry-name { font-size: 16px; font-weight: 700; }
.entry-card.eg-d-font .entry-org { display: none; }
.entry-card.eg-d-font .entry-desc { -webkit-line-clamp: 1; }

/* 竖列：整行铺满，更紧凑 */
.entry-card.eg-d-list { min-height: 0; padding: 10px 14px; grid-column: 1 / -1; }

/* 缩略图：图上字下，密集小方块 */
.entry-card.eg-d-thumb { flex-direction: column; align-items: stretch; min-height: 0; padding: 0; }
.entry-card.eg-d-thumb .entry-visual { flex: 0 0 auto; width: 100%; height: 84px; border-radius: 0; }
.entry-card.eg-d-thumb .entry-img { width: 100%; height: 84px; border-radius: 0; }
.entry-card.eg-d-thumb .entry-ico { width: 100%; height: 84px; border-radius: 0; font-size: 26px; }
.entry-card.eg-d-thumb .entry-main { padding: 9px 12px 11px; }
.entry-card.eg-d-thumb .entry-go { top: 8px; right: 8px; transform: none; }

/* 极简文字：无图标纯文字，最克制 */
.entry-card.eg-d-mini .entry-visual { display: none; }
.entry-card.eg-d-mini { flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; padding: 9px 12px; }
.entry-card.eg-d-mini .entry-main { padding-right: 0; }
.entry-card.eg-d-mini .entry-top { width: 100%; }
.entry-card.eg-d-mini .entry-org { display: inline; font-size: 11px; margin-top: 0; }
.entry-card.eg-d-mini .entry-desc { display: none; }

/* 紧凑：更密网格、更小留白 */
.entry-card.eg-d-compact { padding: 8px 10px; gap: 8px; min-height: 0; }
.entry-card.eg-d-compact .entry-visual { flex: 0 0 36px; width: 36px; }
.entry-card.eg-d-compact .entry-img { width: 36px; height: 36px; border-radius: 9px; }
.entry-card.eg-d-compact .entry-ico { flex: 0 0 36px; width: 36px; height: 36px; font-size: 14px; border-radius: 9px; }
.entry-card.eg-d-compact .entry-name { font-size: 12.5px; }
.entry-card.eg-d-compact .entry-org, .entry-card.eg-d-compact .entry-desc { font-size: 10.5px; }

/* 大卡片：图上字下，图占上半部、名称更醒目 */
.entry-card.eg-d-card { flex-direction: column; align-items: stretch; min-height: 0; padding: 0; }
.entry-card.eg-d-card .entry-visual { flex: 0 0 auto; width: 100%; height: 104px; border-radius: 0; }
.entry-card.eg-d-card .entry-img { width: 100%; height: 104px; border-radius: 0; object-fit: cover; }
.entry-card.eg-d-card .entry-ico { width: 100%; height: 104px; border-radius: 0; font-size: 34px; }
.entry-card.eg-d-card .entry-main { padding: 11px 13px 13px; }
.entry-card.eg-d-card .entry-name { font-size: 15px; }
.entry-card.eg-d-card .entry-go { top: 10px; right: 10px; transform: none; }

/* 磁贴：彩色方块，大图标居中、名称在下（背景用风格强调色） */
.entry-card.eg-d-tile { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 14px 10px; min-height: 96px; background: var(--eg-accent, #1f3b63); border-color: transparent; }
.entry-card.eg-d-tile .entry-visual { flex: 0 0 auto; width: 46px; height: 46px; }
.entry-card.eg-d-tile .entry-ico { width: 46px; height: 46px; border-radius: 12px; font-size: 20px; background: rgba(255,255,255,.92); color: var(--eg-accent, #1f3b63); box-shadow: none; }
.entry-card.eg-d-tile .entry-img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.entry-card.eg-d-tile .entry-main { padding-right: 0; align-items: center; }
.entry-card.eg-d-tile .entry-name { color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.entry-card.eg-d-tile .entry-org, .entry-card.eg-d-tile .entry-desc, .entry-card.eg-d-tile .entry-go { display: none; }
.entry-card.eg-d-tile::before { display: none; }

/* 横幅：整行横幅，左侧粗强调色条 + 浅底 */
.entry-card.eg-d-banner { grid-column: 1 / -1; min-height: 0; padding: 12px 16px 12px 18px; border-left: 5px solid var(--eg-accent, var(--gold)); }
.entry-card.eg-d-banner .entry-visual { flex: 0 0 38px; width: 38px; }
.entry-card.eg-d-banner .entry-ico { width: 38px; height: 38px; font-size: 16px; }
.entry-card.eg-d-banner .entry-name { font-size: 15px; }

/* 超密：极小图标 + 小字号，一屏可放很多入口 */
.entry-card.eg-d-dense { padding: 6px 9px; gap: 7px; min-height: 0; }
.entry-card.eg-d-dense .entry-visual { flex: 0 0 28px; width: 28px; }
.entry-card.eg-d-dense .entry-img { width: 28px; height: 28px; border-radius: 7px; }
.entry-card.eg-d-dense .entry-ico { flex: 0 0 28px; width: 28px; height: 28px; font-size: 12px; border-radius: 7px; }
.entry-card.eg-d-dense .entry-name { font-size: 12px; }
.entry-card.eg-d-dense .entry-org, .entry-card.eg-d-dense .entry-desc { display: none; }

/* 管理弹窗内的分页签（来源管理 / 界面） */
.eg-tabs { display: flex; gap: 6px; margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 8px; flex-wrap: wrap; }
.eg-tab { border: 1px solid var(--border); background: #f8fafc; color: #475569; padding: 5px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: all .12s; }
.eg-tab:hover { border-color: #c8a45c; }
.eg-tab.on { background: var(--ink, #1f3b63); color: #fff; border-color: var(--ink, #1f3b63); }

/* 界面管理面板 */
.eg-ui { display: flex; flex-direction: column; gap: 14px; }
.eg-ui-label { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.eg-ui-row { display: flex; flex-wrap: wrap; gap: 8px; }
.eg-ui-chip { border: 1px solid var(--border); background: #fff; color: #334155; padding: 6px 14px; border-radius: 20px; font-size: 13px; cursor: pointer; transition: all .12s; }
.eg-ui-chip:hover { border-color: var(--c, var(--gold)); }
.eg-ui-chip.on { background: var(--c, var(--gold)); border-color: var(--c, var(--gold)); color: #fff; font-weight: 600; }

/* 入口图片编辑 */
.eg-img-field .eg-img-edit { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.eg-img-prev { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.eg-img-ops { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; min-width: 220px; }
.eg-img-ops .input { flex: 1; min-width: 180px; }

/* 通用：表格横向滚动容器（手机窄屏时包裹表格，可左右拖动查看） */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ================= 手机 / 小屏适配（≤768px） =================
 * 桌面端左侧菜单是固定 216px、内容用 margin-left 让位；手机窄屏会把它挤成一条。
 * 这里把小屏改成「抽屉式」：侧栏默认收起，点顶栏「☰」滑出，选中菜单后自动收起，内容占满全屏。 */
@media (max-width: 768px) {
  /* 侧栏：抽屉 */
  .sidebar {
    width: 80%; max-width: 300px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 0 30px rgba(15, 23, 42, .45);
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }

  /* 顶栏 */
  .topbar { height: 52px; padding: 0 12px; }
  .topbar-left { min-width: 0; flex: 1; }
  .topbar .title { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .right { gap: 8px; flex: 0 0 auto; }
  .hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: 0 0 34px;
    border: 1px solid var(--border-strong); border-radius: 8px; background: #fff;
    color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer;
  }
  /* 顶栏只留头像，姓名/角色收起，避免拥挤 */
  .user-chip > span { display: none; }
  .user-chip { gap: 0; }

  /* 抽屉遮罩（低于侧栏 z-index:20，高于顶栏 z-index:10） */
  .sb-mask { display: block; position: fixed; inset: 0; z-index: 19; background: rgba(15, 23, 42, .45); }

  /* 内容区收窄内边距 */
  .content { padding: 12px 12px 40px; overflow-x: hidden; }
  .card-head { padding: 11px 12px; }
  .card-body { padding: 12px; }

  /* 表单/网格统一单列 */
  .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: 1fr; }
  .filters .field { min-width: 0; flex: 1 1 45%; }
  .filters .field.grow { flex: 1 1 100%; }

  /* 表格：容器内横向滚动，宽表不再撑破屏幕 */
  .card-body.tight { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.tbl { min-width: 560px; }

  /* 弹窗铺满可用宽度 */
  .modal { width: auto; margin: 12px; max-width: none; }
  .modal.narrow { width: auto; }
}

/* ================= 中等宽度适配（手机横屏 / 小平板） =================
 * 用「视口宽度」而非「设备方向」触发，避免手机开了旋转锁定、
 * 或微信/某些浏览器锁定竖屏时 orientation 媒体查询不生效的问题。
 * 手机横过来后视口宽度会变大（典型 560~1024），此时侧栏常驻左侧窄栏、
 * 右侧内容满屏，菜单和列表同屏可见，看报表、操作都更方便。 */
@media (min-width: 560px) and (max-width: 1024px) {
  .layout { height: 100dvh; }
  /* 侧栏回到文档流，常驻左侧（不再 fixed 抽屉） */
  .sidebar {
    position: relative;
    transform: none;
    width: 200px;
    max-width: 200px;
    height: 100dvh;
    box-shadow: none;
    transition: none;
    overflow-y: auto;
  }
  .sidebar.open { transform: none; }
  /* 内容紧贴侧栏右侧，不再留 216 空白 */
  .main { margin-left: 0; }
  /* 侧栏已常驻，隐藏汉堡按钮与遮罩 */
  .topbar-left { display: none; }
  .hamburger { display: none; }
  .sb-mask { display: none !important; }
  /* 顶栏略矮，多让出纵向空间 */
  .topbar { height: 50px; padding: 0 14px; }
  .content { padding: 12px 14px 28px; overflow-x: hidden; }
  /* 横屏较宽，表单/网格两列排布更合理 */
  .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: repeat(2, 1fr); }
  .filters .field { min-width: 0; flex: 1 1 30%; }
  .filters .field.grow { flex: 1 1 100%; }
  /* 宽表在横屏可横向滚动查看 */
  table.tbl { min-width: 480px; }
  .card-body.tight { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* 弹窗限高，横屏不会被顶破 */
  .modal-mask { padding: 14px; align-items: center; }
  .modal { max-height: 92vh; overflow-y: auto; }
  .modal.narrow { width: auto; }
}

/* ================= 自动模式：真正跟随手机物理方向（竖放/横放）自由切换 =================
 * 用 orientation 媒体查询直接读取设备当前方向，旋转手机即重排，不依赖具体宽度。
 * 仅 max-width:1024px 生效；桌面不受影响。强制竖屏/横屏（orient-* 类，特异性更高）仍优先。 */
@media (max-width: 1024px) and (orientation: portrait) {
  .layout { height: auto; min-height: 100dvh; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 80%; max-width: 300px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 30px rgba(15,23,42,.45); z-index: 20; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar-left { display: flex; flex: 1; min-width: 0; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer; }
  .sb-mask { display: block !important; position: fixed; inset: 0; z-index: 19; background: rgba(15,23,42,.45); }
  .content { padding: 12px; overflow-x: hidden; }
  .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: 1fr; }
  .filters .field { min-width: 0; flex: 1 1 45%; }
  .filters .field.grow { flex: 1 1 100%; }
  table.tbl { min-width: 560px; }
  .modal { width: auto; margin: 12px; max-width: none; }
  .modal.narrow { width: auto; }
}
@media (max-width: 1024px) and (orientation: landscape) {
  .layout { height: 100dvh; }
  .sidebar { position: relative; transform: none; width: 200px; max-width: 200px; height: 100dvh; box-shadow: none; transition: none; overflow-y: auto; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .topbar-left, .hamburger, .sb-mask { display: none !important; }
  .topbar { height: 50px; padding: 0 14px; }
  .content { padding: 12px 14px 28px; overflow-x: hidden; }
  .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: repeat(2, 1fr); }
  .filters .field { min-width: 0; flex: 1 1 30%; }
  .filters .field.grow { flex: 1 1 100%; }
  .card-body.tight { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.tbl { min-width: 480px; }
  .modal-mask { padding: 14px; align-items: center; }
  .modal { max-height: 92dvh; overflow-y: auto; }
  .modal.narrow { width: auto; }
}

/* ================= 自动模式：JS 实时方向类（is-landscape / is-portrait，覆盖微信等不触发 orientation 媒体查询的内核） =================
 * 仅 max-width:1024px 生效；与上面的 orientation 媒体查询互为补充，桌面不受影响。
 * 强制竖屏/横屏（orient-* 类）优先级更高，仍由其后规则控制。 */
@media (max-width: 1024px) {
.is-portrait .layout { height: auto; min-height: 100dvh; }
.is-portrait .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 80%; max-width: 300px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 30px rgba(15,23,42,.45); z-index: 20; }
.is-portrait .sidebar.open { transform: translateX(0); }
.is-portrait .main { margin-left: 0; }
.is-portrait .topbar-left { display: flex; flex: 1; min-width: 0; }
.is-portrait .hamburger { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer; }
.is-portrait .sb-mask { display: block !important; position: fixed; inset: 0; z-index: 19; background: rgba(15,23,42,.45); }
.is-portrait .content { padding: 12px; overflow-x: hidden; }
.is-portrait .grid.g2, .is-portrait .grid.g3, .is-portrait .grid.g4 { grid-template-columns: 1fr; }
.is-portrait .filters .field { min-width: 0; flex: 1 1 45%; }
.is-portrait .filters .field.grow { flex: 1 1 100%; }
.is-portrait table.tbl { min-width: 560px; }
.is-portrait .modal { width: auto; margin: 12px; max-width: none; }
.is-portrait .modal.narrow { width: auto; }

.is-landscape .layout { height: 100dvh; }
.is-landscape .sidebar { position: relative; transform: none; width: 200px; max-width: 200px; height: 100dvh; box-shadow: none; transition: none; overflow-y: auto; }
.is-landscape .sidebar.open { transform: none; }
.is-landscape .main { margin-left: 0; }
.is-landscape .topbar-left, .is-landscape .hamburger, .is-landscape .sb-mask { display: none !important; }
.is-landscape .topbar { height: 50px; padding: 0 14px; }
.is-landscape .content { padding: 12px 14px 28px; overflow-x: hidden; }
.is-landscape .grid.g2, .is-landscape .grid.g3, .is-landscape .grid.g4 { grid-template-columns: repeat(2, 1fr); }
.is-landscape .filters .field { min-width: 0; flex: 1 1 30%; }
.is-landscape .filters .field.grow { flex: 1 1 100%; }
.is-landscape .card-body.tight { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.is-landscape table.tbl { min-width: 480px; }
.is-landscape .modal-mask { padding: 14px; align-items: center; }
.is-landscape .modal { max-height: 92dvh; overflow-y: auto; }
.is-landscape .modal.narrow { width: auto; }
}

/* ================= 手机版面：用户自选竖屏 / 横屏（仅小屏生效，桌面不受影响） =================
 * 默认（orient-auto）沿用上面的尺寸自适应；用户可在手机右下角按钮切换：
 *   - 横屏优先：即使手机竖握，也用「左侧窄栏 + 右侧两列」的横屏式，看报表/操作更顺手；
 *   - 竖屏优先：即使手机横握，也用「抽屉 + 单列」的竖屏式。
 * body 上的 orient-* 类由 app.js 根据个人偏好（mobileLayout）写入。 */
.orient-fab { display: none; }
@media (max-width: 1024px) {
  .orient-fab {
    position: fixed; right: 14px; bottom: 16px; z-index: 40;
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  }
  .orient-btn {
    width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-strong);
    background: var(--ink); color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
    box-shadow: 0 6px 18px rgba(15,23,42,.28); display: flex; align-items: center; justify-content: center;
  }
  .orient-pop {
    background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px;
    box-shadow: 0 10px 30px rgba(15,23,42,.22); display: flex; flex-direction: column; gap: 6px; min-width: 136px;
  }
  .orient-opt {
    border: 1px solid var(--border); background: #fff; color: #334155; padding: 8px 12px;
    border-radius: 8px; font-size: 13px; cursor: pointer; text-align: left; white-space: nowrap;
  }
  .orient-opt.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }

  .pop-title { font-size: 12px; color: #94a3b8; padding: 4px 2px 0; }
  .zoom-ctl { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
  .zoom-btn {
    width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
    background: #fff; color: #334155; font-size: 18px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .zoom-btn:active { background: #f1f5f9; }
  .zoom-val { min-width: 46px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; color: #334155; }
  .zoom-reset {
    margin-left: 2px; border: 1px solid var(--border); background: #fff; color: #334155;
    padding: 7px 10px; border-radius: 8px; font-size: 12px; cursor: pointer; white-space: nowrap;
  }
  .zoom-reset:active { background: #f1f5f9; }

  /* 微信内横屏引导条（仅小屏显示，可关闭） */
  .wx-hint {
    position: fixed; left: 12px; right: 12px; bottom: 74px; z-index: 41;
    background: var(--ink, #1f3b63); color: #fff; font-size: 12.5px; line-height: 1.55;
    padding: 10px 36px 10px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.3);
  }
  .wx-hint .x { position: absolute; top: 4px; right: 8px; cursor: pointer; font-size: 18px; line-height: 1; opacity: .85; }
  .pop-note { font-size: 11px; color: #b91c1c; padding: 4px 2px 2px; line-height: 1.5; }

  /* 横屏优先：强制左侧窄栏 + 两列（覆盖竖屏抽屉） */
  .orient-landscape .layout { height: 100dvh; }
  .orient-landscape .sidebar {
    position: relative; transform: none; width: 200px; max-width: 200px; height: 100dvh;
    box-shadow: none; transition: none; overflow-y: auto;
  }
  .orient-landscape .main { margin-left: 0; }
  .orient-landscape .topbar-left, .orient-landscape .hamburger, .orient-landscape .sb-mask { display: none !important; }
  .orient-landscape .topbar { height: 50px; padding: 0 14px; }
  .orient-landscape .content { padding: 12px 14px 28px; overflow-x: hidden; }
  .orient-landscape .grid.g2, .orient-landscape .grid.g3, .orient-landscape .grid.g4 { grid-template-columns: repeat(2, 1fr); }
  .orient-landscape table.tbl { min-width: 480px; }
  .orient-landscape .modal { max-height: 92dvh; overflow-y: auto; }

  /* 竖屏优先：强制抽屉 + 单列（覆盖横屏左栏） */
  .orient-portrait .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: 80%; max-width: 300px;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 30px rgba(15,23,42,.45); z-index: 20;
  }
  .orient-portrait .sidebar.open { transform: translateX(0); }
  .orient-portrait .main { margin-left: 0; }
  .orient-portrait .topbar-left { display: flex; flex: 1; min-width: 0; }
  .orient-portrait .hamburger {
    display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px;
    border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer;
  }
  .orient-portrait .sb-mask { display: block !important; position: fixed; inset: 0; z-index: 19; background: rgba(15,23,42,.45); }
  .orient-portrait .content { padding: 12px; overflow-x: hidden; }
  .orient-portrait .grid.g2, .orient-portrait .grid.g3, .orient-portrait .grid.g4 { grid-template-columns: 1fr; }
  .orient-portrait table.tbl { min-width: 560px; }
}

