/* webapp/static/css/app.css
   pdf2excel Web 设计系统：本地 Bootstrap 5.3 之上做主题化，不依赖任何外网 CDN。
   结构：变量 → 基础 → 布局骨架 → 组件 → 工作台编辑器 → 页面级样式。 */

:root {
  --app-primary: #2f5bff;
  --app-primary-dark: #2445d6;
  --app-primary-soft: #eef2ff;
  --app-ink: #16213a;
  --app-ink-2: #4a5878;
  --app-muted: #8593ad;
  --app-line: #e4e9f4;
  --app-bg: #f5f7fc;
  --app-card: #ffffff;
  --app-ok: #18a25c;
  --app-warn: #e8a020;
  --app-bad: #d93a45;
  --app-sidebar: #14203c;
  --app-sidebar-2: #1b2b52;
  --app-radius: 14px;
  --app-shadow: 0 1px 2px rgba(22, 33, 58, .06), 0 8px 24px rgba(22, 33, 58, .06);
  --app-font: "Segoe UI", "Helvetica Neue", Arial, "Hiragino Sans",
    "Yu Gothic UI", "Noto Sans CJK JP", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

/* ── Bootstrap 主色覆盖（仅覆盖必要组件，其余保持原生行为）────────────── */
.btn-primary {
  --bs-btn-bg: var(--app-primary);
  --bs-btn-border-color: var(--app-primary);
  --bs-btn-hover-bg: var(--app-primary-dark);
  --bs-btn-hover-border-color: var(--app-primary-dark);
  --bs-btn-active-bg: var(--app-primary-dark);
  --bs-btn-active-border-color: var(--app-primary-dark);
  --bs-btn-disabled-bg: #9db2ff;
  --bs-btn-disabled-border-color: #9db2ff;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-disabled-color: #fff;
}
.btn-outline-primary {
  --bs-btn-color: var(--app-primary);
  --bs-btn-border-color: #c3cffd;
  --bs-btn-hover-bg: var(--app-primary);
  --bs-btn-hover-border-color: var(--app-primary);
  --bs-btn-active-bg: var(--app-primary-dark);
}
.btn-success { --bs-btn-bg: var(--app-ok); --bs-btn-border-color: var(--app-ok);
  --bs-btn-hover-bg: #149052; --bs-btn-hover-border-color: #149052; }
.btn-danger { --bs-btn-bg: var(--app-bad); --bs-btn-border-color: var(--app-bad);
  --bs-btn-hover-bg: #c3343d; --bs-btn-hover-border-color: #c3343d; }
.text-primary { color: var(--app-primary) !important; }
.text-success { color: var(--app-ok) !important; }
.link-primary { color: var(--app-primary); }
.form-check-input:checked { background-color: var(--app-primary); border-color: var(--app-primary); }
.form-control:focus, .form-select:focus {
  border-color: #a9baff; box-shadow: 0 0 0 .2rem rgba(47, 91, 255, .12);
}
.nav-pills .nav-link.active { background: var(--app-primary); }
.dropdown-item.active, .dropdown-item:active { background: var(--app-primary); }
.page-link { color: var(--app-primary); }
.page-item.active .page-link {
  background: var(--app-primary); border-color: var(--app-primary); color: #fff;
}

/* ── 基础 ─────────────────────────────────────────────────────────── */
* { scrollbar-width: thin; }
html, body { height: 100%; }
body {
  font-family: var(--app-font);
  background: var(--app-bg);
  color: var(--app-ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-weight: 650; letter-spacing: -.01em; color: var(--app-ink); }
a { text-decoration: none; }
.app-mono, .cell-num { font-variant-numeric: tabular-nums; }
.muted { color: var(--app-muted); }
.divider { height: 1px; background: var(--app-line); margin: 18px 0; }

/* ── 布局骨架：左侧固定导航 + 右侧内容 ─────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
  width: 236px; flex: 0 0 236px;
  background: linear-gradient(180deg, var(--app-sidebar) 0%, var(--app-sidebar-2) 100%);
  color: #cdd6ea;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px; color: #fff;
}
.sidebar-brand .brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #4f7cff, #2f5bff 60%, #153fd0);
  display: grid; place-items: center; font-size: 17px; color: #fff;
  box-shadow: 0 6px 16px rgba(47, 91, 255, .4);
}
.sidebar-brand .brand-text { line-height: 1.15; }
.sidebar-brand .brand-title { font-size: 15px; font-weight: 700; }
.sidebar-brand .brand-sub { font-size: 11px; color: #8ea0c9; }

.side-group { padding: 6px 12px; }
.side-label {
  font-size: 11px; letter-spacing: .08em; color: #7f90b8;
  padding: 10px 8px 6px; text-transform: uppercase;
}
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; color: #c6d1ea;
  font-weight: 500; margin-bottom: 2px; transition: .16s;
}
.side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-link.active {
  background: rgba(79, 124, 255, .2); color: #fff;
  box-shadow: inset 3px 0 0 var(--app-primary);
}
.side-link .bi { font-size: 16px; opacity: .9; }
.side-link .side-badge {
  margin-left: auto; font-size: 10px; padding: 2px 7px; border-radius: 20px;
  background: rgba(255, 255, 255, .14); color: #dbe4ff;
}
.sidebar-foot {
  margin-top: auto; padding: 14px 18px; font-size: 11px; color: #7f90b8;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-foot .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--app-ok); margin-right: 6px; }

.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
  height: 60px; background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--app-line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(160%) blur(8px);
}
.topbar-title { font-size: 16px; font-weight: 680; }
.topbar-crumb { font-size: 12px; color: var(--app-muted); }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px;
  border-radius: 30px; border: 1px solid var(--app-line); background: #fff;
  cursor: pointer; transition: .16s;
}
.user-chip:hover { border-color: #c3cffd; box-shadow: var(--app-shadow); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  background: linear-gradient(135deg, #4f7cff, #153fd0); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.avatar-lg { width: 46px; height: 46px; flex: 0 0 46px; font-size: 18px; }

/* ── 中/日切换（胶囊分段控件）───────────────────────────────────── */
.lang-form { display: inline-flex; margin: 0; }
.lang-seg {
  display: inline-flex; border: 1px solid var(--app-line); border-radius: 999px;
  overflow: hidden; background: #f4f7fd;
}
.lang-btn {
  border: 0; background: transparent; color: var(--app-muted);
  font: 620 12px/1 var(--app-font); padding: 7px 12px; cursor: pointer; transition: .16s;
}
.lang-btn + .lang-btn { border-left: 1px solid var(--app-line); }
.lang-btn:hover { color: var(--app-ink); }
.lang-btn.active { background: var(--app-primary); color: #fff; }

.page-main { padding: 22px; flex: 1 1 auto; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h4 { margin: 0; font-size: 20px; }
.page-head .page-desc { color: var(--app-muted); font-size: 13px; }
.page-head .spacer { flex: 1 1 auto; }

/* ── 卡片与统计 ───────────────────────────────────────────────────── */
.card-app {
  background: var(--app-card); border: 1px solid var(--app-line);
  border-radius: var(--app-radius); box-shadow: var(--app-shadow);
}
.card-app > .card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--app-line);
  display: flex; align-items: center; gap: 10px; font-weight: 620;
}
.card-app > .card-head .bi { color: var(--app-primary); }
.card-app > .card-body-app { padding: 18px; }

.stat-card {
  background: var(--app-card); border: 1px solid var(--app-line);
  border-radius: var(--app-radius); padding: 15px 16px; height: 100%;
  box-shadow: var(--app-shadow); position: relative; overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; right: -18px; top: -18px;
  width: 74px; height: 74px; border-radius: 50%; background: var(--app-primary-soft);
}
.stat-card .stat-label { font-size: 12px; color: var(--app-muted); position: relative; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; line-height: 1.25;
  font-variant-numeric: tabular-nums; position: relative; }
.stat-card .stat-note { font-size: 11.5px; color: var(--app-ink-2); position: relative; }
.stat-card .stat-ico {
  position: absolute; right: 14px; bottom: 12px; font-size: 20px;
  color: var(--app-primary); opacity: .55; z-index: 1;
}

/* ── 表格 ─────────────────────────────────────────────────────────── */
.table-app { --bs-table-bg: transparent; width: 100%; margin: 0; font-size: 13px; }
.table-app thead th {
  background: #f8fafd; color: var(--app-ink-2); font-weight: 600; font-size: 12px;
  letter-spacing: .02em; border-bottom: 1px solid var(--app-line);
  padding: 10px 12px; white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
.table-app tbody td { padding: 11px 12px; border-bottom: 1px solid #eff3fa;
  vertical-align: middle; }
.table-app tbody tr:hover { background: #f9fbff; }
.table-app .cell-strong { font-weight: 600; color: var(--app-ink); }
.table-app .cell-num { font-variant-numeric: tabular-nums; text-align: right; }
/* 滚动条外观与工作台预览区同一套（见下面 .content-area 那组规则） */
.table-wrap-app { max-height: 62vh; overflow: auto; border-radius: 10px; }

/* 列表卡片撑满剩余视口：行数少时不会缩成屏幕中间的一小块框，
   行数多时仍在卡片内部滚动、表头吸顶。
   202 = 顶栏 60 + page-main 上内边距 22 + 过滤条 82 + 其下外边距 16 + 下内边距 22（实测值，
   卡头在卡片内部，故不在此列）；窄屏走下面的 height:auto 降级 */
.card-app.list-fill {
  display: flex; flex-direction: column;
  height: calc(100vh - 202px); min-height: 320px;
}
.card-app.list-fill > .table-wrap-app { flex: 1 1 auto; min-height: 0; max-height: none; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill-ok { background: #e6f7ee; color: #128a4e; }
.pill-bad { background: #fdecee; color: #c22a35; }
.pill-run { background: #eaf1ff; color: #2451c9; }
.pill-off { background: #eef1f7; color: #66738c; }
.pill-warn { background: #fff5e3; color: #a8720d; }

.empty-state { padding: 46px 20px; text-align: center; color: var(--app-muted); }
.empty-state .bi { font-size: 34px; opacity: .35; display: block; margin-bottom: 10px; }

/* ── 上传区 ───────────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed #c3cffd; border-radius: var(--app-radius);
  background: linear-gradient(180deg, #fbfcff, #f5f8ff);
  padding: 34px 20px; text-align: center; cursor: pointer; transition: .18s;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--app-primary); background: var(--app-primary-soft);
  transform: translateY(-1px);
}
.dropzone .dz-ico { font-size: 40px; color: var(--app-primary); opacity: .75; }
.dropzone .dz-title { font-size: 15px; font-weight: 640; margin-top: 8px; }
.dropzone .dz-hint { font-size: 12.5px; color: var(--app-muted); margin-top: 4px; }
.file-pill {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: #f4f7fd; border: 1px solid var(--app-line); border-radius: 10px;
}
.file-pill .bi { color: var(--app-ok); font-size: 18px; }

/* 进度环 */
.work-stage { text-align: center; padding: 46px 18px; }
.ring { width: 96px; height: 96px; margin: 0 auto 18px; }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring .bg { stroke: #e9eefb; }
.ring .fg { stroke: var(--app-primary); stroke-dasharray: 40 200;
  transform-origin: center; animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 工作台（预览/编辑）───────────────────────────────────────────── */
/* 工作台整体占满「视口 - 顶栏 60 - page-main 上下内边距 44」，
   校对内容只在右侧 .content-area 里滚，滚轮不会把整个页面带走 */
.work-view {
  display: none; flex-direction: column;
  height: calc(100vh - 104px); min-height: 420px;
}
.work-topbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  flex: 0 0 auto;
  padding: 12px 16px; background: #fff; border: 1px solid var(--app-line);
  border-radius: var(--app-radius); box-shadow: var(--app-shadow);
}
.work-topbar .wb-file { font-weight: 640; max-width: 46vw; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.work-body { display: flex; gap: 16px; margin-top: 16px; flex: 1 1 auto;
  min-height: 0; align-items: stretch; }
.page-nav {
  width: 190px; flex: 0 0 190px;
  background: #fff; border: 1px solid var(--app-line); border-radius: var(--app-radius);
  padding: 10px; overflow: auto; transition: flex-basis .18s ease, width .18s ease;
}
.page-nav .pn-title { font-size: 11px; color: var(--app-muted); padding: 4px 8px 8px;
  letter-spacing: .06em; text-transform: uppercase;
  display: flex; align-items: center; gap: 6px; }
.pn-fold { margin-left: auto; border: 0; background: transparent; padding: 0 2px;
  color: var(--app-muted); cursor: pointer; line-height: 1; }
.pn-fold:hover { color: var(--app-primary); }
.pn-fold .bi { display: inline-block; transition: transform .18s ease; }
.page-nav.folded .pn-fold .bi { transform: rotate(180deg); }
.pn-num { display: none; }
/* 收起：只留一条页码竖列，宽任务下能把横向空间让给校对区 */
.page-nav.folded { width: 46px; flex: 0 0 46px; padding: 10px 6px; }
.page-nav.folded .pn-text, .page-nav.folded .pn-label { display: none; }
.page-nav.folded .pn-title { justify-content: center; padding: 4px 0 8px; }
.page-nav.folded .pn-fold { margin: 0; }
.page-nav.folded .pn-num { display: inline; font-weight: 620; }
.page-nav.folded .page-btn { text-align: center; padding: 7px 2px; }
.page-btn {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 7px 10px; border-radius: 8px; font-size: 12.5px; color: var(--app-ink-2);
  margin-bottom: 2px; cursor: pointer; transition: .14s;
}
.page-btn:hover { background: #f2f5fc; color: var(--app-ink); }
.page-btn.active { background: var(--app-primary-soft); color: var(--app-primary-dark);
  font-weight: 620; }
.content-area { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding-right: 8px; }
.content-area::-webkit-scrollbar,
.table-wrap-app::-webkit-scrollbar { width: 10px; height: 10px; }
.content-area::-webkit-scrollbar-thumb,
.table-wrap-app::-webkit-scrollbar-thumb { background: #d7e0f5; border-radius: 8px;
  border: 3px solid transparent; background-clip: content-box; }
.content-area::-webkit-scrollbar-thumb:hover,
.table-wrap-app::-webkit-scrollbar-thumb:hover { background: #bcccee;
  background-clip: content-box; }
.page-section { margin-bottom: 26px; scroll-margin-top: 4px; }
.page-section > h5 {
  font-size: 14px; font-weight: 680; margin-bottom: 12px;
  padding-left: 11px; border-left: 3px solid var(--app-primary); color: var(--app-ink);
}

.block {
  background: #fff; border: 1px solid var(--app-line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(22, 33, 58, .04);
  transition: .16s;
}
.block:hover { border-color: #ccd7f5; box-shadow: var(--app-shadow); }
.block-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.block-badge {
  font-size: 11.5px; font-weight: 620; padding: 3px 9px; border-radius: 20px;
}
.badge-table { background: #e9f0ff; color: #2a4fbf; }
.badge-text { background: #eaf7ef; color: #1c7a48; }
.badge-image { background: #fdf1e3; color: #a86b12; }
.block-del {
  margin-left: auto; border: 1px solid transparent; background: transparent;
  color: var(--app-muted); width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
}
.block-del:hover { color: var(--app-bad); background: #fdecee; }
.tbl-toolbar { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tbl-toolbar button {
  border: 1px solid var(--app-line); background: #f8fafd; color: var(--app-ink-2);
  font-size: 11.5px; padding: 3px 9px; border-radius: 7px; cursor: pointer;
}
.tbl-toolbar button:hover { border-color: #c3cffd; color: var(--app-primary-dark);
  background: var(--app-primary-soft); }
.tbl-wrap { overflow: auto; border: 1px solid var(--app-line); border-radius: 10px; }
.tbl-wrap table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.tbl-wrap th, .tbl-wrap td {
  border: 1px solid #e8edf6; padding: 6px 9px; min-width: 60px; vertical-align: top;
}
.tbl-wrap th { background: #f6f8fd; font-weight: 620; color: var(--app-ink); }
.tbl-wrap td:focus, .tbl-wrap th:focus, .text-edit:focus {
  outline: 2px solid rgba(47, 91, 255, .35); outline-offset: -2px; background: #fffdf3;
}
.text-edit {
  min-height: 42px; padding: 9px 11px; border: 1px solid var(--app-line);
  border-radius: 9px; background: #fcfdff; font-size: 13px; line-height: 1.65;
  white-space: pre-wrap;
}
.img-preview { max-width: 100%; max-height: 340px; border-radius: 8px;
  border: 1px solid var(--app-line); background: #fff; }
.add-blocks { display: flex; gap: 8px; margin: 4px 0 22px; }
.save-flag { font-size: 12px; }

/* ── 登录页 ───────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-hero {
  background: linear-gradient(150deg, #14203c 0%, #1d2f5c 55%, #2f5bff 130%);
  color: #eaf0ff; padding: 54px 58px; display: flex; flex-direction: column;
}
.auth-hero .hero-logo { display: flex; align-items: center; gap: 12px; }
/* 通用标题色会压掉 .auth-hero 的浅色文字，这里必须继承，否则大屏上读不出 */
.auth-hero h1 { font-size: 30px; font-weight: 720; line-height: 1.3; margin: 26px 0 12px;
  color: inherit; }
.auth-hero p { color: #b7c6ea; font-size: 14px; max-width: 460px; line-height: 1.75; }
.auth-points { margin-top: auto; display: grid; gap: 14px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; font-size: 13px;
  color: #cdd8f2; }
.auth-point .bi { color: #7fa0ff; font-size: 18px; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: #fff;
  position: relative; }
/* 登录页的语言切换挂在右上角，不参与 auth-box 的居中布局 */
.auth-topbar { position: absolute; top: 18px; right: 22px; z-index: 2; }
.auth-box { width: 100%; max-width: 372px; }
.auth-box h2 { font-size: 22px; margin-bottom: 6px; }
.auth-box .auth-sub { color: var(--app-muted); font-size: 13px; margin-bottom: 24px; }
.form-label-app { font-size: 12.5px; font-weight: 620; color: var(--app-ink-2);
  margin-bottom: 5px; }
.form-control-app {
  border: 1px solid #dfe5f1; border-radius: 10px; padding: 10px 13px; font-size: 14px;
}
.input-group-app { position: relative; }
.input-group-app .toggle-pwd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--app-muted); cursor: pointer;
}
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}

/* ── 过滤条 / 详情页 ──────────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  padding: 14px 16px; background: #fff; border: 1px solid var(--app-line);
  border-radius: var(--app-radius); margin-bottom: 16px;
}
.filter-bar .fld { display: flex; flex-direction: column; gap: 4px; }
.filter-bar .fld label { font-size: 11.5px; color: var(--app-muted); font-weight: 600; }
.filter-bar .grow { flex: 1 1 200px; min-width: 160px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 128px; padding-top: 8px; }
.bar-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center;
  gap: 4px; min-width: 0; }
.bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, #6b8dff, #2f5bff);
  border-radius: 5px 5px 2px 2px; min-height: 3px; transition: .2s; }
.bar-col:hover .bar { background: linear-gradient(180deg, #2f5bff, #153fd0); }
.bar-x { font-size: 10px; color: var(--app-muted); white-space: nowrap; }
.bar-v { font-size: 10.5px; font-weight: 640; color: var(--app-ink-2); }

.kv-list { display: grid; grid-template-columns: 128px 1fr; gap: 8px 14px; font-size: 13px; }
.kv-list dt { color: var(--app-muted); font-weight: 550; }
.kv-list dd { margin: 0; word-break: break-all; }

.kv-inline { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.kv-inline > span { background: #f4f6fb; border: 1px solid var(--app-line);
  border-radius: 6px; padding: 1px 7px; color: var(--app-ink); }
.kv-inline em { font-style: normal; color: var(--app-muted); margin-right: 5px; }

.call-line { display: flex; gap: 10px; align-items: center; font-size: 12.5px;
  padding: 8px 0; border-bottom: 1px dashed var(--app-line); }
.call-line:last-child { border-bottom: 0; }

.notice {
  border: 1px solid #ffe2b8; background: #fff9ec; color: #8a5b0d;
  border-radius: 10px; padding: 11px 14px; font-size: 13px;
}
.notice-app {
  border: 1px solid #c3cffd; background: var(--app-primary-soft); color: #24419c;
  border-radius: 10px; padding: 11px 14px; font-size: 13px;
}

/* ── 响应式 ───────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .page-nav { width: 150px; flex-basis: 150px; }
}
@media (max-width: 991px) {
  .app-sidebar { position: fixed; left: 0; top: 0; z-index: 1080;
    transform: translateX(-100%); transition: .2s; }
  .app-sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .page-main { padding: 16px; }
  /* 窄屏不做内部滚动：高度锁死会让可编辑区只剩几十像素，还是整页滚更好用 */
  .work-view { height: auto; min-height: 0; }
  .content-area { overflow-y: visible; padding-right: 0; }
  /* 同理，窄屏不给列表卡片锁高度，回到整页滚 */
  .card-app.list-fill { height: auto; min-height: 0; }
  .card-app.list-fill > .table-wrap-app { max-height: 70vh; }
  .work-body { flex-direction: column; }
  .page-nav { position: static; width: 100%; flex: 0 0 auto; display: flex;
    gap: 8px; overflow-x: auto; max-height: none; }
  .page-nav .pn-title { display: none; }
  /* 窄屏本来就是横排短条，没有可折叠的纵向空间 */
  .page-nav.folded { width: 100%; flex: 0 0 auto; padding: 10px; }
  .page-nav.folded .pn-label { display: inline; }
  .page-nav.folded .pn-num { display: none; }
  .page-nav.folded .page-btn { text-align: left; padding: 7px 10px; }
  .page-btn { white-space: nowrap; width: auto; margin: 0; }
  .work-topbar .wb-file { max-width: 100%; }
  .menu-toggle { display: inline-flex !important; }
}
.menu-toggle { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(10, 16, 32, .45); z-index: 1070;
  display: none; }
.scrim.show { display: block; }
